Are there any restrictions on the Mass matrix for solving a DAE system using ode23t?

Hello,
When working with ode23t or ode15s, are there any restrictions on the Mass matrix to be used?
I already know that in these cases the Mass Matrix can be singular.
In particular, I am interested in knowing if matrices like M can be used, where M is defined as follows:
M = [1 1 1 0; 1 0 0 0; 0 0 0 0; 0 0 0 1]
Please note that this Mass matrix represents a system with 4 differential variables but only 3 differential equations.
Thank you very much for your kind help.
Best regards
Nicolas

 Accepted Answer

There are no restrictions on the mass matrix for ode23t or ode15s except for that it cannot be the zero matrix (which would mean you only have algebraic equations).
Compare the options concerning the mass matrix for the different solvers here:

4 Comments

Hi Torsten,
Thank you for your answer. More than the restrictions imposed by matlab, I wonder if there are mathematical restrictions that would hinder the solution of my system.
In particular, is a system with n differential variables and m differential equations, where n >> m, difficult to solve using ode23t?
Thanks for your time
In particular, is a system with n differential variables and m differential equations,
You mean algebraic equations here ?
In particular, is a system with n differential variables and m differential equations, where n >> m, difficult to solve using ode23t?
Depends on the system. And I usually prefer ode15s.
I actually mean differential equations. If n are the differential variables and m are differential equations, then I am talking about a Mass Matrix like (only as an example):
[1 1 1 1; 0 0 0 0;0 0 0 0;0 0 0 0]
In this case we would have 1 differential equation and 4 differential variables
If n are the differential variables and m are differential equations
? Maybe you mean:
If n is the sum of differential and algebraic equations and m is the number of differential equations with n >> m ...
I always try to solve algebraic equations explicitly if possible in order not to include them in the system for ode15s. But if it's not possible in your case, just try how the integrator can cope with it.
Usually, it's not easy for the solver to deduce the time derivatives of algebraic equations as it would be necessary in your case:
M = [1 1 1 1; 0 0 0 0;0 0 0 0;0 0 0 0]
I made good experience with RADAU5 for such problems available under
also with a MATLAB interface.
As a test case, the code has an example for electrical circuits where such problems seem to appear quite often.

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Release

R2020b

Community Treasure Hunt

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

Start Hunting!