Modelica.Fluid.Machines

Devices for converting between energy held in a fluid and mechanical energy

Information



Extends from Modelica.Fluid.Icons.VariantLibrary (Icon for a library that contains several variants of one component).

Package Content

NameDescription
Modelica.Fluid.Machines.SweptVolume SweptVolume varying cylindric volume depending on the postition of the piston
Modelica.Fluid.Machines.Pump Pump Centrifugal pump with mechanical connector for the shaft
Modelica.Fluid.Machines.ControlledPump ControlledPump Centrifugal pump with ideally controlled mass flow rate
Modelica.Fluid.Machines.PrescribedPump PrescribedPump Centrifugal pump with ideally controlled speed
Modelica.Fluid.Machines.BaseClasses BaseClasses Base classes used in the Machines package (only of interest to build new component models)


Modelica.Fluid.Machines.SweptVolume Modelica.Fluid.Machines.SweptVolume

varying cylindric volume depending on the postition of the piston

Modelica.Fluid.Machines.SweptVolume

Information


Mixing volume with varying size. The size of the volume is given by:

Losses are neglected. The shaft power is completely converted into mechanical work on the fluid.

The flange position has to be equal or greater than zero. Otherwise the simulation stops. The force of the flange results from the pressure difference between medium and ambient pressure and the cross sectional piston area. For using the component, a top level instance of the ambient model with the inner attribute is needed.

The pressure at both fluid ports equals the medium pressure in the volume. No suction nor discharge valve is included in the model.

The thermal port is directly connected to the medium. The temperature of the thermal port equals the medium temperature. The heat capacity of the cylinder and the piston are not includes in the model.

Extends from Modelica.Fluid.Vessels.BaseClasses.PartialLumpedVessel (Lumped volume with a vector of fluid ports and replaceable heat transfer model).

Parameters

TypeNameDefaultDescription
AreapistonCrossArea cross sectional area of pistion [m2]
Volumeclearance remaining volume at zero piston stroke [m3]
replaceable package MediumPartialMediumMedium in the component
VolumefluidVolumeVVolume [m3]
Ports
Booleanuse_portsDatatrue= false to neglect pressure loss and kinetic energy
VesselPortsDataportsData[nPorts] Data of inlet/outlet ports
Assumptions
Dynamics
DynamicsenergyDynamicssystem.energyDynamicsFormulation of energy balance
DynamicsmassDynamicssystem.massDynamicsFormulation of mass balance
Heat transfer
Booleanuse_HeatTransferfalse= true to use the HeatTransfer model
replaceable model HeatTransferIdealHeatTransferWall heat transfer
Initialization
AbsolutePressurep_startsystem.p_startStart value of pressure [Pa]
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T...Start value of temperature [K]
SpecificEnthalpyh_startif use_T_start then Medium.s...Start value of specific enthalpy [J/kg]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
Advanced
Port properties
MassFlowRatem_flow_smallsystem.m_flow_smallRegularization range at zero mass flow rate [kg/s]

Connectors

TypeNameDescription
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
HeatPort_aheatPort 
Flange_bflangetranslation flange for piston

Modelica definition

model SweptVolume 
  "varying cylindric volume depending on the postition of the piston"
  import Modelica.Constants.pi;

  parameter SI.Area pistonCrossArea "cross sectional area of pistion";
  parameter SI.Volume clearance "remaining volume at zero piston stroke";

  SI.Volume V "fluid volume";

  // Mass and energy balance, ports
  extends Modelica.Fluid.Vessels.BaseClasses.PartialLumpedVessel(
    final fluidVolume = V,
    heatTransfer(surfaceAreas={pistonCrossArea+2*sqrt(pistonCrossArea*pi)*(flange.s+clearance/pistonCrossArea)}));

  Modelica.Mechanics.Translational.Interfaces.Flange_b flange 
    "translation flange for piston";

equation 
  assert(flange.s >= 0, "Piston stroke (given by flange.s) must not be smaller than zero!");

  // volume size
  V = clearance + flange.s * pistonCrossArea;

  0 = flange.f + (medium.p - system.p_ambient) * pistonCrossArea;

  // energy balances
  Wb_flow = medium.p * pistonCrossArea * (-der(flange.s));

  // definition of port pressures
  for i in 1:nPorts loop
    vessel_ps_static[i] = medium.p;
  end for;

end SweptVolume;

Modelica.Fluid.Machines.Pump Modelica.Fluid.Machines.Pump

Centrifugal pump with mechanical connector for the shaft

Modelica.Fluid.Machines.Pump

Information


This model describes a centrifugal pump (or a group of nParallel pumps) with a mechanical rotational connector for the shaft, to be used when the pump drive has to be modelled explicitly. In the case of nParallel pumps, the mechanical connector is relative to a single pump.

The model extends PartialPump

Extends from Modelica.Fluid.Machines.BaseClasses.PartialPump (Base model for centrifugal pumps).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Characteristics
IntegernParallel1Number of pumps in parallel
replaceable function flowCharacteristicPumpCharacteristics.baseFlowHead vs. V_flow characteristic at nominal speed and density
AngularVelocity_rpmN_nominal Nominal rotational speed for flow characteristic [1/min]
Densityrho_nominalMedium.density_pTX(Medium.p_...Nominal fluid density for characteristic [kg/m3]
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
replaceable function powerCharacteristicPumpCharacteristics.quadrati...Power consumption vs. V_flow at nominal speed and density
replaceable function efficiencyCharacteristicPumpCharacteristics.constant...Efficiency vs. V_flow at nominal speed and density
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
BooleancheckValvefalse= true to prevent reverse flow
VolumeV0Volume inside the pump [m3]
Dynamics
DynamicsenergyDynamicsTypes.Dynamics.SteadyStateFormulation of energy balance
DynamicsmassDynamicsTypes.Dynamics.SteadyStateFormulation of mass balance
Heat transfer
Booleanuse_HeatTransferfalse= true to use a HeatTransfer model, e.g. for a housing
replaceable model HeatTransferIdealHeatTransferWall heat transfer
Initialization
AbsolutePressurep_a_startsystem.p_startGuess value for inlet pressure [Pa]
AbsolutePressurep_b_startp_a_startGuess value for outlet pressure [Pa]
MassFlowRatem_flow_start1Guess value of m_flow = port_a.m_flow [kg/s]
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T...Start value of temperature [K]
SpecificEnthalpyh_startif use_T_start then Medium.s...Start value of specific enthalpy [J/kg]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
Advanced
Diagnostics
Booleanshow_NPSHafalse= true to compute Net Positive Suction Head available

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
HeatPort_aheatPort 
Flange_ashaft 

Modelica definition

model Pump "Centrifugal pump with mechanical connector for the shaft"
  extends Modelica.Fluid.Machines.BaseClasses.PartialPump;
  SI.Angle phi "Shaft angle";
  SI.AngularVelocity omega "Shaft angular velocity";
  Modelica.Mechanics.Rotational.Interfaces.Flange_a shaft;
equation 
  phi = shaft.phi;
  omega = der(phi);
  N = Modelica.SIunits.Conversions.to_rpm(omega);
  W_single = omega*shaft.tau;
end Pump;

Modelica.Fluid.Machines.ControlledPump Modelica.Fluid.Machines.ControlledPump

Centrifugal pump with ideally controlled mass flow rate

Modelica.Fluid.Machines.ControlledPump

Information


This model describes a centrifugal pump (or a group of nParallel pumps) with ideally controlled mass flow rate or pressure.

Nominal values are used to predefine an exemplary pump characteristics and to define the operation of the pump. The input connectors m_flow_set or p_set can optionally be enabled to provide time varying set points.

Use this model if the pump characteristics is of secondary interest. The actual characteristics can be configured later on for the appropriate rotational speed N. Then the model can be replaced with a Pump with rotational shaft or with a PrescribedPump.

Extends from Modelica.Fluid.Machines.BaseClasses.PartialPump (Base model for centrifugal pumps).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
AbsolutePressurep_a_nominal Nominal inlet pressure for predefined pump characteristics [Pa]
AbsolutePressurep_b_nominal Nominal outlet pressure, fixed if not control_m_flow and not use_p_set [Pa]
MassFlowRatem_flow_nominal Nominal mass flow rate, fixed if control_m_flow and not use_m_flow_set [kg/s]
Booleancontrol_m_flowtrue= false to control outlet pressure port_b.p instead of m_flow
Booleanuse_m_flow_setfalse= true to use input signal m_flow_set instead of m_flow_nominal
Booleanuse_p_setfalse= true to use input signal p_set instead of p_b_nominal
Characteristics
IntegernParallel1Number of pumps in parallel
replaceable function flowCharacteristicModelica.Fluid.Machines.Base...Head vs. V_flow characteristic at nominal speed and density
AngularVelocity_rpmN_nominal1500Nominal rotational speed for flow characteristic [1/min]
Densityrho_nominalMedium.density_pTX(Medium.p_...Nominal fluid density for characteristic [kg/m3]
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
replaceable function powerCharacteristicPumpCharacteristics.quadrati...Power consumption vs. V_flow at nominal speed and density
replaceable function efficiencyCharacteristicPumpCharacteristics.constant...Efficiency vs. V_flow at nominal speed and density
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
BooleancheckValvefalse= true to prevent reverse flow
VolumeV0Volume inside the pump [m3]
Dynamics
DynamicsenergyDynamicsTypes.Dynamics.SteadyStateFormulation of energy balance
DynamicsmassDynamicsTypes.Dynamics.SteadyStateFormulation of mass balance
Heat transfer
Booleanuse_HeatTransferfalse= true to use a HeatTransfer model, e.g. for a housing
replaceable model HeatTransferIdealHeatTransferWall heat transfer
Initialization
AbsolutePressurep_a_startsystem.p_startGuess value for inlet pressure [Pa]
AbsolutePressurep_b_startp_a_startGuess value for outlet pressure [Pa]
MassFlowRatem_flow_start1Guess value of m_flow = port_a.m_flow [kg/s]
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T...Start value of temperature [K]
SpecificEnthalpyh_startif use_T_start then Medium.s...Start value of specific enthalpy [J/kg]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
Advanced
Diagnostics
Booleanshow_NPSHafalse= true to compute Net Positive Suction Head available

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
HeatPort_aheatPort 
input RealInputm_flow_setPrescribed mass flow rate
input RealInputp_setPrescribed outlet pressure
Characteristics
replaceable function flowCharacteristicHead vs. V_flow characteristic at nominal speed and density

Modelica definition

model ControlledPump 
  "Centrifugal pump with ideally controlled mass flow rate"
  import Modelica.SIunits.Conversions.NonSIunits.AngularVelocity_rpm;
  extends Modelica.Fluid.Machines.BaseClasses.PartialPump(
    N_nominal=1500,
    N(start=N_nominal),
    redeclare replaceable function flowCharacteristic = 
        Modelica.Fluid.Machines.BaseClasses.PumpCharacteristics.quadraticFlow (
          V_flow_nominal={0, V_flow_op, 1.5*V_flow_op},
          head_nominal={2*head_op, head_op, 0}));

  // nominal values
  parameter Medium.AbsolutePressure p_a_nominal 
    "Nominal inlet pressure for predefined pump characteristics";
  parameter Medium.AbsolutePressure p_b_nominal 
    "Nominal outlet pressure, fixed if not control_m_flow and not use_p_set";
  parameter Medium.MassFlowRate m_flow_nominal 
    "Nominal mass flow rate, fixed if control_m_flow and not use_m_flow_set";

  // what to control
  parameter Boolean control_m_flow = true 
    "= false to control outlet pressure port_b.p instead of m_flow";
  parameter Boolean use_m_flow_set = false 
    "= true to use input signal m_flow_set instead of m_flow_nominal";
  parameter Boolean use_p_set = false 
    "= true to use input signal p_set instead of p_b_nominal";

  // exemplary characteristics
  final parameter SI.VolumeFlowRate V_flow_op = m_flow_nominal/rho_nominal 
    "operational volume flow rate according to nominal values";
  final parameter SI.Height head_op = (p_b_nominal-p_a_nominal)/(rho_nominal*g) 
    "operational pump head according to nominal values";

  Modelica.Blocks.Interfaces.RealInput m_flow_set if use_m_flow_set 
    "Prescribed mass flow rate";
  Modelica.Blocks.Interfaces.RealInput p_set if use_p_set 
    "Prescribed outlet pressure";

protected 
  Modelica.Blocks.Interfaces.RealInput m_flow_set_internal 
    "Needed to connect to conditional connector";
  Modelica.Blocks.Interfaces.RealInput p_set_internal 
    "Needed to connect to conditional connector";
equation 
  // Ideal control
  if control_m_flow then
    m_flow = m_flow_set_internal;
  else
    dp_pump = p_set_internal - port_a.p;
  end if;

  // Internal connector value when use_m_flow_set = false
  if not use_m_flow_set then
    m_flow_set_internal = m_flow_nominal;
  end if;
  if not use_p_set then
    p_set_internal = p_b_nominal;
  end if;
  connect(m_flow_set, m_flow_set_internal);
  connect(p_set, p_set_internal);

end ControlledPump;

Modelica.Fluid.Machines.PrescribedPump Modelica.Fluid.Machines.PrescribedPump

Centrifugal pump with ideally controlled speed

Modelica.Fluid.Machines.PrescribedPump

Information


This model describes a centrifugal pump (or a group of nParallel pumps) with prescribed speed, either fixed or provided by an external signal.

The model extends PartialPump

If the N_in input connector is wired, it provides rotational speed of the pumps (rpm); otherwise, a constant rotational speed equal to n_const (which can be different from N_nominal) is assumed.

Extends from Modelica.Fluid.Machines.BaseClasses.PartialPump (Base model for centrifugal pumps).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Booleanuse_N_infalseGet the rotational speed from the input connector
AngularVelocity_rpmN_constN_nominalConstant rotational speed [1/min]
Characteristics
IntegernParallel1Number of pumps in parallel
replaceable function flowCharacteristicPumpCharacteristics.baseFlowHead vs. V_flow characteristic at nominal speed and density
AngularVelocity_rpmN_nominal Nominal rotational speed for flow characteristic [1/min]
Densityrho_nominalMedium.density_pTX(Medium.p_...Nominal fluid density for characteristic [kg/m3]
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
replaceable function powerCharacteristicPumpCharacteristics.quadrati...Power consumption vs. V_flow at nominal speed and density
replaceable function efficiencyCharacteristicPumpCharacteristics.constant...Efficiency vs. V_flow at nominal speed and density
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
BooleancheckValvefalse= true to prevent reverse flow
VolumeV0Volume inside the pump [m3]
Dynamics
DynamicsenergyDynamicsTypes.Dynamics.SteadyStateFormulation of energy balance
DynamicsmassDynamicsTypes.Dynamics.SteadyStateFormulation of mass balance
Heat transfer
Booleanuse_HeatTransferfalse= true to use a HeatTransfer model, e.g. for a housing
replaceable model HeatTransferIdealHeatTransferWall heat transfer
Initialization
AbsolutePressurep_a_startsystem.p_startGuess value for inlet pressure [Pa]
AbsolutePressurep_b_startp_a_startGuess value for outlet pressure [Pa]
MassFlowRatem_flow_start1Guess value of m_flow = port_a.m_flow [kg/s]
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T...Start value of temperature [K]
SpecificEnthalpyh_startif use_T_start then Medium.s...Start value of specific enthalpy [J/kg]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
Advanced
Diagnostics
Booleanshow_NPSHafalse= true to compute Net Positive Suction Head available

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
HeatPort_aheatPort 
input RealInputN_inPrescribed rotational speed [1/min]

Modelica definition

model PrescribedPump "Centrifugal pump with ideally controlled speed"
  extends Modelica.Fluid.Machines.BaseClasses.PartialPump;
  parameter Boolean use_N_in = false 
    "Get the rotational speed from the input connector";
  parameter Modelica.SIunits.Conversions.NonSIunits.AngularVelocity_rpm N_const = N_nominal 
    "Constant rotational speed";
  Modelica.Blocks.Interfaces.RealInput N_in(unit="1/min") if use_N_in 
    "Prescribed rotational speed";

protected 
  Modelica.Blocks.Interfaces.RealInput N_in_internal(unit="1/min") 
    "Needed to connect to conditional connector";
equation 
  // Connect statement active only if use_p_in = true
  connect(N_in, N_in_internal);
  // Internal connector value when use_p_in = false
  if not use_N_in then
    N_in_internal = N_const;
  end if;
  // Set N with a lower limit to avoid singularities at zero speed
  N = max(N_in_internal,1e-3) "Rotational speed";

end PrescribedPump;

HTML-documentation generated by Dymola Sun Jan 17 21:12:15 2010.