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