Solving a PDE withconditions not situated on the left and right boundaries

I was able to solve a PDE using function pdepe. Currently my boundary conditions are situated at the left and right boundaries, that is at x=0 and x=L. However, the solution of my PDE is such that, with time, it should quickly overcome the boundaries, with values at x<0 and x>L. How do I implement this?

Answers (2)

Transform your equation to the new coordinate x* such that the boundaries become 0 and 1 for all times t:
x* = (x-lower(t))/(upper(t)-lower(t))
where lower(t) and upper(t) are the lower and upper boundaries at time t.
This will give you a PDE over the fixed interval [0;1] which can be handled by pdepe.
Best wishes
Torsten.
Thank you Torsten. The problem though is my boundary conditions remain, at all times, at the initial x=0 and x=L. In the new coordinate system x* that you suggest to create, the boundary conditions are not on the left and right of interval, so it looks like I cannot use pdepe anymore.

Asked:

on 5 Oct 2015

Answered:

on 6 Oct 2015

Community Treasure Hunt

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

Start Hunting!