Solving coupled second and first order ODEs with ode45
Afficher commentaires plus anciens
I am looking to numerically solve these coupled ODEs
where both u and η are functions of a variable x only, with
, where
are the boundary conditions (with some pre-defined values for α, γ, d,
, and
).
I have found multiple different examples of previously asked questions with second-order coupled ODEs similar to mine, but none of them really help me understand the ode45 inputs I am supposed to use for my particular problem...
Réponses (1)
darova
le 10 Fév 2020
You should use bvp4c
Function for equations
function dy = myode(t,y)
u = y(1);
eta = y(2);
deta= y(3);
dy(1,1) = (deta-alpha*u^(2+gamma))/u; % du/dt
dy(2,1) = deta; % deta/dt
dy(3,1) = u0/u-exp(-eta); % d2eta/dt2
end
Function for boundary conditions
function res = bfun(y0,yd)
res = [y0(1)-u0 % u(0) == u0
y0(2) % eta(0) == 0
y0(3) % deta(0) == 0
yd(2)-eta_w];% eta(d) == eta_w
end
p.s. I like the way you organized the question
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!