OpenModelica suction side pressure loss

Viewed 38

I want to model the positioning of a pump with only little available NPSH with PumpMonitoringNPSH in MSL/Fluid. But simulation always fails, when I add a suction side pressure loss. It does not matter how large the suction side pressure of a tank or source or how big of a diameter I choose. The moment I comment out the monitoring and switch to ConstantPropertyLiquidWater the simulation works.

The full model is available here.

version: OpenModellica 1.20.0~dev-250-gb17e1a0

model PumpenTeststand
// monitor
  Modelica.Units.NonSI.Pressure_bar p_r;

// system
  inner Modelica.Fluid.System system annotation(
    Placement(visible = true, transformation(origin = {-90, 90}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

// media
  replaceable package Medium = Modelica.Media.Water.StandardWater;
  //Modelica.Media.Water.ConstantPropertyLiquidWater;

// aggregate
  Modelica.Fluid.Machines.PrescribedPump pumpe(
    redeclare package Medium = Medium, 
    m_flow_start = 1, 
    redeclare function flowCharacteristic = Modelica.Fluid.Machines.BaseClasses.PumpCharacteristics.quadraticFlow(
          V_flow_nominal={0.0556,0.1665,0.2778}, 
          head_nominal={3.75e1,3e1,1.9e1}), 
    redeclare model Monitoring = Modelica.Fluid.Machines.BaseClasses.PumpMonitoring.PumpMonitoringNPSH, 
    N_nominal = 1482, 
    p_a_start = 1e5, 
    p_b_start = 1e5) annotation(
    Placement(visible = true, transformation(origin = {-10, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

// leitungen
  Modelica.Fluid.Pipes.StaticPipe leitung(
    redeclare package Medium = Medium,
    diameter = 0.4,
    length = 0.1,
    nParallel = 1) annotation(
    Placement(visible = true, transformation(origin = {-50, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

// grenzen
  Modelica.Fluid.Sources.FixedBoundary quelle(
    redeclare package Medium = Medium, 
    nPorts = 1,
    p = system.p_ambient) annotation(
    Placement(visible = true, transformation(origin = {-90, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.Boundary_pT senke(
    redeclare package Medium = Medium,
    p = system.p_ambient,
    T=system.T_ambient,
    use_p_in=true, nPorts = 1) annotation(
    Placement(visible = true, transformation(origin = {70, -10}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));

// regelung
    Modelica.Blocks.Sources.Ramp rampe(duration = 10, height = 5e5, offset = 1e5)  annotation(
    Placement(visible = true, transformation(origin = {50, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  p_r = Modelica.Units.Conversions.to_bar(pumpe.port_b.p - pumpe.port_a.p);
  connect(rampe.y, senke.p_in) annotation(
    Line(points = {{62, 30}, {92, 30}, {92, -2}, {82, -2}}, color = {0, 0, 127}));
  connect(pumpe.port_b, senke.ports[1]) annotation(
    Line(points = {{0, -10}, {60, -10}}, color = {0, 127, 255}));
  connect(quelle.ports[1], leitung.port_a) annotation(
    Line(points = {{-80, -10}, {-60, -10}}, color = {0, 127, 255}));
  connect(leitung.port_b, pumpe.port_a) annotation(
    Line(points = {{-40, -10}, {-20, -10}}, color = {0, 127, 255}));
  annotation(experiment(StopTime=10));
end PumpenTeststand;
/tmp/OpenModelica_dh/OMEdit/Druckverlust.PumpenTeststand/PumpenTeststand -port=38349 -logFormat=xmltcp -override=startTime=0,stopTime=10,stepSize=0.02,tolerance=1e-06,solver=dassl,outputFormat=mat,variableFilter=.* -r=/tmp/OpenModelica_dh/OMEdit/Druckverlust.PumpenTeststand/PumpenTeststand_res.mat -w -lv=LOG_STATS -inputPath=/tmp/OpenModelica_dh/OMEdit/Druckverlust.PumpenTeststand -outputPath=/tmp/OpenModelica_dh/OMEdit/Druckverlust.PumpenTeststand
IF97 medium function tsat called with too low pressure
p = -161336 Pa <= 611.657 Pa (triple point pressure)
Failed to solve the initialization problem with global homotopy with equidistant step size.
Unable to solve initialization problem.
simulation terminated by an assertion at initialization
Simulation process failed. Exited with code 255.
0 Answers
Related