Is ode15i correct for this situation?
Mostrar comentarios más antiguos
Can someone tell me if this is the correct approach and if so provide suggestions to get this to solve?
I have a system that is characterized by 3 equations in this form:
y'(1) - y(2) = 0
y'(2) + fun1(y(1),y(2),y(3)) = 0
fun2(y(2)) + fun3(y(3)) = 0
The 3 functions are not linear. Since this is a DAE system and since it was most convenient to arrange them as f(t,y,y’) = 0, I used ode15i. Is this correct? The solution fails either at t=0 or some later time with a singular matrix warning depending on choice of parameters.
I differentiated the 3rd equation hoping to have a system of ODEs instead of DAEs. For my functions, the system takes this form:
y'(1) - y(2) = 0
y'(2) + fun1(y(1), y(2), y(3)) = 0
fun2(y'(2)) + fun3(y(3), y'(3)) = 0
Since both y'(2) and y'(3) appear in the 3rd equation, am I stuck with a fully implicit situation and back to using only ode15i? This formulation fails at t=0 with a singular matrix warning.
Any insight appreciated.
4 comentarios
Torsten
el 28 de Mayo de 2018
Use
y'(3) = -d/dy(2)(fun2(y(2))) * (-fun1(y(1),y(2),y(3))) / d/dy(3)(fun3(y(3)))
as third equation.
Best wishes
Torsten.
Tom Mallin
el 29 de Mayo de 2018
Implicit differentiation of equation (3) with respect to t:
fun2(y(2)) + fun3(y(3)) = 0 ->
[d/dy(2) (fun2(y(2)))]*dy(2)/dt + [d/dy(3) (fun3(y(3)))]*dy(3)/dt = 0 ->
dy(3)/dt = - [d/dy(2) (fun2(y(2)))]*dy(2)/dt / [d/dy(3) (fun3(y(3)))] -> (from equation (2))
dy(3)/dt = - [d/dy(2) (fun2(y(2)))]*(-fun1(y(1), y(2), y(3)))/ [d/dy(3) (fun3(y(3)))]
Best wishes
Torsten.
Tom Mallin
el 1 de Jun. de 2018
Respuestas (0)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!