modelNoValidInitialSolution
Extends from WrongInitialSolutionSelected (Initialization converges to the wrong solution).
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. They can be reduced to one by selecting dp_pump as the 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 nonlinear solver will converge to the negative solution. In this case, an assertion that pump flow must be positive is present, so the solution is discarded and an error is reporte.
In order to help the end user fix the problem, it is not enough that the assertion is pointed out, but it should be possible to inspect the discarded value of w_pump and understand where it comes from, as in the case of WrongInitialSolutionSelected.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Pressure | patm (from InitialFailure) | 101325 | Atmospheric pressure |
| Real | Kv (from InitialFailure) | 1e-2 | Valve coefficient |
| Real | dp_small (from InitialFailure) | 1 | Small dp for valve equation |
| Real | dp0 (from InitialFailure) | 3e5 | Pump dp @ zero flow |
| Real | a1 (from InitialFailure) | 1e6 | Pump coefficient |
| Real | a2 (from InitialFailure) | 3e2 | Pump coefficient |
| Real | a3 (from InitialFailure) | 3e2 | Pump coefficient |
| SI.Temperature | T0 (from InitialFailure) | 20 + 273.15 | Temperature of incoming fluid |
| SI.Density | rho (from InitialFailure) | 995 | Density of fluid |
| SI.Area | A (from InitialFailure) | 0.01 | Storage tank cross section |
| SI.MassFlowRate | w_extra (from InitialFailure) | 0 | Extra mass flow rate into reservoir |
| SI.Acceleration | g (from InitialFailure) | Modelica.Constants.g_n | Acceleration of gravity |
| SI.Temperature | Tref (from InitialFailure) | 273.16 | Reference temperature for specific enthalpy computation |
| SI.SpecificHeatCapacity | cp (from InitialFailure) | 4186 | Cp of the fluid |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.MassFlowRate | w_pump (from InitialFailure) | Mass flow rate from the pump | |
| SI.Pressure | p1 (from InitialFailure) | Pump discharge pressure | |
| SI.Pressure | p2 (from InitialFailure) | Storage tank inlet pressure | |
| SI.Pressure | dp_pump (from InitialFailure) | Pump dp | |
| SI.Pressure | dp_valve (from InitialFailure) | Valve dp | |
| Real | sqrt_dp (from InitialFailure) | Regularized sqrt(dp) | |
| SI.SpecificEnthalpy | h0 (from InitialFailure) | Pump inlet specific enthalpy | |
| SI.SpecificEnthalpy | h1 (from InitialFailure) | Pump discharge specific enthalpy | |
| SI.Power | W (from InitialFailure) | ||
| SI.Length | y (from InitialFailure) | Reservoir level | |
| Real | eta (from InitialFailure) | (p1 - patm)*w_pump/rho/W | Pump efficiency |
| SI.Temperature | T1 (from InitialFailure) | Pump discharge temperature | |
| SI.Time | tau (from InitialFailure) | 1 | Time constant of temperature sensor |