Coupled ODE-PDE systems, sovler?

1 次查看(过去 30 天)
Robert
Robert 2015-3-18
回答: Torsten 2015-3-18
Hi everyone,
I'm trying to code a coupled ODE-PDE model using the matlab ODE solvers, im trying to code 3 ODEs of the form
(1) dA/dt= F(B)+ D*(dA/dx)^2
(2) dB/dt= -F(B)+F(C)
(3) dC/dt= -F(C)
where F(B) in equations (1) & (2) are functions of B and F(C) in equations (2) & (3) are functions of C.
where D in equation (1) is a constant and (dA/dx)^2 is a double derivative in the spatial direction.
I can code a script using ode45 that works if I remove my diffusion term but im struggling to code a script including this term? I initially tried to discretize (dA/dx)^2 but then i couldnt find a way to recall A(j+1) A(j) and A(j-1) in the solver thanks

回答(1 个)

Torsten
Torsten 2015-3-18
There is no ready-to-use solver for a coupled ODE-PDE - system.
You will have to go the way you already tried: discretize the d^2A/dx^2-term in space.
This will give you 3*n ordinary differential equations where n is the number of grid points.
Use ODE15S to solve.
Best wishes
Torsten.

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by