modelSingleVariable

Single fan - Variable speed

Extends from Buildings.Templates.Components.Interfaces.PartialFan (Interface class for fan).

Information

This is a model for a variable speed fan (with VFD).

  • The fan is commanded On with a Boolean signal y1 (VFD Run).
  • The fan speed is modulated with a fractional speed signal y (real).
    y = 0 corresponds to 0 Hz. y = 1 corresponds to the maximum speed set in the VFD.
  • A status signal y1_actual (Boolean) is returned.
    y1_actual = true means that the fan is on.

Parameters

TypeNameDefaultDescription
Buildings.Templates.Components.Data.Fandat (from PartialFan)Design and operating parameters
Modelica.Units.SI.PressureDifferencedp_nominal (from PartialFan)dat.dp_nominalTotal pressure rise
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominal (from PartialTwoPortInterface)Nominal mass flow rate
Advanced
Modelica.Units.SI.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
Configuration
Buildings.Templates.Components.Types.Fantyp (from PartialFan)Equipment type
Booleanhave_senFlo (from PartialFan)falseSet to true for air flow measurement
IntegernFan (from PartialFan)Number of fans
Dynamics › Nominal condition
Modelica.Units.SI.Timetau (from PartialFan)1Time constant of fluid volume for nominal flow, used if energy or mass balance is dynamic
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from PartialFan)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Graphics
Buildings.Templates.Components.Types.FanSingletypSin (from PartialFan)Buildings.Templates.Components.Types.FanSingle.HousedType of single fan
Integertext_rotation (from PartialFan)0Text rotation angle in icon layer
Booleantext_flip (from PartialFan)falseTrue to flip text horizontally in icon layer

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)
Buildings.Templates.Components.Interfaces.Busbus (from PartialFan)Control bus

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flow (from PartialTwoPortInterface)port_a.m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp (from PartialTwoPortInterface)port_a.p - port_b.pPressure difference between port_a and port_b
Medium.ThermodynamicStatesta_a (from PartialTwoPortInterface)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.ThermodynamicStatesta_b (from PartialTwoPortInterface)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
Buildings.Templates.Components.Sensors.VolumeFlowRateV_flow (from PartialFan)Air volume flow rate sensor
Buildings.Templates.Components.BaseClasses.MoverSpeedControlled_yfanFan
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealsigStaStart/stop signal
Buildings.Controls.OBC.CDL.Reals.MultiplysigConResulting control signal
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdevaStaEvaluate fan status

Revisions

  • July 17, 2026, by Antoine Gautier:
    Refactored to use a compiler-friendly mover model. This is for #4653.
  • November 18, 2022, by Antoine Gautier:
    First implementation.