Solve simultaneously 2 ODE & one Non linear algebraic equation. And all are dependent to each other. Is it possible to solve them in a single Function file in MATLAB ?

Example : dy/dt=z*x-2*y^2; dx/dt=x*z^2-sinh(y); z=x^2*y*asinh(z);
I need to solve it simultaneously and need plots between y vs. t & x vs.t & z vs.t

1 件のコメント

Daniel Jovin
Daniel Jovin 2018 年 2 月 23 日
Pujari, did you ever manage to solve this system? I am trying to solve a similar system myself.

サインインしてコメントする。

回答 (1 件)

Torsten
Torsten 2016 年 10 月 25 日
編集済み: Walter Roberson 2016 年 10 月 26 日
Take a look at the section "Solve Robertson Problem As Semi-Explicit Differential Algebraic Equations (DAEs)" under
Best wishes
Torsten.

5 件のコメント

PUJARI MURAGA
PUJARI MURAGA 2016 年 10 月 26 日
Thank you. But any other alternative solution available ?
Torsten
Torsten 2016 年 10 月 26 日
Why ? The example exactly does what you are searching for: it handles two differential equations and one algebraic equation simultaneously.
Best wishes
Torsten.
But actually this is not my original differential equations. My model equations containing 5 ODE & 2 Algebraic equations & that too 3 equations with if conditions. I was able to solve it using simulink but I need to do it in M-file also. How to do it now ? Is it still possible as you suggested ?
Torsten
Torsten 2016 年 11 月 3 日
Suitable solvers in MATLAB for DAE-systems are ode15s or ode15i. Usually, it is very important that your initial conditions for the solution variables are consistent, i.e. that the algebraic equations are satisfied when the initial values are inserted.
This is the only advice I can give because I don't know your specific DAE-system.
Best wishes
Torsten.
Okay.

サインインしてコメントする。

カテゴリ

タグ

質問済み:

2016 年 10 月 25 日

コメント済み:

2018 年 2 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by