Solving PDE involving boundary condition with partial derivatives with respect to space and time.

5 views (last 30 days)
Dear all,
I am trying to solve the following PDE (one-dimension diffusion):
with the following boundary condition :
I read the documentation here : http://www.mathworks.com/help/matlab/math/partial-differential-equations.html?refresh=true#f1-697925 and I saw that it works for boundary conditions that can be expressed as :
I don't know how to express my boundary condition under this form, since it contains two partial derivatives. How to address this problem properly?
Thank you.
PS: I have quite a few libraries available, but not the PDE toolbox.
  3 Comments
Cedric
Cedric on 17 Dec 2015
So your question is not how to fully solve your differential equation, but rather how to treat this kind of problems numerically with MATLAB?
Lei Huang
Lei Huang on 17 Dec 2015
Edited: Lei Huang on 17 Dec 2015
Hi Torsten,
Thanks for your comments! I'm modeling the emission of chemicals from a material placed indoor and here's a diagram of the system:
The PDE describes the dynamics of the chemical concentration in the material. Initial condition is that the chemical is uniformly distributed throughout the material:
The first boundary condition assumes that there's no flux out of the base of the material:
The other boundary condition is imposed through a mass balance on the chemical in the room air:
And we assumed that equilibrium exists between the chemical concentration in the surface layer of the material and the room air:
Combining the above two equations we get the "strange" boundary condition that I mentioned.
The whole system is described in this article http://www.sciencedirect.com/science/article/pii/1352231094900973
I think this system is solvable because the author gave an analytical solution to it. Does anybody have experience solving this kind of problems numerically? Any hints will be appreciated!
Best, Lei

Sign in to comment.

Accepted Answer

Torsten
Torsten on 18 Dec 2015
Edited: Torsten on 18 Dec 2015
In principle, your boundary condition for C is
C|x=L = y*K_v
together with an ordinary differential equation for y that has to be solved simultaneously with your PDE
V*dy/dt = -D*A*dC/dx|x=L - Vdot*(y-y_in).
The solution of this ordinary differential equation is not possible within pdepe.
But it should be no problem to discretize the PDE in space and solve the resulting system of ordinary differential equations together with the ordinary differential equation for y using ODE15S, e.g. (method-of-lines).
Maybe you have access to COMSOL Multiphysics. With this program, you can easily couple the PDE with the above boundary ODE.
Best wishes
Torsten.
  6 Comments
CHORFi Salah
CHORFi Salah on 27 Jan 2019
Hi Lei,
I'm facing a similar but more complicated problem, can you provide your code to couple the two equations.
Thanks in advance.
Lei Huang
Lei Huang on 1 Apr 2019
Hi all,
I was able to discretize the system using Method-of-Lines and solve it numerically, but I've encountered instability problems with this solution. If interested please check out my new question here: https://www.mathworks.com/matlabcentral/answers/453710-instability-in-method-of-lines-discretization-of-a-1-d-diffusion-problem
Thanks, Lei

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!