How to write function for my DAE system

5 views (last 30 days)
Thao Vu
Thao Vu on 10 Jun 2019
Hi,
I have my below system need to be solve but I dont know how to write a function to solve it. I tried ode15s and solve for F( dx1dt, x2, dx3dt. dx4dt, dx5dt, dx6dt).
Thanks in advance!
dX1dt = (-G/(vo*dg)).*(D*X1) + ((kg*av*Mm*pt).*(X2-X1))./(vo*dg);
X2 = -((dp).*f)./(12*kg);
dX3dt = (-G/(vo*dg)).*(D*X3) + ((hf*av).*(X4-X3))./(vo*dg*Cpg);
dX4dt = (6*hf.*(X3-X4))./(dp*Cps*ds)+(6.*(-Hh2).*kg.*X1)./(dp*Cps*ds)+((-Hni).*f)./(2*Cps*ds);
dX5dt = -f./ds;
dX6dt = ((-12.*kg).*X1)./(dp*ds);

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!