modelFiniteEscapeTime

Solution with finite escape time

Extends from NonlinearSolverFailureInitial (Nonlinear system of equations has no solutions).

Information

This model describes a simple hydraulic system with a pump, followed by a valve, which fills a reservoir.

As the reservoir level increase, the flow rate w_pump goes to zero. When it does, the energy balance equation causes the specific enthalpy h1, and thus the temperature T1, to go to infinity. The temperature T1 is the input of a first-order linear system, representing the temperature sensor dynamics. If a variable step-size solver with error control is used, it will try to compute the state trajectory, which also goes to infinity, so the solver eventually gets stuck at time t = 664.

The debugger should identify the state variable (Ts, in this case) whose error estimate is causing the step size to be reduced, then suggest the user to look at how its derivative der(Ts) is computed. It will be shown that it depends on T1, which goes to infinity. T1 in turn depends on h1, which also goes to infinity. Finally, h1 depends on the energy balance equation, which depends on w_pump - at that point it will become apparent that as the flow rate w_pump goes to zero, the model wil become ill-posed. The solution in this case is to change the pump model, by adding to the energy balance some dynamic energy storage and/or some heat transfer to the ambient.

Parameters

TypeNameDefaultDescription
SI.Pressurepatm (from NonlinearSolverFailureInitial)101325Atmospheric pressure
RealKv (from NonlinearSolverFailureInitial)1e-2Valve coefficient
Realdp_small (from NonlinearSolverFailureInitial)1Small dp for valve equation
Realdp0 (from NonlinearSolverFailureInitial)3e5Pump dp @ zero flow
Reala1 (from NonlinearSolverFailureInitial)1e6Pump coefficient
Reala2 (from NonlinearSolverFailureInitial)3e2Pump coefficient
Reala3 (from NonlinearSolverFailureInitial)3e2Pump coefficient
SI.TemperatureT0 (from NonlinearSolverFailureInitial)20 + 273.15Temperature of incoming fluid
SI.Densityrho (from NonlinearSolverFailureInitial)995Density of fluid
SI.AreaA (from NonlinearSolverFailureInitial)0.01Storage tank cross section
SI.MassFlowRatew_extra (from NonlinearSolverFailureInitial)0Extra mass flow rate into reservoir
SI.Accelerationg (from NonlinearSolverFailureInitial)Modelica.Constants.g_nAcceleration of gravity
SI.TemperatureTref (from NonlinearSolverFailureInitial)273.16Reference temperature for specific enthalpy computation
SI.SpecificHeatCapacitycp (from NonlinearSolverFailureInitial)4186Cp of the fluid

Components

TypeNameDefaultDescription
SI.MassFlowRatew_pump (from NonlinearSolverFailureInitial)Mass flow rate from the pump
SI.Pressurep1 (from NonlinearSolverFailureInitial)Pump discharge pressure
SI.Pressurep2 (from NonlinearSolverFailureInitial)Storage tank inlet pressure
SI.Pressuredp_pump (from NonlinearSolverFailureInitial)Pump dp
SI.Pressuredp_valve (from NonlinearSolverFailureInitial)Valve dp
Realsqrt_dp (from NonlinearSolverFailureInitial)Regularized sqrt(dp)
SI.SpecificEnthalpyh0 (from NonlinearSolverFailureInitial)Pump inlet specific enthalpy
SI.SpecificEnthalpyh1 (from NonlinearSolverFailureInitial)Pump discharge specific enthalpy
SI.PowerW (from NonlinearSolverFailureInitial)
SI.Lengthy (from NonlinearSolverFailureInitial)Reservoir level
Realeta (from NonlinearSolverFailureInitial)(p1 - patm)*w_pump/rho/WPump efficiency
SI.TemperatureT1 (from NonlinearSolverFailureInitial)Pump discharge temperature
SI.Timetau (from NonlinearSolverFailureInitial)1Time constant of temperature sensor
SI.TemperatureTsOutput of pump discharge temperature sensor