modelWrongInitialSolutionSelected
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
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.MassFlowRate | w_pump (from NonlinearSolverFailureInitial) | Mass flow rate from the pump | |
| SI.Pressure | p1 (from NonlinearSolverFailureInitial) | Pump discharge pressure | |
| SI.Pressure | p2 (from NonlinearSolverFailureInitial) | Storage tank inlet pressure | |
| SI.Pressure | dp_pump (from NonlinearSolverFailureInitial) | Pump dp | |
| SI.Pressure | dp_valve (from NonlinearSolverFailureInitial) | Valve dp | |
| Real | sqrt_dp (from NonlinearSolverFailureInitial) | Regularized sqrt(dp) | |
| SI.SpecificEnthalpy | h0 (from NonlinearSolverFailureInitial) | Pump inlet specific enthalpy | |
| SI.SpecificEnthalpy | h1 (from NonlinearSolverFailureInitial) | Pump discharge specific enthalpy | |
| SI.Power | W (from NonlinearSolverFailureInitial) | ||
| SI.Length | y (from NonlinearSolverFailureInitial) | Reservoir level | |
| Real | eta (from NonlinearSolverFailureInitial) | (p1 - patm)*w_pump/rho/W | Pump efficiency |
| SI.Temperature | T1 (from NonlinearSolverFailureInitial) | Pump discharge temperature | |
| SI.Time | tau (from NonlinearSolverFailureInitial) | 1 | Time constant of temperature sensor |