All the examples use FlowRate or FixedBounderies as Sources/sinks and so don't describe closed cycles. Is this possible in Modelica and especially with the FluidLib?
When trying the easiest example I can think of (see below) I get an error message that the model contains mean circular equalities.
Here my example, written in Dymola:
CODE
model ClosedCycle
annotation (uses(Modelica_Fluid(version="1.0 Beta 2"), Modelica(version=
"2.2.1")), Diagram);
Modelica_Fluid.PressureLosses.WallFrictionAndGravity pipe(
redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater,
length=2,
diameter=0.02) annotation (extent=[-18,44; 2,64]);
Modelica.Blocks.Sources.Constant const(k=1200)
annotation (extent=[-94,28; -74,48]);
inner Modelica_Fluid.Ambient ambient annotation (extent=[50,64; 70,84]);
Modelica_Fluid.Pumps.Pump pumps(
checkValve=true,
redeclare package Medium =
Modelica.Media.Water.ConstantPropertyLiquidWater,
N_nom=1200,
redeclare function flowCharacteristic =
Modelica_Fluid.Pumps.BaseClasses.PumpCharacteristics.quadraticFlow ( q_nom={0,
0.25,0.5}, head_nom={100,60,0}),
Np_nom=4,
M=50,
T_start=Modelica.SIunits.Conversions.from_degC(20))
annotation (extent=[-40,-18; -14,8]);
equation
connect(pumps.outlet, pipe.port_b) annotation (points=[-19.2,-0.84; 10,-0.84;
10,54; 2,54], style(color=69, rgbcolor={0,127,255}));
connect(pipe.port_a, pumps.inlet) annotation (points=[-18,54; -50,54; -50,
-7.6; -37.4,-7.6], style(color=69, rgbcolor={0,127,255}));
connect(pumps.N_in, const.y) annotation (points=[-30.38,0.72; -30,18; -28,36;
-34,36; -34,38; -73,38], style(color=74, rgbcolor={0,0,127}));
end ClosedCycle;
Is there a way to prevent circular equalities and still modeling a closed cycle? If not, how do you simulate pressure losses in such systems?
Thanks for your advice.
