Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation

Collection of validation models

Information

This package contains validation models for the classes in Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.

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

Package Content

Name Description
Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Borefield Borefield Validation of the base subsystem model with geothermal borefield
Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Chiller Chiller Validation of the base subsystem model with heat recovery chiller
Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.HeatExchanger HeatExchanger Validation of the base subsystem model with district heat exchanger
Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.SwitchBox SwitchBox Validation of flow switch box
Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.WatersideEconomizer WatersideEconomizer Validation of the base subsystem model with waterside economizer

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Borefield Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Borefield

Validation of the base subsystem model with geothermal borefield

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Borefield

Information

This model validates Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Borefield.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
IntegernBorHol100Number of boreholes (must be a square number)
Distancedxy6Distance in x-axis (and y-axis) between borehole axes [m]
ExampledatBorFiedatBorFie(conDat=Fluid.Geoth...Borefield design data

Modelica definition

model Borefield "Validation of the base subsystem model with geothermal borefield" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Medium model"; parameter Integer nBorHol=100 "Number of boreholes (must be a square number)"; parameter Modelica.Units.SI.Distance dxy=6 "Distance in x-axis (and y-axis) between borehole axes"; final parameter Modelica.Units.SI.Distance cooBor[nBorHol,2]= Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.computeCoordinates( nBorHol, dxy) "Coordinates of boreholes"; Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Borefield borFie( redeclare final package Medium=Medium, final datBorFie=datBorFie, dp_nominal=5E4, TBorWatEntMax=313.15) "Subsystem with heat recovery chiller"; Fluid.Sources.Boundary_pT conWat( redeclare package Medium=Medium, use_T_in=true, nPorts=2) "Condenser water boundary conditions"; Fluid.Sensors.TemperatureTwoPort senTInl( redeclare final package Medium=Medium, m_flow_nominal=borFie.pum.m_flow_nominal) "Water inlet temperature"; Fluid.Sensors.TemperatureTwoPort senTOut( redeclare final package Medium=Medium, m_flow_nominal=borFie.pum.m_flow_nominal) "Water outlet temperature"; parameter Fluid.Geothermal.Borefields.Data.Borefield.Example datBorFie( conDat=Fluid.Geothermal.Borefields.Data.Configuration.Example( cooBor=cooBor, dp_nominal=0)) "Borefield design data"; Modelica.Blocks.Sources.TimeTable TInlVal( y(final unit="K", displayUnit="degC"), table=[ 0,2; 2,2; 3,15; 7,15; 9,35; 10,45; 11,30; 20,30], timeScale=1000, offset=273.15) "Inlet temperature values"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zer( k=0) "Zero"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp u( duration=1000, startTime=2500) "Control signal"; equation connect(senTInl.port_b,conWat.ports[1]); connect(conWat.ports[2],senTOut.port_a); connect(senTInl.port_a,borFie.port_a); connect(borFie.port_b,senTOut.port_b); connect(TInlVal.y,conWat.T_in); connect(zer.y,borFie.yValIso_actual[2]); connect(u.y,borFie.u); connect(u.y,borFie.yValIso_actual[1]); end Borefield;

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Chiller Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Chiller

Validation of the base subsystem model with heat recovery chiller

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.Chiller

Information

This model validates Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Chiller.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
GenericdatChidatChi(QEva_flow_nominal=-1E...Chiller performance data

Modelica definition

model Chiller "Validation of the base subsystem model with heat recovery chiller" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Medium model"; parameter Fluid.Chillers.Data.ElectricEIR.Generic datChi( QEva_flow_nominal=-1E6, COP_nominal=3, PLRMax=1, PLRMinUnl=0.3, PLRMin=0.3, etaMotor=1, mEva_flow_nominal=30, mCon_flow_nominal=30, TEvaLvg_nominal=280.15, capFunT={1,0,0,0,0,0}, EIRFunT={1,0,0,0,0,0}, EIRFunPLR={1,0,0}, TEvaLvgMin=276.15, TEvaLvgMax=288.15, TConEnt_nominal=313.15, TConEntMin=303.15, TConEntMax=333.15) "Chiller performance data"; Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Chiller chi( redeclare final package Medium=Medium, final dat=datChi, dpCon_nominal=15E3, dpEva_nominal=15E3) "Subsystem with heat recovery chiller"; Fluid.Sources.Boundary_pT evaWat( redeclare package Medium=Medium, use_T_in=true, nPorts=2) "Evaporator water boundary conditions"; Fluid.Sources.Boundary_pT conWat( redeclare package Medium=Medium, use_T_in=true, nPorts=2) "Condenser water boundary conditions"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TChiWatSupSet( k=7+273.15, y(final unit="K", displayUnit="degC")) "Chilled water supply temperature set point"; Fluid.Sensors.TemperatureTwoPort senTHeaWatSup( redeclare final package Medium=Medium, m_flow_nominal=datChi.mCon_flow_nominal) "Heating water supply temperature"; Fluid.Sensors.TemperatureTwoPort senTChiWatSup( redeclare final package Medium=Medium, m_flow_nominal=datChi.mEva_flow_nominal) "Chilled water supply temperature"; Fluid.Sensors.TemperatureTwoPort senTHeaWatRet( redeclare final package Medium=Medium, m_flow_nominal=datChi.mCon_flow_nominal) "Heating water return temperature"; Fluid.Sensors.TemperatureTwoPort senTChiWatRet( redeclare final package Medium=Medium, m_flow_nominal=datChi.mEva_flow_nominal) "Chilled water return temperature"; Modelica.Blocks.Sources.BooleanExpression uHea( y=time < 4000) "Heating enable signal"; Modelica.Blocks.Sources.BooleanExpression uCoo( y=time >= 1000) "Cooling enable signal"; Modelica.Blocks.Sources.TimeTable THeaWatRet( y(final unit="K", displayUnit="degC"), table=[ 0,44; 2,44; 3,34; 4.5,34; 5,14; 10,14], timeScale=1000, offset=273.15) "Heating water return temperature values"; Modelica.Blocks.Sources.TimeTable TChiWatRet( y(final unit="K", displayUnit="degC"), table=[ 0,9; 1,9; 2,14; 3,14; 4,11; 5,11], timeScale=1000, offset=273.15) "Chilled water return temperature values"; equation connect(chi.port_bHeaWat,senTHeaWatSup.port_a); connect(senTHeaWatSup.port_b,conWat.ports[1]); connect(evaWat.ports[1],senTChiWatSup.port_b); connect(senTChiWatSup.port_a,chi.port_bChiWat); connect(conWat.ports[2],senTHeaWatRet.port_a); connect(senTHeaWatRet.port_b,chi.port_aHeaWat); connect(chi.port_aChiWat,senTChiWatRet.port_b); connect(senTChiWatRet.port_a,evaWat.ports[2]); connect(uCoo.y,chi.uCoo); connect(uHea.y,chi.uHea); connect(TChiWatSupSet.y,chi.TChiWatSupSet); connect(THeaWatRet.y,conWat.T_in); connect(TChiWatRet.y,evaWat.T_in); end Chiller;

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.HeatExchanger Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.HeatExchanger

Validation of the base subsystem model with district heat exchanger

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.HeatExchanger

Information

This model validates Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatExchanger in a configuration where the primary flow rate is modulated by means of a two-way valve (see hexVal), and in a configuration where the primary flow rate is modulated by means of a variable speed pump (see hexPum).

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model HeatExchanger "Validation of the base subsystem model with district heat exchanger" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Medium model"; Buildings.Fluid.Sources.Boundary_pT bou1Pum( redeclare package Medium = Medium, use_T_in=true, nPorts=2) "Primary boundary conditions"; Buildings.Fluid.Sources.Boundary_pT bou2( redeclare package Medium = Medium, use_T_in=true, nPorts=4) "Secondary boundary conditions"; Modelica.Blocks.Sources.BooleanExpression uHeaRej( y=time >= 3000) "Heat rejection enable signal"; Modelica.Blocks.Sources.BooleanExpression uEnaColRej( y=time >= 1000 and time < 3000) "Cold rejection enable signal"; Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatExchanger hexPum( redeclare final package Medium1 = Medium, redeclare final package Medium2 = Medium, show_T=true, conCon=Buildings.Experimental.DHC.EnergyTransferStations.Types.ConnectionConfiguration.Pump, dp1Hex_nominal=20E3, dp2Hex_nominal=20E3, Q_flow_nominal=1E6, T_a1_nominal=281.15, T_b1_nominal=277.15, T_a2_nominal=275.15, T_b2_nominal=279.15) "Heat exchanger with primary pump"; Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch secondary temperature value depending on heat/cold rejection mode"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1OutPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m1_flow_nominal) "Primary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1InlPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m1_flow_nominal) "Primary inlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2OutPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m2_flow_nominal) "Secondary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2InlPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m2_flow_nominal) "Secondary inlet temperature"; Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatExchanger hexVal( redeclare final package Medium1 = Medium, redeclare final package Medium2 = Medium, show_T=true, conCon=Buildings.Experimental.DHC.EnergyTransferStations.Types.ConnectionConfiguration.TwoWayValve, dp1Hex_nominal=20E3, dp2Hex_nominal=20E3, Q_flow_nominal=1E6, T_a1_nominal=281.15, T_b1_nominal=277.15, T_a2_nominal=275.15, T_b2_nominal=279.15) "Heat exchanger with primary control valve"; Buildings.Fluid.Sources.Boundary_pT bou1InlVal( redeclare package Medium = Medium, p=Medium.p_default + 30E3, use_T_in=true, nPorts=1) "Primary boundary conditions"; Buildings.Fluid.Sources.Boundary_pT bou1OutVal(redeclare package Medium = Medium, nPorts=1) "Primary boundary conditions"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1InlVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m1_flow_nominal) "Primary inlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1OutVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m1_flow_nominal) "Primary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2OutVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m2_flow_nominal) "Secondary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2InlVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m2_flow_nominal) "Secondary inlet temperature"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Compute enable signal for heat/cold rejection"; Modelica.Blocks.Sources.RealExpression yValIsoCon( y=if time >= 2500 then 1 else 0) "Condenser loop isolation valve opening"; Modelica.Blocks.Sources.RealExpression yValIsoEva( y=if time >= 500 then 1 else 0) "Evaporator loop isolation valve opening"; Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin1( amplitude=0.5, freqHz=1e-3, offset=0.5) "Control signal"; Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Activate heat/cold rejection"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zer( k=0) "Zero"; Modelica.Blocks.Sources.TimeTable TColVal( y(final unit="K", displayUnit="degC"), table=[ 0,6; 2,6; 3,16; 4.5,16; 5,6; 10,6], timeScale=1000, offset=273.15) "Cold side temperature values"; Modelica.Blocks.Sources.TimeTable THotVal( y(final unit="K", displayUnit="degC"), table=[ 0,45; 2,45; 3,55; 4.5,55; 5,25; 10,25], timeScale=1000, offset=273.15) "Hot side temperature values"; Modelica.Blocks.Sources.TimeTable TSerWat( y(final unit="K", displayUnit="degC"), table=[ 0,8; 1,8; 2,13; 3,18; 4,6; 5,18], timeScale=1000, offset=273.15) "Service water temperature values"; equation connect(swi.y, bou2.T_in); connect(uEnaColRej.y,swi.u2); connect(hexPum.port_b1,senT1OutPum.port_a); connect(senT1OutPum.port_b, bou1Pum.ports[1]); connect(hexPum.port_a1,senT1InlPum.port_b); connect(senT1InlPum.port_a, bou1Pum.ports[2]); connect(hexPum.port_b2,senT2OutPum.port_a); connect(senT2OutPum.port_b, bou2.ports[1]); connect(bou2.ports[2], senT2InlPum.port_a); connect(senT2InlPum.port_b,hexPum.port_a2); connect(hexVal.port_a1,senT1InlVal.port_b); connect(senT1InlVal.port_a, bou1InlVal.ports[1]); connect(bou1OutVal.ports[1], senT1OutVal.port_b); connect(senT1OutVal.port_a,hexVal.port_b1); connect(hexVal.port_a2,senT2InlVal.port_b); connect(senT2OutVal.port_a,hexVal.port_b2); connect(uEnaColRej.y,or2.u2); connect(uHeaRej.y,or2.u1); connect(yValIsoCon.y,hexVal.yValIso_actual[1]); connect(yValIsoCon.y,hexPum.yValIso_actual[1]); connect(yValIsoEva.y,hexVal.yValIso_actual[2]); connect(yValIsoEva.y,hexPum.yValIso_actual[2]); connect(or2.y,swi1.u2); connect(sin1.y,swi1.u1); connect(zer.y,swi1.u3); connect(swi1.y,hexVal.u); connect(swi1.y,hexPum.u); connect(TColVal.y,swi.u1); connect(THotVal.y,swi.u3); connect(TSerWat.y, bou1Pum.T_in); connect(TSerWat.y, bou1InlVal.T_in); connect(senT2OutVal.port_b, bou2.ports[3]); connect(bou2.ports[4], senT2InlVal.port_a); end HeatExchanger;

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.SwitchBox Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.SwitchBox

Validation of flow switch box

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.SwitchBox

Information

This model validates that Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.SwitchBox maintains a positive flow rate in the district line outside of the temporization period set by the controller.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal1Nominal water mass flow rate [kg/s]

Modelica definition

model SwitchBox "Validation of flow switch box" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Medium model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1 "Nominal water mass flow rate"; Fluid.Delays.DelayFirstOrder volSup( redeclare final package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial, final m_flow_nominal=m_flow_nominal, tau=60, nPorts=3) "Mixing volume supply"; Fluid.Delays.DelayFirstOrder volRet( redeclare final package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial, final m_flow_nominal=m_flow_nominal, tau=60, nPorts=3) "Mixing volume return"; Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pum1( redeclare package Medium = Medium, final m_flow_nominal=m_flow_nominal) "Chilled water HX secondary pump"; Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pum2( redeclare package Medium = Medium, final m_flow_nominal=m_flow_nominal) "Chilled water HX secondary pump"; Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.SwitchBox floSwiBox(final m_flow_nominal=m_flow_nominal, redeclare final package Medium = Medium, trueHoldDuration=300) "Flow switch box"; Fluid.Sensors.MassFlowRate senMasFlo( redeclare final package Medium = Medium) "District water mass flow rate"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant setMasFlo1(k=0.5) "Set point for mass flow rate (normalized)"; Fluid.Sources.Boundary_pT disWatBou(redeclare package Medium = Medium, nPorts=2) "District water boundary conditions"; Modelica.Blocks.Sources.CombiTimeTable setMasFlo2( tableName="tab1", table=[0,0; 0.6,1; 0.7,0; 1,1], extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, columns={2}, timeScale=1000) "Set point for mass flow rate (normalized)"; Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai2(final k= m_flow_nominal) "Scale with nominal mass flow rate"; Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai1(final k= m_flow_nominal) "Scale with nominal mass flow rate"; equation connect(pum1.port_b, volSup.ports[1]); connect(volSup.ports[2], pum2.port_a); connect(pum2.port_b, volRet.ports[1]); connect(volRet.ports[2], pum1.port_a); connect(floSwiBox.port_bSup, volSup.ports[3]); connect(floSwiBox.port_aRet, volRet.ports[3]); connect(floSwiBox.port_bRet, senMasFlo.port_a); connect(senMasFlo.port_b, disWatBou.ports[1]); connect(disWatBou.ports[2], floSwiBox.port_aSup); connect(pum1.m_flow_actual, floSwiBox.mRev_flow); connect(setMasFlo2.y[1], gai2.u); connect(gai2.y, pum2.m_flow_in); connect(setMasFlo1.y, gai1.u); connect(gai1.y, pum1.m_flow_in); connect(pum2.m_flow_actual, floSwiBox.mPos_flow); end SwitchBox;

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.WatersideEconomizer Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.WatersideEconomizer

Validation of the base subsystem model with waterside economizer

Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation.WatersideEconomizer

Information

This model validates Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.WatersideEconomizer in a configuration where the primary flow rate is modulated by means of a two-way valve (see hexVal), and in a configuration where the primary flow rate is modulated by means of a variable speed pump (see hexPum).

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model WatersideEconomizer "Validation of the base subsystem model with waterside economizer" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Medium model"; Buildings.Fluid.Sources.Boundary_pT bou1Pum( redeclare package Medium = Medium, use_T_in=true, nPorts=2) "Primary boundary conditions"; Buildings.Fluid.Movers.FlowControlled_dp pum2Pum( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_nominal=hexPum.m2_flow_nominal, addPowerToMedium=false, nominalValuesDefineDefaultPressureCurve=true, dp_nominal=25E4) "CHW pump"; Modelica.Blocks.Sources.BooleanExpression uCoo(y=time >= 1000) "Cooling enable signal"; Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.WatersideEconomizer hexPum( redeclare final package Medium1=Medium, redeclare final package Medium2=Medium, show_T=true, conCon=Buildings.Experimental.DHC.EnergyTransferStations.Types.ConnectionConfiguration.Pump, dp1Hex_nominal=3E4, dp2Hex_nominal=3E4, Q_flow_nominal=-1E6, T_a1_nominal=281.15, T_b1_nominal=291.15, T_a2_nominal=293.15, T_b2_nominal=283.15) "Heat exchanger with primary pump"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1OutPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m1_flow_nominal) "Primary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1InlPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m1_flow_nominal) "Primary inlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2OutPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m2_flow_nominal) "Secondary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2InlPum(redeclare final package Medium = Medium, m_flow_nominal=hexPum.m2_flow_nominal) "Secondary inlet temperature"; Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.WatersideEconomizer hexVal( redeclare final package Medium1=Medium, redeclare final package Medium2=Medium, show_T=true, conCon=Buildings.Experimental.DHC.EnergyTransferStations.Types.ConnectionConfiguration.TwoWayValve, dp1Hex_nominal=3E4, dp2Hex_nominal=3E4, Q_flow_nominal=-1E6, T_a1_nominal=281.15, T_b1_nominal=291.15, T_a2_nominal=293.15, T_b2_nominal=283.15) "Heat exchanger with primary control valve"; Buildings.Fluid.Sources.Boundary_pT bou1InlVal( redeclare package Medium = Medium, p=Medium.p_default + 45E3, use_T_in=true, nPorts=1) "Primary boundary conditions"; Buildings.Fluid.Sources.Boundary_pT bou1OutVal(redeclare package Medium = Medium, nPorts=1) "Primary boundary conditions"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1InlVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m1_flow_nominal) "Primary inlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT1OutVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m1_flow_nominal) "Primary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2OutVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m2_flow_nominal) "Secondary outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senT2InlVal(redeclare final package Medium = Medium, m_flow_nominal=hexVal.m2_flow_nominal) "Secondary inlet temperature"; Buildings.Fluid.Sensors.RelativePressure senRelPre(redeclare final package Medium = Medium); Modelica.Blocks.Sources.TimeTable TChiWatRet( y(final unit="K", displayUnit="degC"), table=[0,10; 2,15; 3,16; 4.5,16; 5,13; 10,9], timeScale=1000, offset=273.15) "Chilled water return temperature values"; Modelica.Blocks.Sources.TimeTable TSerWat( y(final unit="K", displayUnit="degC"), table=[ 0,8; 1,8; 2,13; 3,18; 4,6; 5,18], timeScale=1000, offset=273.15) "Service water temperature values"; Buildings.Fluid.Sources.Boundary_pT bou2( redeclare package Medium = Medium, use_T_in=true, nPorts=4) "Secondary boundary conditions"; Buildings.Fluid.FixedResistances.PressureDrop resPum( redeclare package Medium = Medium, m_flow_nominal=hexPum.m2_flow_nominal, dp_nominal=20E4) "Pipe flow resistance"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp dpSet( height=15E4, duration=1000, offset=10E4, startTime=1500) "Differential pressure set point"; Buildings.Fluid.Movers.FlowControlled_dp pum2Val( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_nominal=hexPum.m2_flow_nominal, addPowerToMedium=false, nominalValuesDefineDefaultPressureCurve=true, dp_nominal=25E4) "CHW pump"; Buildings.Fluid.FixedResistances.PressureDrop resVal( redeclare package Medium = Medium, m_flow_nominal=hexPum.m2_flow_nominal, dp_nominal=20E4) "Pipe flow resistance"; Modelica.Blocks.Sources.RealExpression yEva(y=0) "Isolation valve signal"; equation connect(hexPum.port_b1,senT1OutPum.port_a); connect(senT1OutPum.port_b, bou1Pum.ports[1]); connect(hexPum.port_a1,senT1InlPum.port_b); connect(senT1InlPum.port_a, bou1Pum.ports[2]); connect(hexPum.port_b2,senT2OutPum.port_a); connect(senT2InlPum.port_b,hexPum.port_a2); connect(hexVal.port_a1,senT1InlVal.port_b); connect(senT1InlVal.port_a, bou1InlVal.ports[1]); connect(bou1OutVal.ports[1], senT1OutVal.port_b); connect(senT1OutVal.port_a,hexVal.port_b1); connect(hexVal.port_a2,senT2InlVal.port_b); connect(senT2OutVal.port_a,hexVal.port_b2); connect(hexVal.port_a1,senRelPre.port_a); connect(senRelPre.port_b,senT1OutVal.port_a); connect(TSerWat.y, bou1Pum.T_in); connect(TSerWat.y, bou1InlVal.T_in); connect(uCoo.y, hexVal.uCoo); connect(uCoo.y, hexPum.uCoo); connect(bou2.ports[1], senT2InlVal.port_a); connect(TChiWatRet.y, bou2.T_in); connect(pum2Pum.port_a, senT2OutPum.port_b); connect(resPum.port_a, pum2Pum.port_b); connect(dpSet.y, pum2Pum.dp_in); connect(senT2OutVal.port_b, pum2Val.port_a); connect(pum2Val.port_b, resVal.port_a); connect(dpSet.y, pum2Val.dp_in); connect(resVal.port_b, bou2.ports[2]); connect(yEva.y, hexVal.yValIsoEva_actual); connect(yEva.y, hexPum.yValIsoEva_actual); connect(bou2.ports[3], resPum.port_b); connect(senT2InlPum.port_a, bou2.ports[4]); end WatersideEconomizer;