Pump hydraulic efficiency constraint #3469
-
Dear All, I am trying to model a coupled-tanks system, which is composed of two water tanks, a basin, two valves, and a centrifugal pump. The pump has the following p-Q characteristics: In my previous post, I have asked about the pump parameterization. My current pump data model is as follows: record M510S_Data_4
"Pump data for a TCS micropumps M510 pump"
extends Buildings.Fluid.Movers.Data.Generic(
pressure(V_flow=({0.0, 8.0}/60)*0.001, dp={-8/(-(8/0.7)), 0/(-(8/0.7))}*100000)
);
parameter Integer speed_rpm_nominal = 10000 "Nominal RPM";
annotation (
defaultComponentPrefixes="parameter",
defaultComponentName="per",
Documentation(info=""));
end M510S_Data_4; Note that I am primarily interested in the liquid levels of Tank 1 and Tank 2. Power characteristics etc. of the pump are not important in my scenario. Coupled-Tanks Model: I have parameterized the model (to some extent) based on the dimensions of the components implemented as part of a physical testbed. As a first step, I have ignored the controller and set the pump to full speed. model M510S_33_MBL
parameter Modelica.Units.SI.Density rho_default_this=Medium.density(state_default_this)
"Density at nominal condition";
parameter Medium.ThermodynamicState state_default_this=
Medium.setState_pTX(
T=Medium.T_default,
p=Medium.p_default,
X=Medium.X_default[1:Medium.nXi]) "Default state";
parameter Modelica.Units.SI.Velocity v_nominal_this=0.15
"Velocity at m_flow_nominal (used to compute default diameter)";
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=2
"Nominal mass flow rate for each fan";
parameter Modelica.Units.SI.PressureDifference dp_nominal=500
"Nominal pressure head for each fan";
package Medium = Buildings.Media.Water;
Buildings.Fluid.Movers.SpeedControlled_y pump1(redeclare package Medium = Medium, redeclare replaceable
M510S_Data_4 per,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false) annotation(
Placement(visible = true, transformation(origin = {52, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Constant rpm1(k= 10000) "Pump speed control signal"
annotation (Placement(visible = true, transformation(extent = {{18, -26}, {30, -14}}, rotation = 0)));
inner Modelica.Fluid.System system annotation(
Placement(visible = true, transformation(origin = {100, 166}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Math.Gain gain1(k = 1 / M510S_Data_4.speed_rpm_nominal) annotation(
Placement(visible = true, transformation(origin = {87, -37}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
Modelica.Fluid.Vessels.OpenTank tank1(redeclare package Medium = Medium, crossArea = 0.74832, height = 0.278, level_start = 0, nPorts = 2, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.006), Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.006)}, use_portsData = true) annotation(
Placement(visible = true, transformation(origin = {-52, 170}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Modelica.Fluid.Vessels.OpenTank tank2(redeclare package Medium = Medium, crossArea = 0.74832, height = 0.278, level_start = 0, nPorts = 2, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.006), Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.006)}, use_portsData = true) annotation(
Placement(visible = true, transformation(origin = {-66, 52}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Buildings.Fluid.Actuators.Valves.TwoWayLinear val1(redeclare package Medium = Medium,
l=0.05,
m_flow_nominal=2,
use_inputFilter=false,
dpValve_nominal=6000) annotation(
Placement(visible = true, transformation(origin = {-64, 124}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Buildings.Fluid.Actuators.Valves.TwoWayLinear val2(redeclare package Medium = Medium,
l=0.05,
m_flow_nominal=2,
use_inputFilter=false,
dpValve_nominal=6000) annotation(
Placement(visible = true, transformation(origin = {-68, 12}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Blocks.Sources.Ramp y(
duration= 0,height=1,
offset=0) "Control signal"
annotation (Placement(visible = true, transformation(extent = {{16, 106}, {36, 126}}, rotation = 0)));
Modelica.Fluid.Vessels.OpenTank basin1(redeclare package Medium = Medium, crossArea = 4.4156, height = 0.12, level_start = 0.05, nPorts = 2, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.006), Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.006)}, use_portsData = true) annotation(
Placement(visible = true, transformation(origin = {-68, -58}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Buildings.Fluid.FixedResistances.Pipe pip1(redeclare package Medium = Medium, lambdaIns = 0, length = 0.12, m_flow_nominal = 0.006 ^ 2 * Modelica.Constants.pi * v_nominal_this * rho_default_this / 4, nSeg = 1, thicknessIns = 0.002) annotation(
Placement(visible = true, transformation(origin = {-66, 96}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Buildings.Fluid.FixedResistances.Pipe pip4(redeclare package Medium = Medium, lambdaIns = 0, length = 2.68, m_flow_nominal = 0.006 ^ 2 * Modelica.Constants.pi * v_nominal_this * rho_default_this / 4, nSeg = 1, thicknessIns = 0.002) annotation(
Placement(visible = true, transformation(origin = {116, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Buildings.Fluid.FixedResistances.Pipe pip3(redeclare package Medium = Medium, lambdaIns = 0, length = 0.605, m_flow_nominal = 0.006 ^ 2 * Modelica.Constants.pi * v_nominal_this * rho_default_this / 4, nSeg = 1, thicknessIns = 0.002) annotation(
Placement(visible = true, transformation(origin = {-2, -78}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Buildings.Fluid.FixedResistances.Pipe pip2(redeclare package Medium = Medium, lambdaIns = 0, length = 0.45, m_flow_nominal = 0.006 ^ 2 * Modelica.Constants.pi * v_nominal_this * rho_default_this / 4, nSeg = 1, thicknessIns = 0.002) annotation(
Placement(visible = true, transformation(origin = {-68, -16}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
equation
connect(rpm1.y, gain1.u) annotation(
Line(points = {{31, -20}, {67.1, -20}, {67.1, -37}, {79, -37}}, color = {0, 0, 127}));
connect(gain1.y, pump1.y) annotation(
Line(points = {{95, -37}, {52, -37}, {52, -58}}, color = {0, 0, 127}));
connect(y.y, val1.y) annotation(
Line(points = {{37, 116}, {9.5, 116}, {9.5, 124}, {-52, 124}}, color = {0, 0, 127}));
connect(val1.port_a, tank1.ports[1]) annotation(
Line(points = {{-64, 134}, {-64, 142}, {-52, 142}, {-52, 150}}, color = {0, 127, 255}));
connect(y.y, val2.y) annotation(
Line(points = {{37, 116}, {-0.5, 116}, {-0.5, 72}, {0, 72}, {0, 13}, {-56, 13}, {-56, 12}}, color = {0, 0, 127}));
connect(tank2.ports[1], val2.port_a) annotation(
Line(points = {{-66, 32}, {-68, 32}, {-68, 22}}, color = {0, 127, 255}));
connect(pip1.port_b, tank2.ports[2]) annotation(
Line(points = {{-66, 86}, {-66, 32}}, color = {0, 127, 255}));
connect(val1.port_b, pip1.port_a) annotation(
Line(points = {{-64, 114}, {-66, 114}, {-66, 106}}, color = {0, 127, 255}));
connect(pip4.port_b, tank1.ports[2]) annotation(
Line(points = {{126, -70}, {150.5, -70}, {150.5, 150}, {-52, 150}}, color = {0, 127, 255}));
connect(basin1.ports[1], pip3.port_a) annotation(
Line(points = {{-68, -78}, {-12, -78}}, color = {0, 127, 255}));
connect(pip2.port_b, basin1.ports[2]) annotation(
Line(points = {{-68, -26}, {-68, -78}}, color = {0, 127, 255}));
connect(val2.port_b, pip2.port_a) annotation(
Line(points = {{-68, 2}, {-68, -6}}, color = {0, 127, 255}));
connect(pip3.port_b, pump1.port_a) annotation(
Line(points = {{8, -78}, {25, -78}, {25, -70}, {42, -70}}, color = {0, 127, 255}));
connect(pump1.port_b, pip4.port_a) annotation(
Line(points = {{62, -70}, {106, -70}}, color = {0, 127, 255}));
annotation(
uses(Buildings(version = "9.1.0"), Modelica(version = "4.0.0")),
Diagram(coordinateSystem(extent = {{-100, 200}, {160, -120}})),
version = "");
end M510S_33_MBL; Problem: When simulating the model (e.g., with start time 0 seconds, stop time 1000 seconds, and 500 number of intervals), I get the following error:
However, it seems that the simulation still finishes.
Question: Unfortunately, I am not sure what causes
How can I solve this issue? Modelica Buildings Version: 10.0.0, 2022-12-06 Additionally, it is quite interesting that the simulation results diverge wildly from reality (i.e., the physical testbed). Although I am confident that I have parameterized the pump correctly, the liquid levels in both Tank 1 and Tank 2 are not increasing as rapidly as in real world. I suspect that the pressure parameters are misconfigured but I am not sure which ones have the main influence. Is there a strategy on how to debug this to converge to reality? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Greetings! I am not able to run your code and I am a bit confused with which version of Buildings you are running it with. Cheers, |
Beta Was this translation helpful? Give feedback.
Purely from a clarity point of view I believe it is better to set the pressure drop in the pipe components instead of in the pump component.
I am not familiar with the Standard Library components you are using and also cannot think of any model in Buildings library that does this on top of my head, so I cannot say what would be a good way to model the gravity effects. What could be potentially useful to you is the
Buildings.Fluid.Movers.BaseClasses.IdealSource
component. This model forces a flow or a pressure drop across it. I am thinking it could be used to prescribe a differential pressure caused by gravity effects, instead of modelling the gravity directly.Another piece of advice woul…