modelInitialFailure

Initial nonlinear system of equations has no solutions

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

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

The initial value of the level of the reservoir is too high for the pump sizing, so the pressure p2 is too high and consequently the nonlinear algebraic system of equations that determines p1 and w_pump has no solution.

It is possible to find a solution to the system either by lowering the initial value of y, and thus the pressure p2, or by increasing the value of the parameter dp0, increasing the head the pump can provide.

The debugger should show the dependency of the nonlinear system of equations on the parameters dp0, a1, a2, a3, and Kv (also showing their values), as well as the dependency on p2 (which has a too high value). Once one understands that p2 is too high, it should be possible to continue the analysis, looking at the equation that determines p2, which in turn depends on the value of the state y, which is the root cause of the problem.

The nonlinear system that cannot be solved has five unknowns: w_pump, dp_pump, dp_valve, sqrt_dp, and p1, which can be easily reduced to one by using dp_pump as as a tearing variable. It should be possible to track the values of all five variables during the iterations of the Newton algorithm.

Parameters

TypeNameDefaultDescription
SI.Pressurepatm101325Atmospheric pressure
RealKv1e-2Valve coefficient
Realdp_small1Small dp for valve equation
Realdp03e5Pump dp @ zero flow
Reala11e6Pump coefficient
Reala23e2Pump coefficient
Reala33e2Pump coefficient
SI.TemperatureT020 + 273.15Temperature of incoming fluid
SI.Densityrho995Density of fluid
SI.AreaA0.01Storage tank cross section
SI.MassFlowRatew_extra0Extra mass flow rate into reservoir
SI.AccelerationgModelica.Constants.g_nAcceleration of gravity
SI.TemperatureTref273.16Reference temperature for specific enthalpy computation
SI.SpecificHeatCapacitycp4186Cp of the fluid

Components

TypeNameDefaultDescription
SI.MassFlowRatew_pumpMass flow rate from the pump
SI.Pressurep1Pump discharge pressure
SI.Pressurep2Storage tank inlet pressure
SI.Pressuredp_pumpPump dp
SI.Pressuredp_valveValve dp
Realsqrt_dpRegularized sqrt(dp)
SI.SpecificEnthalpyh0Pump inlet specific enthalpy
SI.SpecificEnthalpyh1Pump discharge specific enthalpy
SI.PowerW
SI.LengthyReservoir level
Realeta(p1 - patm)*w_pump/rho/WPump efficiency
SI.TemperatureT1Pump discharge temperature
SI.Timetau1Time constant of temperature sensor