System of PDEs which is tricky for PDEPE
8 次查看(过去 30 天)
显示 更早的评论
I have a system of PDEs, mainly diffusion equations of the form:
T_t-(k(x)(T_x)_x=a*E^2
c_t-(D(x)*c_x)_x=d*(E_x+c_x-T_x)
(epsilon*E)_x=-b*c
Where a and d are constants and _t,_x represent partial differentiation w.r.t. t and x respectively. In terms of pdepe, I would have: f=0 for the third equation. Would this cause errors in the code?
I'm also struggling to see how I can input the boundary conditions.
Any suggestions?
5 个评论
Bill Greene
2018-5-24
Do you mean T=0 at the boundaries? What about the initial conditions on the three variables? At t=0, the boundary and initial conditions must be consistent and also satisfy your differential equations.
回答(5 个)
Torsten
2018-5-23
编辑:Torsten
2018-5-23
"pdepe" is designed to solve systems of parabolic-elliptic pdes. Your third pde is hyperbolic in nature. Thus "pdepe" is not suited to solve your system.
You will have to discretize your equations in space and solve the resulting system of ordinary differential equations using ODE15S.
Look up "method-of-lines" for more details.
Best wishes
Torsten.
2 个评论
Torsten
2018-5-23
Since "pdefun" is called only for a single value of x, you don't have the complete vector for c available. Thus no chance to calculate E, I guess.
Torsten
2018-5-24
You could try to use "pdepe" with the third equation differentiated:
(epsilon*E)_xx=-b*c_x
with Dirichlet boundary condition
E = E0
at one end of the interval and
(epsilon*E)_x + b*c=0
at the opposite end.
Best wishes
Torsten.
3 个评论
Torsten
2018-5-24
But the E_x and T_x terms in the diffusion equation for c will be put in the source term s for this equation, not in the f-term.
Precise Simulation
2018-6-9
Systems of PDEs might also be easier to solve with the FEATool FEM Toolbox which features a GUI and easy syntax for defining custom PDEs and equations. This example of heat transport and diffusion might be a good start, otherwise you could perhaps use the built-in convection and diffusion physics mode and modify it according to your equations.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!