modelPartialFlowMachine

Partial model to interface fan or pump models with the medium

Extends from IBPSA.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), IBPSA.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).

Information

This is the base model for fans and pumps. It provides an interface between the equations that compute head and power consumption, and the implementation of the energy and pressure balance of the fluid.

Optionally, the fluid volume is computed using a dynamic balance or a steady-state balance.

The parameter addPowerToMedium determines whether any power is added to the fluid. The default is addPowerToMedium=true, and hence the outlet enthalpy is higher than the inlet enthalpy if the flow device is operating. The setting addPowerToMedium=false is physically incorrect (since the flow work, the flow friction and the fan heat do not increase the enthalpy of the medium), but this setting does in some cases lead to simpler equations and more robust simulation, in particular if the mass flow is equal to zero.

Parameters

TypeNameDefaultDescription
IBPSA.Fluid.Movers.Data.Genericper
BooleancomputePowerUsingSimilarityLaws= true, compute power exactly, using similarity laws. Otherwise approximate.
BooleanaddPowerToMediumtrueSet to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)
BooleannominalValuesDefineDefaultPressureCurvefalseSet to true to avoid warning if m_flow_nominal and dp_nominal are used to construct the default pressure curve
Dynamics › Equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from LumpedVolumeDeclarations)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicsmassDynamics (from LumpedVolumeDeclarations)energyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicssubstanceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of independent mass fraction balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicstraceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of trace substance balance: dynamic (3 initialization options) or steady state
Initialization
Medium.AbsolutePressurep_start (from LumpedVolumeDeclarations)Medium.p_defaultStart value of pressure
Medium.TemperatureT_start (from LumpedVolumeDeclarations)Medium.T_defaultStart value of temperature
Medium.MassFraction[Medium.nX]X_start (from LumpedVolumeDeclarations)Medium.X_defaultStart value of mass fractions m_i/m
Medium.ExtraProperty[Medium.nC]C_start (from LumpedVolumeDeclarations)fill(0, Medium.nC)Start value of trace substances
Medium.ExtraProperty[Medium.nC]C_nominal (from LumpedVolumeDeclarations)fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Dynamics
RealmSenFac (from LumpedVolumeDeclarations)1Factor for scaling the sensible thermal mass of the volume
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Nominal condition
Modelica.SIunits.MassFlowRatem_flow_nominal (from PartialTwoPortInterface)Nominal mass flow rate
Advanced
Modelica.SIunits.MassFlowRatem_flow_small (from PartialTwoPortInterface)1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortInterface)false= true, if actual temperature at port is computed
Control
IBPSA.Fluid.Types.InputTypeinputTypeIBPSA.Fluid.Types.InputType.ContinuousControl input type
RealconstInput0Constant input set point
Real[:]stageInputsVector of input set points corresponding to stages
Dynamics › Nominal condition
Modelica.SIunits.Timetau1Time constant of fluid volume for nominal flow, used if energy or mass balance is dynamic
Dynamics › Filtered speed
Booleanuse_inputFiltertrue= true, if speed is filtered with a 2nd order CriticalDamping filter
Modelica.SIunits.TimeriseTime30Rise time of the filter (time to reach 99.6 % of the speed)
Modelica.Blocks.Types.InitinitModelica.Blocks.Types.Init.InitialOutputType of initialization (no init/steady state/initial state/initial output)
Realy_start0Initial value of speed

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Blocks.Interfaces.IntegerInputstageStage input signal for the pressure head
Modelica.Blocks.Interfaces.RealOutputy_actualActual normalised pump speed that is used for computations
Modelica.Blocks.Interfaces.RealOutputPElectrical power consumed
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPortHeat dissipation to environment

Components

TypeNameDefaultDescription
Modelica.SIunits.MassFlowRatem_flow (from PartialTwoPortInterface)port_a.m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.SIunits.PressureDifferencedp (from PartialTwoPortInterface)port_a.p - port_b.pPressure difference between port_a and port_b
Medium.ThermodynamicStatesta_a (from PartialTwoPortInterface)Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow)))Medium properties in port_a
Medium.ThermodynamicStatesta_b (from PartialTwoPortInterface)Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow)))Medium properties in port_b
Modelica.SIunits.VolumeFlowRateVMachine_floweff.V_flowVolume flow rate
Modelica.SIunits.PressureDifferencedpMachine-preSou.dpPressure difference
Realetaeff.etaGlobal efficiency
RealetaHydeff.etaHydHydraulic efficiency
RealetaMoteff.etaMotMotor efficiency

Contents

NameDescription
ExtractorprotectedExtract scalar signal out of signal vector dependent on IntegerRealInput index

Revisions

  • March 24, 2017, by Michael Wetter:
    Renamed filteredSpeed to use_inputFilter.
    This is for #665.
  • December 2, 2016, by Michael Wetter:
    Removed min attribute as otherwise numerical noise can cause the assertion on the limit to fail.
    This is for #606.
  • November 3, 2016, by Michael Wetter:
    Set start value for VMachine_flow to avoid a warning in IBPSA.Fluid.Movers.Examples.MoverContinuous.
  • July 29, 2016, by Michael Wetter:
    Made Extractor protected so that it can be removed later with a backwards compatible change.
  • July 19, 2016, by Filip Jorissen:
    Created custom implementation for extractor. This is for #498.
  • June 16, 2016, by Filip Jorissen:
    Switched position of mixing volume and mass flow rate sensor. This is to have a consistent operating point tuple of dp and m_flow when having compressible flow. This is for #458.
  • February 19, 2016, by Michael Wetter and Filip Jorissen:
    Refactored model to make implementation clearer. This model now includes code for both speed and flow prescribed models, eliminating the need for an additional level of partial models. This is for #417.
  • Removed the parameter dynamicBalance. This is for #411.
  • November 19, 2015, by Michael Wetter:
    Removed assignment of parameter showDesignFlowDirection in extends statement. This is for #349. Removed assignment of min and max attributes of the port mass flow rate as this is already done in the base class. Removed import statement.
  • April 2, 2015, by Filip Jorissen:
    Added code for supporting stage input and constant input. Added code for displaying constant set point in symbol.
  • January 24, 2015, by Michael Wetter:
    Propagated m_flow_small of instance vol and made all its parameters final.
  • May 25, 2011, by Michael Wetter:
    Revised implementation of energy balance to avoid having to use conditionally removed models.
  • July 29, 2010, by Michael Wetter:
    Reduced fan time constant from 10 to 1 second.
  • July 27, 2010, by Michael Wetter:
    Redesigned model to fix bug in medium balance.
  • March 24 2010, by Michael Wetter:
    First implementation.