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

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

It's a very unusual boundary condition.
Neither pdepe nor the PDE toolbox will be able to handle it.
Where does it come from ? Are you sure it is adequate ?
Best wishes
Torsten.
So your question is not how to fully solve your differential equation, but rather how to treat this kind of problems numerically with MATLAB?
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

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

Here is an intro to MOL by Sadiku and Obiozor, with MATLAB code.
Hi Lei
Were you able to solve this problem? Im trying to solve a similar problem and would like to know how you did it
Regards
Edgar
Hi Edgar,
I followed Torsten's suggestions - discretized the PDE in space into a bunch of ODEs using the method of lines (MOL) and then solved the resulting system of ODEs. You can find an intro to MOL in Cedric's answer above.
Best, Lei
Hi Lei,
I'm facing a similar but more complicated problem, can you provide your code to couple the two equations.
Thanks in advance.
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)

Asked:

on 16 Dec 2015

Commented:

on 1 Apr 2019

Community Treasure Hunt

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

Start Hunting!