MATLAB Solve DAEs in MATLAB | Omar Bin Yusuf

  • Thread starter Thread starter oby7842
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion revolves around solving a set of differential-algebraic equations (DAEs) in MATLAB, specifically focusing on two equations involving variables U1 and U2 that depend on an independent variable X. The user seeks guidance on implementing a Mass matrix and function to solve these DAEs using MATLAB's ODE solvers, particularly expressing interest in using ode45 despite the Mass matrix being dependent on the variables. Suggestions from other participants include referencing MATLAB's documentation, with specific recommendations for using ode15s, which is suited for such problems. However, the user expresses a preference for ode45 and seeks clarification on how to evaluate the Mass matrix dynamically as it depends on U1 and U2. The conversation highlights the need for practical examples and further elaboration on handling the variable Mass matrix in the context of MATLAB's ODE solvers.
oby7842
Messages
9
Reaction score
0
I have problem in solving following DAE's:

1. 0 = X*U1*C4+X*U2*C4 - 1

2. Re*C1*(U1+U2)*U1' +Re*C2*(U1^2+U2)*U2'= X*(U1*C2+U1*U2+U2*C3)+(1/X)*(U1+U2)

here X is the independent variable and U1 and U2 depend on X and others are constants.I need to solvethis DAE's in matlab. To solve in MATLAB i have following Mass matrix and function:

M=[0 0 ; Re*C1*(U(1)+U(2)) Re*C2*(U(1)^2+U(2))]; U'=[U(1)' ; U(2)'] ;

f = [ X*U1*C4+X*U2*C4 - 1 ; X*(U1*C2+U1*U2+U2*C3)+(1/X)*(U1+U2) ];

can you give me any suggestion how can I solve this problem in matlab? I will appreciate any kind of suggestion in this regard. I would be grateful also if I get any kind of hints to solve the Mass matrix. thanks for reading my problem.

Omar Bin Yusuf
 
Physics news on Phys.org
go thru MATLAB help..its explicitly given there
i think ode15 or ode23 will suit ur purpose..
 
yeah in MATLAB help its says that ode15s can solve this type DAE's. But my Mass matrix M is dependent of U(dependent variable)...I have example to solve this type of problem when Mass matrix is constant. But how can I evaluate value of M?
 
i prefer using ode45 for dat...
 
Can you please elaborate the idea a bit?? It will be a great help for me. thanks
 

Similar threads

Back
Top