This package contains models for combined heating and cooling plants
used in DHC systems.
This model represents a combined heating and cooling plant where chilled
water is produced by cooling-only chillers and heat recovery chillers,
hot water is produced by heat recovery chillers, and a thermal energy storage
tank is integrated in the condenser water circuit to maximize heat recovery
("Tank Charge/Discharge" operating mode).
Cooling towers allow rejecting excess heat from the condenser loop
("Heat Rejection" operating mode).
Air-source heat pumps allow injecting heat into the condenser loop
("Charge Assist" operating mode).
The following abbreviations are used in the documentation of this
model and of its components.
To clearly distinguish cooling-only chillers from heat recovery chillers,
the term "chiller" is used systematically to refer to cooling-only chillers
whereas the abbreviation "HRC" is used systematically to refer to heat recovery chillers.
The schematic below represents a configuration of the system with two chillers
and three HRCs.
The equipment tags correspond to the component names in the plant model.
The control points used by each control function are represented at the intersection
of the gray area that describes the function and the four bus lines corresponding
to the different control point categories (AI, DI, AO, DO).
For the sake of clarity, control logic that is duplicated between multiple
units (for instance the chiller isolation valve control) is only illustrated for
one unit.
The detailed description of each control function is available in the documentation
of
Buildings.Experimental.DHC.Plants.Combined.Controls.Controller.
For an overview of the different operating modes and the design principles of such
a system, the user may refer to the article by B. Gill (2021).
Those setpoints are provided as control inputs.
Ideally, a reset logic based on consumer valve requests should be implemented to adapt
those setpoints to the demand.
Sizing the TES tank and the heat pumps is a joint optimization problem
under the constraint that on a design heating day, heating loads can be
met using both the recovered heat and the heat added to the tank by
the heat pumps.
As stated by B. Gill (2021), increasing the tank
capacity generally improves plant efficiency by providing more opportunity
for heat recovery. Tank capacity should therefore be maximized under the limit
corresponding to the amount of heat that can be recovered over the day.
The model is configured by default with a tank that is sized to store
the heat needed to operate the HRCs during 3 h at peak heating
load with a ΔT covering the two temperature cycles specified
with the parameter TTanSet
(heels and thermocline neglected).
This default can be overwritten.
The tank is assumed to be integrated without pressure separation, i.e.,
the operating level of the tank sets the system pressure and no pressure
sustaining valve or discharge pump is included.
The operating level is approximated as equal to the tank height.
A default height to diameter ratio of 2 is also taken into
account
(designers tend to favor a height to diameter ratio above 1.5
in order to minimize the volume of the thermocline which is
considered useless).
No high limit is considered for the tank mass flow rate.
As per standard practice, the bypass valve is sized for the highest
chiller minimum flow.
The bypass valve model is configured with
a pressure drop varying linearly with the flow rate, as opposed
to a quadratic dependency usually considered for a turbulent flow
regime.
This is because the whole plant model contains large nonlinear systems
of equations, and this configuration limits the risk of solver failure
while reducing the time to solution.
This has no significant impact on the operating point of the circulation pumps
due to the control loop that modulates the valve opening to generate
enough pressure differential at the chiller boundaries to allow for
minimum flow circulation.
So whatever the modeling assumptions for the bypass valve, the
control loop ensures that the valve creates the adequate pressure drop
and bypass flow, which will simply be reached at a different valve opening
with the above simplification.
The design heat flow rate used to size the cooling towers and the intermediary
heat exchanger corresponds to the heat flow rate rejected by all HRCs operating in
cascading cooling mode and all chillers operating at design conditions.
The cooling towers are sized with a default approach of 3 K to the
design wetbulb temperature.
The intermediary heat exchanger is sized with a default approach of 2 K.
The chiller performance data should cover the CW temperature levels
reached when the plant is operating in Heat Rejection mode.
The parameter TCasConEnt_nominal
(set with a final assignment)
provides the maximum CW supply (condenser entering) temperature in this
operating mode.
The HRC performance data should cover the HRC lift envelope,
that is when the HRC is operating in direct heat recovery mode,
producing CHW and HW at their setpoint value at full load.
model AllElectricCWStorage
extends BaseClasses.PartialPlant(
final typ=Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4,
final have_weaBus=true,
final have_fan=true,
final have_pum=true,
final have_eleHea=true,
final have_eleCoo=true);
replaceable package MediumAir=
Buildings.Media.Air
;
replaceable package MediumConWatCoo=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Integer nChi(
final min=1, start=1)
;
parameter Integer nPumChiWat(
final min=1, start=1)=
max(nChi, nChiHea)
;
final parameter Modelica.Units.SI.MassFlowRate mChiWatChi_flow_nominal(
final min=0)=datChi.mEva_flow_nominal
;
parameter Modelica.Units.SI.MassFlowRate mChiWatChi_flow_min(
final min=0)=0.6 * mChiWatChi_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mConWatChi_flow_nominal(
final min=0)=datChi.mCon_flow_nominal
;
parameter Modelica.Units.SI.PressureDifference dpChiWatSet_max(
final min=0,
displayUnit="Pa")
;
parameter Modelica.Units.SI.PressureDifference dpEvaChi_nominal(
final min=0,
displayUnit="Pa")=5E4
;
parameter Modelica.Units.SI.PressureDifference dpConChi_nominal(
final min=0,
displayUnit="Pa")=5E4
;
parameter Modelica.Units.SI.PressureDifference dpPumChiWat_nominal(
final min=0,
displayUnit="Pa")=1.1 * (dpChiWatSet_max +
max(
dpEvaChi_nominal + chi.valEva.dpValve_nominal,
dpEvaChiHea_nominal +
max(chiHea.valEva.dpValve_nominal) +
sum(chiHea.valEvaSwi.dpValve_nominal)))
;
replaceable parameter Fluid.Chillers.Data.ElectricReformulatedEIR.Generic datChi
constrainedby Buildings.Fluid.Chillers.Data.BaseClasses.Chiller
;
final parameter Modelica.Units.SI.Temperature TChiWatSup_nominal=
max(chi.TChiWatSup_nominal, chiHea.TChiWatSup_nominal)
;
final parameter Modelica.Units.SI.Temperature TChiWatRet_nominal=
TChiWatSup_nominal - QChiWat_flow_nominal / mChiWat_flow_nominal / cp_default
;
final parameter Modelica.Units.SI.HeatFlowRate QChiWat_flow_nominal=
chi.QChiWat_flow_nominal + chiHea.QChiWat_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal(
final min=0)=
nChi * mChiWatChi_flow_nominal + nChiHea * mChiWatChiHea_flow_nominal
;
parameter Modelica.Units.SI.TemperatureDifference dTLifChi_min=10
;
parameter Modelica.Units.SI.TemperatureDifference dTLifChi_nominal=
TTanSet[1, 2] + 5 - TChiWatSup_nominal
;
parameter Integer nChiHea(
final min=1, start=1)
;
parameter Integer nPumHeaWat(
final min=1, start=1) = nChiHea
;
final parameter Modelica.Units.SI.MassFlowRate mChiWatChiHea_flow_nominal=
datChiHea.mEva_flow_nominal
;
parameter Modelica.Units.SI.MassFlowRate mChiWatChiHea_flow_min(
final min=0)=0.6 * mChiWatChiHea_flow_nominal
;
parameter Modelica.Units.SI.MassFlowRate mHeaWatChiHea_flow_min(
final min=0)=0.6 * mConWatChiHea_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mConWatChiHea_flow_nominal=
datChiHea.mCon_flow_nominal
;
parameter Modelica.Units.SI.PressureDifference dpHeaWatSet_max(
final min=0,
displayUnit="Pa")
;
parameter Modelica.Units.SI.PressureDifference dpEvaChiHea_nominal(
final min=0,
displayUnit="Pa")=5E4
;
parameter Modelica.Units.SI.PressureDifference dpConChiHea_nominal(
final min=0,
displayUnit="Pa")=5E4
;
parameter Modelica.Units.SI.PressureDifference dpPumHeaWat_nominal(
final min=0,
displayUnit="Pa")=1.1 * (dpHeaWatSet_max +
dpConChiHea_nominal +
max(chiHea.valCon.dpValve_nominal) +
sum(chiHea.valConSwi.dpValve_nominal))
;
replaceable parameter Fluid.Chillers.Data.ElectricReformulatedEIR.Generic datChiHea
constrainedby Buildings.Fluid.Chillers.Data.BaseClasses.Chiller
;
final parameter Modelica.Units.SI.Temperature THeaWatSup_nominal=
chiHea.THeaWatSup_nominal
;
final parameter Modelica.Units.SI.Temperature THeaWatRet_nominal=
THeaWatSup_nominal - QHeaWat_flow_nominal / mHeaWat_flow_nominal / cp_default
;
final parameter Modelica.Units.SI.Temperature TCasHeaEnt_nominal=
TTanSet[2, 2]
;
final parameter Modelica.Units.SI.Temperature TCasCooEnt_nominal=
TConWatCooSup_nominal + dTHexCoo_nominal
;
final parameter Modelica.Units.SI.HeatFlowRate QHeaWat_flow_nominal=
chiHea.QHeaWat_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal=
chiHea.mConWat_flow_nominal
;
parameter Integer nHeaPum(
final min=1, start=1)
;
parameter Integer nPumConWatCon(
final min=1, start=1)=
max(nChi, nChiHea)
;
parameter Integer nPumConWatEva(
final min=1, start=1)=nChiHea
;
parameter Modelica.Units.SI.PressureDifference dpConWatConSet_max(
final min=0,
displayUnit="Pa")=
max(
dpConChi_nominal + chi.valCon.dpValve_nominal,
dpConChiHea_nominal +
max(chiHea.valCon.dpValve_nominal) +
sum(chiHea.valConSwi.dpValve_nominal))
;
parameter Modelica.Units.SI.PressureDifference dpConWatEvaSet_max(
final min=0,
displayUnit="Pa")=
dpEvaChiHea_nominal +
max(chiHea.valEva.dpValve_nominal) +
sum(chiHea.valEvaSwi.dpValve_nominal)
;
parameter Modelica.Units.SI.PressureDifference dpPumConWatCon_nominal(
final min=0,
displayUnit="Pa")=1.1 * (dpConWatConSet_max +
max(dpHexCoo_nominal, dpTan_nominal))
;
parameter Modelica.Units.SI.PressureDifference dpPumConWatEva_nominal(
final min=0,
displayUnit="Pa")=1.1 * (dpConWatEvaSet_max + dpTan_nominal)
;
final parameter Modelica.Units.SI.MassFlowRate mConWatCon_flow_nominal(
final min=0)=chi.mConWat_flow_nominal + chiHea.mConWat_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mConWatEva_flow_nominal(
final min=0)=chiHea.mChiWat_flow_nominal
;
parameter Modelica.Units.SI.Volume VTan=
-chiHea.QEvaCasHea_flow_nominal * 3 * 3600 / (
max(TTanSet) -
min(TTanSet)) /
cp_default / rho_default
;
parameter Modelica.Units.SI.Length hTan = (16 * VTan / Modelica.Constants.pi)^(1/3)
;
parameter Real fraUslTan(
final unit="1",
final min=0,
final max=1, start=0.1) =
((
max(TTanSet[2]) -
min(TTanSet)) / (
max(TTanSet) -
min(TTanSet)) * 1 + 1) / hTan
;
parameter Modelica.Units.SI.Length dInsTan
;
parameter Modelica.Units.SI.ThermalConductivity kInsTan=0.04
;
parameter Integer nSegTan(min=2) = 10
;
parameter Modelica.Units.SI.Temperature TTanSet[2, 2] = {
{15 + 273.15, 25 + 273.15},
{TChiWatSup_nominal, 15 + 273.15}}
;
parameter Modelica.Units.SI.PressureDifference dpTan_nominal=1E3
;
replaceable parameter Fluid.HeatPumps.Data.EquationFitReversible.Generic datHeaPum
;
parameter Integer nCoo(
final min=1, start=1)
;
parameter Modelica.Units.SI.MassFlowRate mConWatCoo_flow_nominal(
final min=0)=mConWatCon_flow_nominal
;
parameter Modelica.Units.SI.PressureDifference dpConWatCooFri_nominal(
displayUnit="Pa",
start=1E4,
final min=0)
;
parameter Modelica.Units.SI.MassFlowRate mAirCooUni_flow_nominal(
final min=0,
start=mConWatCoo_flow_nominal / nCoo / 1.45)
;
parameter Modelica.Units.SI.Temperature TWetBulCooEnt_nominal(
final min=273.15)
;
parameter Modelica.Units.SI.Temperature TConWatCooRet_nominal(
final min=273.15)=TConWatCooSup_nominal +
abs(QHexCoo_flow_nominal) / mConWatCoo_flow_nominal / cpConWatCoo_default
;
parameter Modelica.Units.SI.Temperature TConWatCooSup_nominal(
final min=273.15)=TWetBulCooEnt_nominal + 3
;
parameter Modelica.Units.SI.Power PFanCoo_nominal(
final min=0,
start=340 * mConWatCoo_flow_nominal / nCoo)
;
parameter Integer nPumConWatCoo(
final min=1, start=1)=nCoo
;
parameter Modelica.Units.SI.PressureDifference dpPumConWatCoo_nominal=
1.1 * (dpHexCoo_nominal + dpConWatCooFri_nominal)
;
parameter Modelica.Units.SI.TemperatureDifference dTHexCoo_nominal=2
;
parameter Modelica.Units.SI.PressureDifference dpHexCoo_nominal=3E4
;
parameter Modelica.Units.SI.HeatFlowRate QHexCoo_flow_nominal=
-(chi.QConWat_flow_nominal + chiHea.QConCasCoo_flow_nominal)
;
parameter Modelica.Fluid.Types.Dynamics energyDynamics=
Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
;
parameter Boolean use_inputFilter=energyDynamics<>Modelica.Fluid.Types.Dynamics.SteadyState
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Coo
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Hea
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSupSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatSet(
final unit="Pa",
final min=0)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSupSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHeaWatSet(
final unit="Pa",
final min=0)
;
Subsystems.ChillerGroup chi(
redeclare final package Medium1=
Medium,
redeclare final package Medium2=
Medium,
final dat=datChi,
final nUni=nChi,
final dpEva_nominal=dpEvaChi_nominal,
final dpCon_nominal=dpConChi_nominal,
final energyDynamics=energyDynamics,
final use_inputFilter=use_inputFilter,
final allowFlowReversal1=allowFlowReversal,
final allowFlowReversal2=allowFlowReversal)
;
Subsystems.MultiplePumpsSpeed pumChiWat(
redeclare final package Medium=
Medium,
final nPum=nPumChiWat,
final have_var=true,
final have_valve=true,
final mPum_flow_nominal=mChiWat_flow_nominal / nPumChiWat,
final dpPum_nominal=dpPumChiWat_nominal,
final energyDynamics=energyDynamics,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal)
;
Fluid.FixedResistances.Junction junChiWatSup(
redeclare final package Medium =
Medium,
final m_flow_nominal=mChiWat_flow_nominal * {1, -1, -1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving)
;
Fluid.FixedResistances.Junction junChiWatRet(
redeclare final package Medium =
Medium,
final m_flow_nominal=mChiWat_flow_nominal * {1, -1, 1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering)
;
Fluid.FixedResistances.Junction junChiWatChiHeaRet(
redeclare final package Medium =
Medium,
final m_flow_nominal=mChiWat_flow_nominal * {1,-1,-1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving) ;
Fluid.FixedResistances.Junction junChiWatChiHeaSup(
redeclare final package Medium =
Medium,
final m_flow_nominal=mChiWat_flow_nominal*{1,-1,1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering) ;
Fluid.Actuators.Valves.TwoWayLinear valChiWatMinByp(
redeclare final package Medium=
Medium,
final m_flow_nominal=
max(mChiWatChi_flow_min, mChiWatChiHea_flow_min),
from_dp=true,
linearized=true,
dpValve_nominal=1E3,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.RelativePressure dpChiWat(
redeclare final package Medium=
Medium)
;
Fluid.Sensors.TemperatureTwoPort TChiWatPriRet(
redeclare final package Medium=
Medium,
final m_flow_nominal=mChiWat_flow_nominal,
final allowFlowReversal=allowFlowReversal) ;
Fluid.Sensors.MassFlowRate mChiWatPri_flow(
redeclare final package Medium =
Medium,
final allowFlowReversal=allowFlowReversal) ;
Fluid.Sensors.TemperatureTwoPort TChiWatSup(
redeclare final package Medium =
Medium,
final m_flow_nominal=mChiWat_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Subsystems.ChillerHeatRecoveryGroup chiHea(
redeclare final package Medium =
Medium,
final dat=datChiHea,
final nUni=nChiHea,
final TCasCooEnt_nominal=TCasCooEnt_nominal,
final TCasHeaEnt_nominal=TCasHeaEnt_nominal,
final dpEva_nominal=dpEvaChiHea_nominal,
final dpCon_nominal=dpConChiHea_nominal,
final allowFlowReversal=allowFlowReversal,
final use_inputFilter=use_inputFilter,
final energyDynamics=energyDynamics)
;
Subsystems.MultiplePumpsSpeed pumHeaWat(
redeclare final package Medium=
Medium,
final nPum=nPumHeaWat,
final have_var=true,
final have_valve=true,
final mPum_flow_nominal=mHeaWat_flow_nominal/nPumHeaWat,
final dpPum_nominal=dpPumHeaWat_nominal,
final energyDynamics=energyDynamics,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal)
;
Fluid.FixedResistances.Junction junHeaWatSup(
redeclare final package Medium =
Medium,
final m_flow_nominal=mHeaWat_flow_nominal * {1,-1,-1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving) ;
Fluid.FixedResistances.Junction junHeaWatRet(
redeclare final package Medium =
Medium,
final m_flow_nominal=mHeaWat_flow_nominal * {1,-1,1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering) ;
Fluid.Actuators.Valves.TwoWayLinear valHeaWatMinByp(
redeclare final package Medium =
Medium,
final m_flow_nominal=mHeaWatChiHea_flow_min,
from_dp=true,
linearized=true,
dpValve_nominal=1E3,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal) ;
Fluid.Sensors.RelativePressure dpHeaWat(
redeclare final package Medium =
Medium)
;
Fluid.Sensors.TemperatureTwoPort THeaWatPriRet(
redeclare final package Medium =
Medium,
final m_flow_nominal=mHeaWat_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.TemperatureTwoPort THeaWatSup(
redeclare final package Medium =
Medium,
final m_flow_nominal=mHeaWat_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.MassFlowRate mHeaWatPri_flow(
redeclare final package Medium =
Medium,
final allowFlowReversal=allowFlowReversal)
;
Subsystems.MultiplePumpsSpeed pumConWatCon(
redeclare final package Medium =
Medium,
final nPum=nPumConWatCon,
final have_var=true,
final have_valve=true,
final mPum_flow_nominal=mConWatCon_flow_nominal / nPumConWatCon,
final dpPum_nominal=dpPumConWatCon_nominal,
final energyDynamics=energyDynamics,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal)
;
Subsystems.MultiplePumpsSpeed pumConWatEva(
redeclare final package Medium =
Medium,
final nPum=nPumConWatEva,
final have_var=true,
final have_valve=true,
final mPum_flow_nominal=mConWatEva_flow_nominal / nPumConWatEva,
final dpPum_nominal=dpPumConWatEva_nominal,
final energyDynamics=energyDynamics,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal)
;
Fluid.FixedResistances.Junction junConWatEnt(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal*{1,-1,-1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving) ;
Fluid.Storage.Stratified tan(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final VTan=VTan,
final hTan=hTan,
final dIns=dInsTan,
final kIns=kInsTan,
final nSeg=nSegTan)
;
Fluid.Sources.Boundary_pT bouConWat(
redeclare final package Medium =
Medium,
final p=hTan * rho_default * Modelica.Constants.g_n,
final nPorts=1)
;
Fluid.FixedResistances.Junction junConWatTanEnt(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal*{1,-1,-1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=Modelica.Fluid.Types.PortFlowDirection.Bidirectional)
;
Fluid.FixedResistances.Junction junConWatLvg(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal*{1,-1,1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering) ;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TTan[nSegTan](
T(
each displayUnit="degC"))
;
HeatTransfer.Sources.PrescribedTemperature out ;
Fluid.FixedResistances.Junction junConWatHeaPumEnt(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal*{1,-1,-1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving)
;
Fluid.FixedResistances.Junction junConWatHeaPumLvg(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal*{1,-1,1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering)
;
Subsystems.HeatPumpGroup heaPum(
redeclare final package Medium =
Medium,
redeclare final package MediumAir =
MediumAir,
final nUni=nHeaPum,
final dat=datHeaPum,
final energyDynamics=energyDynamics,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal)
;
Fluid.FixedResistances.Junction junConWatTanLvg(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal*{1,-1,1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering) ;
Fluid.HeatExchangers.PlateHeatExchangerEffectivenessNTU hexCoo(
redeclare final package Medium1=
MediumConWatCoo,
redeclare final package Medium2=
Medium,
final m1_flow_nominal=mConWatCoo_flow_nominal,
final m2_flow_nominal=mConWatCon_flow_nominal,
final dp1_nominal=0,
final dp2_nominal=0,
final Q_flow_nominal=QHexCoo_flow_nominal,
final T_a1_nominal=TConWatCooSup_nominal,
final T_a2_nominal=TConWatCooRet_nominal + dTHexCoo_nominal,
final allowFlowReversal1=allowFlowReversal,
final allowFlowReversal2=allowFlowReversal,
final configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow)
;
Subsystems.CoolingTowerGroup coo(
redeclare final package Medium=
Medium,
final nUni=nCoo,
final mConWatUni_flow_nominal=mConWatCoo_flow_nominal / nCoo,
final dpConWatFriUni_nominal=dpConWatCooFri_nominal + dpHexCoo_nominal,
final mAirUni_flow_nominal=mAirCooUni_flow_nominal,
final TWetBulEnt_nominal=TWetBulCooEnt_nominal,
final TConWatRet_nominal=TConWatCooRet_nominal,
final TConWatSup_nominal=TConWatCooSup_nominal,
final PFanUni_nominal=PFanCoo_nominal,
final energyDynamics=energyDynamics,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Actuators.Valves.ThreeWayLinear valBypTan(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final energyDynamics=energyDynamics,
dpValve_nominal=1E3,
dpFixed_nominal={dpTan_nominal,dpHexCoo_nominal})
;
Fluid.Sources.Boundary_pT bouConWatCoo(
redeclare final package Medium =
Medium,
final p=130000,
nPorts=1)
;
Subsystems.MultiplePumpsSpeed pumConWatCoo(
redeclare final package Medium =
Medium,
final nPum=nPumConWatCoo,
final have_var=true,
have_valve=false,
final mPum_flow_nominal=mConWatCoo_flow_nominal / nPumConWatCoo,
final dpPum_nominal=dpPumConWatCoo_nominal,
final energyDynamics=energyDynamics,
final allowFlowReversal=allowFlowReversal) ;
Fluid.Sensors.TemperatureTwoPort TConWatEvaEnt(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatEva_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Buildings.Experimental.DHC.Plants.Combined.Controls.Controller ctl(
final nChi=nChi,
final nPumChiWat=nPumChiWat,
final QHeaPum_flow_nominal=datHeaPum.hea.Q_flow*nHeaPum,
final dTLifChi_min=dTLifChi_min,
final dTLifChi_nominal=dTLifChi_nominal,
final nChiHea=nChiHea,
final nPumHeaWat=nPumHeaWat,
final nHeaPum=nHeaPum,
final nPumConWatCon=nPumConWatCon,
final nPumConWatEva=nPumConWatEva,
final TTanSet=TTanSet,
final nCoo=nCoo,
final nPumConWatCoo=nPumConWatCoo,
final THeaWatSup_nominal=THeaWatSup_nominal,
final TChiWatSup_nominal=TChiWatSup_nominal,
final mChiWat_flow_nominal=mChiWat_flow_nominal,
final mHeaWat_flow_nominal=mHeaWat_flow_nominal,
final mConWatCon_flow_nominal=mConWatCon_flow_nominal,
final mConWatEva_flow_nominal=mConWatEva_flow_nominal,
final mChiWatChi_flow_nominal=mChiWatChi_flow_nominal,
final mChiWatChi_flow_min=mChiWatChi_flow_min,
final mConWatChi_flow_nominal=mConWatChi_flow_nominal,
final mChiWatChiHea_flow_nominal=mChiWatChiHea_flow_nominal,
final mChiWatChiHea_flow_min=mChiWatChiHea_flow_min,
final mConWatChiHea_flow_nominal=mConWatChiHea_flow_nominal,
final mHeaWatChiHea_flow_min=mHeaWatChiHea_flow_min,
final dpChiWatSet_max=dpChiWatSet_max,
final dpHeaWatSet_max=dpHeaWatSet_max,
final dpConWatConSet_max=dpConWatConSet_max,
final dpConWatEvaSet_max=dpConWatEvaSet_max,
final dpEvaChi_nominal=dpEvaChi_nominal,
final dpValEvaChi_nominal=chi.valEva.dpValve_nominal,
final dpEvaChiHea_nominal=dpEvaChiHea_nominal,
final dpValEvaChiHea_nominal=
max(chiHea.valEva.dpValve_nominal),
final QChiWatChi_flow_nominal=chi.QChiWat_flow_nominal,
final QChiWatCasCoo_flow_nominal=chiHea.QChiWatCasCoo_flow_nominal,
final QChiWatCasCoo_flow_nominal_approx=chiHea.QChiWat_flow_nominal,
final QHeaWat_flow_nominal=QHeaWat_flow_nominal,
final cp_default=cp_default,
final fraUslTan=fraUslTan,
final dTHexCoo_nominal=dTHexCoo_nominal,
final nTTan=nSegTan)
;
Modelica.Blocks.Sources.RealExpression sumPHea(
final y=heaPum.P +
sum({
if ctl.y1CooChiHea[i]
or ctl.y1HeaCooChiHea[i]
then 0
else chiHea.chi[i].P
for i
in 1:nChiHea}))
;
Modelica.Blocks.Sources.RealExpression sumPCoo(
final y=chi.P +
sum({
if ctl.y1CooChiHea[i]
or ctl.y1HeaCooChiHea[i]
then chiHea.chi[i].P
else 0
for i
in 1:nChiHea}))
;
Modelica.Blocks.Sources.RealExpression sumPFan(y=coo.P)
;
Modelica.Blocks.Sources.RealExpression sumPPum(
final y=pumChiWat.P + pumHeaWat.P + pumConWatCon.P + pumConWatEva.P + pumConWatCoo.P + heaPum.PPum)
;
Fluid.Sensors.RelativePressure dpConWatEva(
redeclare final package Medium =
Medium) ;
Fluid.Sensors.RelativePressure dpConWatCon(
redeclare final package Medium =
Medium) ;
Fluid.Sensors.MassFlowRate mConWatEva_flow(
redeclare final package Medium =
Medium,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.MassFlowRate mConWatCon_flow(
redeclare final package Medium =
Medium,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.MassFlowRate mConWatOutTan_flow(
redeclare final package Medium =
Medium,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.TemperatureTwoPort TConWatConChiLvg(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.TemperatureTwoPort TConWatConChiEnt(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.TemperatureTwoPort TConWatCooSup(
redeclare final package Medium =
MediumConWatCoo,
final m_flow_nominal=mConWatCoo_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.TemperatureTwoPort TConWatCooRet(
redeclare final package Medium =
MediumConWatCoo,
final m_flow_nominal=mConWatCoo_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.TemperatureTwoPort TConWatHexCooEnt(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final allowFlowReversal=allowFlowReversal) ;
Fluid.Sensors.TemperatureTwoPort TConWatHexCooLvg(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final allowFlowReversal=allowFlowReversal) ;
Fluid.Actuators.Valves.ThreeWayLinear valConWatEvaMix(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatEva_flow_nominal,
final energyDynamics=energyDynamics,
dpValve_nominal=1E3,
final dpFixed_nominal=
fill(0, 2)) ;
Fluid.FixedResistances.Junction junConWatEvaLvg(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatEva_flow_nominal*{1,-1,-1},
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving)
;
Fluid.Sensors.TemperatureTwoPort TConWatConRet(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Sensors.TemperatureTwoPort TConWatHeaPumEnt(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final allowFlowReversal=allowFlowReversal) ;
Fluid.Sensors.TemperatureTwoPort TConWatHeaPumLvg(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
final allowFlowReversal=allowFlowReversal) ;
protected
final parameter Medium.ThermodynamicState sta_default=
Medium.setState_pTX(
T=Medium.T_default,
p=Medium.p_default,
X=Medium.X_default)
;
final parameter Modelica.Units.SI.SpecificHeatCapacity cp_default=
Medium.specificHeatCapacityCp(sta_default)
;
final parameter Modelica.Units.SI.Density rho_default=
Medium.density(sta_default)
;
final parameter MediumConWatCoo.ThermodynamicState staConWatCoo_default=
MediumConWatCoo.setState_pTX(
T=MediumConWatCoo.T_default,
p=MediumConWatCoo.p_default,
X=MediumConWatCoo.X_default)
;
final parameter Modelica.Units.SI.SpecificHeatCapacity cpConWatCoo_default=
MediumConWatCoo.specificHeatCapacityCp(staConWatCoo_default)
;
public
Fluid.Sensors.MassFlowRate mConWatHexCoo_flow(
redeclare final package Medium =
Medium,
final allowFlowReversal=allowFlowReversal)
;
Fluid.Actuators.Valves.TwoWayLinear valConWatByp(
redeclare final package Medium =
Medium,
final m_flow_nominal=mConWatCon_flow_nominal,
from_dp=true,
linearized=true,
dpValve_nominal=1E3,
final use_inputFilter=use_inputFilter,
final allowFlowReversal=allowFlowReversal)
;
equation
connect(junChiWatSup.port_2, port_bSerCoo);
connect(junChiWatSup.port_3, valChiWatMinByp.port_a);
connect(valChiWatMinByp.port_b, junChiWatRet.port_3);
connect(junChiWatSup.port_2, dpChiWat.port_a);
connect(TChiWatPriRet.port_a, junChiWatRet.port_2);
connect(port_aSerCoo, junChiWatRet.port_1);
connect(dpChiWat.port_b, junChiWatRet.port_1);
connect(junHeaWatSup.port_3, valHeaWatMinByp.port_a);
connect(valHeaWatMinByp.port_b, junHeaWatRet.port_3);
connect(THeaWatPriRet.port_a, junHeaWatRet.port_2);
connect(dpHeaWat.port_b, junHeaWatRet.port_1);
connect(junHeaWatSup.port_2, port_bSerHea);
connect(ctl.y1Chi, chi.y1);
connect(ctl.yValConChi, chi.yValCon);
connect(TChiWatSupSet, chi.TSet);
connect(ctl.y1PumChiWat, pumChiWat.y1);
connect(ctl.y1PumHeaWat, pumHeaWat.y1);
connect(ctl.yValChiWatMinByp, valChiWatMinByp.y);
connect(ctl.yValHeaWatMinByp, valHeaWatMinByp.y);
connect(THeaWatPriRet.port_b, mHeaWatPri_flow.port_a);
connect(TChiWatPriRet.port_b, mChiWatPri_flow.port_a);
connect(ctl.y1PumConWatEva, pumConWatEva.y1);
connect(ctl.yPumConWatEva, pumConWatEva.y);
connect(sumPHea.y, PHea);
connect(sumPCoo.y, PCoo);
connect(sumPFan.y, PFan);
connect(sumPPum.y, PPum);
connect(junHeaWatSup.port_2, dpHeaWat.port_a);
connect(pumChiWat.port_b, TChiWatSup.port_a);
connect(TChiWatSup.port_b, junChiWatSup.port_1);
connect(tan.heaPorVol, TTan.port);
connect(out.port, tan.heaPorTop);
connect(out.port, tan.heaPorSid);
connect(out.port, tan.heaPorBot);
connect(pumHeaWat.port_b, THeaWatSup.port_a);
connect(THeaWatSup.port_b, junHeaWatSup.port_1);
connect(junConWatHeaPumEnt.port_2, junConWatHeaPumLvg.port_1);
connect(weaBus.TDryBul, out.T);
connect(weaBus, heaPum.weaBus);
connect(ctl.y1HeaPum, heaPum.y1);
connect(ctl.THeaPumSet, heaPum.TSet);
connect(bouConWat.ports[1], tan.port_b);
connect(ctl.yPumChiWat, pumChiWat.y);
connect(ctl.yPumHeaWat, pumHeaWat.y);
connect(mChiWatPri_flow.port_b,junChiWatChiHeaRet. port_1);
connect(junChiWatChiHeaRet.port_2, chi.port_a2);
connect(port_aSerHea, junHeaWatRet.port_1);
connect(junConWatTanEnt.port_2, valBypTan.port_2);
connect(valBypTan.port_1, tan.port_a);
connect(ctl.yValBypTan, valBypTan.y);
connect(bouConWatCoo.ports[1], pumConWatCoo.port_a);
connect(coo.port_b, pumConWatCoo.port_a);
connect(weaBus, coo.weaBus);
connect(ctl.yCoo, coo.y);
connect(ctl.y1PumConWatCoo, pumConWatCoo.y1);
connect(chi.port_b1, junConWatLvg.port_3);
connect(chiHea.port_b1, pumHeaWat.port_a);
connect(mHeaWatPri_flow.port_b, chiHea.port_a1);
connect(junChiWatChiHeaRet.port_3, chiHea.port_a4);
connect(junConWatEnt.port_2, chiHea.port_a3);
connect(chiHea.port_b3, junConWatLvg.port_1);
connect(ctl.yValEvaChiHea, chiHea.yValEva);
connect(ctl.y1CooChiHea, chiHea.y1Coo);
connect(ctl.y1ChiHea, chiHea.y1);
connect(ctl.yValConChiHea, chiHea.yValCon);
connect(ctl.TChiHeaSet, chiHea.TSet);
connect(ctl.yValEvaChi, chi.yValEva);
connect(junChiWatChiHeaSup.port_2, pumChiWat.port_a);
connect(chi.port_b2, junChiWatChiHeaSup.port_1);
connect(chiHea.port_b4, junChiWatChiHeaSup.port_3);
connect(TConWatEvaEnt.port_b, chiHea.port_a2);
connect(TChiWatSupSet, ctl.TChiWatSupSet);
connect(dpChiWatSet, ctl.dpChiWatSet);
connect(THeaWatSupSet, ctl.THeaWatSupSet);
connect(dpHeaWatSet, ctl.dpHeaWatSet);
connect(u1Coo, ctl.u1Coo);
connect(u1Hea, ctl.u1Hea);
connect(mChiWatPri_flow.m_flow, ctl.mChiWatPri_flow);
connect(dpChiWat.p_rel, ctl.dpChiWat);
connect(mHeaWatPri_flow.m_flow, ctl.mHeaWatPri_flow);
connect(dpHeaWat.p_rel, ctl.dpHeaWat);
connect(pumConWatEva.port_b, dpConWatEva.port_a);
connect(pumConWatEva.port_b, mConWatEva_flow.port_a);
connect(mConWatEva_flow.port_b, TConWatEvaEnt.port_a);
connect(junConWatTanLvg.port_2, mConWatCon_flow.port_a);
connect(mConWatCon_flow.port_b, pumConWatCon.port_a);
connect(mConWatCon_flow.m_flow, ctl.mConWatCon_flow);
connect(mConWatEva_flow.m_flow, ctl.mConWatEva_flow);
connect(dpConWatEva.p_rel, ctl.dpConWatEva);
connect(dpConWatCon.p_rel, ctl.dpConWatCon);
connect(TChiWatPriRet.T, ctl.TChiWatPriRet);
connect(THeaWatPriRet.T, ctl.THeaWatPriRet);
connect(TTan.T, ctl.TTan);
connect(tan.port_b, mConWatOutTan_flow.port_a);
connect(mConWatHexCoo_flow.m_flow, ctl.mConWatHexCoo_flow);
connect(mConWatOutTan_flow.m_flow, ctl.mConWatOutTan_flow);
connect(junConWatEnt.port_3, chi.port_a1);
connect(chi.mCon_flow, ctl.mConChi_flow);
connect(chi.mEva_flow, ctl.mEvaChi_flow);
connect(chiHea.mCon_flow, ctl.mConChiHea_flow);
connect(chiHea.mEva_flow, ctl.mEvaChiHea_flow);
connect(ctl.yValConSwiChiHea, chiHea.yValConSwi);
connect(ctl.yValEvaSwiHea, chiHea.yValEvaSwi);
connect(TChiWatSup.T, ctl.TChiWatSup);
connect(chiHea.TEvaLvg, ctl.TEvaLvgChiHea);
connect(junConWatLvg.port_2, TConWatConChiLvg.port_a);
connect(TConWatConChiLvg.port_b, junConWatHeaPumEnt.port_1);
connect(THeaWatSup.T, ctl.THeaWatSup);
connect(TConWatConChiEnt.port_b, junConWatEnt.port_1);
connect(pumConWatCoo.port_b, TConWatCooSup.port_a);
connect(TConWatCooSup.port_b, hexCoo.port_a1);
connect(hexCoo.port_b1, TConWatCooRet.port_a);
connect(TConWatCooRet.port_b, coo.port_a);
connect(valBypTan.port_3, TConWatHexCooEnt.port_a);
connect(TConWatHexCooEnt.port_b, hexCoo.port_a2);
connect(hexCoo.port_b2, TConWatHexCooLvg.port_a);
connect(TConWatHexCooLvg.port_b, mConWatHexCoo_flow.port_a);
connect(TConWatConChiLvg.T, ctl.TConWatConChiLvg);
connect(TConWatConChiEnt.T, ctl.TConWatConChiEnt);
connect(TConWatCooSup.T, ctl.TConWatCooSup);
connect(TConWatCooRet.T, ctl.TConWatCooRet);
connect(TConWatHexCooEnt.T, ctl.TConWatHexCooEnt);
connect(TConWatHexCooLvg.T, ctl.TConWatHexCooLvg);
connect(ctl.yPumConWatCoo, pumConWatCoo.y);
connect(chiHea.TConLvg, ctl.TConLvgChiHea);
connect(chiHea.TConEnt, ctl.TConEntChiHea);
connect(junConWatTanEnt.port_3, valConWatEvaMix.port_1);
connect(valConWatEvaMix.port_2, pumConWatEva.port_a);
connect(junConWatEvaLvg.port_3, valConWatEvaMix.port_3);
connect(junConWatEvaLvg.port_3, dpConWatEva.port_b);
connect(chiHea.port_b2, junConWatEvaLvg.port_1);
connect(junConWatEvaLvg.port_2, junConWatTanLvg.port_3);
connect(TConWatEvaEnt.T, ctl.TConWatEvaEnt);
connect(ctl.yValConWatEvaMix, valConWatEvaMix.y);
connect(junConWatHeaPumLvg.port_2, TConWatConRet.port_a);
connect(TConWatConRet.port_b, junConWatTanEnt.port_1);
connect(TConWatConRet.T, ctl.TConWatConRet);
connect(chi.TConLvg, ctl.TConLvgChi);
connect(junConWatHeaPumEnt.port_3, TConWatHeaPumEnt.port_a);
connect(TConWatHeaPumEnt.port_b, heaPum.port_a);
connect(heaPum.port_b, TConWatHeaPumLvg.port_a);
connect(TConWatHeaPumLvg.port_b, junConWatHeaPumLvg.port_3);
connect(ctl.y1Coo, coo.y1);
connect(mConWatHexCoo_flow.port_b, junConWatTanLvg.port_1);
connect(mConWatOutTan_flow.port_b, junConWatTanLvg.port_1);
connect(ctl.yPumConWatCon, pumConWatCon.y);
connect(ctl.y1PumConWatCon, pumConWatCon.y1);
connect(pumConWatCon.port_b, valConWatByp.port_b);
connect(ctl.yValConWatByp, valConWatByp.y);
connect(pumConWatCon.port_b, TConWatConChiEnt.port_a);
connect(pumConWatCon.port_b, dpConWatCon.port_a);
connect(valConWatByp.port_a, TConWatConChiLvg.port_a);
connect(dpConWatCon.port_b, TConWatConChiLvg.port_a);
end AllElectricCWStorage;