modelLoad
Model of a load on a hydronic circuit
Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model with two ports and declaration of quantities that are used by many models).
Information
This model represents a thermal load on a hydronic circuit,
typically a terminal unit with recirculating air such as
a fan coil unit.
It takes the fraction of the design load u as input
and returns the control valve demand signal yVal as output.
In steady-state conditions, the model provides zero load
for u=0 and the design load for u=1.
However, for a cooling load with condensation, the relationship between
u and the load is not linear.
The main modeling assumptions are described below.
-
The heat exchanger is modeled in steady-state by default
(dynamics may be reintroduced with the parameter
energyDynamics). -
No pressure drop is considered, neither on the load side, nor
on the source side
(the design pressure drop on the source side may be
reset with the parameter
dpLiq_nominal). - The mass flow rate and the inlet conditions on the load side are constant. The load is modulated by varying the supply temperature set point.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Fluid.HydronicConfigurations.Types.Control | typ | Load type | |
| Modelica.Units.SI.MassFlowRate | mLiq_flow_nominal | 1 | Liquid mass flow rate at design conditions |
| Modelica.Units.SI.PressureDifference | dpLiq_nominal | 0 | Liquid pressure drop at design conditions |
| Modelica.Units.SI.MassFlowRate | mAir_flow_nominal | abs(Q_flow_nominal)/10/cpAir_nominal | Air mass flow rate at design conditions |
| Modelica.Units.SI.Temperature | TAirEnt_nominal | if typ == Buildings.Fluid.HydronicConfigurations.Types.Control.Heating then 20 + 273.15 else 26 + 273.15 | Air entering temperature at design conditions |
| Modelica.Units.SI.Temperature | TAirEntChg_nominal | 20 + 273.15 | Air entering temperature in change-over mode |
| Modelica.Units.SI.MassFraction | phiAirEnt_nominal | 0.5 | Air entering relative humidity at design conditions |
| Modelica.Units.SI.MassFraction | XAirEnt_nominal | Buildings.Utilities.Psychrometrics.Functions.X_pTphi(MediumAir.p_default, TAirEnt_nominal, phiAirEnt_nominal) | Air entering water mass fraction at design conditions (kg/kg air) |
| Modelica.Units.SI.MassFraction | xAirEnt_nominal | XAirEnt_nominal/(1 - XAirEnt_nominal) | Air entering humidity ratio at design conditions (kg/kg dry air) |
| Modelica.Units.SI.Temperature | TLiqEnt_nominal | if typ == Buildings.Fluid.HydronicConfigurations.Types.Control.Heating then 60 + 273.15 else 7 + 273.15 | Liquid entering temperature at design conditions |
| Modelica.Units.SI.Temperature | TLiqLvg_nominal | TLiqEnt_nominal + (if typ == Buildings.Fluid.HydronicConfigurations.Types.Control.Heating then -10 else +5) | Liquid leaving temperature at design conditions |
| Modelica.Units.SI.Temperature | TLiqEntChg_nominal | 60 + 273.15 | Liquid entering temperature in change-over mode |
| Modelica.Units.SI.HeatFlowRate | Q_flow_nominal | (MediumLiq.specificEnthalpy_pTX(MediumLiq.p_default, TLiqEnt_nominal, X = MediumLiq.X_default) - MediumLiq.specificEnthalpy_pTX(MediumLiq.p_default, TLiqLvg_nominal, X = MediumLiq.X_default))*mLiq_flow_nominal | Transmitted heat flow rate at design conditions |
| Modelica.Units.SI.HeatFlowRate | QChg_flow_nominal | eps_nominal*min({mLiq_flow_nominal*cpLiq_nominal, mAir_flow_nominal*cpAirChg_nominal})*(TLiqEntChg_nominal - TAirEntChg_nominal) | Transmitted heat flow rate in change-over mode |
| Modelica.Units.SI.Temperature | TAirLvgChg_nominal | TAirEntChg_nominal + QChg_flow_nominal/cpAirChg_nominal/mAir_flow_nominal | Air leaving temperature in change-over mode |
| Buildings.Controls.OBC.CDL.Types.SimpleController | controllerType | Buildings.Controls.OBC.CDL.Types.SimpleController.PI | Type of controller |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
| Control gains | |||
| Real | k | 0.1 | Gain of controller |
| Real | Ti | 60 | Time constant of integrator block |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamics.SteadyState | Type of energy balance: dynamic (3 initialization options) or steady state |
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) | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u | Load modulating signal | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | mode | Operating mode | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | yVal | Valve demand signal | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | u_s | Controller set point | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | u_m | Controller measured value | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | dTLiq | Liquid deltaT | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | Q_flow | Total heat flow rate transferred to the load | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | yLoa_actual | Actual load fraction met |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow (from PartialTwoPortInterface) | 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 (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_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.ThermodynamicState | sta_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 |
| Sources.Boundary_pT | outAir | Pressure boundary condition at coil outlet | |
| Sensors.TemperatureTwoPort | TAirLvg | Leaving air temperature sensor | |
| HeatExchangers.WetCoilEffectivenessNTU | coi | Coil | |
| Sources.MassFlowSource_T | souAir | Source for entering air | |
| Controls.PIDWithOperatingMode | ctl | Controller for supply air temperature | |
| Buildings.Controls.OBC.CDL.Reals.Add | TAirSupSet | Compute set point as TAirEnt_nominal + u * (TAirLvg_nominal - TAirEnt_nominal) | |
| HeatExchangers.WetCoilEffectivenessNTU | coiNom | Coil operating at design conditions (used for model parameterization) | |
| Sources.MassFlowSource_T | souAirNom | Source for entering air | |
| Sources.MassFlowSource_T | souLiq | Source for entering liquid | |
| Sources.Boundary_pT | outLiq | Pressure boundary condition at liquid outlet | |
| Sensors.TemperatureTwoPort | TLiqEnt | Entering liquid temperature sensor | |
| Sensors.TemperatureTwoPort | TLiqLvg | Leaving liquid temperature sensor | |
| Buildings.Controls.OBC.CDL.Reals.Subtract | dT | Compute deltaT | |
| Modelica.Blocks.Sources.RealExpression | heaFlo | Access coil heat flow rate | |
| Modelica.Blocks.Sources.RealExpression | loaFra | Compute actual load fraction | |
| Sensors.TemperatureTwoPort | TAirLvgNom | Leaving air temperature sensor | |
| Buildings.Controls.OBC.CDL.Reals.Subtract | sub | Compute TAirLvg_nominal - TAirEnt_nominal | |
| Buildings.Controls.OBC.CDL.Reals.Multiply | pro | Compute u * (TAirLvg_nominal - TAirEnt_nominal) | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[3] | TAirEntVal | Values of entering air temperature | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractor | TAirEnt_actual | Select design value of entering air temperature depending on mode | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractor | TAirLvg_actual | Select design value of leaving air temperature depending on mode | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant | TAirLvgVal | Values of leaving air temperature | |
| Buildings.Controls.OBC.CDL.Integers.AddParameter | addPar | Convert mode index to array index | |
| Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator | reaScaRep | Replicate |
Contents
| Name | Description |
|---|---|
| Medium model for air | |
| Medium model for liquid (CHW or HHW) |
Revisions
-
June 30, 2022, by Antoine Gautier:
First implementation.