How to solve pde and ode together?
5 ビュー (過去 30 日間)
古いコメントを表示
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).
0 件のコメント
回答 (1 件)
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!