Coupled ODE-PDE systems, sovler?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Torsten
am 18 Mär. 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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!