Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples

Example models

Information

This package contains examples for the use of models that can be found in Buildings.Fluid.HydronicConfigurations.ActiveNetworks.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.Decoupling Decoupling Model illustrating the operation of a decoupling circuit
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingMixing DecouplingMixing Model illustrating the operation of a decoupling circuit serving a single mixing circuit
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingTemperature DecouplingTemperature Model illustrating the operation of a decoupling circuit with Delta-T control
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DiversionOpenLoop DiversionOpenLoop Model illustrating the operation of diversion circuits with constant speed pump
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionThreeWay InjectionThreeWay Model illustrating the operation of an inversion circuit with three-way valve
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayCheckValve InjectionTwoWayCheckValve Model illustrating the operation of an inversion circuit with two-way valve and check valve and variable secondary
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstant InjectionTwoWayConstant Model illustrating the operation of an inversion circuit with two-way valve and constant secondary
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstantReturn InjectionTwoWayConstantReturn  
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariable InjectionTwoWayVariable Model illustrating the operation of an inversion circuit with two-way valve and variable secondary
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariableReturn InjectionTwoWayVariableReturn Model illustrating the operation of an inversion circuit with two-way valve and variable secondary with return temperature control
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.SingleMixing SingleMixing Model illustrating the operation of single mixing circuits
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.ThrottleOpenLoop ThrottleOpenLoop Model illustrating the operation of throttle circuits with variable speed pump
Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses BaseClasses Package with base classes

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.Decoupling Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.Decoupling

Model illustrating the operation of a decoupling circuit

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.Decoupling

Information

This model represents a change-over system where the configuration Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Decoupling serves as the interface between a variable flow primary circuit and a variable flow consumer circuit operated in change-over. For a given operating mode, both the primary circuit and the consumer circuit have a constant supply temperature.

The model illustrates how the primary flow rate varies with the secondary flow rate, yielding a nearly constant bypass mass flow rate.

Extends from BaseClasses.PartialDecoupling (Partial model of primary variable circuit serving a decoupling circuit).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominalif typ == Buildings.Fluid.Hy...Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal + (if typ ==...Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominalTLiqEnt_nominalLiquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
PressureDifferencedp1_nominaldpPum_nominal - dpPip_nominalControl valve pressure drop at design conditions [Pa]
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominal1.1*m2_flow_nominalMass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominal/0.9Mass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal10e4Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + dp2SetConsumer circuit pressure differential at design conditions [Pa]
Configuration
Booleanis_baltrueSet to true for balanced primary branch
Controls
PressureDifferencedp2Setloa1.dpTer_nominal + loa1.dp...Consumer circuit pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model Decoupling "Model illustrating the operation of a decoupling circuit" extends BaseClasses.PartialDecoupling(del2(nPorts=4), mode(table=[0,0; 6,0; 6, 2; 15,2; 15,1; 22,1; 22,0; 24,0]), T1Set(nin=3)); equation connect(con.port_b2, jun.port_1); connect(con.port_a2, del2.ports[4]); end Decoupling;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingMixing Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingMixing

Model illustrating the operation of a decoupling circuit serving a single mixing circuit

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingMixing

Information

This model represents a cooling system where the configuration Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Decoupling is used in conjunction with Buildings.Fluid.HydronicConfigurations.PassiveNetworks.SingleMixing. The combined configuration serves as the interface between a variable flow primary circuit and a variable flow consumer circuit. The primary circuit has a constant supply temperature. The consumer circuit has a varying supply temperature set point that is reset based on the terminal valve opening, with the most open valve being kept 90% open.

Note the following settings.

The fact that the load seems unmet at partial load (see plot #4) is due to the load model that does not guarantee a linear variation of the load with the input signal in cooling mode, see Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.Load.

Extends from Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.PartialDecoupling (Partial model of primary variable circuit serving a decoupling circuit).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominalif typ == Buildings.Fluid.Hy...Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal + (if typ ==...Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominalTLiqEnt_nominalLiquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
PressureDifferencedp1_nominaldpPum_nominal - dpPip_nominalControl valve pressure drop at design conditions [Pa]
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominal1.1*m2_flow_nominalMass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominal/0.9Mass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal10e4Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + dp2SetConsumer circuit pressure differential at design conditions [Pa]
Configuration
Booleanis_baltrueSet to true for balanced primary branch
Controls
PressureDifferencedp2Setloa1.dpTer_nominal + loa1.dp...Consumer circuit pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model DecouplingMixing "Model illustrating the operation of a decoupling circuit serving a single mixing circuit" extends Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.PartialDecoupling ( ctlPum2(k=0.1, r=1e4), typ=Buildings.Fluid.HydronicConfigurations.Types.Control.Cooling, con(typPum=Buildings.Fluid.HydronicConfigurations.Types.Pump.None), mode(table=[0,0; 6,0; 6,1; 15,1; 15,1; 22,1; 22,0; 24,0]), del2(nPorts=4)); PassiveNetworks.SingleMixing con1( typPum=Buildings.Fluid.HydronicConfigurations.Types.Pump.VariableInput, redeclare final package Medium=MediumLiq, typCtl=typ, final energyDynamics=energyDynamics, final m2_flow_nominal=m2_flow_nominal, final dp2_nominal=dp2_nominal, dp1_nominal=con.dpBal3_nominal) "Single mixing connection"; Controls.PIDWithOperatingMode resT2( k=1, Ti=60, reverseActing=false, y_reset=1) "PI controller for consumer circuit temperature reset"; Buildings.Controls.OBC.CDL.Reals.Line T2SetVar( y(final unit="K", displayUnit="degC")) "Consumer circuit temperature set point (reset)"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yValSet(k=0.9, y( final unit="1")) "Valve opening set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(final k=1.0, y( final unit="1")) "One"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer1(final k=0.0, y( final unit="1")) "Zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant T2SetLim0(k= TLiqEnt_nominal + 5, y(final unit="K", displayUnit="degC")) "Consumer circuit temperature limiting set point "; Buildings.Controls.OBC.CDL.Reals.Max yValMax( y(final unit="1")) "Maximum valve opening"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant T2SetLim1( final k=TLiqEnt_nominal, y(final unit="K", displayUnit="degC")) "Consumer circuit temperature design set point "; equation connect(resT2.y,T2SetVar. u); connect(yValSet.y,resT2. u_s); connect(zer1.y, T2SetVar.x1); connect(one.y,T2SetVar. x2); connect(T2SetLim0.y,T2SetVar. f1); connect(yValMax.y, resT2.u_m); connect(T2SetVar.y, con1.set); connect(T2SetLim1.y, T2SetVar.f2); connect(con.port_b2, con1.port_a1); connect(con.port_a2, con1.port_b1); connect(loa.yVal_actual, yValMax.u2); connect(loa1.yVal_actual, yValMax.u1); connect(mode.y[1], con1.mode); connect(ctlPum2.y, con1.yPum); connect(mode.y[1], resT2.mode); connect(con1.port_b2, jun.port_1); connect(con1.port_a2, del2.ports[4]); end DecouplingMixing;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingTemperature Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingTemperature

Model illustrating the operation of a decoupling circuit with Delta-T control

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingTemperature

Information

This example is similar to Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.Decoupling except that an alternative control logic is implemented, based on the measurement of the return temperature in the consumer circuit and in the primary branch.

Decoupling circuit schematic

This control logic intends to keep constant the difference between those two measurements. Considering that we have: T1, ret - T2, ret = (ṁ1 - ṁ2) / ṁ1 * (T1, sup - T2, ret), the control objective can be expressed based on the set point ΔTset and the consumer circuit temperature differential ΔT2 (ΔT2 = T2, sup - T2, ret = T1, sup - T2, ret) as: ΔTset = (ṁ1 - ṁ2) / ṁ1 * ΔT2. For consumer circuits that have a temperature differential relatively constant (see for instance Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.ThrottleOpenLoop), the control logic will thus maintain a nearly constant fraction of primary flow recirculation. However, at very low load if ΔT2 value drops (due for instance to a secondary flow recirculation ensuring a minimum flow for the secondary pump) the control valve will be fully open, and the primary pump speed potentially maxed out, trying to compensate for the vanishing ΔT2. In other words, taking the example of a heating circuit, at low load the control logic cannot infer that the low value of T1, ret - T2, ret is due to a consumer circuit return temperature that is too high (as it tends towards the supply temperature). It will work under the assumption that T1, ret is too low, and open the control valve to try and increase the primary flow recirculation. This flawed control is showcased in this example when the parameter is_cor is set to false (the default), see plots #1 and #2 between 14 and 16 h.

Now setting is_cor to true, a correction is used to counteract this low load effect by limiting the set point to the consumer circuit temperature differential ΔT2. Note that the implementation of that correction is specific to a change-over operation and needs to be adapted for heating-only or cooling-only applications.

Extends from Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.Decoupling (Model illustrating the operation of a decoupling circuit).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominalif typ == Buildings.Fluid.Hy...Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal + (if typ ==...Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominalTLiqEnt_nominalLiquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
PressureDifferencedp1_nominaldpPum_nominal - dpPip_nominalControl valve pressure drop at design conditions [Pa]
Booleanis_corfalseSet to true to correct Delta-T set point for low load operation
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominal1.1*m2_flow_nominalMass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominal/0.9Mass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal10e4Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + dp2SetConsumer circuit pressure differential at design conditions [Pa]
Configuration
Booleanis_baltrueSet to true for balanced primary branch
Controls
PressureDifferencedp2Setloa1.dpTer_nominal + loa1.dp...Consumer circuit pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model DecouplingTemperature "Model illustrating the operation of a decoupling circuit with Delta-T control" extends Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.Decoupling ( con(typCtl=Buildings.Fluid.HydronicConfigurations.Types.Control.None, dpBal3_nominal=0)); parameter Boolean is_cor = false "Set to true to correct Delta-T set point for low load operation"; Buildings.Controls.OBC.CDL.Reals.Subtract dT( y(final unit="K")) "Compute T1Ret-T2Ret"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant dTSetVal[3](final k={1, if typ == Types.Control.Heating then 1 else -1,1}) "Delta-T set point values"; Buildings.Controls.OBC.CDL.Routing.RealExtractor dTSetAct( y(final unit="K"), final nin=3) "Select actual set point based on operating mode"; Controls.PIDWithOperatingMode ctl( k=0.1, Ti=120, u_s(final unit="K", displayUnit="K"), u_m(final unit="K", displayUnit="K"), final reverseActing=typ == Buildings.Fluid.HydronicConfigurations.Types.Control.Heating) "Controller"; Buildings.Controls.OBC.CDL.Reals.Subtract dT2SupRet(y(final unit="K")) "Compute T2Sup-T2Ret"; Modelica.Blocks.Sources.RealExpression T2Ret(y=con.T2Ret.T) "Access T2Ret measurement from connection component"; Modelica.Blocks.Sources.RealExpression T2Sup(y=con.T2Sup.T) "Access T2Sup measurement from connection component"; Buildings.Controls.OBC.CDL.Reals.Max maxDelT(y(final unit="K")) "Compute max(T2Sup-T2Ret, dTSet) for cooling mode"; Buildings.Controls.OBC.CDL.Reals.Min minDelT(y(final unit="K")) "Compute min(T2Sup-T2Ret, dTSet) for heating mode"; Buildings.Controls.OBC.CDL.Routing.RealExtractor dTSetCor( y(final unit="K"), final nin=3) if is_cor "Delta-T set point corrected for low load operation"; Modelica.Blocks.Routing.RealPassThrough dTSetUnc if not is_cor "Delta-T set point uncorrected"; equation connect(T1ConRet.T, dT.u1); connect(dT.y, ctl.u_m); connect(dTSetVal.y, dTSetAct.u); connect(ctl.y, con.yVal); connect(mode.y[1], ctl.mode); connect(T2Ret.y, dT.u2); connect(T2Sup.y, dT2SupRet.u1); connect(T2Ret.y, dT2SupRet.u2); connect(dT2SupRet.y, maxDelT.u2); connect(dT2SupRet.y, minDelT.u1); connect(dTSetAct.y, maxDelT.u1); connect(dTSetAct.y, minDelT.u2); connect(dTSetCor.y, ctl.u_s); connect(dTSetAct.y, dTSetUnc.u); connect(dTSetUnc.y, ctl.u_s); connect(addPar.y, dTSetAct.index); connect(addPar.y, dTSetCor.index); connect(maxDelT.y, dTSetCor.u[2]); connect(minDelT.y, dTSetCor.u[3]); connect(dT2SupRet.y, dTSetCor.u[1]); end DecouplingTemperature;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DiversionOpenLoop Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DiversionOpenLoop

Model illustrating the operation of diversion circuits with constant speed pump

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DiversionOpenLoop

Information

This model represents a heating system where the configuration Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Diversion is used to modulate the heat flow rate transmitted to a constant load. Two identical secondary circuits are connected to a primary circuit with a constant speed pump. The main assumptions are enumerated below.

When simulated with the default parameter values, this example shows the following points.

Sensitivity analysis

Those observations are confirmed by a sensitivity study to the following parameters.

Direct and bypass mass flow rate

The overflow in the bypass branch when the valve is fully closed increases with ψ and decreases with β. It is close to 70% for ψ = 40% and β = 10%. However, the concomitant flow shortage in the other terminal unit with a valve fully open (see Figure 2) is limited to 12%. For a valve authority of β = 50% one may note that the flow shortage is below 5%, indicating that selecting the control valve with a suitable authority largely dampens the impact of an unbalanced bypass.

Diversion circuit bypass flow rate
Figure 1. Bypass mass flow rate (ratio to design value) at fully closed conditions as a function of ψ for various valve authorities β (color scale), and a bypass branch either balanced (right plot) or not (left plot).

Diversion circuit direct flow rate
Figure 2. Direct mass flow rate (ratio to design value) at fully open conditions as a function of ψ for various valve authorities β (color scale), and a bypass branch either balanced (right plot) or not (left plot).

Primary mass flow rate

The total primary mass flow rate (or pump mass flow rate) is plotted on Figure 3. This helps assess the actual flow variation in "constant flow circuits", i.e., constant speed pump distribution systems with terminal units equipped with three-way control valves. The total pump flow can vary up to 50% when the bypass of the three-way valves is not balanced, whereas the flow variation is limited to about 20% when the bypass of the three-way valves is balanced. If the characteristic of the valves is equal percentage and linear, this variation is rather by higher values for an unbalanced bypass and by lower values for a balanced bypass. If the characteristic of the valves is linear and linear, this variation is always by higher values. Eventually, when the control valve authority is higher than 0.5 the flow variation is limited to about ±20% in all cases.

Diversion circuit pump flow rate
Figure 3. Pump mass flow rate (ratio to design value) as a function of ψ for various valve authorities β (color scale), a bypass branch either balanced (right plots) or not (left plots) and either an equal-percentage / linear valve characteristic (top plots) or a linear / linear valve characteristic (bottom plots).

Heat flow rate transferred to the load

The heat flow rate transferred to the load is presented

The impact on the coil capacity of the flow shortage due to an unbalanced bypass is limited to about 5% and is less than 2% for an authority higher or equal to 0.5. A balanced bypass tends to disturb the linearity of the heat flow rate with the valve opening. But again, if the valve is selected with an authority higher or equal to 0.5 that disturbance is highly reduced.

Diversion circuit heat flow rate fully open
Figure 4. Heat flow rate (ratio to design value) at fully open conditions as a function of ψ for various valve authorities β (color scale), and a bypass branch either balanced (right plot) or not (left plot).

Diversion circuit heat flow rate 10% open
Figure 5. Heat flow rate (ratio to design value) at 10% open conditions as a function of ψ for various valve authorities β (color scale), and a bypass branch either balanced (right plot) or not (left plot).

Extends from BaseClasses.PartialActivePrimary (Partial model of active primary network).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominalif typ == Buildings.Fluid.Hy...Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal + (if typ ==...Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominalTLiqEnt_nominalLiquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
PressureDifferencedpValve_nominaldpTer_nominalControl valve pressure drop at design conditions [Pa]
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominalMass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominalMass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(2*dpPip_nominal + dpTer_nom...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominalPrimary pump mass flow rate at design conditions [kg/s]
PressureDifferencedpBal3_nominalif is_bal then dpTer_nominal...Bypass balancing valve pressure drop at design conditions [Pa]
Configuration
Booleanis_balfalseSet to true for a balanced bypass
ValveCharacteristictypChaBuildings.Fluid.HydronicConf...Control valve characteristic
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model DiversionOpenLoop "Model illustrating the operation of diversion circuits with constant speed pump" extends BaseClasses.PartialActivePrimary( energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, dpPum_nominal= (2 * dpPip_nominal + dpTer_nominal + dpValve_nominal) * kSizPum, pum(typ=Buildings.Fluid.HydronicConfigurations.Types.Pump.NoVariableInput), del1(nPorts=3)); parameter Boolean is_bal=false "Set to true for a balanced bypass"; parameter Buildings.Fluid.HydronicConfigurations.Types.ValveCharacteristic typCha= Buildings.Fluid.HydronicConfigurations.Types.ValveCharacteristic.EqualPercentage "Control valve characteristic"; parameter Modelica.Units.SI.PressureDifference dpValve_nominal( final min=0, displayUnit="Pa") = dpTer_nominal "Control valve pressure drop at design conditions"; parameter Modelica.Units.SI.PressureDifference dpBal3_nominal( final min=0, displayUnit="Pa") = if is_bal then dpTer_nominal else 0 "Bypass balancing valve pressure drop at design conditions"; ActiveNetworks.Diversion con( use_siz=false, redeclare final package Medium=MediumLiq, val(fraK=1), final typCha=typCha, final use_lumFloRes=false, final energyDynamics=energyDynamics, final m2_flow_nominal=mTer_flow_nominal, final dpValve_nominal=dpValve_nominal, final dpBal1_nominal=dpPum_nominal - dpPip_nominal - dpTer_nominal - dpValve_nominal, final dpBal3_nominal=dpBal3_nominal) "Hydronic connection"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.Load loa( redeclare final package MediumLiq = MediumLiq, final typ=typ, final dpLiq_nominal=dpTer_nominal, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal, k=10) "Load"; .Buildings.Controls.OBC.CDL.Reals.Sources.Constant fraLoa(k=1.0) "Load modulating signal"; ActiveNetworks.Diversion con1( use_siz=false, redeclare final package Medium = MediumLiq, val(fraK=1), final typCha=typCha, final use_lumFloRes=false, final energyDynamics=energyDynamics, final m2_flow_nominal=mTer_flow_nominal, final dpValve_nominal=dpValve_nominal, final dpBal1_nominal=dpPum_nominal - 2 * dpPip_nominal - dpTer_nominal - dpValve_nominal, final dpBal3_nominal=dpBal3_nominal) "Hydronic connection"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.Load loa1( redeclare final package MediumLiq = MediumLiq, final typ=typ, final dpLiq_nominal=dpTer_nominal, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal, k=10) "Load"; FixedResistances.PressureDrop res1b( redeclare final package Medium = MediumLiq, final m_flow_nominal=mPum_flow_nominal - mTer_flow_nominal, final dp_nominal=dpPip_nominal) "Pipe pressure drop"; Sensors.RelativePressure dp( redeclare final package Medium = MediumLiq) "Differential pressure"; Sensors.RelativePressure dp1( redeclare final package Medium = MediumLiq) "Differential pressure"; .Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable ope( table=[0,1,1; 1,0,1; 2,1,0; 3,0,0], extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.HoldLastPoint, timeScale=100) "Valve opening signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant mode(k=1) "Operating mode"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold isEna(final t=Controls.OperatingModes.disabled) "Returns true if enabled"; equation connect(con.port_b2, loa.port_a); connect(loa.port_b, con.port_a2); connect(fraLoa.y, loa.u); connect(con1.port_b2, loa1.port_a); connect(con1.port_a2, loa1.port_b); connect(fraLoa.y, loa1.u); connect(dp1.port_a, res1b.port_b); connect(dp1.port_a, con1.port_a1); connect(con1.port_b1, dp1.port_b); connect(con.port_b1, dp.port_b); connect(con.port_a1, dp.port_a); connect(ope.y[1], con.yVal); connect(ope.y[2], con1.yVal); connect(res1.port_b, dp.port_a); connect(dp.port_b, del1.ports[2]); connect(res1.port_b, res1b.port_a); connect(dp1.port_b, del1.ports[3]); connect(mode.y, loa.mode); connect(mode.y, loa1.mode); connect(mode.y, isEna.u); connect(isEna.y, pum.y1); end DiversionOpenLoop;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionThreeWay Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionThreeWay

Model illustrating the operation of an inversion circuit with three-way valve

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionThreeWay

Information

This model represents a heating system where the configuration Buildings.Fluid.HydronicConfigurations.ActiveNetworks.InjectionThreeWay serves as the interface between a constant flow primary circuit at constant supply temperature and a constant flow secondary circuit at variable supply temperature. The secondary supply temperature is reset with an open loop, representing for instance a reset logic based on the outdoor air temperature. Two identical terminal units are served by the secondary circuit. Each terminal unit has its own hourly load profile.

The primary side of the injection circuit is balanced at design conditions if kSizBal=1. Selecting a lower value of the parameter kSizBal illustrates the operation with an oversized balancing valve, yielding a lower pressure drop. One can observe the degraded ΔT (plot #6) and elevated mass flow rate (plot #7) in the primary circuit. However, the operation of the consumer circuit is not disturbed: the set point and the loads are met.

Extends from BaseClasses.PartialActivePrimary (Partial model of active primary network).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum5.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominal40 + 273.15Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal - 5Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominal60 + 273.15Liquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(TLiqEnt_nom...Mass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominalMass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(dpPip_nominal + con.dpValve...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominalPrimary pump mass flow rate at design conditions [kg/s]
Configuration
RealkSizBal0.5Sizing factor for primary balancing valve (1 means balanced)
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model InjectionThreeWay "Model illustrating the operation of an inversion circuit with three-way valve" extends BaseClasses.PartialActivePrimary( m1_flow_nominal= m2_flow_nominal * (TLiqEnt_nominal - TLiqLvg_nominal) / (TLiqSup_nominal - TLiqLvg_nominal), kSizPum=5.0, TLiqEnt_nominal=40+273.15, TLiqLvg_nominal=TLiqEnt_nominal-5, TLiqSup_nominal=60+273.15, dpPum_nominal=(dpPip_nominal + con.dpValve_nominal) * kSizPum, del1(nPorts=2), pum(typ=Buildings.Fluid.HydronicConfigurations.Types.Pump.NoVariableInput)); parameter Real kSizBal(final min=0) = 0.5 "Sizing factor for primary balancing valve (1 means balanced)"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.InjectionThreeWay con( typPum=Buildings.Fluid.HydronicConfigurations.Types.Pump.NoVariableInput, redeclare final package Medium = MediumLiq, use_lumFloRes=false, typCtl=typ, final energyDynamics=energyDynamics, final m1_flow_nominal=m1_flow_nominal, final m2_flow_nominal=m2_flow_nominal, final dp2_nominal=dpTer_nominal + loa.con.dpValve_nominal + dpPip_nominal, final dpBal1_nominal= kSizBal * (dpPum_nominal - dpPip_nominal - con.dpValve_nominal), pum(addPowerToMedium=false)) "Hydronic connection"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.LoadThreeWayValveControl loa( redeclare final package MediumLiq = MediumLiq, final typ=typ, k=0.1, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal) "Load"; Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable fraLoa(table=[0,0,0; 6,0,0; 6.1,1,1; 8,1,1; 9,1,0; 14,0.5,0; 14.5,0,0; 16,0,0; 17,0,1; 21,0, 1; 22,0,0; 24,0,0], timeScale=3600) "Load modulating signal"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.LoadThreeWayValveControl loa1( redeclare final package MediumLiq = MediumLiq, final typ=typ, k=0.1, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal) "Load"; Sensors.RelativePressure dp( redeclare final package Medium = MediumLiq) "Differential pressure"; FixedResistances.PressureDrop res2( redeclare final package Medium = MediumLiq, final m_flow_nominal=con.pum.m_flow_nominal - loa.mLiq_flow_nominal, final dp_nominal=dpPip_nominal) "Pipe pressure drop"; Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable mode( table=[0,0; 6,0; 6,1; 22,1; 22,0; 24,0], timeScale=3600, period=86400) "Operating mode (time schedule)"; Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable setOff(table=[0,0; 12, 0; 13,-5; 14,-7; 17,0; 24,0], timeScale=3600) "Offset applied to design supply temperature to compute set point"; Buildings.Controls.OBC.CDL.Reals.AddParameter T2Set(final p= TLiqEnt_nominal, y(final unit="K", displayUnit="degC")) "Consumer circuit temperature set point"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold isEna(final t=Controls.OperatingModes.disabled) "Returns true if enabled"; equation connect(con.port_b1, dp.port_b); connect(con.port_a1, dp.port_a); connect(res2.port_b, loa1.port_a); connect(fraLoa.y[1], loa.u); connect(fraLoa.y[2], loa1.u); connect(setOff.y[1], T2Set.u); connect(mode.y[1], con.mode); connect(T2Set.y, con.set); connect(con.port_b2, loa.port_a); connect(loa.port_b, con.port_a2); connect(con.port_b2,res2. port_a); connect(loa1.port_b, con.port_a2); connect(res1.port_b, dp.port_a); connect(dp.port_b, del1.ports[2]); connect(mode.y[1], loa.mode); connect(mode.y[1], loa1.mode); connect(mode.y[1], isEna.u); connect(isEna.y, pum.y1); end InjectionThreeWay;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayCheckValve Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayCheckValve

Model illustrating the operation of an inversion circuit with two-way valve and check valve and variable secondary

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayCheckValve

Information

This model is nearly similar to Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariable except that

Extends from InjectionTwoWayVariable (Model illustrating the operation of an inversion circuit with two-way valve and variable secondary).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominal277.55Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominal286.65Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominal276.15Liquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
Nominal condition
MassFlowRatemTer_flow_nominal2.46Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(TLiqEnt_nom...Mass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominal2*mTer_flow_nominal/0.9Mass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(dpPip_nominal + dp1Set)*kSi...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + dp2SetConsumer circuit pressure differential at design conditions [Pa]
TemperatureT2Set_nominal3.2 + 273.15Consumer circuit design temperature set point [K]
TemperatureTAirEnt_nominal298.75Air entering temperature at design conditions [K]
MassFractionphiAirEnt_nominal0.5Air entering relative humidity at design conditions [1]
MassFlowRatemAir_flow_nominal6.8Air mass flow rate at design conditions [kg/s]
Configuration
Booleanis_balfalseSet to true for balanced primary branch
Booleanhave_resT2falseSet to true for consumer circuit temperature reset, false for constant set point
Controls
PressureDifferencedp1Set1e4Pressure differential set point [Pa]
PressureDifferencedp2Setloa1.dpTer_nominal + loa1.dp...Secondary pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model InjectionTwoWayCheckValve "Model illustrating the operation of an inversion circuit with two-way valve and check valve and variable secondary" extends InjectionTwoWayVariable( T2Set_nominal=3.2+273.15, redeclare ActiveNetworks.InjectionTwoWayCheckValve con(k=0.1, Ti=500)); end InjectionTwoWayCheckValve;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstant Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstant

Model illustrating the operation of an inversion circuit with two-way valve and constant secondary

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstant

Information

This model represents a heating system where the configuration Buildings.Fluid.HydronicConfigurations.ActiveNetworks.InjectionTwoWay serves as the interface between a variable flow primary circuit and a constant flow secondary circuit. Two identical terminal units are served by the secondary circuit. Each terminal unit has its own hourly load profile. The main assumptions are enumerated below.

Without temperature reset (have_resT2=false), the primary flow variation with the load is not optimal (see plot #8): for a load fraction of 30% the normalized primary flow rate is about 60%.

The flow reduction is enhanced when using a reset based on the maximum valve demand: for a load fraction of 30% the normalized primary flow rate is now close to 30%. (Also note the setting of the controller resT2 which ensures a reset at design value when the control loop is enabled).

The flow reduction is further enhanced when using a control based on the return temperature (have_resT2 = false and con(typVar=Types.ControlVariable.ReturnTemperature)): the normalized primary flow rate varies close to linearly with the load fraction. This explains why this control strategy is often adopted as it brings a good flow rate variation with the load at a first cost lower than the previous reset option based on the valve demand. However, it also brings some additional constraints on the sizing of the terminal units. The load diversity must indeed be accounted for. When tracking the return temperature of a constant flow consumer circuit, the supply temperature will vary with the aggregated load. In our example, the actual value of the secondary supply temperature is lower than its design value at partial load, which yields unmet loads (see plot #4). The terminal units should be sized accordingly, based on the lowest possible ΔT when one terminal unit may still be at peak load. Additional caveats speak against the use of return temperature control with this hydronic configuration in the case of variable flow consumer circuits, see Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariableReturn.

Extends from Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.PartialInjectionTwoWay (Partial model of primary variable circuit serving an inversion circuit with two-way valve).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominal55 + 273.15Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal + (if typ ==...Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominal60 + 273.15Liquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
LoadThreeWayValveControlloaredeclare BaseClasses.LoadTh...Load
LoadThreeWayValveControlloa1redeclare BaseClasses.LoadTh...Load
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(TLiqEnt_nom...Mass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominalMass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(dpPip_nominal + dp1Set)*kSi...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + loa1.dpTer_n...Consumer circuit pressure differential at design conditions [Pa]
TemperatureT2Set_nominalif con.typVar == Buildings.F...Consumer circuit design temperature set point [K]
TemperatureTAirEnt_nominal293.15Air entering temperature at design conditions [K]
MassFractionphiAirEnt_nominal0.5Air entering relative humidity at design conditions [1]
Configuration
Booleanis_balfalseSet to true for balanced primary branch
Booleanhave_resT2falseSet to true for consumer circuit temperature reset, false for constant set point
Controls
PressureDifferencedp1Set1e4Pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model InjectionTwoWayConstant "Model illustrating the operation of an inversion circuit with two-way valve and constant secondary" extends Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.PartialInjectionTwoWay ( del2(nPorts=3), dp2_nominal=dpPip_nominal + loa1.dpTer_nominal + loa1.dpValve_nominal, con(typVar=Buildings.Fluid.HydronicConfigurations.Types.ControlVariable.SupplyTemperature)); parameter Boolean have_resT2 = false "Set to true for consumer circuit temperature reset, false for constant set point"; parameter Modelica.Units.SI.Temperature T2Set_nominal= if con.typVar==Buildings.Fluid.HydronicConfigurations.Types.ControlVariable.SupplyTemperature then TLiqEnt_nominal else TLiqLvg_nominal "Consumer circuit design temperature set point"; parameter Modelica.Units.SI.Temperature TAirEnt_nominal=293.15 "Air entering temperature at design conditions"; parameter Modelica.Units.SI.MassFraction phiAirEnt_nominal=0.5 "Air entering relative humidity at design conditions"; replaceable BaseClasses.LoadThreeWayValveControl loa constrainedby BaseClasses.PartialLoadValveControl( redeclare final package MediumLiq = MediumLiq, final typ=typ, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TAirEnt_nominal=TAirEnt_nominal, final phiAirEnt_nominal=phiAirEnt_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal, dpBal1_nominal=dp2_nominal-loa.dpTer_nominal-loa.dpValve_nominal) "Load"; replaceable BaseClasses.LoadThreeWayValveControl loa1 constrainedby BaseClasses.PartialLoadValveControl( redeclare final package MediumLiq = MediumLiq, final typ=typ, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TAirEnt_nominal=TAirEnt_nominal, final phiAirEnt_nominal=phiAirEnt_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal, dpBal1_nominal=0) "Load"; FixedResistances.PressureDrop res2( redeclare final package Medium = MediumLiq, m_flow_nominal=con.pum.m_flow_nominal - loa.mLiq_flow_nominal, dp_nominal=dpPip_nominal) "Pipe pressure drop"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant T2SetLim1( final k=T2Set_nominal, y(final unit="K", displayUnit="degC")) "Consumer circuit temperature design set point "; Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable fraLoa(table=[0,0,0; 6, 0,0; 6.1,1,1; 8,1,1; 9,1,0; 14,0.5,0; 14.5,0,0; 16,0,0; 17,0,1; 21,0,1; 22,0,0; 24,0,0], timeScale=3600) "Load modulating signal"; Controls.PIDWithOperatingMode resT2( k=1, Ti=60, reverseActing=false, y_reset=1) "PI controller for consumer circuit temperature reset"; Buildings.Controls.OBC.CDL.Reals.Line T2SetVar( y(final unit="K", displayUnit="degC")) if have_resT2 "Consumer circuit temperature set point (reset)"; Buildings.Controls.OBC.CDL.Reals.Max yValMax( y(final unit="1")) "Maximum valve opening"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yValSet( k=0.9, y(final unit="1")) "Valve opening set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one( final k=1, y(final unit="1")) "One"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer( final k=0, y(final unit="1")) "Zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant T2SetLim0( k=T2Set_nominal + (if con.typCtl == Buildings.Fluid.HydronicConfigurations.Types.Control.Heating then -10 else +5), y(final unit="K", displayUnit="degC")) "Consumer circuit temperature limiting set point "; Modelica.Blocks.Routing.RealPassThrough T2SetCst( y(final unit="K", displayUnit="degC")) if not have_resT2 "Consumer circuit temperature set point (constant)"; Modelica.Blocks.Routing.RealPassThrough T2Set( y(final unit="K", displayUnit="degC")) "Consumer circuit temperature set point"; equation connect(fraLoa.y[1], loa.u); connect(fraLoa.y[2], loa1.u); connect(con.port_b2, loa.port_a); connect(del2.ports[2], loa1.port_b); connect(loa.port_b, del2.ports[3]); connect(con.port_b2, res2.port_a); connect(res2.port_b, loa1.port_a); connect(resT2.y, T2SetVar.u); connect(loa.yVal_actual, yValMax.u2); connect(loa1.yVal_actual, yValMax.u1); connect(yValMax.y, resT2.u_m); connect(mode.y[1], resT2.mode); connect(yValSet.y, resT2.u_s); connect(zer.y, T2SetVar.x1); connect(one.y, T2SetVar.x2); connect(T2SetLim1.y, T2SetVar.f2); connect(T2SetLim0.y, T2SetVar.f1); connect(T2SetLim1.y, T2SetCst.u); connect(T2SetCst.y, T2Set.u); connect(T2SetVar.y, T2Set.u); connect(T2Set.y, con.set); connect(mode.y[1], loa.mode); connect(mode.y[1], loa1.mode); end InjectionTwoWayConstant;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstantReturn Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstantReturn


Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstantReturn

Information

This model is almost similar to Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstant except that a cooling system is represented, and the valve control logic is based on the consumer return temperature. This model serves mostly as a reference to illustrate the shortcomings of this control option when used with a variable consumer circuit such as in Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariableReturn.

In this model the load is not met at partial load due to the sizing of the terminal units that does not take into account the load diversity as required when controlling for the return temperature (see the explanation provided in Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstant). In addition, the load model does not guarantee a linear variation of the load with the input signal in cooling mode, see Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.Load. This amplifies the effect of the unmet load at partial load.

Extends from InjectionTwoWayConstant (Model illustrating the operation of an inversion circuit with two-way valve and constant secondary).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominal277.55Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominal286.65Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominal276.15Liquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
Nominal condition
MassFlowRatemTer_flow_nominal2.46Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(TLiqEnt_nom...Mass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominalMass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(dpPip_nominal + dp1Set)*kSi...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + loa1.dpTer_n...Consumer circuit pressure differential at design conditions [Pa]
TemperatureT2Set_nominalif con.typVar == Buildings.F...Consumer circuit design temperature set point [K]
TemperatureTAirEnt_nominal298.75Air entering temperature at design conditions [K]
MassFractionphiAirEnt_nominal0.5Air entering relative humidity at design conditions [1]
MassFlowRatemAir_flow_nominal6.8Air mass flow rate at design conditions [kg/s]
Configuration
Booleanis_balfalseSet to true for balanced primary branch
Booleanhave_resT2falseSet to true for consumer circuit temperature reset, false for constant set point
Controls
PressureDifferencedp1Set1e4Pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model InjectionTwoWayConstantReturn extends InjectionTwoWayConstant( loa(final mAir_flow_nominal=mAir_flow_nominal), loa1(final mAir_flow_nominal=mAir_flow_nominal), typ=Buildings.Fluid.HydronicConfigurations.Types.Control.Cooling, mTer_flow_nominal=2.46, TAirEnt_nominal=298.75, phiAirEnt_nominal=0.5, TLiqEnt_nominal=277.55, TLiqLvg_nominal=286.65, TLiqSup_nominal=276.15, con(typVar=Buildings.Fluid.HydronicConfigurations.Types.ControlVariable.ReturnTemperature)); parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal=6.8 "Air mass flow rate at design conditions"; end InjectionTwoWayConstantReturn;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariable Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariable

Model illustrating the operation of an inversion circuit with two-way valve and variable secondary

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariable

Information

This model is almost similar to Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstant except that a cooling system is represented, and the consumer circuit is a variable flow circuit with a variable speed pump and two-way valves. The pump speed is modulated to track a constant pressure differential at the boundaries of the remote terminal unit.

For this circuit to operate as intended, it is critical that the secondary supply temperature set point be different from the primary supply temperature. Otherwise, the tracking error does not change sign and there is no overshoot that can desaturate the integral term of the PI controller. In other words, the controller output is fixed as soon as the measured value equals the set point. Therefore, the equilibrium point typically differs from the control intent which is a primary flow rate varying with the load. One can observe that behavior by setting TLiqSup_nominal=TLiqEnt_nominal and have_resT2=false. Such setting yields a fixed valve position with a primary recirculation and a flow reversal in the bypass whereas the control intent would be a slightly closer position ensuring a positive flow in the bypass. Note that this is nearly invisible from an operating standpoint since the set point and the loads are met. However, this is definitely detrimental to the overall performance as the primary circuit is operated at a higher flow rate and lower ΔT than needed. The system practically behaves as there was no control valve installed on the primary return line.

The fact that the load seems unmet at partial load (see plot #4) is due to the load model that does not guarantee a linear variation of the load with the input signal in cooling mode, see Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.Load.

Extends from InjectionTwoWayConstantReturn.

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominal277.55Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominal286.65Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominal276.15Liquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
Nominal condition
MassFlowRatemTer_flow_nominal2.46Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(TLiqEnt_nom...Mass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominal2*mTer_flow_nominal/0.9Mass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(dpPip_nominal + dp1Set)*kSi...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + dp2SetConsumer circuit pressure differential at design conditions [Pa]
TemperatureT2Set_nominalif con.typVar == Buildings.F...Consumer circuit design temperature set point [K]
TemperatureTAirEnt_nominal298.75Air entering temperature at design conditions [K]
MassFractionphiAirEnt_nominal0.5Air entering relative humidity at design conditions [1]
MassFlowRatemAir_flow_nominal6.8Air mass flow rate at design conditions [kg/s]
Configuration
Booleanis_balfalseSet to true for balanced primary branch
Booleanhave_resT2falseSet to true for consumer circuit temperature reset, false for constant set point
Controls
PressureDifferencedp1Set1e4Pressure differential set point [Pa]
PressureDifferencedp2Setloa1.dpTer_nominal + loa1.dp...Secondary pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model InjectionTwoWayVariable "Model illustrating the operation of an inversion circuit with two-way valve and variable secondary" extends InjectionTwoWayConstantReturn( redeclare BaseClasses.LoadTwoWayValveControl loa, redeclare BaseClasses.LoadTwoWayValveControl loa1, del2(nPorts=4), dp2_nominal=dpPip_nominal + dp2Set, m2_flow_nominal=2*mTer_flow_nominal/0.9, con( typPum=Buildings.Fluid.HydronicConfigurations.Types.Pump.VariableInput, typVar=Buildings.Fluid.HydronicConfigurations.Types.ControlVariable.SupplyTemperature)); parameter Modelica.Units.SI.PressureDifference dp2Set( final min=0, displayUnit="Pa") = loa1.dpTer_nominal + loa1.dpValve_nominal "Secondary pressure differential set point"; Sensors.RelativePressure dp2(redeclare final package Medium = MediumLiq) "Differential pressure"; FixedResistances.PressureDrop resEnd2( redeclare final package Medium = MediumLiq, final m_flow_nominal=0.1*m2_flow_nominal, final dp_nominal=dp2Set) "Pipe pressure drop"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant dp2SetVal( final k=dp2Set) "Pressure differential set point"; Controls.PIDWithOperatingMode ctlPum2( k=0.1, Ti=60, r=1e4) "Pump controller"; equation connect(dp2.port_a, loa1.port_a); connect(dp2.port_b, loa1.port_b); connect(resEnd2.port_b, del2.ports[4]); connect(dp2SetVal.y, ctlPum2.u_s); connect(mode.y[1], ctlPum2.mode); connect(dp2.p_rel, ctlPum2.u_m); connect(ctlPum2.y, con.yPum); connect(res2.port_b, resEnd2.port_a); end InjectionTwoWayVariable;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariableReturn Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariableReturn

Model illustrating the operation of an inversion circuit with two-way valve and variable secondary with return temperature control

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariableReturn

Information

This model illustrates a configuration that is not recommended, that is an injection circuit with a two-way valve serving a variable flow consumer circuit, and controlled based on the return temperature. When comparing this model to Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayConstantReturn one can notice that the design load is not met (see plot #4 between 6h and 8h) despite the return temperature set point being met (see plot #1) and the consumer circuit being operated at design flow rate (see plot #2). This is because, for the specific sizing of the cooling coil and for certain operating conditions the "process characteristic" is not monotonously decreasing as expected. This is illustrated by the simulation of the load model with open loop control (see plot #9). That simulation shows that for a constant load, an increasing supply temperature yields a decreasing return temperature. However, the control logic is based on the consideration that a decreasing return temperature is the signature of a decreasing load. It thus triggers the closing of the control valve, which in turn yields an increasing secondary flow recirculation, so an increasing supply temperature that further decreases the return temperature. The result is that the equilibrium point differs from the control intent, here with a supply temperature much higher than the design value (6.6 °C instead of 4.4 °C).

Extends from InjectionTwoWayVariable (Model illustrating the operation of an inversion circuit with two-way valve and variable secondary).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominal277.55Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominal286.65Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominal276.15Liquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
Nominal condition
MassFlowRatemTer_flow_nominal2.46Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(TLiqEnt_nom...Mass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominal2*mTer_flow_nominal/0.9Mass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(dpPip_nominal + dp1Set)*kSi...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
PressureDifferencedp2_nominaldpPip_nominal + dp2SetConsumer circuit pressure differential at design conditions [Pa]
TemperatureT2Set_nominalif con.typVar == Buildings.F...Consumer circuit design temperature set point [K]
TemperatureTAirEnt_nominal298.75Air entering temperature at design conditions [K]
MassFractionphiAirEnt_nominal0.5Air entering relative humidity at design conditions [1]
MassFlowRatemAir_flow_nominal6.8Air mass flow rate at design conditions [kg/s]
Configuration
Booleanis_balfalseSet to true for balanced primary branch
Booleanhave_resT2falseSet to true for consumer circuit temperature reset, false for constant set point
Controls
PressureDifferencedp1Set1e4Pressure differential set point [Pa]
PressureDifferencedp2Setloa1.dpTer_nominal + loa1.dp...Secondary pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model InjectionTwoWayVariableReturn "Model illustrating the operation of an inversion circuit with two-way valve and variable secondary with return temperature control" extends InjectionTwoWayVariable( con(typVar=Buildings.Fluid.HydronicConfigurations.Types.ControlVariable.ReturnTemperature)); BaseClasses.LoadTwoWayValveControl loaOpe( typ=Buildings.Fluid.HydronicConfigurations.Types.Control.Cooling, mAir_flow_nominal=mAir_flow_nominal, redeclare final package MediumLiq = MediumLiq, k=1, Ti=1, final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, final mLiq_flow_nominal=mTer_flow_nominal, final TAirEnt_nominal=TAirEnt_nominal, final phiAirEnt_nominal=phiAirEnt_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal) "Load with open loop control"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp TSupVal1( height=6, duration=16*3600, offset=TLiqEnt_nominal, startTime=6*3600, y(final unit="K", displayUnit="degC")) "Supply temperature"; Sources.Boundary_pT refOpe( redeclare final package Medium = MediumLiq, final p=p_min + 10*(loa1.dpTer_nominal + loa1.dpValve_nominal), use_T_in=true, nPorts=1) "Pressure and temperature boundary condition"; Sources.Boundary_pT refOpe1( redeclare final package Medium = MediumLiq, final p=p_min, nPorts=1) "Pressure and temperature boundary condition"; Sensors.TemperatureTwoPort TSupOpe( redeclare final package Medium = MediumLiq, final m_flow_nominal=loa.mLiq_flow_nominal, tau=0, T_start=loa1.TLiqEnt_nominal) "Supply temperature sensor"; Sensors.TemperatureTwoPort TRetOpe( redeclare final package Medium = MediumLiq, final m_flow_nominal=loa.mLiq_flow_nominal, tau=0, T_start=loa1.TLiqLvg_nominal) "Return temperature sensor"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant fraLoa1(k=0.7) "Load modulating signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant modOpe( k=1) "Operating mode"; equation connect(TSupOpe.port_b, loaOpe.port_a); connect(loaOpe.port_b, TRetOpe.port_a); connect(TSupVal1.y, refOpe.T_in); connect(fraLoa1.y, loaOpe.u); connect(refOpe.ports[1], TSupOpe.port_a); connect(TRetOpe.port_b, refOpe1.ports[1]); connect(modOpe.y, loaOpe.mode); end InjectionTwoWayVariableReturn;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.SingleMixing Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.SingleMixing

Model illustrating the operation of single mixing circuits

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.SingleMixing

Information

This model represents a heating system where the configuration Buildings.Fluid.HydronicConfigurations.ActiveNetworks.SingleMixing serves as the interface between a variable flow primary circuit at constant supply temperature and a constant flow secondary circuit at variable supply temperature. The primary pump is operated at constant speed so the operating point rides the pump characteristic as the three-way valve closes. The secondary supply temperature is reset with an open loop, representing for instance a reset logic based on the outdoor air temperature. Two identical terminal units are served by the secondary circuit. Each terminal unit has its own hourly load profile.

For this model to simulate properly the ratio of the Kvs coefficient between the bypass branch and the direct branch of the control valve (con.val.fraK) must be set to 1. Otherwise, if con.val.fraK=0.7 cavitation occurs when the secondary pump starts and the control valve is fully open, as the secondary pump head exceeds the primary pressure differential augmented by the pressure drop across the direct branch of the control valve. Alternatively, if the pump is sized with the pressure drop across the direct branch of the control valve (disregarding the higher pressure drop across the bypass) it cannot provide enough head at low supply temperature set point when the valve is partially closed.

Note that the load loa1 is not fully met at partial load (see plot #4 from 17 h in model time) due to the unbalanced bypass of the terminal unit control valves. See Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DiversionOpenLoop for further details.

Extends from BaseClasses.PartialActivePrimary (Partial model of active primary network).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominalif typ == Buildings.Fluid.Hy...Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal + (if typ ==...Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominalTLiqEnt_nominalLiquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(TLiqEnt_nom...Mass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominalMass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal10e4Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominalPrimary pump mass flow rate at design conditions [kg/s]
Configuration
Booleanis_baltrueSet to true for balanced primary branch
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model SingleMixing "Model illustrating the operation of single mixing circuits" extends BaseClasses.PartialActivePrimary( m1_flow_nominal= m2_flow_nominal * (TLiqEnt_nominal - TLiqLvg_nominal) / (TLiqSup_nominal - TLiqLvg_nominal), dpPum_nominal=10e4, del1(nPorts=2), pum(typ=Buildings.Fluid.HydronicConfigurations.Types.Pump.NoVariableInput, typMod=Buildings.Fluid.HydronicConfigurations.Types.PumpModel.Speed)); parameter Boolean is_bal=true "Set to true for balanced primary branch"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.SingleMixing con( typPum=Buildings.Fluid.HydronicConfigurations.Types.Pump.NoVariableInput, redeclare final package Medium=MediumLiq, use_lumFloRes=false, final typCtl=typ, final energyDynamics=energyDynamics, final m2_flow_nominal=m2_flow_nominal, final dp1_nominal= dpPum_nominal-dpPip_nominal, final dp2_nominal=loa1.dpTer_nominal + loa1.dpValve_nominal + dpPip_nominal, final dpBal1_nominal=if is_bal then dpPum_nominal-dpPip_nominal else 0, val(fraK=1.0)) "Hydronic connection"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.LoadThreeWayValveControl loa( redeclare final package MediumLiq = MediumLiq, final typ=typ, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal) "Load"; Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable fraLoa(table=[0,0,0; 6, 0,0; 6.1,1,1; 8,1,1; 9,1,0; 14,0.5,0; 14.5,0,0; 16,0,0; 17,0,1; 21,0,1; 22,0,0; 24,0,0], timeScale=3600) "Load modulating signal"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.LoadThreeWayValveControl loa1( redeclare final package MediumLiq = MediumLiq, final typ=typ, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal) "Load"; Sensors.RelativePressure dp( redeclare final package Medium = MediumLiq) "Differential pressure"; FixedResistances.PressureDrop res2( redeclare final package Medium = MediumLiq, final m_flow_nominal=con.pum.m_flow_nominal - loa.mLiq_flow_nominal, final dp_nominal=dpPip_nominal) "Pipe pressure drop"; Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable mode( table=[0,0; 6,0; 6,1; 22,1; 22,0; 24,0], timeScale=3600, period=86400) "Operating mode (time schedule)"; Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable setOff(table=[0,0; 9,0; 15,-10; 16,-10; 17,0; 24,0], timeScale=3600) "Offset applied to design supply temperature to compute set point"; Buildings.Controls.OBC.CDL.Reals.AddParameter T2Set(final p= TLiqEnt_nominal, y(final unit="K", displayUnit="degC")) "Consumer circuit temperature set point"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold isEna( final t=Controls.OperatingModes.disabled) "Returns true if enabled"; equation connect(con.port_b1, dp.port_b); connect(con.port_a1, dp.port_a); connect(res2.port_b, loa1.port_a); connect(fraLoa.y[1], loa.u); connect(fraLoa.y[2], loa1.u); connect(setOff.y[1], T2Set.u); connect(mode.y[1], con.mode); connect(T2Set.y, con.set); connect(con.port_b2, loa.port_a); connect(loa.port_b, con.port_a2); connect(loa1.port_b, con.port_a2); connect(con.port_b2,res2. port_a); connect(res1.port_b, dp.port_a); connect(dp.port_b, del1.ports[2]); connect(mode.y[1], loa.mode); connect(mode.y[1], loa1.mode); connect(mode.y[1], isEna.u); connect(isEna.y, pum.y1); end SingleMixing;

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.ThrottleOpenLoop Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.ThrottleOpenLoop

Model illustrating the operation of throttle circuits with variable speed pump

Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.ThrottleOpenLoop

Information

This model represents a heating system where the configuration Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Throttle is used to modulate the heat flow rate transmitted to a constant load. Two identical secondary circuits are connected to a primary circuit with a variable speed pump. The pump speed is modulated to track a constant pressure differential at the boundaries of the remote circuit. The main assumptions are enumerated below.

When simulated with the default parameter values, this example shows the following points.

Sensitivity analysis

Those observations are confirmed by a sensitivity study to the following parameters.

Valve mass flow rate

When the circuits are not balanced, Figure 1 shows that the overflow through the terminal unit closest to the pump may reach 100% of the design flow rate for low values of ψ and β. However, the concomitant flow shortage in the other terminal unit with a valve fully open is limited to about 40% and the coil capacity is reduced by less than 20% (see Figure 2). A good valve authority (higher than 0.5) does not help improving the situation.

When the circuits are balanced, the overflow is eliminated but the flow shortage is even higher (reaching 60%) and becomes critical with respect to the coil capacity that gets reduced by nearly 40%. A good valve authority (higher than 0.5) slightly helps improving the situation, which remains worse than in the case of unbalanced circuits though.

Throttle circuit  flow rate
Figure 1. Valve mass flow rate (ratio to design value) at fully open conditions as a function of ψ for various valve authorities β (color scale), and a circuit either balanced (right plot) or not (left plot).

Diversion circuit heat flow rate fully open
Figure 2. Heat flow rate (ratio to design value) at fully open conditions as a function of ψ for various valve authorities β (color scale), and a circuit either balanced (right plot) or not (left plot).

Extends from BaseClasses.PartialActivePrimary (Partial model of active primary network).

Parameters

TypeNameDefaultDescription
ControltypBuildings.Fluid.HydronicConf...Load type
IntegernTer2Number of terminal units
RealkSizPum1.0Pump oversizing coefficient [1]
Pressurep_min200000Circuit minimum pressure [Pa]
TemperatureTLiqEnt_nominalif typ == Buildings.Fluid.Hy...Liquid entering temperature at design conditions [K]
TemperatureTLiqLvg_nominalTLiqEnt_nominal + (if typ ==...Liquid leaving temperature at design conditions [K]
TemperatureTLiqEntChg_nominal60 + 273.15Liquid entering temperature in change-over mode [K]
TemperatureTLiqSup_nominalTLiqEnt_nominalLiquid primary supply temperature at design conditions [K]
TemperatureTLiqSupChg_nominalTLiqEntChg_nominalLiquid primary supply temperature in change-over mode [K]
PressureDifferencedpValve_nominaldpTer_nominalControl valve pressure drop at design conditions [Pa]
PressureDifferencedpValve1_nominaldpTer_nominalControl valve pressure drop at design conditions [Pa]
PressureDifferencedpPip1_nominal3E4Pipe section (between two circuits) pressure drop at design conditions [Pa]
Nominal condition
MassFlowRatemTer_flow_nominal1Terminal unit mass flow rate at design conditions [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominalMass flow rate in primary branch at design conditions [kg/s]
MassFlowRatem2_flow_nominalnTer*mTer_flow_nominalMass flow rate in consumer circuit at design conditions [kg/s]
PressureDifferencedpTer_nominal3E4Terminal unit pressure drop at design conditions [Pa]
PressureDifferencedpPip_nominal0.5E4Pipe section pressure drop at design conditions [Pa]
PressureDifferencedpPum_nominal(dpPip_nominal + dpPip1_nomi...Pump head at design conditions [Pa]
MassFlowRatemPum_flow_nominalm1_flow_nominal/0.9Primary pump mass flow rate at design conditions [kg/s]
Configuration
Booleanis_balfalseSet to true for balanced primary branch
ValveCharacteristictypChaBuildings.Fluid.HydronicConf...Control valve characteristic
Controls
PressureDifferencedp1SetdpValve1_nominal + dpTer_nom...Pressure differential set point [Pa]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

model ThrottleOpenLoop "Model illustrating the operation of throttle circuits with variable speed pump" extends BaseClasses.PartialActivePrimary( energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, dpPum_nominal=(dpPip_nominal + dpPip1_nominal + dp1Set)*kSizPum, mPum_flow_nominal=m1_flow_nominal / 0.9, del1(nPorts=4)); parameter Boolean is_bal=false "Set to true for balanced primary branch"; parameter Buildings.Fluid.HydronicConfigurations.Types.ValveCharacteristic typCha= Buildings.Fluid.HydronicConfigurations.Types.ValveCharacteristic.EqualPercentage "Control valve characteristic"; // Only an approximation: practical authority depends on mass flow rate. parameter Modelica.Units.SI.PressureDifference dpValve_nominal( final min=0, displayUnit="Pa") = dpTer_nominal "Control valve pressure drop at design conditions"; parameter Modelica.Units.SI.PressureDifference dpValve1_nominal( final min=0, displayUnit="Pa") = dpTer_nominal "Control valve pressure drop at design conditions"; parameter Modelica.Units.SI.PressureDifference dpPip1_nominal( displayUnit="Pa") = 3E4 "Pipe section (between two circuits) pressure drop at design conditions"; parameter Modelica.Units.SI.PressureDifference dp1Set(displayUnit="Pa")= dpValve1_nominal + dpTer_nominal "Pressure differential set point"; Throttle con( use_siz=false, redeclare final package Medium=MediumLiq, final use_lumFloRes=false, final energyDynamics=energyDynamics, final m2_flow_nominal=mTer_flow_nominal, final dpValve_nominal=dpValve_nominal, final dpBal1_nominal=if is_bal then dpPum_nominal - dpPip_nominal - dpTer_nominal - dpValve_nominal else 0) "Hydronic connection"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.Load loa( redeclare final package MediumLiq = MediumLiq, final typ=typ, final dpLiq_nominal=dpTer_nominal, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal, k=10) "Load"; .Buildings.Controls.OBC.CDL.Reals.Sources.Constant fraLoa(k=1) "Load modulating signal"; Throttle con1( use_siz=false, final use_lumFloRes=false, redeclare final package Medium = MediumLiq, final energyDynamics=energyDynamics, final m2_flow_nominal=mTer_flow_nominal, final dpValve_nominal=dpValve1_nominal, final dpBal1_nominal=0) "Hydronic connection"; Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.BaseClasses.Load loa1( redeclare final package MediumLiq = MediumLiq, final typ=typ, final dpLiq_nominal=dpTer_nominal, final energyDynamics=energyDynamics, final mLiq_flow_nominal=mTer_flow_nominal, final TLiqEnt_nominal=TLiqEnt_nominal, final TLiqLvg_nominal=TLiqLvg_nominal, k=10) "Load"; FixedResistances.PressureDrop res1b( redeclare final package Medium = MediumLiq, final m_flow_nominal=mPum_flow_nominal - mTer_flow_nominal, final dp_nominal=dpPip1_nominal) "Pipe pressure drop"; Sensors.RelativePressure dp( redeclare final package Medium = MediumLiq) "Differential pressure"; Sensors.RelativePressure dp1( redeclare final package Medium = MediumLiq) "Differential pressure"; .Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable ope( table=[0,1,1; 1,0,1; 2,1,0; 3,0,0], extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.HoldLastPoint, timeScale=100) "Valve opening signal"; Buildings.Controls.OBC.CDL.Reals.PID conPID( k=1, Ti=1, r=1e4, xi_start=1) "Pump controller"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant dpSetVal( final k=dp1Set) "Pressure differential set point"; FixedResistances.PressureDrop resEnd( redeclare final package Medium = MediumLiq, final m_flow_nominal=0.1*mPum_flow_nominal, final dp_nominal=dp1Set) "Pipe pressure drop"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant mode(k=1) "Operating mode"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold isEna(final t=Controls.OperatingModes.disabled) "Returns true if enabled"; equation connect(con.port_b2, loa.port_a); connect(loa.port_b, con.port_a2); connect(fraLoa.y, loa.u); connect(con1.port_b2, loa1.port_a); connect(con1.port_a2, loa1.port_b); connect(fraLoa.y, loa1.u); connect(dp1.port_a, res1b.port_b); connect(dp1.port_a, con1.port_a1); connect(con1.port_b1, dp1.port_b); connect(con.port_b1, dp.port_b); connect(con.port_a1, dp.port_a); connect(ope.y[1], con.yVal); connect(ope.y[2], con1.yVal); connect(dp1.p_rel, conPID.u_m); connect(dpSetVal.y, conPID.u_s); connect(res1b.port_b, resEnd.port_a); connect(res1.port_b, dp.port_a); connect(res1.port_b, res1b.port_a); connect(dp.port_b, del1.ports[2]); connect(del1.ports[3], resEnd.port_b); connect(dp1.port_b, del1.ports[4]); connect(conPID.y, pum.y); connect(mode.y, loa.mode); connect(mode.y, loa1.mode); connect(mode.y, isEna.u); connect(isEna.y, pum.y1); end ThrottleOpenLoop;