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

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)

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

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.

Asked:

on 26 Jan 2015

Commented:

on 30 Aug 2016

Community Treasure Hunt

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

Start Hunting!