modelPartialFlowMachine
Extends from Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), Buildings.Fluid.Interfaces.PartialTwoPort (Partial component with two ports).
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.
In the previous implementation, this model extends from
Buildings.Fluid.Interfaces.PartialTwoPortInterface.
Now it copies much of the code instead.
This is to resolve a potential circular parameter binding that occurs when
Buildings.Fluid.Movers.Preconfigured.SpeedControlled_y
extends from
Buildings.Fluid.Movers.SpeedControlled_y.
The former uses the nominal flow rate provided by user to construct
the pressure curve, whilst the latter uses the user-provided pressure curve
to determine the nominal flow rate. The new implementation removes the
original declaration of nominal flow rate from
Buildings.Fluid.Interfaces.PartialTwoPortInterface
and hides it (protected _m_flow_nominal) from the user.
This way, A higher-level model (e.g.
Buildings.Fluid.Movers.FlowControlled_dp),
can still provide a default but not the other way around.
See discussions in
#1705.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Fluid.Movers.Data.Generic | per | ||
| Boolean | computePowerUsingSimilarityLaws | = true, compute power exactly, using similarity laws. Otherwise approximate. | |
| Boolean | addPowerToMedium | true | Set to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations) |
| Boolean | nominalValuesDefineDefaultPressureCurve | false | Set to true to avoid warning if m_flow_nominal and dp_nominal are used to construct the default pressure curve |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from LumpedVolumeDeclarations) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | substanceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of independent mass fraction balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | traceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of trace substance balance: dynamic (3 initialization options) or steady state |
| Modelica.Units.SI.Time | tau | 1 | Time constant of fluid volume for nominal flow, used if energy or mass balance is dynamic |
| Advanced › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | massDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from LumpedVolumeDeclarations) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from LumpedVolumeDeclarations) | Medium.T_default | Start value of temperature |
| Medium.MassFraction[Medium.nX] | X_start (from LumpedVolumeDeclarations) | Medium.X_default | Start 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 | |||
| Real | mSenFac (from LumpedVolumeDeclarations) | 1 | Factor for scaling the sensible thermal mass of the volume |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Control | |||
| Buildings.Fluid.Types.InputType | inputType | Buildings.Fluid.Types.InputType.Continuous | Control input type |
| Real | constInput | 0 | Constant input set point |
| Real[:] | stageInputs | Vector of input set points corresponding to stages | |
| Dynamics › Motor speed | |||
| Boolean | use_riseTime | true | Set to true to continuously change motor speed |
| Modelica.Units.SI.Time | riseTime | 30 | Time needed to change motor speed between zero and full speed |
| Modelica.Blocks.Types.Init | init | Modelica.Blocks.Types.Init.InitialOutput | Type of initialization (no init/steady state/initial state/initial output) |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small | 1E-4*abs(_m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Blocks.Interfaces.IntegerInput | stage | Stage input signal for the pressure head | |
| Modelica.Blocks.Interfaces.RealOutput | y_actual | Actual normalised fan or pump speed that is used for computations | |
| Modelica.Blocks.Interfaces.RealOutput | P | Electrical power consumed | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatPort | Heat dissipation to environment |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.VolumeFlowRate | VMachine_flow | eff.V_flow | Volume flow rate |
| Modelica.Units.SI.PressureDifference | dpMachine | -preSou.dp | Pressure difference |
| Real | eta | eff.eta | Global efficiency |
| Real | etaHyd | eff.etaHyd | Hydraulic efficiency |
| Real | etaMot | eff.etaMot | Motor efficiency |
| Modelica.Units.SI.MassFlowRate | m_flow | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_a | if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow))) | Medium properties in port_a |
| Medium.ThermodynamicState | sta_b | if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow)) | Medium properties in port_b |
Contents
| Name | Description |
|---|---|
| Extract scalar signal out of signal vector dependent on IntegerRealInput index |
Revisions
-
July 17, 2026, by Antoine Gautier:
Added an assertion thatper.pressure.V_flowandper.pressure.dphave equal size. This is for Buildings, #4653. -
August 26, 2024, by Michael Wetter:
Implemented linear dynamics for change in motor speed.
This is for Buildings, #3965 and for IBPSA, #1926. -
June 18, 2024, by Michael Wetter:
Addedstartandnominalattributes to avoid warnings in OpenModelica due to conflicting values.
This is for IBPSA, #1890. -
March 29, 2023, by Hongxiang Fu:
Removed the gain block that normalised the speed input because it is no longer needed. This is for IBPSA, #1704. -
March 1, 2023, by Hongxiang Fu:
Instead of extending Buildings.Fluid.Interfaces.PartialTwoPortInterface, this model now has its code copied, then rewrotem_flow_nominalasprotected _m_flow_nominal.
This is for #1705. -
May 6, 2022, by Hongxiang Fu:
-
Moved
haveVMaxfrom here to Buildings.Fluid.Movers.BaseClasses.FlowMachineInterface andV_flow_maxfrom here to Buildings.Fluid.Movers.Data.Generic. -
Added
per.peak,per.totalEfficiency,,per.motorEfficiency_yMotto be also passed down toeff.perat instantiation. -
Added an
assert()warning when the model has to make an unreliable guess for efficiency computation using.EulerNumber. -
Added an
assert()warning when the model has to overrideper.etaMotMet.
-
Moved
-
June 17, 2021, by Michael Wetter:
Changed implementation of the filter.
This is for #1498. -
October 25, 2019, by Jianjun Hu:
Improved icon graphics annotation. This is for #1225. -
January 22, 2019, by Filip Jorissen:
Split long assert output string into two strings to avoid compiler warnings in JModelica.
This is for #1081. -
January 8, 2019, by Filip Jorissen:
Added assert for value ofm_flow_nominal.
This is for #908. -
March 24, 2017, by Michael Wetter:
RenamedfilteredSpeedtouse_inputFilter.
This is for #665. -
December 2, 2016, by Michael Wetter:
Removedminattribute 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 forVMachine_flowto avoid a warning in Buildings.Fluid.Movers.Examples.MoverContinuous. -
July 29, 2016, by Michael Wetter:
MadeExtractorprotected 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 ofdpandm_flowwhen 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 parametershowDesignFlowDirectioninextendsstatement. This is for #349. Removed assignment ofminandmaxattributes of the port mass flow rate as this is already done in the base class. Removedimportstatement. -
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:
Propagatedm_flow_smallof instancevoland 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.