Collection of validation models
Information
This package contains validation models for the classes in
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Information
This model validates the load calculation logic of the block
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDep
for different system configurations and operating modes.
-
The component
chiSupLvg validates the block for
chiller applications with CHW supply temperature control and
performance data interpolation based on evaporator and condenser
leaving temperature.
-
The component
chiRetEnt validates the block for
chiller applications with CHW return temperature control and
performance data interpolation based on evaporator leaving
and condenser entering temperature.
-
The component
chiHeaSupLvg validates the block for
heat recovery chiller applications with HW supply temperature control
and performance data interpolation based on evaporator and condenser
leaving temperature.
-
The component
hpSupLvg validates the block for
heat pump applications with HW supply temperature control
and performance data interpolation based on evaporator and condenser
leaving temperature.
The validation is carried out by computing the tracked temperature
using the heat flow rate calculated by the block, and feeding back
this variable along with the required part load ratio as inputs.
It is then expected that the tracked temperature matches the setpoint.
Further validation of the performance calculation algorithm
by comparison to polynomial chiller models is available in the package
Buildings.Fluid.Chillers.ModularReversible.Validation.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
| Type | Name | Default | Description |
| GenericHeatPump | datHea | datHea(fileName=Modelica.Uti... | Heat pump performance data |
| Generic | datCoo | datCoo(fileName=Modelica.Uti... | Chiller performance data |
Modelica definition
model TableData2DLoadDep
extends Modelica.Icons.Example;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp TChiWatSet(
height=TEvaEnt.k - TEvaLvg.k,
duration=80,
offset=TEvaLvg.k,
startTime=10,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp THeaWatSet(
height=TConLvg.k - TConEnt.k,
duration=80,
offset=TConEnt.k,
startTime=10,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TConEnt(
k=TConLvg.k - 889828 / datCoo.mCon_flow_nominal / cp.k,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TConLvg(
k=63 + 273.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TEvaEnt(
k=TEvaLvg.k + 630369 / datCoo.mEva_flow_nominal / cp.k,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TEvaLvg(
k=6 + 273.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDep
chiSupLvg(
typ=1,
use_TEvaOutForTab=true,
use_TConOutForTab=true,
PLRSup=datCoo.PLRSup,
fileName=datCoo.fileName,
TLoa_nominal=TEvaLvg.k,
TAmb_nominal=TConLvg.k)
;
parameter Data.TableData2DLoadDep.GenericHeatPump datHea(
fileName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/Examples/TableData2DLoadDep_HP.txt"),
PLRSup={0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.9,1.0},
PLRCyc_min=0.2,
mCon_flow_nominal=45,
mEva_flow_nominal=30,
dpCon_nominal=40E3,
dpEva_nominal=37E3,
devIde="30XW852",
use_TEvaOutForTab=true,
use_TConOutForTab=true,
tabUppBou=[
276.45, 336.15;
303.15, 336.15],
use_TConOutForOpeEnv=true,
use_TEvaOutForOpeEnv=true)
;
parameter Chillers.ModularReversible.Data.TableData2DLoadDep.Generic datCoo(
fileName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/Examples/TableData2DLoadDep_Chiller.txt"),
PLRSup={0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.9,1.0},
PLRCyc_min=0.2,
mCon_flow_nominal=45,
mEva_flow_nominal=30,
dpCon_nominal=40E3,
dpEva_nominal=37E3,
devIde="30XW852",
use_TEvaOutForTab=true,
use_TConOutForTab=true,
tabLowBou=[
292.15, 276.45;
336.15, 276.45],
use_TConOutForOpeEnv=true,
use_TEvaOutForOpeEnv=true)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant on(
k=true)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant mEva_flow(
k=datCoo.mEva_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant mCon_flow(
k=datCoo.mCon_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant cp(
k=Buildings.Media.Water.cp_const)
;
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDep
chiRetEnt(
typ=1,
use_TLoaLvgForCtl=false,
use_TEvaOutForTab=true,
use_TConOutForTab=false,
PLRSup=datCoo.PLRSup,
fileName=datCoo.fileName,
TLoa_nominal=TEvaLvg.k,
TAmb_nominal=TConEnt.k)
;
Modelica.Blocks.Sources.RealExpression TEvaLvgChiSupLvg(
y=chiSupLvg.TLoaEnt + chiSupLvg.Q_flow / chiSupLvg.mLoa_flow / chiSupLvg.cpLoa)
;
Modelica.Blocks.Sources.RealExpression TEvaEntChiRetEnt(
y=chiRetEnt.TLoaLvg - chiRetEnt.Q_flow / chiRetEnt.mLoa_flow / chiRetEnt.cpLoa)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant coo(
k=false)
;
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDep
chiHeaSupLvg(
typ=2,
use_TEvaOutForTab=true,
use_TConOutForTab=true,
PLRSup=datCoo.PLRSup,
fileName=datCoo.fileName,
TLoa_nominal=TEvaLvg.k,
TAmb_nominal=TConLvg.k)
;
Modelica.Blocks.Sources.RealExpression TConLvgChiHeaSupLvg(
y=chiHeaSupLvg.TLoaEnt +(chiHeaSupLvg.P - chiHeaSupLvg.Q_flow) /
chiHeaSupLvg.mLoa_flow / chiHeaSupLvg.cpLoa)
;
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDep
hpSupLvg(
typ=3,
use_TEvaOutForTab=true,
use_TConOutForTab=true,
PLRSup=datHea.PLRSup,
fileName=datHea.fileName,
TLoa_nominal=TConLvg.k,
TAmb_nominal=TEvaLvg.k)
;
Modelica.Blocks.Sources.RealExpression TConLvgHpSupLvg(
y=hpSupLvg.TLoaEnt + hpSupLvg.Q_flow / hpSupLvg.mLoa_flow / hpSupLvg.cpLoa)
;
equation
connect(on.y, chiSupLvg.on);
connect(TChiWatSet.y, chiSupLvg.TSet);
connect(TConEnt.y, chiSupLvg.TAmbEnt);
connect(TConLvg.y, chiSupLvg.TAmbLvg);
connect(mEva_flow.y, chiSupLvg.mLoa_flow);
connect(cp.y, chiSupLvg.cpLoa);
connect(on.y, chiRetEnt.on);
connect(TChiWatSet.y, chiRetEnt.TSet);
connect(TConEnt.y, chiRetEnt.TAmbEnt);
connect(TConLvg.y, chiRetEnt.TAmbLvg);
connect(TEvaLvg.y, chiRetEnt.TLoaLvg);
connect(mEva_flow.y, chiRetEnt.mLoa_flow);
connect(cp.y, chiRetEnt.cpLoa);
connect(chiSupLvg.PLR, chiSupLvg.yMea);
connect(chiRetEnt.PLR, chiRetEnt.yMea);
connect(TEvaLvgChiSupLvg.y, chiSupLvg.TLoaLvg);
connect(TEvaEnt.y, chiSupLvg.TLoaEnt);
connect(TEvaEntChiRetEnt.y, chiRetEnt.TLoaEnt);
connect(on.y, chiHeaSupLvg.on);
connect(cp.y, chiHeaSupLvg.cpLoa);
connect(cp.y, chiRetEnt.cpLoa);
connect(chiHeaSupLvg.PLR, chiHeaSupLvg.yMea);
connect(coo.y, chiHeaSupLvg.coo);
connect(TConLvgHpSupLvg.y, hpSupLvg.TLoaLvg);
connect(on.y, hpSupLvg.on);
connect(TEvaEnt.y, hpSupLvg.TAmbEnt);
connect(TEvaLvg.y, hpSupLvg.TAmbLvg);
connect(TConEnt.y, hpSupLvg.TLoaEnt);
connect(THeaWatSet.y, hpSupLvg.TSet);
connect(hpSupLvg.PLR, hpSupLvg.yMea);
connect(mCon_flow.y, hpSupLvg.mLoa_flow);
connect(cp.y, hpSupLvg.cpLoa);
connect(TEvaLvg.y, chiHeaSupLvg.TAmbLvg);
connect(TEvaEnt.y, chiHeaSupLvg.TAmbEnt);
connect(TConEnt.y, chiHeaSupLvg.TLoaEnt);
connect(TConLvgChiHeaSupLvg.y, chiHeaSupLvg.TLoaLvg);
connect(mCon_flow.y, chiHeaSupLvg.mLoa_flow);
connect(THeaWatSet.y, chiHeaSupLvg.TSet);
end TableData2DLoadDep;
Information
This model validates the load calculation and staging logic of the block
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDepSHC.
The two available control options are tested:
the component hpSup uses supply temperature control,
while the component hpRet uses return temperature control.
The model represents a three-module system operating in constant
simultaneous heating and cooling mode with the on/off command
always true.
The validation is carried out by computing the tracked temperature
using the heat flow rate calculated by the block, and feeding back
this variable as input to the heat pump model.
It is then expected that the tracked temperature matches the setpoint,
under the constraints of step-by-step staging and minimum stage runtime.
Note that a filtered value of the tracked temperature is used to avoid
creating an algebraic loop.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
| Type | Name | Default | Description |
| Nominal condition |
| Temperature | THwSup_nominal | 323.15 | HW supply temperature [K] |
| Temperature | THwRet_nominal | 315.15 | HW return temperature [K] |
| Temperature | TChwSup_nominal | 280.15 | CHW supply temperature [K] |
| Temperature | TChwRet_nominal | 285.15 | CHW return temperature [K] |
| MassFlowRate | mHw_flow_nominal | QHea_flow_nominal/(THwSup_no... | HW mass flow rate [kg/s] |
| MassFlowRate | mChw_flow_nominal | QCoo_flow_nominal/(TChwSup_n... | CHW mass flow rate [kg/s] |
| Nominal condition - Heating mode |
| Temperature | TAmbHea_nominal | 268.15 | OA temperature [K] |
| HeatFlowRate | QHea_flow_nominal | 58E3 | Heating heat flow rate - Heating mode [W] |
| HeatFlowRate | QHeaShc_flow_nominal | 85E3 | Heating heat flow rate - SHC mode [W] |
| Nominal condition - Cooling mode |
| Temperature | TAmbCoo_nominal | 308.15 | Ambient side fluid temperature — Entering or leaving depending on use_TAmbOutForTab [K] |
| HeatFlowRate | QCoo_flow_nominal | -73E3 | Cooling heat flow rate - Cooling mode [W] |
| HeatFlowRate | QCooShc_flow_nominal | -65E3 | Cooling heat flow rate - SHC mode [W] |
Modelica definition
model TableData2DLoadDepSHC
extends Modelica.Icons.Example;
parameter Modelica.Units.SI.Temperature THwSup_nominal=323.15
;
parameter Modelica.Units.SI.Temperature THwRet_nominal=315.15
;
parameter Modelica.Units.SI.Temperature TChwSup_nominal=280.15
;
parameter Modelica.Units.SI.Temperature TChwRet_nominal=285.15
;
parameter Modelica.Units.SI.Temperature TAmbHea_nominal=268.15
;
parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal = 58E3
;
parameter Modelica.Units.SI.HeatFlowRate QHeaShc_flow_nominal = 85E3
;
parameter Modelica.Units.SI.Temperature TAmbCoo_nominal=308.15
;
parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal = -73E3
;
parameter Modelica.Units.SI.HeatFlowRate QCooShc_flow_nominal = -65E3
;
parameter Modelica.Units.SI.MassFlowRate mHw_flow_nominal=
QHea_flow_nominal / (THwSup_nominal - THwRet_nominal) /
Buildings.Media.Water.cp_const
;
parameter Modelica.Units.SI.MassFlowRate mChw_flow_nominal=
QCoo_flow_nominal / (TChwSup_nominal - TChwRet_nominal) /
Buildings.Media.Water.cp_const
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp TChwSet(
height=TChwEnt.k - TChwSup_nominal,
duration=2500,
offset=TChwSup_nominal,
startTime=1000,
y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp THwSet(
height=THwEnt.k - THwSup_nominal,
duration=2000,
offset=THwSup_nominal,
startTime=500,
y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THwEnt(k=THwSup_nominal +
(THwRet_nominal - THwSup_nominal)*QHeaShc_flow_nominal/QHea_flow_nominal,
y(
final unit="K", displayUnit="degC")) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChwEnt(k=TChwSup_nominal +
(TChwRet_nominal - TChwSup_nominal)* QCooShc_flow_nominal /QCoo_flow_nominal,
y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant onHeaCoo(k=true)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant mChw_flow(k=
mChw_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant mHw_flow(k=mHw_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant cp(
k=Buildings.Media.Water.cp_const)
;
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDepSHC
hpSup(
nUni=3,
use_TEvaOutForTab=true,
use_TConOutForTab=true,
PLRHeaSup={1},
PLRCooSup={1},
PLRShcSup={1},
fileNameHea=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_Heating.txt"),
fileNameCoo=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_Cooling.txt"),
fileNameShc=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_SHC.txt"),
final THw_nominal=THwSup_nominal,
final TChw_nominal=TChwSup_nominal,
TAmbHea_nominal=TAmbHea_nominal,
final QHea_flow_nominal=QHea_flow_nominal,
final TAmbCoo_nominal=TAmbCoo_nominal,
final QCoo_flow_nominal=QCoo_flow_nominal,
final QHeaShc_flow_nominal=QHeaShc_flow_nominal,
final QCooShc_flow_nominal=QCooShc_flow_nominal)
;
Modelica.Blocks.Sources.RealExpression TConLvgHpSup(y=hpSup.THwEnt + hpSup.QHea_flow
/hpSup.mHw_flow/hpSup.cpHw) ;
Modelica.Blocks.Sources.RealExpression TEvaLvgHpSup(y=hpSup.TChwEnt + hpSup.QCoo_flow
/hpSup.mChw_flow/hpSup.cpChw)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TOut(k=15 + 273.15, y(
final unit="K", displayUnit="degC")) ;
Modelica.Blocks.Continuous.Filter filter(
f_cut=1,
init=Modelica.Blocks.Types.Init.InitialOutput,
y_start=THwSup_nominal) ;
Modelica.Blocks.Continuous.Filter filter1(
f_cut=1,
init=Modelica.Blocks.Types.Init.InitialOutput,
y_start=TChwSup_nominal) ;
Buildings.Controls.OBC.CDL.Integers.MultiSum sumNumUni(nin=3)
;
Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold intLesEquThr(t=hpSup.nUni)
;
Buildings.Controls.OBC.CDL.Utilities.Assert assMes(
message="Number of enabled modules exceeds number of modules")
;
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDepSHC
hpRet(
nUni=3,
use_TLoaLvgForCtl=false,
use_TEvaOutForTab=true,
use_TConOutForTab=true,
PLRHeaSup={1},
PLRCooSup={1},
PLRShcSup={1},
fileNameHea=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_Heating.txt"),
fileNameCoo=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_Cooling.txt"),
fileNameShc=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_SHC.txt"),
final THw_nominal=THwSup_nominal,
final TChw_nominal=TChwSup_nominal,
TAmbHea_nominal=TAmbHea_nominal,
final QHea_flow_nominal=QHea_flow_nominal,
final TAmbCoo_nominal=TAmbCoo_nominal,
final QCoo_flow_nominal=QCoo_flow_nominal,
final QHeaShc_flow_nominal=QHeaShc_flow_nominal,
final QCooShc_flow_nominal=QCooShc_flow_nominal)
;
Modelica.Blocks.Sources.RealExpression TConEntHpRet(y=hpRet.THwLvg - hpRet.QHea_flow
/hpRet.mHw_flow/hpRet.cpHw) ;
Modelica.Blocks.Sources.RealExpression TEvaEntHpRet(y=hpRet.TChwLvg - hpRet.QCoo_flow
/hpRet.mChw_flow/hpRet.cpChw)
;
Modelica.Blocks.Continuous.Filter filter2(
f_cut=1,
init=Modelica.Blocks.Types.Init.InitialOutput,
y_start=THwSup_nominal) ;
Modelica.Blocks.Continuous.Filter filter3(
f_cut=1,
init=Modelica.Blocks.Types.Init.InitialOutput,
y_start=TChwSup_nominal) ;
Buildings.Controls.OBC.CDL.Integers.MultiSum sumNumUni1(nin=3)
;
Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold intLesEquThr1(t=hpSup.nUni)
;
Buildings.Controls.OBC.CDL.Utilities.Assert assMes1(message=
"Number of enabled modules exceeds number of modules")
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChwLvg(k=TChwSup_nominal,
y(
final unit="K", displayUnit="degC")) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THwLvg(k=THwSup_nominal, y(
final unit="K", displayUnit="degC")) ;
equation
connect(cp.y, hpSup.cpChw);
connect(mHw_flow.y, hpSup.mHw_flow);
connect(THwEnt.y, hpSup.THwEnt);
connect(TChwSet.y, hpSup.TChwSet);
connect(THwSet.y, hpSup.THwSet);
connect(TChwEnt.y, hpSup.TChwEnt);
connect(TOut.y, hpSup.TAmbEnt);
connect(mChw_flow.y, hpSup.mChw_flow);
connect(cp.y, hpSup.cpHw);
connect(TConLvgHpSup.y, filter.u);
connect(TEvaLvgHpSup.y, filter1.u);
connect(onHeaCoo.y, hpSup.onHea);
connect(hpSup.nUniHea, sumNumUni.u[1]);
connect(hpSup.nUniCoo, sumNumUni.u[2]);
connect(hpSup.nUniShc, sumNumUni.u[3]);
connect(sumNumUni.y, intLesEquThr.u);
connect(intLesEquThr.y, assMes.u);
connect(filter.y, hpSup.THwLvg);
connect(filter1.y, hpSup.TChwLvg);
connect(TConEntHpRet.y, filter2.u);
connect(TEvaEntHpRet.y, filter3.u);
connect(sumNumUni1.y, intLesEquThr1.u);
connect(intLesEquThr1.y, assMes1.u);
connect(onHeaCoo.y, hpRet.onHea);
connect(TOut.y, hpRet.TAmbEnt);
connect(mChw_flow.y, hpRet.mChw_flow);
connect(mHw_flow.y, hpRet.mHw_flow);
connect(TChwSet.y, hpRet.TChwSet);
connect(THwSet.y, hpRet.THwSet);
connect(hpRet.nUniHea, sumNumUni1.u[1]);
connect(hpRet.nUniCoo, sumNumUni1.u[2]);
connect(hpRet.nUniShc, sumNumUni1.u[3]);
connect(filter3.y, hpRet.TChwEnt);
connect(filter2.y, hpRet.THwEnt);
connect(TChwLvg.y, hpRet.TChwLvg);
connect(THwLvg.y, hpRet.THwLvg);
connect(cp.y, hpRet.cpChw);
connect(cp.y, hpRet.cpHw);
connect(onHeaCoo.y, hpSup.onCoo);
connect(onHeaCoo.y, hpRet.onCoo);
end TableData2DLoadDepSHC;
Information
This model validates the load calculation and staging logic of the block
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDepSHC.
The model represents a three-module system.
The operating mode switches between simultaneous heating and cooling,
heating only, and cooling only.
The on/off command starts as true and is switched to
false at the end of the simulated period.
The validation is carried out by computing the tracked temperature
using the heat flow rate calculated by the block, and feeding back
this variable as input to the heat pump model.
It is then expected that the tracked temperature matches the setpoint,
under the constraints of step-by-step staging and minimum stage runtime.
Note that a filtered value of the tracked temperature is used to avoid
creating an algebraic loop.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
| Type | Name | Default | Description |
| Nominal condition |
| Temperature | THwSup_nominal | 50 + 273.15 | HW supply temperature [K] |
| Temperature | THwRet_nominal | 42 + 273.15 | HW return temperature [K] |
| Temperature | TChwSup_nominal | 7 + 273.15 | CHW supply temperature [K] |
| Temperature | TChwRet_nominal | 12 + 273.15 | CHW return temperature [K] |
| MassFlowRate | mHw_flow_nominal | QHea_flow_nominal/(THwSup_no... | HW mass flow rate [kg/s] |
| MassFlowRate | mChw_flow_nominal | QCoo_flow_nominal/(TChwSup_n... | CHW mass flow rate [kg/s] |
| Nominal condition - Heating mode |
| Temperature | TAmbHea_nominal | -5 + 273.15 | OA temperature [K] |
| HeatFlowRate | QHea_flow_nominal | 58E3 | Heating heat flow rate - Heating mode [W] |
| HeatFlowRate | QHeaShc_flow_nominal | 85E3 | Heating heat flow rate - SHC mode [W] |
| Nominal condition - Cooling mode |
| Temperature | TAmbCoo_nominal | 35 + 273.15 | Ambient side fluid temperature — Entering or leaving depending on use_TAmbOutForTab [K] |
| HeatFlowRate | QCoo_flow_nominal | -73E3 | Cooling heat flow rate - Cooling mode [W] |
| HeatFlowRate | QCooShc_flow_nominal | -65E3 | Cooling heat flow rate - SHC mode [W] |
Modelica definition
model TableData2DLoadDepSHCVariable
extends Modelica.Icons.Example;
parameter Modelica.Units.SI.Temperature THwSup_nominal = 50 + 273.15
;
parameter Modelica.Units.SI.Temperature THwRet_nominal = 42 + 273.15
;
parameter Modelica.Units.SI.Temperature TChwSup_nominal = 7 + 273.15
;
parameter Modelica.Units.SI.Temperature TChwRet_nominal = 12 + 273.15
;
parameter Modelica.Units.SI.Temperature TAmbHea_nominal = -5 + 273.15
;
parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal = 58E3
;
parameter Modelica.Units.SI.HeatFlowRate QHeaShc_flow_nominal = 85E3
;
parameter Modelica.Units.SI.Temperature TAmbCoo_nominal = 35 + 273.15
;
parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal = -73E3
;
parameter Modelica.Units.SI.HeatFlowRate QCooShc_flow_nominal = -65E3
;
parameter Modelica.Units.SI.MassFlowRate mHw_flow_nominal=
QHea_flow_nominal / (THwSup_nominal - THwRet_nominal) /
Buildings.Media.Water.cp_const
;
parameter Modelica.Units.SI.MassFlowRate mChw_flow_nominal=
QCoo_flow_nominal / (TChwSup_nominal - TChwRet_nominal) /
Buildings.Media.Water.cp_const
;
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TChiWatSet(
table=[0,0; 1500,0; 3000,TChwEnt.k - TChwSup_nominal; 3600,TChwEnt.k -
TChwSup_nominal],
offset={TChwSup_nominal},
y(
each final unit="K",
each displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Sin THwSet(
amplitude=THwEnt.k - THwSup_nominal,
freqHz=1/5000,
offset=THwSup_nominal + (THwEnt.k - THwSup_nominal)/2,
startTime=1000,
y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THwEnt(k=THwSup_nominal +
(THwRet_nominal - THwSup_nominal)*QHeaShc_flow_nominal/QHea_flow_nominal,
y(
final unit="K", displayUnit="degC")) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChwEnt(k=TChwSup_nominal +
(TChwRet_nominal - TChwSup_nominal)* QCooShc_flow_nominal /QCoo_flow_nominal,
y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant mChw_flow(k=
mChw_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant mHw_flow(k=mHw_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant cp(
k=Buildings.Media.Water.cp_const)
;
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.TableData2DLoadDepSHC
hpSup(
nUni=3,
use_TEvaOutForTab=true,
use_TConOutForTab=true,
PLRHeaSup={1},
PLRCooSup={1},
PLRShcSup={1},
fileNameHea=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_Heating.txt"),
fileNameCoo=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_Cooling.txt"),
fileNameShc=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/Validation/AWHP_SHC.txt"),
final THw_nominal=THwSup_nominal,
final TChw_nominal=TChwSup_nominal,
TAmbHea_nominal=TAmbHea_nominal,
final QHea_flow_nominal=QHea_flow_nominal,
final TAmbCoo_nominal=TAmbCoo_nominal,
final QCoo_flow_nominal=QCoo_flow_nominal,
final QHeaShc_flow_nominal=QHeaShc_flow_nominal,
final QCooShc_flow_nominal=QCooShc_flow_nominal)
;
Modelica.Blocks.Sources.RealExpression TConLvgHpSup(y=hpSup.THwEnt + hpSup.QHea_flow
/hpSup.mHw_flow/hpSup.cpHw) ;
Modelica.Blocks.Sources.RealExpression TEvaLvgHpSup(y=hpSup.TChwEnt + hpSup.QCoo_flow
/hpSup.mChw_flow/hpSup.cpChw)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TOut(k=15 + 273.15, y(
final unit="K", displayUnit="degC")) ;
Modelica.Blocks.Continuous.Filter filter(
f_cut=1,
init=Modelica.Blocks.Types.Init.InitialOutput,
y_start=THwSup_nominal) ;
Modelica.Blocks.Continuous.Filter filter1(
f_cut=1,
init=Modelica.Blocks.Types.Init.InitialOutput,
y_start=TChwSup_nominal) ;
Buildings.Controls.OBC.CDL.Reals.Min min1
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSwSupNom(k=THwSup_nominal,
y(
final unit="K", displayUnit="degC")) ;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable mode(
table=[0,1; 2,1; 4,0; 6,1; 7,0],
timeScale=1000,
period=7200)
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable onHea(
table=[0,1; 2,0; 4,1; 7,0],
timeScale=1000,
period=7200) ;
Buildings.Controls.OBC.CDL.Integers.MultiSum sumNumUni(nin=3)
;
Buildings.Controls.OBC.CDL.Utilities.Assert assMes(message=
"Number of enabled modules exceeds number of modules")
;
Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold intLesEquThr(t=hpSup.nUni)
;
equation
connect(cp.y, hpSup.cpChw);
connect(mHw_flow.y, hpSup.mHw_flow);
connect(THwEnt.y, hpSup.THwEnt);
connect(TChwEnt.y, hpSup.TChwEnt);
connect(TOut.y, hpSup.TAmbEnt);
connect(mChw_flow.y, hpSup.mChw_flow);
connect(cp.y, hpSup.cpHw);
connect(TConLvgHpSup.y, filter.u);
connect(TEvaLvgHpSup.y, filter1.u);
connect(filter1.y, hpSup.TChwLvg);
connect(TChiWatSet.y[1], hpSup.TChwSet);
connect(THwSet.y, min1.u1);
connect(min1.y, hpSup.THwSet);
connect(TSwSupNom.y, min1.u2);
connect(filter.y, hpSup.THwLvg);
connect(onHea.y[1], hpSup.onHea);
connect(hpSup.nUniHea, sumNumUni.u[1]);
connect(hpSup.nUniCoo, sumNumUni.u[2]);
connect(hpSup.nUniShc, sumNumUni.u[3]);
connect(sumNumUni.y, intLesEquThr.u);
connect(intLesEquThr.y, assMes.u);
connect(mode.y[1], hpSup.onCoo);
end TableData2DLoadDepSHCVariable;