Help - Search - Members - Calendar
Full Version: closed fluid cycle possible?
Modelica Forum > Modelica > Modelica
wendelin
Hi I am writing models for fluid systems using the Modelica Fluid Lib (http://www.modelica.org/libraries/Modelica_Fluid). In the examples there is no closed cycle so that for example the outlet of a pump passes other components (easiest example: one pipe with pressure loss) and then enters the inlet of the same pump again.
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.
wendelin
Nobody has had this problem before? The alternative i see is to cut the cycle. But this means that a static pressure at the "end" of the cyle has to be defined- and so its not truely dynamic modelling of a fluid cycle anymore.

Any ideas or experiences?
Hannes
Hi Wendelin!

Currently, I obviously hit the same problem as you did five month ago. Are you still interested in this topic or have you even found a solution?

I cannot make your code running because obviously the Modelica_Fluid library you used is a different one than the one I can download from modelica.org.

As to my problem:

I also need to model pump plus pipe / two-port (representing characteristic curve of a hydraulic plant) in order to have a tool for sizing the pump, electric motor, inverter and PV-module.

My first impression was, that in a closed cycle there are only pressure DIFFERENCES (delta_p) well defined but no absolute pressure. If we were in electrics, a king of GROUND would be missing to define the electric potential. In this case a pressure potential is missing. - So far about my assumption.

I tried to define a hydraulic ground: With the standard connector-concept I implemented with a well-defined parameter p_gnd=1.013e5 (Pascal):

port.p = p_gnd;
port.dotM_flow = 0;
port.dotH_flow = port.dotM_flow * (if port.dotM_flow>=0 then
port.h else
0);
port.dotM_flow_s = port.dotM_flow * (if port.dotM_flow>=0 then
port.X_s else
0);

This is an one-port defining the absolute pressure and setting mass flow rate, partial mass flow rate and enthalpy flow rate to zero. The test-setup from "ModelicaDymola_Screenshot1.png" doesn't work, although number of equation equals number of unknowns.

In "ModelicaDymola_Screenshot2.png" I tried an elastic pressure absorber I programmed once. Same result.

Do you have further ideas?

Regards,

Hannes
wendelin
Hi Hannes,
I am still interested in a solution, but didn't work on this problem recently. I will attach the minimal examples for an open cycle (which works) and a closed cycle. I think it's easier to discuss if we have the same mo-files. I used the 1.0-beta2 version of the fluid lib which is still available from modelica.org. So we should be using the same library.

Regards,
Wendelin
Severine
Hi
I'm running on the same problem now too.
Did you solve your problem?
Thanks
Severine

QUOTE(wendelin @ Mar 13 2008, 07:00 PM) *

Hi Hannes,
I am still interested in a solution, but didn't work on this problem recently. I will attach the minimal examples for an open cycle (which works) and a closed cycle. I think it's easier to discuss if we have the same mo-files. I used the 1.0-beta2 version of the fluid lib which is still available from modelica.org. So we should be using the same library.

Regards,
Wendelin

ETH
QUOTE(Severine @ Feb 24 2009, 02:06 AM) *

Hi
I'm running on the same problem now too.
Did you solve your problem?
Thanks
Severine


dry.gif Try the new Modelica_Fluid downlable from www.Modelica.org (requires Dymola 7.1 mini)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.