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
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