From: Feng on
I try to solve a PDE system fellowing the MATLAB help for using the pdepe().

My system is
dc1/dt = -v*dc1/dx - A/V1*(c1 - c2)
dc2/dt = A/V2*(c1-c2)

c1(0,x) = c2(0, x) = 0;
c1(t, 0) = 1-exp(-k*t);

I always got the oscillation solution, it is not what supposed to be.

Anybody can help me out? does that mean the pdepe() can not solve such system?

From: Bruno Luong on
"Feng" <nclxin(a)hotmail.com> wrote in message <ha0b8h$a3n$1(a)fred.mathworks.com>...
> I try to solve a PDE system fellowing the MATLAB help for using the pdepe().
>
> My system is
> dc1/dt = -v*dc1/dx - A/V1*(c1 - c2)
> dc2/dt = A/V2*(c1-c2)
>
> c1(0,x) = c2(0, x) = 0;
> c1(t, 0) = 1-exp(-k*t);

For this kind of pure convection pde it is better suitable to reformulate as ODE along the flow lines ("characteristic" flow or Lagrangian formulation). In this formulation, only ODE solver is needed.

For "eulerian" formulation using pde solver (as you did), it is preferably add a little viscosity term to make the solution numerically stable. There is a numerical trick called a "upwind" scheme which avoid the need of the viscosity (it's a limit of the viscosity solution when the viscosity goes to zero). Generally the pde scheme of used generic software (such as de toolbox) might not have the scheme implemented and - yes - it can be unstable for pure convection equation. But I don't know the toolbox well, so I stop my comment here.

Bruno