How to solve pde and ode together?

5 ビュー (過去 30 日間)
wei
wei 2015 年 1 月 3 日
コメント済み: Torsten 2015 年 1 月 6 日
Dear everyone, I have a problem dealing with gas release from a solid phase to its surroundings (gas phase). To make it easy to understand, I want to make a example. There is a bottle contains oxygen, and I put a ball into it and close the bottle immediately. The ball starts to absorb oxygen until the ball and the gas phase in the bottle get in equilibrium. The governing equation of the ball can be described with a pde funtion (fick's law), while the gas phase is simple a ode function (only time dependent) because the time needed for equilibrium is very short. I know that we can use "pdepe" to solve the pde function and "ode45" for the ode function, My question is how to solve both functions simultaneously, as they are linked (the amount of oxygen absorbed by the ball is equal to the oxygen decreased in the gas phase).

回答 (1 件)

Torsten
Torsten 2015 年 1 月 5 日
Use the method of lines to transform your PDE into a system of ODEs and use an ODE integrator to solve the complete system (ODEs from PDE discretization + your additional ODE).
Best wishes
Torsten.
  2 件のコメント
wei
wei 2015 年 1 月 5 日
Thanks for the answer, but I am not clear for that. pde has two independent variables and how to convert it to odes?
Torsten
Torsten 2015 年 1 月 6 日
Take a look at chapter 9 and 10 in
Best wishes
Torsten.

サインインしてコメントする。

カテゴリ

Help Center および File Exchange1-D Partial Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by