Buildings.Fluid.HydronicConfigurations.BaseClasses

Package with base classes

Information

This package contains base classes that are used to construct the models in Buildings.Fluid.HydronicConfigurations.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Fluid.HydronicConfigurations.BaseClasses.SingleMixing SingleMixing Single mixing circuit

Buildings.Fluid.HydronicConfigurations.BaseClasses.SingleMixing Buildings.Fluid.HydronicConfigurations.BaseClasses.SingleMixing

Single mixing circuit

Buildings.Fluid.HydronicConfigurations.BaseClasses.SingleMixing

Information

Variable primary

This is a typical configuration for constant flow secondary circuits that have a design supply temperature identical to the primary circuit. The control valve should be sized with a pressure drop at least equal to the maximum of Δp1 and 3e3 Pa. Its authority is β = ΔpA-AB / (ΔpA-AB + Δp1).

In most cases the bypass balancing valve is not needed. However, it may be needed to counter negative back pressure created by other served circuits.

Parameterization

By default the secondary pump is parameterized with m2_flow_nominal and dp2_nominal + dpBal2_nominal + max({val.dpValve_nominal, val.dp3Valve_nominal}) + dpBal3_nominal at maximum speed.

Extends from Fluid.HydronicConfigurations.Interfaces.PartialHydronicConfiguration.

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMedium in the component
Configuration
Booleanuse_siztrueSet to true for built-in sizing of control valve and optional pump
Booleanuse_dp1use_sizSet to true to enable dp1_nominal
Booleanuse_dp2use_siz and typPum <> Buildi...Set to true to enable dp2_nominal
ValvetypValBuildings.Fluid.HydronicConf...Type of control valve
Booleanhave_typVarfalseSet to true to enable the choice of the controlled variable
Nominal condition
MassFlowRatem1_flow_nominalm2_flow_nominalMass flow rate in primary circuit at design conditions [kg/s]
MassFlowRatem2_flow_nominal Mass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedp1_nominal Primary circuit pressure differential at design conditions [Pa]
PressureDifferencedp2_nominal Consumer circuit pressure differential at design conditions [Pa]
Control valve
ValveCharacteristictypChaBuildings.Fluid.HydronicConf...Control valve characteristic
PressureDifferencedpValve_nominalmax(dp1_nominal, 3E3)Control valve pressure drop at design conditions [Pa]
GenericflowCharacteristics Table with flow characteristics
GenericflowCharacteristics1 Table with flow characteristics for direct flow path at port_1
GenericflowCharacteristics3 Table with flow characteristics for bypass flow path at port_3
Pump
PumptypPumBuildings.Fluid.HydronicConf...Type of secondary pump
PumpModeltypPumModBuildings.Fluid.HydronicConf...Type of pump model
MassFlowRatemPum_flow_nominalm2_flow_nominalPump head at design conditions [kg/s]
PressureDifferencedpPum_nominaldp2_nominal + dpBal2_nominal...Pump head at design conditions [Pa]
GenericperPumredeclare parameter Movers.D...Pump parameters
Controls
ControltypCtlBuildings.Fluid.HydronicConf...Type of built-in controls
ControlVariabletypVarBuildings.Fluid.HydronicConf...Controlled variable
SimpleControllercontrollerTypeBuildings.Controls.OBC.CDL.T...Type of controller
Realk0.1Gain of controller
RealTi120Time constant of integrator block [s]
Balancing valves
PressureDifferencedpBal1_nominal0Primary balancing valve pressure drop at design conditions [Pa]
PressureDifferencedpBal2_nominal0Secondary balancing valve pressure drop at design conditions [Pa]
PressureDifferencedpBal3_nominal0Bypass balancing valve pressure drop at design conditions [Pa]
Assumptions
Booleanuse_lumFloRestrueSet to true to use a lumped flow resistance when possible
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDescription
FluidPort_aport_a1Primary supply port
FluidPort_bport_b1Primary return port
FluidPort_aport_a2Secondary return port
FluidPort_bport_b2Secondary supply port
input RealInputyValValve control signal [1]
input RealInputsetSet point [K]
input RealInputyPumPump control signal (variable speed) [1]
input IntegerInputmodeOperating mode
output RealOutputyVal_actualValve position feedback [1]
output RealOutputyPum_actualActual pump input value that is used for computations [1]
output RealOutputPPumPump electrical power [W]

Modelica definition

model SingleMixing "Single mixing circuit" extends Fluid.HydronicConfigurations.Interfaces.PartialHydronicConfiguration( set(final unit="K", displayUnit="degC"), dpValve_nominal=max(dp1_nominal, 3E3), dpPum_nominal=dp2_nominal + dpBal2_nominal + max({val.dpValve_nominal, val.dp3Valve_nominal + dpBal3_nominal}), final m1_flow_nominal=m2_flow_nominal, final typVal=Buildings.Fluid.HydronicConfigurations.Types.Valve.ThreeWay, final use_dp1=use_siz, final use_dp2=use_siz and typPum<>Buildings.Fluid.HydronicConfigurations.Types.Pump.None, final have_typVar=false); Buildings.Fluid.HydronicConfigurations.Components.ThreeWayValve val( redeclare final package Medium=Medium, final typCha=typCha, final energyDynamics=energyDynamics, use_inputFilter=energyDynamics<>Modelica.Fluid.Types.Dynamics.SteadyState, final portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, final portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, final portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, final m_flow_nominal=m2_flow_nominal, final dpValve_nominal=dpValve_nominal, final dpFixed_nominal=if use_lumFloRes then {dpBal1_nominal, dpBal3_nominal} else {0,0}, final flowCharacteristics1=flowCharacteristics1, final flowCharacteristics3=flowCharacteristics3) "Control valve"; FixedResistances.Junction jun( redeclare final package Medium = Medium, final energyDynamics=energyDynamics, final portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, final portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, final portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, final m_flow_nominal=m1_flow_nominal .* {1,-1,-1}, final dp_nominal=fill(0, 3)) "Junction"; FixedResistances.PressureDrop res1( redeclare final package Medium = Medium, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m1_flow_nominal, final dp_nominal=if use_lumFloRes then 0 else dpBal1_nominal) "Primary balancing valve"; FixedResistances.PressureDrop res2( redeclare final package Medium = Medium, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m2_flow_nominal, final dp_nominal=dpBal2_nominal) "Secondary balancing valve"; Buildings.Fluid.HydronicConfigurations.Components.Pump pum( redeclare final package Medium = Medium, final typ=typPum, final typMod=typPumMod, final m_flow_nominal=mPum_flow_nominal, final dp_nominal=dpPum_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, use_inputFilter=energyDynamics<>Modelica.Fluid.Types.Dynamics.SteadyState, final per=perPum) "Pump"; Sensors.TemperatureTwoPort T2Sup( redeclare final package Medium = Medium, final m_flow_nominal=m2_flow_nominal, final allowFlowReversal=allowFlowReversal, tau=if energyDynamics == Modelica.Fluid.Types.Dynamics.SteadyState then 0 else 1) "Consumer circuit supply temperature sensor"; Controls.PIDWithOperatingMode ctl( u_s(final unit="K", displayUnit="degC"), u_m(final unit="K", displayUnit="degC"), final reverseActing=typCtl == Buildings.Fluid.HydronicConfigurations.Types.Control.Heating, final yMin=0, final yMax=1, final controllerType=controllerType, final k=k, final Ti=Ti) if typCtl <> Buildings.Fluid.HydronicConfigurations.Types.Control.None "Controller"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold isEna( final t=Controls.OperatingModes.disabled) "Returns true if enabled"; Sensors.TemperatureTwoPort T2Ret( redeclare final package Medium = Medium, final m_flow_nominal=m2_flow_nominal, final allowFlowReversal=allowFlowReversal, tau=if energyDynamics == Modelica.Fluid.Types.Dynamics.SteadyState then 0 else 1) "Consumer circuit return temperature sensor"; FixedResistances.PressureDrop res3( redeclare final package Medium = Medium, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m2_flow_nominal, final dp_nominal=if use_lumFloRes then 0 else dpBal3_nominal) "Bypass balancing valve"; equation connect(port_b1,res1. port_b); connect(pum.port_b, T2Sup.port_a); connect(T2Sup.port_b, port_b2); connect(ctl.y, val.y); connect(mode, ctl.mode); connect(T2Sup.T, ctl.u_m); connect(set, ctl.u_s); connect(yVal, val.y); connect(mode, isEna.u); connect(jun.port_2,res1. port_a); connect(res2.port_b, jun.port_1); connect(val.port_2, pum.port_a); connect(val.port_1, port_a1); connect(pum.P, PPum); connect(pum.y_actual, yPum_actual); connect(port_a2, T2Ret.port_a); connect(T2Ret.port_b,res2. port_a); connect(jun.port_3, res3.port_a); connect(res3.port_b, val.port_3); connect(val.y_actual, yVal_actual); connect(isEna.y, pum.y1); connect(yPum, pum.y); end SingleMixing;