How to structure my DAE problem

Hi Matlab community. I do not know how to formulate a DAE problem. I want to simulate a two liquid phase mixture in which reactions occur in the two phases. I have 8 components, which means that there is an array of 16 elements (I have two liquid phases). Here the differential equations y'= [ k1.*y(2).*y(3)-k2.*y(1).*y(4); -(k1.*y(2).*y(3)-k2.*y(1).*y(4)); -(k1.*y(2).*y(3)-k2.*y(1).*y(4)); k1.*y(2).*y(3)-k2.*y(1).*y(4); 0; 0; 0; 0; 0; 0; 100.*y(12).*y(13); -100.*y(12).*y(13); 0; 0; 0; 0;]
the algebraic equations are the mass balances of each component in the two phases, i.e. 0=y0-y(1)-y(9) for example. Shall I prepare a different Matrix with the algebraic constrains?
How can I build the ode function?
I tried looking at the examples (amp1dae and hb1dae) but I haven't understood.
Thank you

Antworten (0)

Kategorien

Mehr zu Chemistry finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 21 Jan. 2017

Bearbeitet:

am 21 Jan. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by