Reputation: 1232
I am debugging a Nonlinear model in Dymola, the model stops at 56600s, the last error is
IF97 medium function g2 called with too low pressure
p = 611.643 Pa <= 611.657 Pa (triple point pressure)
Failed condition: p > 611.657
So I try to locate the variable that causes this error, but I am not sure if there is a simple way to find it in Dymola, or I need to output nonlinear iteration details which would be a huge log file. My question is:
How could I locate the wrong variable
simply?
Here is the dslog.txt file:
Expression preheaterHP_LevelController.limiter.u < preheaterHP_LevelController.limiter.uMin became false ( (preheaterHP_LevelController.limiter.u) - (preheaterHP_LevelController.limiter.uMin) = 1.2054e-09 )
Iterating to find consistent restart conditions.
during event at Time : 52544.06110892259
Expression pPI1.limiter.u < pPI1.limiter.uMin became false ( (pPI1.limiter.u) - (pPI1.limiter.uMin) = 7.89853e-09 )
Iterating to find consistent restart conditions.
during event at Time : 52681.07501417062
POINTA=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>
Expression -vol_turbineHP1.drain[2].m_flow > 0.0 became true ( ( -vol_turbineHP1.drain[2].m_flow)-(0.0) = 1.96259e-14 )
Iterating to find consistent restart conditions.
during event at Time : 56087.88419083787
=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>
POINTB=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>
Error: The following error was detected at time: 56600
IF97 medium function g2 called with too low pressure
p = 611.643 Pa <= 611.657 Pa (triple point pressure)
Failed condition: p > 611.657
=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>
Error: The following error was detected at time: 56598.40726897018
IF97 medium function g2 called with too low pressure
p = 611.656 Pa <= 611.657 Pa (triple point pressure)
Failed condition: p > 611.657
Error: The following error was detected at time: 56598.30750099612
IF97 medium function g2 called with too low pressure
p = 611.657 Pa <= 611.657 Pa (triple point pressure)
Failed condition: p > 611.657
Error: The following error was detected at time: 56598.30750099612
IF97 medium function g2 called with too low pressure
p = 611.657 Pa <= 611.657 Pa (triple point pressure)
Failed condition: p > 611.657
Integration terminated before reaching "StopTime" at T = 5.66e+04
Upvotes: 2
Views: 203
Reputation: 12507
For most models you should ensure you haven't disabled Simulation Setup>Debug>Include function call in messages The default setting gives something like:
Error: The following error was detected at time: 0
IF97 medium function tsat called with too low pressure
p = -210190 Pa <= 611.657 Pa (triple point pressure)
Failed condition: p > 611.657
The stack of functions is:
Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_p
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_ph
Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph
Modelica.Media.Water.IF97_Utilities.rho_props_ph(
V18.port_a.p,
volume4.medium.h,
Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(V18.port_a.p, volume4.medium.h, 0, 0))
Modelica.Media.Water.IF97_Utilities.rho_ph(pipeB7Pump.port_b.p, V18.port_a.h_outflow, 0, 0)
Modelica.Media.Water.WaterIF97_ph.density_ph_Unique5(pipeB7Pump.port_b.p, V18.port_a.h_outflow, 0, 0)
Modelica.Media.Water.WaterI...
For very large models this will be disabled (this will be written in the C-code with additional instructions).
It may be possible to build a debug-version of dymosim (by setting Advanced.BuildDebugDymosim=true
) and set a break-point in that case, and then go from there.
Upvotes: 2