modelWrongInitialSolutionSelected

Initialization converges to the wrong solution

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.

The operating point of the pumpt is determined by a nonlinear system with five unknowns: w_pump, dp_pump, dp_valve, sqrt_dp, and p1. Dymola selects dp_pump as as a tearing variable. At time t=0, this system has two solutions, one with positive w_pump, and the other one with negative w_pump. If the start value of the tearing variable dp_pump is chosen incorrectly, the solver will converge to the negative solution, then lock onto it for the rest of the simulation.

When the user sees the negative w_pump, he/she should be able to analyze how this value was found at time t = 0. The debugger should show that w_pump is solved by that nonlinear system, and show the values of the tearing variables and of the torn variables at each iteration. It will then become apparent that the start value of the teaing variable dp_pump leads to a negative value of the torn variable w_pump, leading to the solution of the problem, i.e., changing the start value of dp_pump to a value that allows to converge on the desired solution.

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