Package with validation models
Information
This package contains validation models.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
StageIndex
|
|
StagingPlant
|
Validation of plant staging block |
StagingPump
|
Validation of pump staging block |
Information
This is a validation model for the block
Buildings.DHC.Plants.Combined.Controls.BaseClasses.StageIndex.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model StageIndex
extends Modelica.Icons.Example;
Buildings.DHC.Plants.Combined.Controls.BaseClasses.StageIndex
sta(nSta=3, tSta=60) ;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable booTimTab(
table=[0,0,0,0; 1,1,0,0; 2,1,1,1; 3,0,1,1; 4,1,0,0; 5,1,0,1; 6,1,1,0; 7,1,0,
1],
timeScale=100,
period=1000) ;
equation
connect(booTimTab.y[1], sta.u1);
connect(booTimTab.y[2], sta.u1Up);
connect(booTimTab.y[3], sta.u1Dow);
end StageIndex;
Validation of plant staging block
Information
This is a validation model for the plant staging logic implemented in
Buildings.DHC.Plants.Combined.Controls.BaseClasses.StagingPlant.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Real | PLRStaTra | 0.85 | Part load ratio triggering stage transition [1] |
CHW loop and cooling-only chillers |
Integer | nChi | 2 | Number of units operating at design conditions |
HeatFlowRate | QChiWatChi_flow_nominal | -4.4E6 | Cooling design heat flow rate of cooling-only chillers (all units) [W] |
HW loop and heat recovery chillers |
Integer | nChiHea | 3 | Number of units operating at design conditions |
HeatFlowRate | QChiWatCasCoo_flow_nominal | -6E6 | Cooling design heat flow rate of HRC in cascading cooling mode (all units) [W] |
HeatFlowRate | QHeaWat_flow_nominal | 6.4E6 | Heating design heat flow rate (all units) [W] |
Modelica definition
model StagingPlant
extends Modelica.Icons.Example;
parameter Integer nChi(
final min=1, start=1)=2
;
parameter Modelica.Units.SI.HeatFlowRate QChiWatChi_flow_nominal=-4.4E6
;
parameter Integer nChiHea(
final min=1, start=1)=3
;
parameter Real PLRStaTra(
final unit="1",
final min=0,
final max=1) = 0.85
;
parameter Modelica.Units.SI.HeatFlowRate QChiWatCasCoo_flow_nominal=-6E6
;
parameter Modelica.Units.SI.HeatFlowRate QHeaWat_flow_nominal=6.4E6
;
final parameter Modelica.Units.SI.HeatFlowRate mChiWat_flow_nominal=
abs(QChiWatChi_flow_nominal+QChiWatCasCoo_flow_nominal) /
Buildings.Utilities.Psychrometrics.Constants.cpWatLiq /
5
;
final parameter Modelica.Units.SI.HeatFlowRate mHeaWat_flow_nominal=
QHeaWat_flow_nominal /
Buildings.Utilities.Psychrometrics.Constants.cpWatLiq /
10
;
Buildings.DHC.Plants.Combined.Controls.BaseClasses.StagingPlant
staChi(
final nChi=nChi,
final nChiHea=nChiHea,
final QChiWatChi_flow_nominal=QChiWatChi_flow_nominal,
final QChiWatCasCoo_flow_nominal=QChiWatCasCoo_flow_nominal,
QChiWatCasCoo_flow_nominal_approx=QChiWatCasCoo_flow_nominal,
final QHeaWat_flow_nominal=QHeaWat_flow_nominal) ;
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable ratFlo(table=[0,0,0; 1,
0,0; 4,0.3,0.1; 5,1,0.1; 10,0.1,0.1; 13,1,0.3; 16,0.3,1;20,0.1,0.1; 24,0.1,0.3; 25,
0.1,1; 30,0,0],
timeScale=1000) ;
Modelica.Blocks.Sources.BooleanExpression u1(y=time > 0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSupSet(k=7 + 273.15)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatPriRet(k=12 + 273.15)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSupSet(k=60 + 273.15)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatPriRet(k=50 + 273.15)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter sca(
final k=
mChiWat_flow_nominal) ;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter sca1(
final k=
mHeaWat_flow_nominal) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dpSet(k=20E4)
;
equation
connect(u1.y, staChi.u1Coo);
connect(u1.y, staChi.u1Hea);
connect(TChiWatSupSet.y, staChi.TChiWatSupSet);
connect(THeaWatPriRet.y, staChi.THeaWatPriRet);
connect(THeaWatSupSet.y, staChi.THeaWatSupSet);
connect(TChiWatPriRet.y, staChi.TChiWatPriRet);
connect(sca.y, staChi.mChiWatPri_flow);
connect(sca1.y, staChi.mHeaWatPri_flow);
connect(TChiWatSupSet.y, staChi.TChiWatSup);
connect(dpSet.y, staChi.dpChiWat);
connect(dpSet.y, staChi.dpChiWatSet);
connect(dpSet.y, staChi.dpHeaWatSet);
connect(dpSet.y, staChi.dpHeaWat);
connect(THeaWatSupSet.y, staChi.THeaWatSup);
connect(ratFlo.y[1], sca.u);
connect(ratFlo.y[2], sca1.u);
end StagingPlant;
Validation of pump staging block
Information
This is a validation model for the pump staging logic implemented in
Buildings.DHC.Plants.Combined.Controls.BaseClasses.StagingPump.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Integer | nPum | 3 | Number of pumps |
Integer | nChi | 1 | Number of chillers served by the pumps |
Nominal condition |
MassFlowRate | m_flow_nominal | 1 | [kg/s] |
Modelica definition
model StagingPump
extends Modelica.Icons.Example;
parameter Integer nPum(
final min=1,
start=1)=3
;
parameter Integer nChi(
final min=1,
start=1)=1
;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1;
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable floSpe(
table=[
0,0,0;
1,0,0;
4,(nPum - 1)/nPum*m_flow_nominal,1;
5,m_flow_nominal,0.9;
10,0,0.1],
timeScale=500)
;
Buildings.DHC.Plants.Combined.Controls.BaseClasses.StagingPump
staDet(
final nPum=nPum,
final m_flow_nominal=m_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant yVal(k=1)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold isOpe(t=0.1,
h=5E-2) ;
equation
connect(floSpe.y[1],staDet. m_flow);
connect(floSpe.y[2],staDet. y);
connect(yVal.y, isOpe.u);
connect(isOpe.y,staDet.y1Ena);
end StagingPump;