diff --git a/Modelica/Fluid/Vessels.mo b/Modelica/Fluid/Vessels.mo index b3b746c4f4..a1b4ff9ea0 100644 --- a/Modelica/Fluid/Vessels.mo +++ b/Modelica/Fluid/Vessels.mo @@ -307,7 +307,7 @@ of the modeller. Increase nPorts to add an additional port. end for; // Check for correct solution assert(fluidLevel <= fluidLevel_max, "Vessel is overflowing (fluidLevel > fluidLevel_max = " + String(fluidLevel) + ")"); - assert(fluidLevel > -1e-6*fluidLevel_max, "Fluid level (= " + String(fluidLevel) + ") is below zero meaning that the solution failed."); + assert(fluidLevel > 0, "Fluid level is too small, the tank cannot be completely empty otherwise the energy balance equation becomes singular."); // Boundary conditions diff --git a/ModelicaTest/Fluid/TestComponents/Vessels/TestSimpleTank.mo b/ModelicaTest/Fluid/TestComponents/Vessels/TestSimpleTank.mo index 5d93b1af49..449a82ff08 100644 --- a/ModelicaTest/Fluid/TestComponents/Vessels/TestSimpleTank.mo +++ b/ModelicaTest/Fluid/TestComponents/Vessels/TestSimpleTank.mo @@ -10,10 +10,10 @@ model TestSimpleTank height=1, nPorts=2, portsData={Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.1, - height=0),Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter= + height=0.001),Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter= 0.1, height=1)}, crossArea=1, - level_start=0) + level_start=0.001) annotation (Placement(transformation(extent={{0,0},{40,40}}))); inner Modelica.Fluid.System system(energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)