- #1
AiRAVATA
- 173
- 0
Hey guys, I'm having a conceptual problem implementing the Crank-Nicolson scheme to a PDE with nonlinear boundary conditions.
The problem is the following:
[tex]
u_t + u_{xxxx} = 0,
[/tex]
[tex] u(0,t) = 1,\quad u_x(0,t) = 0, \quad u_{xx}(1,t) = 0,[/tex]
[tex]
u_t(1,t) - u_{xxx}(1,t) = f\bigl(u(1,t)\bigr).
[/tex]
Taking m points in space and denoting [itex]u(x_j,t^i) = u_j^i[/itex], I have, for the linear part:
[tex]
u_{-1}^i = u_0^i = 1, \quad u_{m+1}^i - 2 u_m^i + u_{m-1}^i = 0,
[/tex]
and
[tex]
u^{i+1}_{j-2} - 4 u^{i+1}_{j-1} + \Bigl(6 + \frac{2 k^4}{h}\Bigr) u^{i+1}_{j} - 4 u^{i+1}_{j+1} + u^{i+1}_{j+2} = -u^{i}_{j-2} + 4 u^{i}_{j-1} - \Bigl(6 - \frac{2 k^4}{h}\Bigr) u^{i}_{j} + 4 u^{i}_{j+1} - u^{i}_{j+2}, \quad 0 < j < m,
[/tex]
and for the nonlinear part,
[tex]
u^{i+1}_{m-2} - 2 u^{i+1}_{m-1} + \Bigl(\frac{4 k^3}{h} - 2k^3 f'(u_m^i)\Bigr) u_m^{i+1} + 2 u^{i+1}_{m+1} - u_{m+2}^{i+1} = -u^{i}_{m-2} + 2 u^{i}_{m-1} + \Bigl(\frac{4 k^3}{h} - 2k^3 f'(u_m^i)\Bigr) u_m^i - 2 u^{i}_{m+1} + u_{m+2}^{i} + 4k^3f(u_m^i),
[/tex]
where k is the step in space and h is the step in time.
Now, I have m+1 equations with m+2 unknowns so, where is my missing equation?
Should I add an artificial "free boundary" condition to the right of the point m, or I should extend the PDE to the right boundary (allowing j = m)?
I'm doing something wrong?
---EDIT---
I suppose that taking [itex]u_{xxx}(1^-,t) = u_{xxx}(1,t)[/itex] will close the sistem correctly by modifying the last equation.
The problem is the following:
[tex]
u_t + u_{xxxx} = 0,
[/tex]
[tex] u(0,t) = 1,\quad u_x(0,t) = 0, \quad u_{xx}(1,t) = 0,[/tex]
[tex]
u_t(1,t) - u_{xxx}(1,t) = f\bigl(u(1,t)\bigr).
[/tex]
Taking m points in space and denoting [itex]u(x_j,t^i) = u_j^i[/itex], I have, for the linear part:
[tex]
u_{-1}^i = u_0^i = 1, \quad u_{m+1}^i - 2 u_m^i + u_{m-1}^i = 0,
[/tex]
and
[tex]
u^{i+1}_{j-2} - 4 u^{i+1}_{j-1} + \Bigl(6 + \frac{2 k^4}{h}\Bigr) u^{i+1}_{j} - 4 u^{i+1}_{j+1} + u^{i+1}_{j+2} = -u^{i}_{j-2} + 4 u^{i}_{j-1} - \Bigl(6 - \frac{2 k^4}{h}\Bigr) u^{i}_{j} + 4 u^{i}_{j+1} - u^{i}_{j+2}, \quad 0 < j < m,
[/tex]
and for the nonlinear part,
[tex]
u^{i+1}_{m-2} - 2 u^{i+1}_{m-1} + \Bigl(\frac{4 k^3}{h} - 2k^3 f'(u_m^i)\Bigr) u_m^{i+1} + 2 u^{i+1}_{m+1} - u_{m+2}^{i+1} = -u^{i}_{m-2} + 2 u^{i}_{m-1} + \Bigl(\frac{4 k^3}{h} - 2k^3 f'(u_m^i)\Bigr) u_m^i - 2 u^{i}_{m+1} + u_{m+2}^{i} + 4k^3f(u_m^i),
[/tex]
where k is the step in space and h is the step in time.
Now, I have m+1 equations with m+2 unknowns so, where is my missing equation?
Should I add an artificial "free boundary" condition to the right of the point m, or I should extend the PDE to the right boundary (allowing j = m)?
I'm doing something wrong?
---EDIT---
I suppose that taking [itex]u_{xxx}(1^-,t) = u_{xxx}(1,t)[/itex] will close the sistem correctly by modifying the last equation.
Last edited: