Azzera filtri
Azzera filtri

How to solve pde and ode together?

7 visualizzazioni (ultimi 30 giorni)
wei
wei il 3 Gen 2015
Commentato: Torsten il 6 Gen 2015
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).

Risposte (1)

Torsten
Torsten il 5 Gen 2015
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 Commenti
wei
wei il 5 Gen 2015
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 il 6 Gen 2015
Take a look at chapter 9 and 10 in
Best wishes
Torsten.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by