what is 'Derivative of state in block at time t is not finite. There may be a singularity in the solution.' error? how to address it?
Mostra commenti meno recenti
Hi
I am trying to simulate a thermal fluid system. As soon as I introduce gas-charged accumulator circled red in the circuit, it gives me following error
An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state 'pumpandpipe13082024b.Gas_Charged_Accumulator_TL.T_I' in block 'pumpandpipe13082024b/Gas-Charged Accumulator (TL)' at time 20.0 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
Also, when I introduce elevation gain from port A to port B in pipes TL circled red, i have the following error
An error occurred while running the simulation and the simulation was terminated
Caused by:
- Derivative of state 'pumpandpipe13082024b.Centrifugal_Pump_TL1.A.T' in block 'pumpandpipe13082024b/Centrifugal Pump (TL)1' at time 16.666666666666668 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
what do these errors mean?

Risposte (1)
Muhammad Ali
il 14 Ago 2024
Spostato: Sabin
il 6 Ago 2025
0 voti
3 Commenti
Yifeng Tang
il 15 Ago 2024
Spostato: Sabin
il 6 Ago 2025
I did find the gas-charged accumulator to be a bit more difficult to use, mainly because the definition for the parameters and initial conditions can be a bit hard to get right (read the documentation!). I prefer to use a Tank (TL) or Tank (G-TL) for similar behavior and easier parametrization. You will need some kind of tank/accumulator in a closed thermal liquid network. Otherwise it's quite likely to build up pressure or energy and error out, as the fluid has no extra volume to expand or shrink.
Using a stiff solver for fluids systems is almost a must. The nature of the equations typically requires stiff solver. If you leave it to variable-step, auto selection, you'll likely get "daessc", a solver designed to handle typical equations from a Simscape network. I find it to work fine most of the time.
Muhammad Ali
il 27 Ago 2024
Spostato: Sabin
il 6 Ago 2025
Yifeng Tang
il 27 Ago 2024
Spostato: Sabin
il 6 Ago 2025
Simscape local solver is what you'll very very likely to turn on for real-time simulation. It contains implicit solvers designed for handling stiffness to some degree. Of course, you won't have the luxury of reducing time step when needed, so the numerical efficiency of the model may need closer attention. See the link below for the real-time workflow in Simscape:
https://www.mathworks.com/help/simscape/real-time-simulation.html
Categorie
Scopri di più su Model Statistics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!