How to structure my DAE problem
Show older comments
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
Answers (0)
Categories
Find more on Chemistry 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!