Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
solve pde system with permeability term

Subject: solve pde system with permeability term

From: Feng

Date: 30 Sep, 2009 19:24:01

Message: 1 of 2

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?
 

Subject: solve pde system with permeability term

From: Bruno Luong

Date: 30 Sep, 2009 19:49:02

Message: 2 of 2

"Feng" <nclxin@hotmail.com> wrote in message <ha0b8h$a3n$1@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

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us