Buildings.Templates.Plants.Controls.HeatPumps.Validation
Collection of validation models
Information
This package contains validation models.
Package Content
Name | Description |
---|---|
![]() |
Buildings.Templates.Plants.Controls.HeatPumps.Validation.AirToWater
Information
This model validates Buildings.Templates.Plants.Controls.HeatPumps.AirToWater in a configuration with three equally sized lead/lag alternate heat pumps and a sidestream heat recovery chiller.
Simulating this model shows how the controller responds to a varying load by
- enabling the sidestream HRC in cooling mode,
- staging or unstaging the AWHPs and associated primary pumps,
- rotating lead/lag alternate equipment to ensure even wear,
- resetting the supply temperature and remote differential pressure in both the CHW and HW loops based on the valve position,
- staging the secondary pumps.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Nominal condition | |||
Real | THeaWatSup_nominal | 323.15 | Design HW supply temperature [K] |
Real | THeaWatRet_nominal | 315.15 | Design HW return temperature [K] |
Real | VHeaWat_flow_nominal | capHea_nominal/abs(THeaWatSu... | Design HW volume flow rate [m3/s] |
Real | TChiWatSup_nominal | 280.15 | Design CHW supply temperature [K] |
Real | TChiWatRet_nominal | 285.15 | Design CHW return temperature [K] |
Real | VChiWat_flow_nominal | capCoo_nominal/abs(TChiWatSu... | Design CHW volume flow rate [m3/s] |
Modelica definition
model AirToWater
final parameter Real capHea_nominal(
final unit="W")=sum(ctl.capHeaHp_nominal)
"Installed heating capacity";
parameter Real THeaWatSup_nominal(
unit="K",
displayUnit="degC")=323.15
"Design HW supply temperature";
parameter Real THeaWatRet_nominal(
unit="K",
displayUnit="degC")=315.15
"Design HW return temperature";
parameter Real VHeaWat_flow_nominal(
unit="m3/s")=capHea_nominal / abs(THeaWatSup_nominal - THeaWatRet_nominal) /
ctl.cp_default / ctl.rho_default
"Design HW volume flow rate";
final parameter Real capCoo_nominal(
final unit="W")=sum(ctl.capCooHp_nominal)
"Installed cooling capacity";
parameter Real TChiWatSup_nominal(
unit="K",
displayUnit="degC")=280.15
"Design CHW supply temperature";
parameter Real TChiWatRet_nominal(
unit="K",
displayUnit="degC")=285.15
"Design CHW return temperature";
parameter Real VChiWat_flow_nominal(
unit="m3/s")=capCoo_nominal / abs(TChiWatSup_nominal - TChiWatRet_nominal) /
ctl.cp_default / ctl.rho_default
"Design CHW volume flow rate";
Buildings.Templates.Plants.Controls.HeatPumps.AirToWater ctl(
have_heaWat=true,
have_chiWat=true,
have_hrc_select=true,
have_valHpInlIso=true,
have_valHpOutIso=true,
have_pumChiWatPriDed_select=true,
have_pumPriHdr=false,
is_priOnl=false,
have_pumHeaWatPriVar_select=false,
have_pumChiWatPriVar_select=false,
have_senVHeaWatPri_select=false,
have_senVChiWatPri_select=false,
have_senTHeaWatPriRet_select=false,
have_senTChiWatPriRet_select=false,
nHp=3,
have_senDpHeaWatRemWir=false,
nSenDpHeaWatRem=1,
have_senDpChiWatRemWir=false,
nSenDpChiWatRem=1,
final THeaWatSup_nominal=THeaWatSup_nominal,
THeaWatSupSet_min=298.15,
VHeaWatHp_flow_nominal=1.1 * fill(VHeaWat_flow_nominal / ctl.nHp, ctl.nHp),
VHeaWatHp_flow_min=0.6 * ctl.VHeaWatHp_flow_nominal,
final VHeaWatSec_flow_nominal=VHeaWat_flow_nominal,
capHeaHp_nominal=fill(350E3, ctl.nHp),
dpHeaWatRemSet_max={5E4},
final TChiWatSup_nominal=TChiWatSup_nominal,
TChiWatSupSet_max=288.15,
VChiWatHp_flow_nominal=1.1 * fill(VChiWat_flow_nominal / ctl.nHp, ctl.nHp),
VChiWatHp_flow_min=0.6 * ctl.VChiWatHp_flow_nominal,
final VChiWatSec_flow_nominal=VChiWat_flow_nominal,
capCooHp_nominal=fill(350E3, ctl.nHp),
yPumHeaWatPriSet=0.8,
yPumChiWatPriSet=0.7,
dpChiWatRemSet_max={5E4},
staEqu=[
1 / 3, 1 / 3, 1 / 3;
2 / 3, 2 / 3, 2 / 3;
1, 1, 1],
idxEquAlt={1, 2, 3},
TChiWatSupHrc_min=277.15,
THeaWatSupHrc_max=333.15,
COPHeaHrc_nominal=2.8,
capCooHrc_min=ctl.capHeaHrc_min *(1 - 1 / ctl.COPHeaHrc_nominal),
capHeaHrc_min=0.3 * 0.5 * sum(ctl.capHeaHp_nominal))
"Plant controller";
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable ratV_flow(
table=[
0, 0, 0;
5, 0, 0;
6, 1, 0;
12, 0.2, 0.2;
15, 0, 1;
22, 0.1, 0.1;
24, 0, 0],
timeScale=3600)
"Source signal for volume flow rate ratio – Index 1 for HW, 2 for CHW";
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dTHeaWat(
final k=(THeaWatRet_nominal - THeaWatSup_nominal) *(if ctl.have_hrc then 0.5
else 1))
"HW Delta-T";
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dTChiWat(
final k=(TChiWatRet_nominal - TChiWatSup_nominal) *(if ctl.have_hrc then 0.5
else 1))
"CHW Delta-T";
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter VHeaWat_flow(
final k=VHeaWat_flow_nominal)
"Scale by design flow";
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter VChiWat_flow(
final k=VChiWat_flow_nominal)
"Scale by design flow";
Components.Controls.StatusEmulator y1Hp_actual[ctl.nHp]
"HP status";
Components.Controls.StatusEmulator y1PumHeaWatPri_actual1[ctl.nPumHeaWatPri]
if ctl.have_heaWat and ctl.have_pumHeaWatPri
"Primary HW pump status";
Components.Controls.StatusEmulator y1PumChiWatPri_actual[ctl.nPumChiWatPri]
if ctl.have_chiWat and ctl.have_pumChiWatPri
"Primary CHW pump status";
Components.Controls.StatusEmulator y1PumHeaWatSec_actual[ctl.nPumHeaWatSec]
if ctl.have_heaWat and ctl.have_pumHeaWatSec
"Secondary HW pump status";
Components.Controls.StatusEmulator y1PumChiWatSec_actual[ctl.nPumChiWatSec]
if ctl.have_chiWat and ctl.have_pumChiWatSec
"Secondary CHW pump status";
Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOut(
amplitude=10,
freqHz=0.5 / 24 / 3600,
phase=- 0.43633231299858,
offset=10 + 273.15)
"OAT";
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold isDemHea(
t=1E-2,
h=0.5E-2)
"Return true if heating demand";
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold isDemCoo(
t=1E-2,
h=0.5E-2)
"Return true if cooling demand";
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger reqPlaHeaWat
"Generate HW plant request";
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger reqPlaChiWat
"Generate CHW plant request";
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai[2](
each k=5)
"Use fraction of flow rate as a proxy for plant reset request";
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reqResHeaWat
"Generate HW reset request";
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reqResChiWat
"Generate CHW reset request";
Buildings.Controls.OBC.CDL.Reals.Sources.Sin sin[1](
amplitude=0.1 * ctl.dpHeaWatRemSet_max,
freqHz={4 / 8000},
each phase=3.1415926535898)
if ctl.have_heaWat
"Source signal used to generate measurement values";
Buildings.Controls.OBC.CDL.Reals.Add dpHeaWatRem[1]
if ctl.have_heaWat
"Differential pressure at remote location";
Buildings.Controls.OBC.CDL.Reals.Add dpChiWatRem[1]
if ctl.have_chiWat
"Differential pressure at remote location";
Pumps.Generic.ResetLocalDifferentialPressure resDpHeaWatLoc[1](
each dpLocSet_max=20E4)
if ctl.have_heaWat
"Local HW DP reset";
Pumps.Generic.ResetLocalDifferentialPressure resDpChiWatLoc[1](
each dpLocSet_max=15E4)
if ctl.have_chiWat
"Local CHW DP reset";
Buildings.Controls.OBC.CDL.Reals.Sources.Sin sin1[1](
amplitude=0.1 * ctl.dpChiWatRemSet_max,
freqHz={3 / 8000},
each phase=3.1415926535898)
"Source signal used to generate measurement values";
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter dpHeaWatLoc(
final k=4)
if ctl.have_heaWat
"Differential pressure local to the plant";
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter dpChiWatLoc(
final k=3)
if ctl.have_chiWat
"Differential pressure local to the plant";
Components.Controls.StatusEmulator y1Hrc_actual
if ctl.have_hrc
"Sidestream HRC status";
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dTHeaWatUpsHrc(
final k=THeaWatRet_nominal - THeaWatSup_nominal)
"HW Delta-T as measured upstream of HRC";
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dTChiWatUpsHrc(
final k=TChiWatRet_nominal - TChiWatSup_nominal)
"CHW Delta-T as measured upstream of HRC";
Buildings.Controls.OBC.CDL.Reals.Add THeaWatRet
if ctl.have_heaWat
"HWRT";
Buildings.Controls.OBC.CDL.Reals.Add THeaWatRetUpsHrc
if ctl.have_heaWat
"HWRT upstream of HRC";
Buildings.Controls.OBC.CDL.Reals.Add TChiWatRet
if ctl.have_chiWat
"CHWRT";
Buildings.Controls.OBC.CDL.Reals.Add TChiWatRetUpsHrc
if ctl.have_chiWat
"CHWRT upstream of HRC";
equation
connect(ratV_flow.y[1], VHeaWat_flow.u);
connect(ratV_flow.y[2], VChiWat_flow.u);
connect(ctl.y1Hp, y1Hp_actual.y1);
connect(y1Hp_actual.y1_actual, ctl.u1Hp_actual);
connect(ctl.y1PumHeaWatPri, y1PumHeaWatPri_actual1.y1);
connect(ctl.y1PumChiWatPri, y1PumChiWatPri_actual.y1);
connect(ctl.y1PumHeaWatSec, y1PumHeaWatSec_actual.y1);
connect(ctl.y1PumChiWatSec, y1PumChiWatSec_actual.y1);
connect(y1PumHeaWatPri_actual1.y1_actual, ctl.u1PumHeaWatPri_actual);
connect(y1PumHeaWatSec_actual.y1_actual, ctl.u1PumHeaWatSec_actual);
connect(y1PumChiWatPri_actual.y1_actual, ctl.u1PumChiWatPri_actual);
connect(y1PumChiWatSec_actual.y1_actual, ctl.u1PumChiWatSec_actual);
connect(TOut.y, ctl.TOut);
connect(ratV_flow.y[1], isDemHea.u);
connect(ratV_flow.y[2], isDemCoo.u);
connect(isDemCoo.y, reqPlaChiWat.u);
connect(isDemHea.y, reqPlaHeaWat.u);
connect(reqPlaHeaWat.y, ctl.nReqPlaHeaWat);
connect(reqPlaChiWat.y, ctl.nReqPlaChiWat);
connect(VHeaWat_flow.y, ctl.VHeaWatPri_flow);
connect(VHeaWat_flow.y, ctl.VHeaWatSec_flow);
connect(VChiWat_flow.y, ctl.VChiWatPri_flow);
connect(VChiWat_flow.y, ctl.VChiWatSec_flow);
connect(ratV_flow.y, gai.u);
connect(gai[1].y, reqResHeaWat.u);
connect(gai[2].y, reqResChiWat.u);
connect(reqResHeaWat.y, ctl.nReqResHeaWat);
connect(reqResChiWat.y, ctl.nReqResChiWat);
connect(sin.y, dpHeaWatRem.u2);
connect(dpChiWatRem.y, ctl.dpChiWatRem);
connect(dpHeaWatRem.y, ctl.dpHeaWatRem);
connect(ctl.dpHeaWatRemSet, dpHeaWatRem.u1);
connect(ctl.dpChiWatRemSet, dpChiWatRem.u1);
connect(sin1.y, dpChiWatRem.u2);
connect(dpHeaWatRem[1].y, dpHeaWatLoc.u);
connect(ctl.dpHeaWatRemSet, resDpHeaWatLoc.dpRemSet);
connect(dpChiWatRem[1].y, dpChiWatLoc.u);
connect(ctl.dpChiWatRemSet, resDpChiWatLoc.dpRemSet);
connect(dpHeaWatRem.y, resDpHeaWatLoc.dpRem);
connect(dpChiWatRem.y, resDpChiWatLoc.dpRem);
connect(resDpChiWatLoc.dpLocSet, ctl.dpChiWatLocSet);
connect(dpChiWatLoc.y, ctl.dpChiWatLoc);
connect(dpHeaWatLoc.y, ctl.dpHeaWatLoc);
connect(resDpHeaWatLoc.dpLocSet, ctl.dpHeaWatLocSet);
connect(ctl.y1Hrc, y1Hrc_actual.y1);
connect(y1Hrc_actual.y1_actual, ctl.u1Hrc_actual);
connect(ctl.TChiWatSupSet, ctl.TChiWatSecSup);
connect(ctl.TChiWatSupSet, ctl.TChiWatPriSup);
connect(ctl.THeaWatSupSet, ctl.THeaWatPriSup);
connect(ctl.THeaWatSupSet, ctl.THeaWatSecSup);
connect(ctl.THeaWatSupSet, THeaWatRet.u1);
connect(dTHeaWat.y, THeaWatRet.u2);
connect(ctl.TChiWatSupSet, TChiWatRet.u2);
connect(dTChiWat.y, TChiWatRet.u1);
connect(dTChiWatUpsHrc.y, TChiWatRetUpsHrc.u1);
connect(TChiWatRetUpsHrc.u2, ctl.TChiWatSupSet);
connect(THeaWatRetUpsHrc.u2, ctl.THeaWatSupSet);
connect(dTHeaWatUpsHrc.y, THeaWatRetUpsHrc.u1);
connect(THeaWatRet.y, ctl.THeaWatPriRet);
connect(THeaWatRet.y, ctl.THeaWatSecRet);
connect(TChiWatRet.y, ctl.TChiWatSecRet);
connect(TChiWatRet.y, ctl.TChiWatPriRet);
connect(TChiWatRetUpsHrc.y, ctl.TChiWatRetUpsHrc);
connect(THeaWatRetUpsHrc.y, ctl.THeaWatRetUpsHrc);
end AirToWater;