Use pdepe to solve an ode
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi everyone,
I am using the pdepe splver to solve a set of 2 pdes that arou coupled and it works great. However, I now want to couple another equation, which does not have a flux term. Therefore, by the pdepe notation,
m = 0, c = 1, f = 0, and s = u-1 (the s is just an example, not my actual s).
The problem is that pdepe discretization supports only parabolic and elliptic equations, with flux term involving spatial derivative.
How can I couple all three equations if two equations are pdes and one equation is ode.
Thank you!
댓글 수: 0
답변 (1개)
Torsten
2022년 6월 30일
So your equation is not a PDE, but a simple ODE.
Either you try to artificially set du/dx = 0 at both ends and see whether the results make sense.
Or you use Bill Greene's code who claims that ODEs can be handled therein.
Or - as you wrote that there is another problem with your equations that pdepe cannot handle (sigmoid function) - discretize your equations in space and use ODE15S to solve the resulting system of ordinary differential equations in the grid points. Look up "method-of-lines" for more details.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!