Coupled ODE-PDE systems, sovler?

1 view (last 30 days)
Robert
Robert on 18 Mar 2015
Answered: Torsten on 18 Mar 2015
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

Answers (1)

Torsten
Torsten on 18 Mar 2015
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.

Tags

Community Treasure Hunt

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

Start Hunting!