How to solve coupled differential equations using ode45
Show older comments
Hi all,
I have four couples ODE's to be solved the equations can be seen in the attachment with boundary conditions.
I am having diffuculties in solving them using ODE 45.
Do you have any idea about how I can solve these ODE's.
Thanks in advence
2 Comments
darova
on 10 Mar 2019
Can you please rewrite your equations like:
And describe what constants and variables are?
Star Strider
on 10 Mar 2019
Do something like this to convert your system to an anonymous function:
syms delta rho_l h_lv phi w_fg v_lp_l delatPrime P_v Y
... CODE ...
[VF, Sbs] = odeToVectorField(ode1, ode2, ode3, ode4);
odesys = matlabFunction(VF, 'Vars',{t, Y, [delta, rho_l, h_lv, phi, w_fg, v_l, p_l, delatPrime, P_v]});
then use bvp4c to do the integration with your chosen boundary conditions.
See the documentation for bvp4c and the other functions I use here to understand how to use them with your system.
Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!