Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

matlab PDE help needed

Status
Not open for further replies.

cprasad

Chemical
May 21, 2011
1
Need help !!

The partial differential equations to be solved in matlab are:

d(c1)/d(t) + u*d(c1)/dx = D1*(d/dx(d(c1)/d(x))) (for x=0 to x=1mm)
d(c2)/d(t) + u*d(c2)/dx = D2*(d/dx(d(c2)/d(x))) (for x=1mm to x=2mm)


the system is from x=0 to x=2 mm with an interface at x=1mm
So, there are two domains left domain(x=0 to x=1mm) and
right domain(x=1 to x=2mm)

C1 and C2 are concentration of the component in domain 1 and domain 2
In the left domain C1(t=0) = 500
In the right domain C2(t=0) = 0

As time starts the component starts to diffuse from domain 1 to 2 through the interface by diffusion

Boundary condition:
At the interface : D1*d(c1)/d(x) = D2*d(c2)/d(x)
At x=0mm : d(c1)/d(x)=0
At x=2mm : d(c2)/d(x)
The values of constants are:

u=0.05m/s
D1=1e-6 (10 raised to the power -6)
D2=1e-7

Solve for t=0 to t=3or4 seconds

I m new to matlab and don't have much idea about the partial differential equations
i tried but the program had some errors. I need to do it for my project ..but i m stuck...Can someone plz give the code..



Plz help


 
Replies continue below

Recommended for you

The built-in solvers work with ODE's. PDE's are more challenging.

Is it a homework problem?

=====================================
(2B)+(2B)' ?
 
your lucky, these equations are de-coupled and they have analytical solutiuons in each domain, subject to the matching conditions at the boundary.

suggest that you first solve the differential equation problem, i.e. set the d/dt terms to null, that will give you the equilibrium result. having done that you'll see your way forward,

as to the homework issue, if it involves solving pde's, most business managers start to roll their eyes and get interested in their cell phones, the common refrain is "gee this is like trigonometry..." oh well, what can you say

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor