Buildings.Fluid.Movers

Package with fan and pump models

Information


This package contains models that can be used for fans and pumps.

The models with names FlowMachine_* are similar to the pump models in the package Modelica.Fluid.Machines. However, the models in this package differ primarily in the following points:

For a detailed description of the models with names FlowMachine_*, see their base class Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine.

. The model Buildings.Fluid.Movers.FlowMachinePolynomial is in this package for compatibility with older versions of this library. It is recommended to use the other models as they optionally allow use of a medium volume that provides state variables which are needed in some models when the flow rate is zero.

Package Content

NameDescription
Buildings.Fluid.Movers.FlowMachine_dp FlowMachine_dp Pump or fan with ideally controlled pressure difference
Buildings.Fluid.Movers.FlowMachine_m_flow FlowMachine_m_flow Pump or fan with ideally controlled mass flow rate
Buildings.Fluid.Movers.FlowMachine_Nrpm FlowMachine_Nrpm Centrifugal pump with ideally controlled speed
Buildings.Fluid.Movers.FlowMachine_y FlowMachine_y Pump or fan with ideally controlled normalized speed
Buildings.Fluid.Movers.FlowMachinePolynomial FlowMachinePolynomial Pump or fan with head and efficiency declared by a non-dimensional polynomial
Buildings.Fluid.Movers.Examples Examples Collection of models that illustrate model use and test models
Buildings.Fluid.Movers.BaseClasses BaseClasses Base classes used in the Machines package (only of interest to build new component models)


Buildings.Fluid.Movers.FlowMachine_dp Buildings.Fluid.Movers.FlowMachine_dp

Pump or fan with ideally controlled pressure difference

Buildings.Fluid.Movers.FlowMachine_dp

Information


This model describes a centrifugal pump (or a group of nParallel pumps) with prescribed pressure difference across the ports, either fixed or provided by an external signal. The model is identical to Modelica:Modelica.Fluid.Machines.ControlledPump but it defines parameters for easier configuration, and input is the pressure difference between the ports, and not the pressure at the port_b.

Extends from Buildings.Fluid.Movers.BaseClasses.FlowMachine (Fan or pump with ideally controlled mass flow rate or pressure difference).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
AbsolutePressurep_a_nominalsystem.p_startNominal inlet pressure for predefined fan or pump characteristics [Pa]
AbsolutePressuredp_set_nominal1000Nominal total pressure difference, fixed if not control_m_flow and not use_dp_set [Pa]
MassFlowRatem_flow_nominal Nominal mass flow rate, fixed if control_m_flow and not use_m_flow_set [kg/s]
Booleancontrol_m_flowfalse= 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_dp_settrue= true to use input signal dp_set instead of dp_set_nominal
Characteristics
IntegernParallel1Number of fans or pumps in parallel
replaceable function flowCharacteristicCharacteristics.quadraticFlo...Total pressure vs. V_flow characteristic at nominal speed
AngularVelocity_rpmN_nominal1500Nominal rotational speed for flow characteristic [1/min]
Densityrho_nominalMedium.density_pTX(Medium.p_...Nominal fluid density [kg/m3]
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
replaceable function powerCharacteristicCharacteristics.quadraticPow...Power consumption vs. V_flow at nominal speed and density
replaceable function efficiencyCharacteristicCharacteristics.constantEffi...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
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation 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 RealInputdp_setPrescribed outlet pressure

Modelica definition

model FlowMachine_dp 
  "Pump or fan with ideally controlled pressure difference"
  extends Buildings.Fluid.Movers.BaseClasses.FlowMachine(
  final control_m_flow = false,
  final use_dp_set=true,
  final use_m_flow_set=false);
end FlowMachine_dp;

Buildings.Fluid.Movers.FlowMachine_m_flow Buildings.Fluid.Movers.FlowMachine_m_flow

Pump or fan with ideally controlled mass flow rate

Buildings.Fluid.Movers.FlowMachine_m_flow

Information


This model describes a centrifugal pump (or a group of nParallel pumps) with prescribed mass flow rate, either fixed or provided by an external signal. The model is identical to Modelica.Fluid.Machines.ControlledPump but it defines parameters for easier configuration.

Extends from Buildings.Fluid.Movers.BaseClasses.FlowMachine (Fan or pump with ideally controlled mass flow rate or pressure difference).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
AbsolutePressurep_a_nominalsystem.p_startNominal inlet pressure for predefined fan or pump characteristics [Pa]
AbsolutePressuredp_set_nominal1000Nominal total pressure difference, fixed if not control_m_flow and not use_dp_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_settrue= true to use input signal m_flow_set instead of m_flow_nominal
Booleanuse_dp_setfalse= true to use input signal dp_set instead of dp_set_nominal
Characteristics
IntegernParallel1Number of fans or pumps in parallel
replaceable function flowCharacteristicCharacteristics.quadraticFlo...Total pressure vs. V_flow characteristic at nominal speed
AngularVelocity_rpmN_nominal1500Nominal rotational speed for flow characteristic [1/min]
Densityrho_nominalMedium.density_pTX(Medium.p_...Nominal fluid density [kg/m3]
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
replaceable function powerCharacteristicCharacteristics.quadraticPow...Power consumption vs. V_flow at nominal speed and density
replaceable function efficiencyCharacteristicCharacteristics.constantEffi...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
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation 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 RealInputdp_setPrescribed outlet pressure

Modelica definition

model FlowMachine_m_flow 
  "Pump or fan with ideally controlled mass flow rate"
  extends Buildings.Fluid.Movers.BaseClasses.FlowMachine(
  final control_m_flow=true,
  final use_m_flow_set=true,
  final use_dp_set=false);
end FlowMachine_m_flow;

Buildings.Fluid.Movers.FlowMachine_Nrpm Buildings.Fluid.Movers.FlowMachine_Nrpm

Centrifugal pump with ideally controlled speed

Buildings.Fluid.Movers.FlowMachine_Nrpm

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 Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine (Base model for fans or pumps).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Booleanuse_N_intrueGet the rotational speed from the input connector
AngularVelocity_rpmN_constN_nominalConstant rotational speed [1/min]
Characteristics
IntegernParallel1Number of fans or pumps in parallel
replaceable function flowCharacteristicCharacteristics.baseFlowTotal pressure vs. V_flow characteristic at nominal speed
AngularVelocity_rpmN_nominal1500Nominal rotational speed for flow characteristic [1/min]
Densityrho_nominalMedium.density_pTX(Medium.p_...Nominal fluid density [kg/m3]
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
replaceable function powerCharacteristicCharacteristics.quadraticPow...Power consumption vs. V_flow at nominal speed and density
replaceable function efficiencyCharacteristicCharacteristics.constantEffi...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
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation 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 FlowMachine_Nrpm 
  "Centrifugal pump with ideally controlled speed"
  extends Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine;
  parameter Boolean use_N_in = true 
    "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 FlowMachine_Nrpm;

Buildings.Fluid.Movers.FlowMachine_y Buildings.Fluid.Movers.FlowMachine_y

Pump or fan with ideally controlled normalized speed

Buildings.Fluid.Movers.FlowMachine_y

Information


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

If the y_in input connector is wired, it provides the normalized rotational speed of the pumps (between 0 and 1); otherwise, a constant rotational speed equal to y_const is assumed.

Extends from Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine (Base model for fans or pumps).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Booleanuse_y_intrueGet the rotational speed from the input connector
Realy_const1Constant normalized rotational speed
Characteristics
IntegernParallel1Number of fans or pumps in parallel
replaceable function flowCharacteristicBuildings.Fluid.Movers.BaseC...Total pressure vs. V_flow characteristic at nominal speed
AngularVelocity_rpmN_nominal1500Nominal rotational speed for flow characteristic [1/min]
Densityrho_nominalMedium.density_pTX(Medium.p_...Nominal fluid density [kg/m3]
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
replaceable function powerCharacteristicCharacteristics.quadraticPow...Power consumption vs. V_flow at nominal speed and density
replaceable function efficiencyCharacteristicCharacteristics.constantEffi...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
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation 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 RealInputy_inConstant normalized rotational speed
Characteristics
replaceable function flowCharacteristicTotal pressure vs. V_flow characteristic at nominal speed

Modelica definition

model FlowMachine_y 
  "Pump or fan with ideally controlled normalized speed"
  extends Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine(
  final N_nominal=1500 "fix N_nominal as it is used only for scaling",
  redeclare replaceable function flowCharacteristic = 
      Buildings.Fluid.Movers.BaseClasses.Characteristics.baseFlow);
  parameter Boolean use_y_in = true 
    "Get the rotational speed from the input connector";
  parameter Real y_const(min=0, max=1) = 1 
    "Constant normalized rotational speed";
  Modelica.Blocks.Interfaces.RealInput y_in(min=0, max=1) if use_y_in 
    "Constant normalized rotational speed";

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

end FlowMachine_y;

Buildings.Fluid.Movers.FlowMachinePolynomial Buildings.Fluid.Movers.FlowMachinePolynomial

Pump or fan with head and efficiency declared by a non-dimensional polynomial

Buildings.Fluid.Movers.FlowMachinePolynomial

Information


This is a model of a flow machine (pump or fan).

The normalized pressure difference is computed using a function of the normalized mass flow rate. The function is a polynomial for which a user needs to supply the coefficients and two values that determine for what flow rate the polynomial is linearly extended.

Note: This model is here for compatibility with older versions of this library. For new models, use instead Buildings.Fluid.Movers.FlowMachine_y.

Extends from Buildings.Fluid.Interfaces.PartialStaticTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
LengthD Diameter [m]
Reala[:] Polynomial coefficients for pressure=p(mNor_flow)
Realb[:] Polynomial coefficients for etaSha=p(mNor_flow)
RealmNorMin_flow Lowest valid normalized mass flow rate
RealmNorMax_flow Highest valid normalized mass flow rate
RealscaM_flow1Factor used to scale the mass flow rate of the fan (used for quickly adjusting fan size)
RealscaDp1Factor used to scale the pressure increase of the fan (used for quickly adjusting fan size)
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Initialization
MassFlowRatem_flow.start0Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s]
Pressuredp.start0Pressure difference between port_a and port_b [Pa]
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
MassFlowRatem_flow_small1E-4*m_flow_nominalSmall mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_V_flowfalse= true, if volume flow rate at inflowing port is computed
Initialization
AbsolutePressurep_a_startsystem.p_startGuess value for inlet pressure [Pa]
AbsolutePressurep_b_startp_a_startGuess value for outlet pressure [Pa]

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)
input RealInputN_inPrescribed rotational speed

Modelica definition

model FlowMachinePolynomial 
  "Pump or fan with head and efficiency declared by a non-dimensional polynomial"
  extends Buildings.Fluid.Interfaces.PartialStaticTwoPortInterface;


  Modelica.Blocks.Interfaces.RealInput N_in "Prescribed rotational speed";

  parameter Modelica.SIunits.Length D "Diameter";
  parameter Real[:] a "Polynomial coefficients for pressure=p(mNor_flow)";
  parameter Real[:] b "Polynomial coefficients for etaSha=p(mNor_flow)";
  parameter Real mNorMin_flow "Lowest valid normalized mass flow rate";
  parameter Real mNorMax_flow "Highest valid normalized mass flow rate";
  parameter Real scaM_flow = 1 
    "Factor used to scale the mass flow rate of the fan (used for quickly adjusting fan size)";
  parameter Real scaDp = 1 
    "Factor used to scale the pressure increase of the fan (used for quickly adjusting fan size)";

  Real pNor(min=0) "Normalized pressure";
  Real mNor_flow(start=mNorMax_flow) "Normalized mass flow rate";
  Real etaSha(min=0, max=1) "Efficiency, flow work divided by shaft power";
  Modelica.SIunits.Power PSha "Power input at shaft";

  Medium.Density den "Medium density";
protected 
  parameter Real pNorMin1(fixed=false) 
    "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]";
  parameter Real pNorMin2(fixed=false) 
    "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]";
  parameter Real pNorMax1(fixed=false) 
    "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]";
  parameter Real pNorMax2(fixed=false) 
    "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]";

initial equation 
 // check slope of polynomial outside the domain [mNorMin_flow, mNorMax_flow]
 pNorMin1 = Buildings.Fluid.Utilities.extendedPolynomial(
                                        c=a, x=mNorMin_flow/2, xMin=mNorMin_flow, xMax=mNorMax_flow);
 pNorMin2 = Buildings.Fluid.Utilities.extendedPolynomial(
                                        c=a, x=mNorMin_flow, xMin=mNorMin_flow, xMax=mNorMax_flow);
 pNorMax1 = Buildings.Fluid.Utilities.extendedPolynomial(
                                        c=a, x=mNorMax_flow, xMin=mNorMin_flow, xMax=mNorMax_flow);
 pNorMax2 = Buildings.Fluid.Utilities.extendedPolynomial(
                                        c=a, x=mNorMax_flow*2, xMin=mNorMin_flow, xMax=mNorMax_flow);
 assert(pNorMin1>pNorMin2,
    "Slope of pump pressure polynomial is non-negative for mNor_flow < mNorMin_flow. Check parameter a.");
 assert(pNorMax1>pNorMax2,
    "Slope of pump pressure polynomial is non-negative for mNorMax_flow < mNor_flow. Check parameter a.");

equation 
  den = Medium.density(sta_a);
  -dp = scaDp     * pNor      * den * D*D   * N_in * N_in;
  m_flow = scaM_flow * mNor_flow * den * D*D*D * N_in;
  pNor = Buildings.Fluid.Utilities.extendedPolynomial(
                                        c=a, x=mNor_flow, xMin=mNorMin_flow, xMax=mNorMax_flow);
  etaSha = max(0.1, Buildings.Fluid.Utilities.polynomial(
                                                      c=b, x=mNor_flow));
  etaSha * PSha = -dp * m_flow / den; // dp<0 and m_flow>0 for normal operation

  // Energy balance (no storage, no heat loss/gain)
  PSha = -m_flow*(port_a.h_outflow-inStream(port_b.h_outflow));
  PSha = m_flow*(port_b.h_outflow-inStream(port_a.h_outflow));

  // Mass balance (no storage)
  port_a.m_flow + port_b.m_flow = 0;

  // Transport of substances
  port_a.Xi_outflow = inStream(port_b.Xi_outflow);
  port_b.Xi_outflow = inStream(port_a.Xi_outflow);

  port_a.C_outflow = inStream(port_b.C_outflow);
  port_b.C_outflow = inStream(port_a.C_outflow);

end FlowMachinePolynomial;

HTML-documentation generated by Dymola Sat Feb 6 17:35:32 2010.