필터 지우기
필터 지우기

How to solve pde and ode together?

조회 수: 7 (최근 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 CenterFile Exchange에서 1-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