LBL logo

Buildings.Fluid.Movers

Package with fan and pump models

Information

This package contains components models for fans and pumps.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

NameDescription
Buildings.Fluid.Movers.UsersGuide UsersGuide User's Guide
Buildings.Fluid.Movers.FlowMachine_y FlowMachine_y Fan or pump with ideally controlled normalized speed y as input signal
Buildings.Fluid.Movers.FlowMachine_Nrpm FlowMachine_Nrpm Fan or pump with ideally controlled speed Nrpm as input signal
Buildings.Fluid.Movers.FlowMachine_dp FlowMachine_dp Fan or pump with ideally controlled head dp as input signal
Buildings.Fluid.Movers.FlowMachine_m_flow FlowMachine_m_flow Fan or pump with ideally controlled mass flow rate as input signal
Buildings.Fluid.Movers.FlowMachinePolynomial FlowMachinePolynomial Fan or pump 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 Package with base classes for Buildings.Fluid.Movers


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

Fan or pump with ideally controlled normalized speed y as input signal

Buildings.Fluid.Movers.FlowMachine_y

Information

This model describes a fan or pump with prescribed normalized speed. The input connector provides the normalized rotational speed (between 0 and 1). The head is computed based on the performance curve that take as an argument the actual volume flow rate divided by the maximum flow rate and the relative speed of the fan. The efficiency of the device is computed based on the efficiency curves that take as an argument the actual volume flow rate divided by the maximum possible volume flow rate, or based on the motor performance curves.

See the User's Guide for more information.

Extends from Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine (Partial model for fan or pump with speed (y or Nrpm) as input signal).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
BooleanaddPowerToMediumtrueSet to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)
Characteristics
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
BooleanmotorCooledByFluidtrueIf true, then motor heat is added to fluid stream
efficiencyParametersmotorEfficiency Normalized volume flow rate vs. efficiency
efficiencyParametershydraulicEfficiency Normalized volume flow rate vs. efficiency
AngularVelocity_rpmN_nominal1500Nominal rotational speed for flow characteristic [1/min]
flowParameterspressure Volume flow rate vs. total pressure rise
powerParameterspower Volume flow rate vs. electrical power consumption
Initialization
Realr_V.start1Ratio V_flow/V_flow_max [1]
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]
Advanced
BooleanhomotopyInitializationtrue= true, use homotopy method
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed (may lead to events)
Dynamics
Filtered speed
BooleanfilteredSpeedtrue= true, if speed is filtered with a 2nd order CriticalDamping filter
TimeriseTime30Rise time of the filter (time to reach 99.6 % of the speed) [s]
InitinitModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealN_start0Initial value of speed
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation of mass balance
BooleandynamicBalancetrueSet to true to use a dynamic balance, which often leads to smaller systems of equations
Nominal condition
Timetau1Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s]
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
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
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
output RealOutputN_actual[1/min]
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 RealInputyConstant normalized rotational speed [1]

Modelica definition

model FlowMachine_y 
  "Fan or pump with ideally controlled normalized speed y as input signal"
  extends Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine(
  final N_nominal=1500 "fix N_nominal as it is used only for scaling");

  Modelica.Blocks.Interfaces.RealInput y(min=0, max=1, unit="1") 
    "Constant normalized rotational speed";

protected 
  Modelica.Blocks.Math.Gain gaiSpe(final k=N_nominal,
    u(min=0, max=1),
    y(final quantity="AngularVelocity",
      final unit="1/min",
      nominal=N_nominal)) "Gain for speed input signal";
equation 
  connect(y, gaiSpe.u);

   connect(filter.y, N_filtered);

  if filteredSpeed then
    connect(gaiSpe.y, filter.u);
    connect(filter.y, N_actual);
  else
    connect(gaiSpe.y, N_actual);
  end if;

end FlowMachine_y;

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

Fan or pump with ideally controlled speed Nrpm as input signal

Buildings.Fluid.Movers.FlowMachine_Nrpm

Information

This model describes a fan or pump with prescribed speed in revolutions per minute. The head is computed based on the performance curve that take as an argument the actual volume flow rate divided by the maximum flow rate and the relative speed of the fan. The efficiency of the device is computed based on the efficiency curves that take as an argument the actual volume flow rate divided by the maximum possible volume flow rate, or based on the motor performance curves.

See the User's Guide for more information.

Extends from Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine (Partial model for fan or pump with speed (y or Nrpm) as input signal).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
BooleanaddPowerToMediumtrueSet to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)
Characteristics
Booleanuse_powerCharacteristicfalseUse powerCharacteristic (vs. efficiencyCharacteristic)
BooleanmotorCooledByFluidtrueIf true, then motor heat is added to fluid stream
efficiencyParametersmotorEfficiency Normalized volume flow rate vs. efficiency
efficiencyParametershydraulicEfficiency Normalized volume flow rate vs. efficiency
AngularVelocity_rpmN_nominal1500Nominal rotational speed for flow characteristic [1/min]
flowParameterspressure Volume flow rate vs. total pressure rise
powerParameterspower Volume flow rate vs. electrical power consumption
Initialization
Realr_V.start1Ratio V_flow/V_flow_max [1]
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]
Advanced
BooleanhomotopyInitializationtrue= true, use homotopy method
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed (may lead to events)
Dynamics
Filtered speed
BooleanfilteredSpeedtrue= true, if speed is filtered with a 2nd order CriticalDamping filter
TimeriseTime30Rise time of the filter (time to reach 99.6 % of the speed) [s]
InitinitModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealN_start0Initial value of speed
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation of mass balance
BooleandynamicBalancetrueSet to true to use a dynamic balance, which often leads to smaller systems of equations
Nominal condition
Timetau1Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s]
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
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
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
output RealOutputN_actual[1/min]
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 RealInputNrpmPrescribed rotational speed [1/min]

Modelica definition

model FlowMachine_Nrpm 
  "Fan or pump with ideally controlled speed Nrpm as input signal"
  extends Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine;

  Modelica.Blocks.Interfaces.RealInput Nrpm(unit="1/min") 
    "Prescribed rotational speed";

equation 
  if filteredSpeed then
    connect(Nrpm, filter.u);
    connect(filter.y, N_actual);
    connect(filter.y, N_filtered);

  else
    connect(Nrpm, N_actual);
  end if;

end FlowMachine_Nrpm;

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

Fan or pump with ideally controlled head dp as input signal

Buildings.Fluid.Movers.FlowMachine_dp

Information

This model describes a fan or pump with prescribed head. The input connector provides the difference between outlet minus inlet pressure. The efficiency of the device is computed based on the efficiency curves that take as an argument the actual volume flow rate divided by the maximum possible volume flow rate.

If filteredSpeed=true, then the parameter dp_nominal is used to normalize the filter. This is used to improve the numerics of the transient response. The actual pressure raise of the mover at steady-state is independent of the value of dp_nominal. It is recommended to set dp_nominal to approximately the pressure raise that the fan has during full speed.

See the User's Guide for more information.

Extends from Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine (Partial model for fan or pump with ideally controlled mass flow rate or head as input signal).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
BooleanaddPowerToMediumtrueSet to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)
Booleancontrol_m_flowfalse= false to control head instead of m_flow
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]
Realr_V.start1Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal)
Characteristics
BooleanmotorCooledByFluidtrueIf true, then motor heat is added to fluid stream
efficiencyParametersmotorEfficiency Normalized volume flow rate vs. efficiency
efficiencyParametershydraulicEfficiency Normalized volume flow rate vs. efficiency
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation of mass balance
BooleandynamicBalancetrueSet to true to use a dynamic balance, which often leads to smaller systems of equations
Nominal condition
Timetau1Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s]
Filtered speed
BooleanfilteredSpeedtrue= true, if speed is filtered with a 2nd order CriticalDamping filter
TimeriseTime30Rise time of the filter (time to reach 99.6 % of the speed) [s]
InitinitModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
Pressuredp_start0Initial value of pressure raise [Pa]
Pressuredp_nominal10000Nominal pressure raise, used to normalize filter [Pa]
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
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
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed (may lead to events)

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 RealInputdp_inPrescribed pressure rise [Pa]
output RealOutputdp_actual[Pa]

Modelica definition

model FlowMachine_dp 
  "Fan or pump with ideally controlled head dp as input signal"
  extends Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine(
  final control_m_flow = false,
  preSou(
      dp_start=dp_start,
      m_flow_small=m_flow_small));

  // Classes used to implement the filtered speed
  parameter Boolean filteredSpeed=true 
    "= true, if speed is filtered with a 2nd order CriticalDamping filter";
  parameter Modelica.SIunits.Time riseTime=30 
    "Rise time of the filter (time to reach 99.6 % of the speed)";
  parameter Modelica.Blocks.Types.Init init=Modelica.Blocks.Types.Init.InitialOutput 
    "Type of initialization (no init/steady state/initial state/initial output)";
  parameter Modelica.SIunits.Pressure dp_start(min=0, displayUnit="Pa")=0 
    "Initial value of pressure raise";
  parameter Modelica.SIunits.Pressure dp_nominal(min=0, displayUnit="Pa")=10000 
    "Nominal pressure raise, used to normalize filter";
  Modelica.Blocks.Interfaces.RealInput dp_in(min=0, final unit="Pa") 
    "Prescribed pressure rise";

  Modelica.Blocks.Interfaces.RealOutput dp_actual(min=0, final unit="Pa");

protected 
  Modelica.Blocks.Math.Gain gain(final k=-1);
  Modelica.Blocks.Continuous.Filter filter(
     order=2,
     f_cut=5/(2*Modelica.Constants.pi*riseTime),
     final init=init,
     final y_start=dp_start,
     u_nominal=abs(dp_nominal),
     x(each stateSelect=StateSelect.always),
     u(final unit="Pa"),
     y(final unit="Pa"),
     final analogFilter=Modelica.Blocks.Types.AnalogFilter.CriticalDamping,
     final filterType=Modelica.Blocks.Types.FilterType.LowPass) if filteredSpeed 
    "Second order filter to approximate transient of rotor, and to improve numerics";

  Modelica.Blocks.Interfaces.RealOutput dp_filtered(min=0, final unit="Pa") if 
     filteredSpeed "Filtered pressure";
equation 
  assert(dp_in >= -Modelica.Constants.eps,
    "dp_in cannot be negative. Obtained dp_in = " + String(dp_in));

  connect(dp_in, gain.u);

  if filteredSpeed then
    connect(gain.y, filter.u);
    connect(filter.y, dp_actual);
    connect(filter.y, dp_filtered);
  else
    connect(gain.y, dp_actual);
  end if;

  connect(dp_actual, preSou.dp_in);
end FlowMachine_dp;

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

Fan or pump with ideally controlled mass flow rate as input signal

Buildings.Fluid.Movers.FlowMachine_m_flow

Information

This model describes a fan or pump with prescribed mass flow rate. The efficiency of the device is computed based on the efficiency curves that take as an argument the actual volume flow rate divided by the maximum possible volume flow rate.

See the User's Guide for more information.

Extends from Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine (Partial model for fan or pump with ideally controlled mass flow rate or head as input signal).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
BooleanaddPowerToMediumtrueSet to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)
Booleancontrol_m_flowtrue= false to control head instead of m_flow
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]
Realr_V.start1Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal)
Characteristics
BooleanmotorCooledByFluidtrueIf true, then motor heat is added to fluid stream
efficiencyParametersmotorEfficiency Normalized volume flow rate vs. efficiency
efficiencyParametershydraulicEfficiency Normalized volume flow rate vs. efficiency
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation of mass balance
BooleandynamicBalancetrueSet to true to use a dynamic balance, which often leads to smaller systems of equations
Nominal condition
Timetau1Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s]
Filtered speed
BooleanfilteredSpeedtrue= true, if speed is filtered with a 2nd order CriticalDamping filter
TimeriseTime30Rise time of the filter (time to reach 99.6 % of the speed) [s]
InitinitModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
MassFlowRatem_flow_start0Initial value of mass flow rate [kg/s]
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
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
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed (may lead to events)

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_inPrescribed mass flow rate [kg/s]
output RealOutputm_flow_actualActual mass flow rate [kg/s]

Modelica definition

model FlowMachine_m_flow 
  "Fan or pump with ideally controlled mass flow rate as input signal"
  extends Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine(
  final control_m_flow=true, preSou(m_flow_start=m_flow_start, m_flow_small=
          m_flow_small));
  Modelica.Blocks.Interfaces.RealInput m_flow_in(final unit="kg/s",
                                                 nominal=m_flow_nominal) 
    "Prescribed mass flow rate";

  // Classes used to implement the filtered speed
  parameter Boolean filteredSpeed=true 
    "= true, if speed is filtered with a 2nd order CriticalDamping filter";
  parameter Modelica.SIunits.Time riseTime=30 
    "Rise time of the filter (time to reach 99.6 % of the speed)";
  parameter Modelica.Blocks.Types.Init init=Modelica.Blocks.Types.Init.InitialOutput 
    "Type of initialization (no init/steady state/initial state/initial output)";
  parameter Modelica.SIunits.MassFlowRate m_flow_start(min=0)=0 
    "Initial value of mass flow rate";

  Modelica.Blocks.Interfaces.RealOutput m_flow_actual(final unit="kg/s",
                                                       nominal=m_flow_nominal) 
    "Actual mass flow rate";

protected 
  Modelica.Blocks.Continuous.Filter filter(
     order=2,
     f_cut=5/(2*Modelica.Constants.pi*riseTime),
     final init=init,
     final y_start=m_flow_start,
     u_nominal=m_flow_nominal,
     x(each stateSelect=StateSelect.always),
     u(final unit="kg/s"),
     y(final unit="kg/s"),
     final analogFilter=Modelica.Blocks.Types.AnalogFilter.CriticalDamping,
     final filterType=Modelica.Blocks.Types.FilterType.LowPass) if 
        filteredSpeed 
    "Second order filter to approximate transient of rotor, and to improve numerics";

  Modelica.Blocks.Interfaces.RealOutput m_flow_filtered(final unit="kg/s") if 
     filteredSpeed "Filtered mass flow rate";

equation 
  if filteredSpeed then
    connect(m_flow_in, filter.u);
    connect(filter.y, m_flow_actual);
  else
    connect(m_flow_in, m_flow_actual);
  end if;
    connect(filter.y, m_flow_filtered);
        connect(m_flow_actual, preSou.m_flow_in);

end FlowMachine_m_flow;

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

Fan or pump 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.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).

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*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_V_flowfalse= true, if volume flow rate at inflowing port is computed
Booleanshow_Tfalse= true, if actual temperature at port is computed (may lead to events)

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 
  "Fan or pump with head and efficiency declared by a non-dimensional polynomial"
  extends Buildings.Fluid.Interfaces.PartialTwoPortInterface;
  extends Modelica.Icons.ObsoleteModel;

  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 rho "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 
 Modelica.Utilities.Streams.print("The model Buildings.Fluid.Movers.FlowMachinePolynomial is deprecated.
 It will be removed in future releases.
 You should use Buildings.Fluid.Movers.FlowMachine_y 
 instead of Buildings.Fluid.Movers.FlowMachinePolynomial.");
 // 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 
  // For computing the density, we assume that the fan operates in the design flow direction.
  rho = Medium.density(
     Medium.setState_phX(port_a.p, inStream(port_a.h_outflow), inStream(port_a.Xi_outflow)));

  -dp = scaDp     * pNor      * rho * D*D   * N_in * N_in;
  m_flow = scaM_flow * mNor_flow * rho * 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 / rho; // 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;

Automatically generated Tue Jan 8 08:30:31 2013.