How to solve with Matlab a PDE with periodical boundary conditions.

11 views (last 30 days)
Dear,
I would like to solve the following PDE for the function u(x,t):
Du/Dt = (ia - 1)u + i([u]^2)u - ib(D²u/Dx²) + F
where i = sqrt(-1) and a,b,F are real quantities, known. And with the periodic boundary condition: u(x,t) = u(x+A,t) , being A the period. And a initial condition u(x,0) = f(x). With A and f(x) also known.
So far I couldn't find a function in Matlab to do so. I tried pdepe but it seems I cannot implement periodic boundary conditions.
What would be the best option to solve such PDE in Matlab?
Thanks alot for the help. Pablo

Answers (1)

Torsten
Torsten on 26 Jan 2015
Discretize your PDE in space and solve the resulting System of ordinary differential equations using ODE15s (method-of-lines approach).
Best wishes
Torsten.
  1 Comment
Maulik Shah
Maulik Shah on 30 Aug 2016
Hi Torsten, I have a fourth order PDE with periodic boundary conditions. I have discretized such an equation using central difference schemes in FDM. However, it gives me a 7 point stencil. As a result, I need 6 "guard" points. Do I also include equation for these 6 extra points in the function that is being solved using ode15s?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!