This package contains control sequences for heat pump plants.
This block implements the sequence of operation for plants with
air-to-water heat pumps.
Most parts of the sequence of operation are similar to that
described in ASHRAE, 2021 for chiller plants.
The supported plant configurations are enumerated in the table below.
Depending on the plant configuration, the term "primary HW pumps"
(and the corresponding variables containing *pumHeaWatPri*
)
refers either to primary HW pumps for plants with separate primary
HW and CHW pumps (either headered or dedicated)
or to dedicated primary pumps for plants with common primary pumps
serving both the HW and CHW loops.
At its current stage of development, this controller contains no
logic for handling faulted equipment.
It is therefore assumed that any equipment is available at all times.
block AirToWater
parameter Boolean have_heaWat
;
parameter Boolean have_chiWat
;
parameter Boolean is_priOnl=false
;
parameter Boolean have_hrc_select(start=false)=false
;
final parameter Boolean have_hrc=
if have_heaWat
and have_chiWat
then have_hrc_select
else false
;
parameter Boolean have_valHpInlIso
;
parameter Boolean have_valHpOutIso
;
final parameter Boolean have_pumHeaWatPri=have_heaWat
;
parameter Boolean have_pumChiWatPriDed_select(start=false)=false
;
final parameter Boolean have_pumChiWatPriDed=
if have_chiWat
and not have_pumPriHdr
then have_pumChiWatPriDed_select
else false
;
final parameter Boolean have_pumChiWatPri=
have_chiWat
and (have_pumPriHdr
or have_pumChiWatPriDed)
;
parameter Boolean have_pumPriHdr
;
parameter Boolean have_pumHeaWatPriVar_select(start=true)=true
;
parameter Boolean have_pumChiWatPriVar_select(start=true)=true
;
final parameter Boolean have_pumHeaWatPriVar=
have_pumHeaWatPri
and (is_priOnl
or have_pumHeaWatPriVar_select)
;
final parameter Boolean have_pumChiWatPriVar=
have_pumChiWatPri
and (is_priOnl
or have_pumChiWatPriVar_select)
;
final parameter Boolean have_pumPriCtlDp=is_priOnl
;
final parameter Boolean have_pumHeaWatSec=
have_heaWat
and not is_priOnl
;
final parameter Boolean have_pumChiWatSec=
have_chiWat
and not is_priOnl
;
final parameter Boolean have_pumSecHdr=true
;
final parameter Boolean have_pumSecCtlDp=have_pumHeaWatSec
or have_pumChiWatSec
;
parameter Boolean have_senVHeaWatPri_select(start=false)
;
final parameter Boolean have_senVHeaWatPri=have_heaWat
and
(
if have_hrc
or not have_senVHeaWatSec
then true
else have_senVHeaWatPri_select)
;
final parameter Boolean have_senVHeaWatSec=have_pumHeaWatSec
;
parameter Boolean have_senVChiWatPri_select(start=false)
;
final parameter Boolean have_senVChiWatPri=have_chiWat
and
(
if have_hrc
or not have_senVChiWatSec
then true
else have_senVChiWatPri_select)
;
final parameter Boolean have_senVChiWatSec(start=false)=have_pumChiWatSec
;
parameter Boolean have_senTHeaWatPriRet_select(start=false)
;
final parameter Boolean have_senTHeaWatPriRet=have_heaWat
and
(
if have_hrc
or not have_senTHeaWatSecRet
then true
else have_senTHeaWatPriRet_select)
;
parameter Boolean have_senTChiWatPriRet_select(start=false)
;
final parameter Boolean have_senTChiWatPriRet=have_chiWat
and
(
if have_hrc
or not have_senTChiWatSecRet
then true
else have_senTChiWatPriRet_select)
;
final parameter Boolean have_senTHeaWatSecSup=have_pumHeaWatSec
;
final parameter Boolean have_senTChiWatSecSup=have_pumChiWatSec
;
parameter Boolean have_senTHeaWatSecRet_select(start=false)=false
;
parameter Boolean have_senTChiWatSecRet_select(start=false)=false
;
final parameter Boolean have_senTHeaWatSecRet=
if have_hrc
then true
elseif not have_pumHeaWatSec
then false
else have_senTHeaWatSecRet_select
;
final parameter Boolean have_senTChiWatSecRet(start=false)=
if have_hrc
then true
elseif not have_pumChiWatSec
then false
else have_senTChiWatSecRet_select
;
parameter Integer nHp(min=1)
;
parameter Integer nPumHeaWatPri(
min=
if have_pumHeaWatPri
then 1
else 0,
start=0)=nHp
;
parameter Integer nPumChiWatPri(
min=
if have_pumChiWatPri
then 1
else 0,
start=
if have_pumChiWatPri
then nHp
else 0)=
if have_pumChiWatPri
then nHp
else 0
;
parameter Integer nPumHeaWatSec(
min=
if have_pumHeaWatSec
then 1
else 0,
start=0)=nHp
;
parameter Integer nPumChiWatSec(
min=
if have_pumChiWatSec
then 1
else 0,
start=0)=nHp
;
parameter Boolean have_senDpHeaWatRemWir(start=false)=false
;
parameter Integer nSenDpHeaWatRem(
final min=
if have_heaWat
then 1
else 0,
start=0)
;
parameter Boolean have_senDpChiWatRemWir(start=false)=false
;
parameter Integer nSenDpChiWatRem(
final min=
if have_chiWat
then 1
else 0,
start=0)
;
parameter Real THeaWatSup_nominal(
min=273.15,
start=50 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real THeaWatSupSet_min(
min=273.15,
start=25 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real TOutHeaWatLck(
min=273.15,
start=21 + 273.15,
unit="K",
displayUnit="degC")=294.15
;
parameter Real capHeaHp_nominal[nHp](
min=
fill(0, nHp),
start=
fill(1, nHp),
unit=
fill("W", nHp))
;
parameter Real VHeaWatHp_flow_nominal[nHp](
final min=
fill(0, nHp),
start=
fill(1E-6, nHp),
final unit=
fill("m3/s", nHp))
;
parameter Real VHeaWatHp_flow_min[nHp](
final min=
fill(0, nHp),
start=
fill(0, nHp),
final unit=
fill("m3/s", nHp))
;
parameter Real VHeaWatPri_flow_nominal(
min=0,
start=
sum(VHeaWatHp_flow_nominal),
unit="m3/s")=
sum(VHeaWatHp_flow_nominal)
;
parameter Real VHeaWatSec_flow_nominal(
min=0,
start=1E-6,
unit="m3/s")
;
parameter Real dpHeaWatRemSet_max[nSenDpHeaWatRem](
min=
fill(0, nSenDpHeaWatRem),
start=
fill(5E4, nSenDpHeaWatRem),
unit=
fill("Pa", nSenDpHeaWatRem))
;
parameter Real dpHeaWatRemSet_min(
min=0,
start=5*6894,
unit="Pa")=5*6894
;
parameter Real yPumHeaWatPriSet(
max=2,
min=0,
start=1,
unit="1")
;
parameter Real TChiWatSup_nominal(
min=273.15,
start=7 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real TChiWatSupSet_max(
min=273.15,
start=15 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real TOutChiWatLck(
min=273.15,
start=16 + 273.15,
unit="K",
displayUnit="degC")=289.15
;
parameter Real capCooHp_nominal[nHp](
min=
fill(0, nHp),
start=
fill(1, nHp),
unit=
fill("W", nHp))
;
parameter Real VChiWatHp_flow_nominal[nHp](
final min=
fill(0, nHp),
start=
fill(1E-6, nHp),
final unit=
fill("m3/s", nHp))
;
parameter Real VChiWatHp_flow_min[nHp](
final min=
fill(0, nHp),
start=
fill(0, nHp),
final unit=
fill("m3/s", nHp))
;
parameter Real VChiWatPri_flow_nominal(
final min=0,
start=
sum(VChiWatHp_flow_nominal),
final unit="m3/s")=
sum(VChiWatHp_flow_nominal)
;
parameter Real VChiWatSec_flow_nominal(
min=0,
start=1E-6,
unit="m3/s")
;
parameter Real dpChiWatRemSet_max[nSenDpChiWatRem](
min=
fill(0, nSenDpChiWatRem),
start=
fill(5E4, nSenDpChiWatRem),
unit=
fill("Pa", nSenDpChiWatRem))
;
parameter Real dpChiWatRemSet_min(
min=0,
start=5*6894,
unit="Pa")=5*6894
;
parameter Real yPumChiWatPriSet(
max=2,
min=0,
start=1,
unit="1")
;
parameter Real cp_default(
min=0,
unit="J/(kg.K)")=4184
;
parameter Real rho_default(
min=0,
unit="kg/m3")=996
;
parameter Boolean have_inpSch=false
;
parameter Real schHea[:, 2](start=[0,1; 24*3600,1])=[0,1; 24*3600,1]
;
parameter Real schCoo[:, 2](start=[0,1; 24*3600,1])=[0,1; 24*3600,1]
;
parameter Integer nReqIgnHeaWat(min=0)=0
;
parameter Integer nReqIgnChiWat(min=0)=0
;
parameter Real dTOutLck(
min=0,
unit="K")=0.5
;
parameter Real dtRunEna(
min=0,
unit="s")=15*60
;
parameter Real dtReqDis(
min=0,
unit="s")=3*60
;
parameter Real staEqu[:, nHp](
each final max=1,
each final min=0,
each final unit="1")
;
final parameter Integer nSta(
final min=1)=
size(staEqu, 1)
;
final parameter Integer nEquAlt(
final min=0)=
if nHp==1
then 1
else
max({
sum({(
if staEqu[i, j] > 0
and staEqu[i, j] < 1
then 1
else 0)
for j
in 1:nHp})
for i
in 1:nSta})
;
parameter Integer idxEquAlt[nEquAlt](
final min=
fill(1, nEquAlt))
;
parameter Real plrSta(
max=1,
min=0,
start=0.9,
unit="1")=0.9
;
parameter Real dTHea(
min=0,
unit="K")=2.5
;
parameter Real dTCoo(
min=0,
unit="K")=1
;
parameter Real dtVal(
min=0,
start=90,
unit="s")=90
;
parameter Real dtRunSta(
min=0,
unit="s",
displayUnit="min")=900
;
parameter Real dtOff(
min=0,
unit="s")=900
;
parameter Real dtOffHp(
min=0,
unit="s")=180
;
parameter Real dtPri(
min=0,
unit="s")=900
;
parameter Real dtSec(
min=0,
start=600,
unit="s")=600
;
parameter Real dtRunPumSta(
min=0,
start=600,
unit="s")=600
;
parameter Real dtRunFaiSafPumSta(
min=0,
start=300,
unit="s")=300
;
parameter Real dtRunFaiSafLowYPumSta(
min=0,
start=600,
unit="s")=dtRunPumSta
;
parameter Real dVOffUpPumSta(
max=1,
min=0,
start=0.03,
unit="1")=0.03
;
parameter Real dVOffDowPumSta(
max=1,
min=0,
start=0.03,
unit="1")=dVOffUpPumSta
;
parameter Real dpOffPumSta(
min=0,
start=1E4,
unit="Pa")=1E4
;
parameter Real yUpPumSta(
min=0,
start=0.99,
unit="1")=0.99
;
parameter Real yDowPumSta(
min=0,
start=0.4,
unit="1")=0.4
;
parameter Real dtHol(
min=0,
unit="s")=900
;
parameter Real resDpHeaWat_max(
max=1,
min=0,
unit="1")=0.5
;
parameter Real resTHeaWatSup_min(
max=1,
min=0,
unit="1")=resDpHeaWat_max
;
parameter Real resDpChiWat_max(
max=1,
min=0,
unit="1")=0.5
;
parameter Real resTChiWatSup_min(
max=1,
min=0,
unit="1")=resDpChiWat_max
;
parameter Real res_init(
max=1,
min=0,
unit="1")=1
;
parameter Real res_min(
max=1,
min=0,
unit="1")=0
;
parameter Real res_max(
max=1,
min=0,
unit="1")=1
;
parameter Real dtDel(
min=100*1E-15,
unit="s")=900
;
parameter Real dtResHeaWat(
min=1E-3,
unit="s")=300
;
parameter Integer nReqResIgnHeaWat(min=0)=2
;
parameter Real triHeaWat(
max=0,
unit="1")=-0.02
;
parameter Real rspHeaWat(
min=0,
unit="1")=0.03
;
parameter Real rspHeaWat_max(
min=0,
unit="1")=0.07
;
parameter Real dtResChiWat(
min=1E-3,
unit="s")=300
;
parameter Integer nReqResIgnChiWat(min=0)=2
;
parameter Real triChiWat(
max=0,
unit="1")=-0.02
;
parameter Real rspChiWat(
min=0,
unit="1")=0.03
;
parameter Real rspChiWat_max(
min=0,
unit="1")=0.07
;
parameter Real yPumHeaWatPri_min(
max=1,
min=0,
start=0.1,
unit="1")=0.1
;
parameter Real kCtlDpHeaWat(
min=100*Buildings.Controls.OBC.CDL.Constants.eps,
start=1)=1
;
parameter Real TiCtlDpHeaWat(
min=100*Buildings.Controls.OBC.CDL.Constants.eps,
start=60,
unit="s")=60
;
parameter Real yPumChiWatPri_min(
max=1,
min=0,
start=0.1,
unit="1")=0.1
;
parameter Real kCtlDpChiWat(
min=100*Buildings.Controls.OBC.CDL.Constants.eps,
start=1)=1
;
parameter Real TiCtlDpChiWat(
min=100*Buildings.Controls.OBC.CDL.Constants.eps,
start=60,
unit="s")=60
;
parameter Real yPumHeaWatSec_min(
max=1,
min=0,
start=0.1,
unit="1")=0.1
;
parameter Real yPumChiWatSec_min(
max=1,
min=0,
start=0.1,
unit="1")=0.1
;
parameter Real kValMinByp(
min=0,
start=1)=1
;
parameter Modelica.Units.SI.Time TiValMinByp(
min=Buildings.Controls.OBC.CDL.Constants.small,
start=0.5)=60
;
parameter Boolean have_reqFloHrc(start=false)=false
;
parameter Real TChiWatSupHrc_min(
min=273.15,
start=4 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real THeaWatSupHrc_max(
min=273.15,
start=60 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real COPHeaHrc_nominal(
min=1.1,
start=2.8,
unit="1")
;
parameter Real capCooHrc_min(
min=0,
start=0,
unit="W")
;
parameter Real capHeaHrc_min(
min=0,
start=0,
unit="W")
;
parameter Real dtLoaHrc(
min=0,
start=600,
unit="s")=600
;
parameter Real dtTem1Hrc(
min=0,
start=180,
unit="s")=180
;
parameter Real dtTem2Hrc(
min=0,
start=60,
unit="s")=60
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1AvaHp[nHp](
each k=true)
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqPlaHeaWat
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
final quantity="ThermodynamicTemperature",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SchHea
if have_heaWat
and have_inpSch
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqPlaChiWat
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SchCoo
if have_chiWat
and have_inpSch
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqResHeaWat
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqResChiWat
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumHeaWatPri_actual[nPumHeaWatPri]
if have_pumHeaWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumChiWatPri_actual[nPumChiWatPri]
if have_pumChiWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumHeaWatSec_actual[nPumHeaWatSec]
if have_pumHeaWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumChiWatSec_actual[nPumChiWatSec]
if have_pumChiWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatPriRet(
final unit="K",
displayUnit="degC")
if have_heaWat
and have_senTHeaWatPriRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VHeaWatPri_flow(
final unit="m3/s")
if have_heaWat
and have_senVHeaWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHeaWatLoc(
final unit="Pa")
if have_heaWat
and not have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHeaWatLocSet[nSenDpHeaWatRem](
each final unit="Pa")
if have_heaWat
and not have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHeaWatRem[nSenDpHeaWatRem](
each final unit="Pa")
if have_heaWat
and have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatLoc(
final unit="Pa")
if have_chiWat
and not have_senDpChiWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatLocSet[nSenDpChiWatRem](
each final unit="Pa")
if have_chiWat
and not have_senDpChiWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatRem[nSenDpChiWatRem](
each final unit="Pa")
if have_chiWat
and have_senDpChiWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValHeaWatHpInlIso[nHp]
if have_heaWat
and have_valHpInlIso
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValHeaWatHpOutIso[nHp]
if have_heaWat
and have_valHpOutIso
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValChiWatHpInlIso[nHp]
if have_chiWat
and have_valHpInlIso
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValChiWatHpOutIso[nHp]
if have_chiWat
and have_valHpOutIso
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatPri[nPumHeaWatPri]
if have_pumHeaWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatPri[nPumChiWatPri]
if have_pumChiWatPri
and have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatSec[nPumHeaWatSec]
if have_pumHeaWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatSec[nPumChiWatSec]
if have_pumChiWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Hp[nHp]
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1HeaHp[nHp]
if have_heaWat
and have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput dpHeaWatRemSet[nSenDpHeaWatRem](
each final min=0,
each final unit="Pa")
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput dpChiWatRemSet[nSenDpChiWatRem](
each final min=0,
each final unit="Pa")
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumHeaWatPriHdr(
final unit="1")
if have_pumHeaWatPriVar
and have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumChiWatPriHdr(
final unit="1")
if have_pumChiWatPriVar
and have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumHeaWatSec(
final unit="1")
if have_pumHeaWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumChiWatSec(
final unit="1")
if have_pumChiWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatSupSet(
final unit="K",
displayUnit="degC")
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaWatSupSet(
final unit="K",
displayUnit="degC")
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatPriRet(
final unit="K",
displayUnit="degC")
if have_chiWat
and have_senTChiWatPriRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VChiWatPri_flow(
final unit="m3/s")
if have_chiWat
and have_senVChiWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Hp_actual[nHp]
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumHeaWatPriDed[nPumHeaWatPri](
each final unit="1")
if have_pumHeaWatPriVar
and not have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumChiWatPriDed[nPumChiWatPri](
each final unit="1")
if have_pumChiWatPriVar
and have_pumChiWatPriDed
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSecRet(
final unit="K",
displayUnit="degC")
if have_heaWat
and have_senTHeaWatSecRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VHeaWatSec_flow(
final unit="m3/s")
if have_heaWat
and have_senVHeaWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSecRet(
final unit="K",
displayUnit="degC")
if have_chiWat
and have_senTChiWatSecRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VChiWatSec_flow(
final unit="m3/s")
if have_chiWat
and have_senVChiWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSupSet[nHp](
each final unit="K",
each final quantity="ThermodynamicTemperature",
each displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatPriSup(
final unit="K",
displayUnit="degC")
if have_heaWat ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatPriSup(
final unit="K",
displayUnit="degC")
if have_chiWat ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSecSup(
final unit="K",
displayUnit="degC")
if have_heaWat
and have_senTHeaWatSecSup
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSecSup(
final unit="K",
displayUnit="degC")
if have_chiWat
and have_senTChiWatSecSup
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Hrc
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1CooHrc
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatHrc
if
have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatHrc
if
have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSupSetHrc(
final unit="K",
displayUnit="degC")
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatRetUpsHrc(
final unit="K",
displayUnit="degC")
if have_hrc ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatRetUpsHrc(
final unit="K",
displayUnit="degC")
if have_hrc ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Hrc_actual
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1ReqFloChiWat
if have_hrc
and have_reqFloHrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1ReqFloConWat
if have_hrc
and have_reqFloHrc
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValHeaWatMinByp(
final unit="1")
if have_heaWat
and is_priOnl
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValChiWatMinByp(
final unit="1")
if have_chiWat
and is_priOnl
;
Enabling.Enable enaHea(
final typ=Buildings.Templates.Plants.Controls.Types.Application.Heating,
final TOutLck=TOutHeaWatLck,
final dTOutLck=dTOutLck,
final dtReq=dtReqDis,
final dtRun=dtRunEna,
final have_inpSch=have_inpSch,
final nReqIgn=nReqIgnHeaWat,
final sch=schHea)
if have_heaWat
;
Utilities.StageIndex idxStaHea(
final nSta=nSta,
final dtRun=dtRunSta)
if have_heaWat
;
StagingRotation.StageAvailability avaStaHea(
final staEqu=staEqu)
if have_heaWat
;
StagingRotation.EquipmentEnable enaEquHea(
final staEqu=staEqu,
final nEquAlt=nEquAlt)
if have_heaWat
;
StagingRotation.EventSequencing seqEve[nHp](
each final have_heaWat=have_heaWat,
each final have_chiWat=have_chiWat,
each final have_valInlIso=have_valHpInlIso,
each final have_valOutIso=have_valHpOutIso,
each final have_pumHeaWatPri=have_pumHeaWatPri,
each final have_pumChiWatPri=have_pumChiWatPri,
each final have_pumHeaWatSec=have_pumHeaWatSec,
each final have_pumChiWatSec=have_pumChiWatSec,
each final dtVal=dtVal,
each final dtOff=dtOffHp)
;
StagingRotation.StageAvailability avaStaCoo(
final staEqu=staEqu)
if have_chiWat
;
StagingRotation.StageChangeCommand chaStaHea(
typ=Buildings.Templates.Plants.Controls.Types.Application.Heating,
final have_pumSec=have_pumHeaWatSec,
final have_inpPlrSta=false,
final plrSta=plrSta,
final staEqu=staEqu,
final capEqu=capHeaHp_nominal,
final dtRun=dtRunSta,
final cp_default=cp_default,
final rho_default=rho_default,
final dT=dTHea,
final dtPri=dtPri,
final dtSec=dtSec)
if have_heaWat
;
StagingRotation.SortRuntime sorRunTimHea(
idxEquAlt=idxEquAlt,
nin=nHp)
if have_heaWat
;
Enabling.Enable enaCoo(
final typ=Buildings.Templates.Plants.Controls.Types.Application.Cooling,
final TOutLck=TOutChiWatLck,
final dTOutLck=dTOutLck,
final dtReq=dtReqDis,
final dtRun=dtRunEna,
final have_inpSch=have_inpSch,
final nReqIgn=nReqIgnChiWat,
final sch=schCoo)
if have_chiWat
;
StagingRotation.StageChangeCommand chaStaCoo(
final typ=Buildings.Templates.Plants.Controls.Types.Application.Cooling,
final have_pumSec=have_pumChiWatSec,
final have_inpPlrSta=false,
final plrSta=plrSta,
final staEqu=staEqu,
final capEqu=capCooHp_nominal,
final dtRun=dtRunSta,
final cp_default=cp_default,
final rho_default=rho_default,
final dT=dTCoo,
final dtPri=dtPri,
final dtSec=dtSec)
if have_chiWat
;
Utilities.StageIndex idxStaCoo(
final nSta=nSta,
final dtRun=dtRunSta)
if have_chiWat
;
StagingRotation.EquipmentEnable enaEquCoo(
final staEqu=staEqu,
final nEquAlt=nEquAlt)
if have_chiWat
;
StagingRotation.EquipmentAvailability avaEquHeaCoo[nHp](
each final have_heaWat=have_heaWat,
each final have_chiWat=have_chiWat,
each final dtOff=dtOff)
;
Buildings.Controls.OBC.CDL.Logical.Pre y1HeaPre[nHp]
if have_heaWat
and have_chiWat
;
StagingRotation.SortRuntime sorRunTimCoo(
final idxEquAlt=idxEquAlt,
nin=nHp)
if have_chiWat
;
Pumps.Generic.StagingHeadered staPumHeaWatPri(
final is_pri=true,
final is_ctlDp=have_pumPriCtlDp,
final have_valInlIso=have_valHpInlIso,
final have_valOutIso=have_valHpOutIso,
final nEqu=nHp,
final nPum=nPumHeaWatPri,
final is_hdr=have_pumPriHdr,
final dtRun=dtRunPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final nSenDp=
if have_senDpHeaWatRemWir
then nSenDpHeaWatRem
else 1,
final V_flow_nominal=VHeaWatPri_flow_nominal,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumHeaWatPri
;
Pumps.Generic.StagingHeadered staPumChiWatPri(
final is_pri=true,
final is_ctlDp=have_pumPriCtlDp,
final have_valInlIso=have_valHpInlIso,
final have_valOutIso=have_valHpOutIso,
final nEqu=nHp,
final nPum=nPumChiWatPri,
final is_hdr=have_pumPriHdr,
final dtRun=dtRunPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final nSenDp=
if have_senDpChiWatRemWir
then nSenDpChiWatRem
else 1,
final V_flow_nominal=VChiWatPri_flow_nominal,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumChiWatPri
;
Pumps.Generic.StagingHeadered staPumChiWatSec(
final is_pri=false,
final nEqu=nHp,
final nPum=nPumChiWatSec,
final is_hdr=have_pumSecHdr,
final is_ctlDp=have_pumSecCtlDp,
final nSenDp=
if have_senDpChiWatRemWir
then nSenDpChiWatRem
else 1,
final V_flow_nominal=VChiWatSec_flow_nominal,
final dtRun=dtRunPumSta,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumChiWatSec
;
Pumps.Generic.StagingHeadered staPumHeaWatSec(
final is_pri=false,
final nEqu=nHp,
final nPum=nPumHeaWatSec,
final is_hdr=have_pumSecHdr,
final is_ctlDp=have_pumSecCtlDp,
final nSenDp=
if have_senDpHeaWatRemWir
then nSenDpHeaWatRem
else 1,
final V_flow_nominal=VHeaWatSec_flow_nominal,
final dtRun=dtRunPumSta,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumHeaWatSec
;
Utilities.PlaceholderReal THeaWatRet(
final have_inp=have_senTHeaWatPriRet,
final have_inpPh=true)
if have_heaWat ;
Utilities.PlaceholderReal VHeaWatSta_flow(
final have_inp=have_senVHeaWatPri,
final have_inpPh=true)
if have_heaWat
;
Utilities.PlaceholderReal TChiWatRet(
final have_inp=have_senTChiWatPriRet,
final have_inpPh=true)
if have_chiWat ;
Utilities.PlaceholderReal VChiWatSta_flow(
final have_inp=have_senVChiWatPri,
final have_inpPh=true)
if have_chiWat
;
Buildings.Controls.OBC.CDL.Logical.Pre y1HpPre[nHp]
;
StagingRotation.StageCompletion comStaCoo(
nin=nHp)
if have_chiWat
;
StagingRotation.StageCompletion comStaHea(
nin=nHp)
if have_heaWat
;
Setpoints.PlantReset resHeaWat(
final TSup_nominal=THeaWatSup_nominal,
final TSupSetLim=THeaWatSupSet_min,
final dpSet_max=dpHeaWatRemSet_max,
final dpSet_min=dpHeaWatRemSet_min,
final dtDel=dtDel,
final dtHol=dtHol,
final dtRes=dtResHeaWat,
final nReqResIgn=nReqResIgnHeaWat,
final nSenDpRem=nSenDpHeaWatRem,
final resDp_max=resDpHeaWat_max,
final resTSup_min=resTHeaWatSup_min,
final res_init=res_init,
final res_max=res_max,
final res_min=res_min,
final rsp=rspHeaWat,
final rsp_max=rspHeaWat_max,
final tri=triHeaWat)
if have_heaWat ;
Setpoints.PlantReset resChiWat(
final TSup_nominal=TChiWatSup_nominal,
final TSupSetLim=TChiWatSupSet_max,
final dpSet_max=dpChiWatRemSet_max,
final dpSet_min=dpChiWatRemSet_min,
final dtDel=dtDel,
final dtHol=dtHol,
final dtRes=dtResChiWat,
final nReqResIgn=nReqResIgnChiWat,
final nSenDpRem=nSenDpChiWatRem,
final resDp_max=resDpChiWat_max,
final resTSup_min=resTChiWatSup_min,
final res_init=res_init,
final res_max=res_max,
final res_min=res_min,
final rsp=rspChiWat,
final rsp_max=rspChiWat_max,
final tri=triChiWat)
if have_chiWat ;
Pumps.Primary.VariableSpeed ctlPumPri(
final have_heaWat=have_heaWat,
final have_chiWat=have_chiWat,
final have_pumPriCtlDp=have_pumPriCtlDp,
final have_pumChiWatPriDed=have_pumChiWatPriDed,
final have_pumPriHdr=have_pumPriHdr,
final nEqu=nHp,
final nPumHeaWatPri=nPumHeaWatPri,
final nPumChiWatPri=nPumChiWatPri,
final yPumHeaWatPriSet=yPumHeaWatPriSet,
final yPumChiWatPriSet=yPumChiWatPriSet,
final have_senDpChiWatRemWir=have_senDpChiWatRemWir,
final have_senDpHeaWatRemWir=have_senDpHeaWatRemWir,
final kCtlDpChiWat=kCtlDpChiWat,
final kCtlDpHeaWat=kCtlDpHeaWat,
final nSenDpChiWatRem=nSenDpChiWatRem,
final nSenDpHeaWatRem=nSenDpHeaWatRem,
final TiCtlDpChiWat=TiCtlDpChiWat,
final TiCtlDpHeaWat=TiCtlDpHeaWat,
final yPumChiWatPri_min=yPumChiWatPri_min,
final yPumHeaWatPri_min=yPumHeaWatPri_min)
if have_pumHeaWatPriVar
or have_pumChiWatPriVar
;
Pumps.Generic.ControlDifferentialPressure ctlPumHeaWatSec(
final have_senDpRemWir=have_senDpHeaWatRemWir,
final nPum=nPumHeaWatSec,
final nSenDpRem=nSenDpHeaWatRem,
final y_min=yPumHeaWatSec_min,
final k=kCtlDpHeaWat,
final Ti=TiCtlDpHeaWat)
if have_pumHeaWatSec
and have_pumSecCtlDp
;
Pumps.Generic.ControlDifferentialPressure ctlPumChiWatSec(
final have_senDpRemWir=have_senDpChiWatRemWir,
final nPum=nPumChiWatSec,
final nSenDpRem=nSenDpChiWatRem,
final y_min=yPumChiWatSec_min,
final k=kCtlDpChiWat,
final Ti=TiCtlDpChiWat)
if have_pumChiWatSec
and have_pumSecCtlDp
;
Buildings.Controls.OBC.CDL.Reals.Switch swiTSupSet[nHp]
if have_heaWat
and have_chiWat
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator repTChiWatSupSet(
final
nout=nHp)
if have_chiWat ;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator repTHeaWatSupSet(
final
nout=nHp)
if have_heaWat ;
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal pasTHeaWatSupSet(
final nin
=nHp,
final
nout=nHp)
if have_heaWat
and not have_chiWat
;
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal pasTChiWatSupSet(
final nin
=nHp,
final nout=nHp)
if have_chiWat
and not have_heaWat
;
HeatRecoveryChillers.Controller hrc(
final COPHea_nominal=COPHeaHrc_nominal,
final TChiWatSup_min=TChiWatSupHrc_min,
final THeaWatSup_max=THeaWatSupHrc_max,
final capCoo_min=capCooHrc_min,
final capHea_min=capHeaHrc_min,
final cp_default=cp_default,
final dtLoa=dtLoaHrc,
final dtRun=dtRunEna,
final dtTem1=dtTem1Hrc,
final dtTem2=dtTem2Hrc,
final have_reqFlo=have_reqFloHrc,
final rho_default=rho_default)
if have_hrc
;
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal pasDpHeaWatRemSet(
final
nin=nSenDpHeaWatRem,
final nout=nSenDpHeaWatRem)
if have_heaWat
and have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal pasDpChiWatRemSet(
final
nin=nSenDpChiWatRem,
final nout=nSenDpChiWatRem)
if have_chiWat
and have_senDpChiWatRemWir
;
MinimumFlow.ControllerDualMode ctlFloMin(
final have_chiWat=have_chiWat,
final have_heaWat=have_heaWat,
final have_pumChiWatPri=have_pumChiWatPri,
final have_valInlIso=have_valHpInlIso,
final have_valOutIso=have_valHpOutIso,
final k=kValMinByp,
final nEnaChiWat=
if have_valHpInlIso
or have_valHpOutIso
then nHp
elseif have_pumChiWatPri
then nPumChiWatPri
else nPumHeaWatPri,
final nEnaHeaWat=
if have_valHpInlIso
or have_valHpOutIso
then nHp
else nPumHeaWatPri,
final nEqu=nHp,
final Ti=TiValMinByp,
final VChiWat_flow_min=VChiWatHp_flow_min,
final VChiWat_flow_nominal=VChiWatHp_flow_nominal,
final VHeaWat_flow_min=VHeaWatHp_flow_min,
final VHeaWat_flow_nominal=VHeaWatHp_flow_nominal)
if is_priOnl
;
Utilities.PlaceholderReal VHeaWatLoa_flow(
final have_inp=is_priOnl,
final
have_inpPh=true)
if have_heaWat
;
Utilities.PlaceholderReal VChiWatLoa_flow(
final have_inp=is_priOnl,
final
have_inpPh=true)
if have_chiWat
;
equation
connect(u1SchHea, enaHea.u1Sch);
connect(nReqPlaHeaWat, enaHea.nReqPla);
connect(TOut, enaHea.TOut);
connect(enaHea.y1, idxStaHea.u1Lea);
connect(avaStaHea.y1, idxStaHea.u1AvaSta);
connect(idxStaHea.y, enaEquHea.uSta);
connect(seqEve.y1, y1Hp);
connect(seqEve.y1Hea, y1HeaHp);
connect(seqEve.y1ValHeaWatOutIso, y1ValHeaWatHpOutIso);
connect(seqEve.y1ValHeaWatInlIso, y1ValHeaWatHpInlIso);
connect(seqEve.y1ValChiWatInlIso, y1ValChiWatHpInlIso);
connect(seqEve.y1ValChiWatOutIso, y1ValChiWatHpOutIso);
connect(idxStaHea.y, chaStaHea.uSta);
connect(chaStaHea.y1Dow, idxStaHea.u1Dow);
connect(chaStaHea.y1Up, idxStaHea.u1Up);
connect(avaStaHea.y1, chaStaHea.u1AvaSta);
connect(sorRunTimHea.yIdx, enaEquHea.uIdxAltSor);
connect(nReqPlaChiWat, enaCoo.nReqPla);
connect(TOut, enaCoo.TOut);
connect(u1SchCoo, enaCoo.u1Sch);
connect(avaStaCoo.y1, chaStaCoo.u1AvaSta);
connect(enaCoo.y1, idxStaCoo.u1Lea);
connect(chaStaCoo.y1Up, idxStaCoo.u1Up);
connect(chaStaCoo.y1Dow, idxStaCoo.u1Dow);
connect(idxStaCoo.y, enaEquCoo.uSta);
connect(enaEquHea.y1, seqEve.u1Hea);
connect(enaEquCoo.y1, seqEve.u1Coo);
connect(y1HeaHp, y1HeaPre.u);
connect(y1HeaPre.y, avaEquHeaCoo.u1Hea);
connect(avaEquHeaCoo.y1Hea, avaStaHea.u1Ava);
connect(avaEquHeaCoo.y1Coo, avaStaCoo.u1Ava);
connect(avaStaCoo.y1, idxStaCoo.u1AvaSta);
connect(avaEquHeaCoo.y1Hea, enaEquHea.u1Ava);
connect(avaEquHeaCoo.y1Coo, enaEquCoo.u1Ava);
connect(sorRunTimCoo.yIdx, enaEquCoo.uIdxAltSor);
connect(idxStaCoo.y, chaStaCoo.uSta);
connect(avaEquHeaCoo.y1Hea, sorRunTimHea.u1Ava);
connect(avaEquHeaCoo.y1Coo, sorRunTimCoo.u1Ava);
connect(staPumChiWatPri.y1, y1PumChiWatPri);
connect(staPumChiWatPri.y1_actual, seqEve.u1PumChiWatPri_actual);
connect(seqEve.y1PumChiWatPri, staPumChiWatPri.u1Pum);
connect(u1PumChiWatPri_actual, staPumChiWatPri.u1Pum_actual);
connect(u1PumHeaWatPri_actual, staPumHeaWatPri.u1Pum_actual);
connect(staPumHeaWatPri.y1_actual, seqEve.u1PumHeaWatPri_actual);
connect(staPumHeaWatSec.y1, y1PumHeaWatSec);
connect(staPumChiWatSec.y1, y1PumChiWatSec);
connect(u1PumHeaWatSec_actual, staPumHeaWatSec.u1Pum_actual);
connect(u1PumChiWatSec_actual, staPumChiWatSec.u1Pum_actual);
connect(staPumHeaWatPri.y1, y1PumHeaWatPri);
connect(staPumChiWatSec.y1_actual, seqEve.u1PumChiWatSec_actual);
connect(seqEve.y1PumHeaWatPri, staPumHeaWatPri.u1Pum);
connect(staPumHeaWatSec.y1_actual, seqEve.u1PumHeaWatSec_actual);
connect(VHeaWatSec_flow, staPumHeaWatSec.V_flow);
connect(VChiWatSec_flow, staPumChiWatSec.V_flow);
connect(THeaWatPriRet, THeaWatRet.u);
connect(THeaWatRet.y, chaStaHea.TRet);
connect(THeaWatSecRet, THeaWatRet.uPh);
connect(VHeaWatPri_flow, VHeaWatSta_flow.u);
connect(VHeaWatSta_flow.y, chaStaHea.V_flow);
connect(VHeaWatSec_flow, VHeaWatSta_flow.uPh);
connect(TChiWatPriRet, TChiWatRet.u);
connect(TChiWatRet.y, chaStaCoo.TRet);
connect(TChiWatSecRet, TChiWatRet.uPh);
connect(VChiWatPri_flow, VChiWatSta_flow.u);
connect(VChiWatSta_flow.y, chaStaCoo.V_flow);
connect(VChiWatSec_flow, VChiWatSta_flow.uPh);
connect(enaHea.y1, staPumHeaWatSec.u1Pla);
connect(enaCoo.y1, staPumChiWatSec.u1Pla);
connect(seqEve.y1ValHeaWatInlIso, staPumHeaWatPri.u1ValInlIso);
connect(seqEve.y1ValHeaWatOutIso, staPumHeaWatPri.u1ValOutIso);
connect(seqEve.y1ValChiWatInlIso, staPumChiWatPri.u1ValInlIso);
connect(seqEve.y1ValChiWatOutIso, staPumChiWatPri.u1ValOutIso);
connect(u1Hp_actual, sorRunTimHea.u1Run);
connect(u1Hp_actual, sorRunTimCoo.u1Run);
connect(y1Hp, y1HpPre.u);
connect(y1HpPre.y, avaEquHeaCoo.u1);
connect(idxStaCoo.y, comStaCoo.uSta);
connect(comStaCoo.y1, chaStaCoo.u1StaPro);
connect(u1Hp_actual, comStaCoo.u1_actual);
connect(y1HpPre.y, comStaCoo.u1);
connect(idxStaHea.y, comStaHea.uSta);
connect(u1Hp_actual, comStaHea.u1_actual);
connect(y1HpPre.y, comStaHea.u1);
connect(comStaHea.y1, chaStaHea.u1StaPro);
connect(resHeaWat.dpSet, dpHeaWatRemSet);
connect(resChiWat.dpSet, dpChiWatRemSet);
connect(nReqResHeaWat,resHeaWat.nReqRes);
connect(nReqResChiWat,resChiWat.nReqRes);
connect(enaCoo.y1, resChiWat.u1Ena);
connect(enaHea.y1, resHeaWat.u1Ena);
connect(comStaHea.y1, resHeaWat.u1StaPro);
connect(comStaCoo.y1, resChiWat.u1StaPro);
connect(resChiWat.TSupSet, chaStaCoo.TSupSet);
connect(resHeaWat.TSupSet, chaStaHea.TSupSet);
connect(ctlPumPri.yPumHeaWatPriHdr, yPumHeaWatPriHdr);
connect(ctlPumPri.yPumChiWatPriHdr, yPumChiWatPriHdr);
connect(ctlPumPri.yPumHeaWatPriDed, yPumHeaWatPriDed);
connect(ctlPumPri.yPumChiWatPriDed, yPumChiWatPriDed);
connect(staPumHeaWatPri.y1, ctlPumPri.u1PumHeaWatPri);
connect(staPumChiWatPri.y1, ctlPumPri.u1PumChiWatPri);
connect(seqEve.y1Hea, ctlPumPri.u1Hea);
connect(ctlPumHeaWatSec.y, yPumHeaWatSec);
connect(ctlPumChiWatSec.y, yPumChiWatSec);
connect(u1PumHeaWatSec_actual, ctlPumHeaWatSec.y1_actual);
connect(u1PumChiWatSec_actual, ctlPumChiWatSec.y1_actual);
connect(resChiWat.dpSet, ctlPumChiWatSec.dpRemSet);
connect(dpHeaWatRem, ctlPumHeaWatSec.dpRem);
connect(resHeaWat.dpSet, ctlPumHeaWatSec.dpRemSet);
connect(dpHeaWatLoc, ctlPumHeaWatSec.dpLoc);
connect(dpHeaWatLocSet, ctlPumHeaWatSec.dpLocSet);
connect(dpChiWatRem, ctlPumChiWatSec.dpRem);
connect(dpChiWatLocSet, ctlPumChiWatSec.dpLocSet);
connect(dpChiWatLoc, ctlPumChiWatSec.dpLoc);
connect(u1AvaHp.y, avaEquHeaCoo.u1Ava);
connect(repTChiWatSupSet.y, swiTSupSet.u3);
connect(repTHeaWatSupSet.y, swiTSupSet.u1);
connect(resChiWat.TSupSet, repTChiWatSupSet.u);
connect(resHeaWat.TSupSet, repTHeaWatSupSet.u);
connect(seqEve.y1Hea, swiTSupSet.u2);
connect(swiTSupSet.y, TSupSet);
connect(pasTChiWatSupSet.y, TSupSet);
connect(pasTHeaWatSupSet.y, TSupSet);
connect(repTChiWatSupSet.y, pasTChiWatSupSet.u);
connect(repTHeaWatSupSet.y, pasTHeaWatSupSet.u);
connect(resChiWat.TSupSet, TChiWatSupSet);
connect(resHeaWat.TSupSet, THeaWatSupSet);
connect(hrc.y1, y1Hrc);
connect(hrc.y1Coo, y1CooHrc);
connect(hrc.TSupSet, TSupSetHrc);
connect(hrc.y1PumChiWat, y1PumChiWatHrc);
connect(hrc.y1PumHeaWat, y1PumHeaWatHrc);
connect(TChiWatSupSet, hrc.TChiWatSupSet);
connect(THeaWatSupSet, hrc.THeaWatSupSet);
connect(enaCoo.y1, hrc.u1Coo);
connect(enaHea.y1, hrc.u1Hea);
connect(TChiWatRetUpsHrc, hrc.TChiWatRetUpsHrc);
connect(THeaWatRetUpsHrc, hrc.THeaWatRetUpsHrc);
connect(THeaWatSecRet, hrc.THeaWatHrcLvg);
connect(TChiWatSecRet, hrc.TChiWatHrcLvg);
connect(u1Hrc_actual, hrc.u1Hrc_actual);
connect(u1ReqFloChiWat, hrc.u1ReqFloChiWat);
connect(u1ReqFloConWat, hrc.u1ReqFloConWat);
connect(TChiWatPriSup, chaStaCoo.TPriSup);
connect(THeaWatSecSup, chaStaHea.TSecSup);
connect(TChiWatSecSup, chaStaCoo.TSecSup);
connect(THeaWatPriSup, chaStaHea.TPriSup);
connect(ctlPumHeaWatSec.y, staPumHeaWatSec.y);
connect(ctlPumChiWatSec.y, staPumChiWatSec.y);
connect(ctlPumHeaWatSec.dpLocSetMax, staPumHeaWatSec.dpSet[1]);
connect(ctlPumChiWatSec.dpLocSetMax, staPumChiWatSec.dpSet[1]);
connect(dpHeaWatLoc, staPumHeaWatSec.dp[1]);
connect(dpChiWatLoc, staPumChiWatSec.dp[1]);
connect(dpChiWatRem, staPumChiWatSec.dp);
connect(dpHeaWatRem, staPumHeaWatSec.dp);
connect(resHeaWat.dpSet, pasDpHeaWatRemSet.u);
connect(pasDpHeaWatRemSet.y, staPumHeaWatSec.dpSet);
connect(pasDpChiWatRemSet.y, staPumChiWatSec.dpSet);
connect(resChiWat.dpSet, pasDpChiWatRemSet.u);
connect(resChiWat.dpSet, ctlPumPri.dpChiWatRemSet);
connect(resHeaWat.dpSet, ctlPumPri.dpHeaWatRemSet);
connect(dpHeaWatRem, ctlPumPri.dpHeaWatRem);
connect(dpHeaWatLocSet, ctlPumPri.dpHeaWatLocSet);
connect(dpHeaWatLoc, ctlPumPri.dpHeaWatLoc);
connect(pasDpHeaWatRemSet.y, staPumHeaWatPri.dpSet);
connect(pasDpChiWatRemSet.y, staPumChiWatPri.dpSet);
connect(ctlPumPri.dpChiWatLocSetMax, staPumChiWatPri.dpSet[1]);
connect(ctlPumPri.dpHeaWatLocSetMax, staPumHeaWatPri.dpSet[1]);
connect(dpHeaWatRem, staPumHeaWatPri.dp);
connect(dpChiWatRem, staPumChiWatPri.dp);
connect(dpHeaWatLoc, staPumHeaWatPri.dp[1]);
connect(dpChiWatLoc, staPumChiWatPri.dp[1]);
connect(dpChiWatLoc, ctlPumPri.dpChiWatLoc);
connect(VChiWatPri_flow, staPumChiWatPri.V_flow);
connect(VHeaWatPri_flow, staPumHeaWatPri.V_flow);
connect(u1PumHeaWatPri_actual, ctlPumPri.u1PumHeaWatPri_actual);
connect(u1PumChiWatPri_actual, ctlPumPri.u1PumChiWatPri_actual);
connect(dpChiWatRem, ctlPumPri.dpChiWatRem);
connect(dpChiWatLocSet, ctlPumPri.dpChiWatLocSet);
connect(ctlFloMin.yValHeaWatMinByp, yValHeaWatMinByp);
connect(ctlFloMin.yValChiWatMinByp, yValChiWatMinByp);
connect(y1Hp, ctlFloMin.u1Equ);
connect(y1HeaHp, ctlFloMin.u1HeaEqu);
connect(y1ValHeaWatHpInlIso, ctlFloMin.u1ValHeaWatInlIso);
connect(y1ValHeaWatHpOutIso, ctlFloMin.u1ValHeaWatOutIso);
connect(y1ValChiWatHpInlIso, ctlFloMin.u1ValChiWatInlIso);
connect(y1ValChiWatHpOutIso, ctlFloMin.u1ValChiWatOutIso);
connect(u1PumHeaWatPri_actual, ctlFloMin.u1PumHeaWatPri_actual);
connect(u1PumChiWatPri_actual, ctlFloMin.u1PumChiWatPri_actual);
connect(VHeaWatPri_flow, ctlFloMin.VHeaWatPri_flow);
connect(VChiWatPri_flow, ctlFloMin.VChiWatPri_flow);
connect(ctlPumPri.yPumHeaWatPriHdr, staPumHeaWatPri.y);
connect(ctlPumPri.yPumChiWatPriHdr, staPumChiWatPri.y);
connect(VHeaWatSec_flow, VHeaWatLoa_flow.uPh);
connect(VHeaWatPri_flow, VHeaWatLoa_flow.u);
connect(VChiWatSec_flow, VChiWatLoa_flow.uPh);
connect(VChiWatPri_flow, VChiWatLoa_flow.u);
connect(VChiWatLoa_flow.y, hrc.VChiWatLoa_flow);
connect(VHeaWatLoa_flow.y, hrc.VHeaWatLoa_flow);
end AirToWater;