Package with validation models
Information
This pakcge contains validation models.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
ChillerGroup
|
Validation of chiller group model |
ChillerHeatRecoveryGroup
|
Validation of heat recovery chiller group model |
CoolingTowerGroup
|
Validation of cooling tower group model |
HeatPumpGroup
|
Validation of heat pump group model |
MultiplePumpsDp
|
Validation of multiple pumps model with dp-controlled pump model |
MultiplePumpsFlow
|
Validation of multiple pumps model with flow-controlled pump model |
MultiplePumpsSpeed
|
Validation of multiple pumps model with speed-controlled pump model |
ValveOpeningFlowBalancing
|
Validation model for the computation of the valve opening ensuring flow balancing |
BaseClasses
|
Package with base classes |
Validation of chiller group model
Information
This model validates
Buildings.Experimental.DHC.Plants.Combined.Subsystems.ChillerGroup
in a configuration with two chillers.
The chillers are initially On and they are switched Off one after the other
as they receive an increasing CHW supply temperature setpoint.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Connectors
Type | Name | Description |
replaceable package MediumChiWat | CHW medium |
replaceable package MediumConWat | CW medium |
Modelica definition
model ChillerGroup
extends Modelica.Icons.Example;
replaceable package MediumChiWat=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
replaceable package MediumConWat=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Fluid.Chillers.Data.ElectricReformulatedEIR.ReformEIRChiller_Carrier_19XR_1403kW_7_09COP_VSD
dat ;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.ChillerGroup chi(
redeclare final package Medium1 =
MediumConWat,
redeclare final package Medium2 =
MediumChiWat,
show_T=true,
nUni=2,
dpEva_nominal=3E5,
dpCon_nominal=3E5,
final dat=dat,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Fluid.Sources.Boundary_pT retChiWat(
redeclare final package Medium =
MediumChiWat,
p=supChiWat.p + chi.dpEva_nominal + chi.valEva.dpValve_nominal,
T=288.15,
nPorts=1)
;
Fluid.Sources.Boundary_pT supConWat(
redeclare final package Medium =
MediumConWat,
p=retConWat.p + chi.dpCon_nominal + chi.valCon.dpValve_nominal,
nPorts=1) ;
Fluid.Sources.Boundary_pT retConWat(
redeclare final package Medium =
MediumConWat,
p=200000,
nPorts=1) ;
Fluid.Sources.Boundary_pT supChiWat(
redeclare final package Medium =
MediumChiWat,
p=200000,
nPorts=1) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp TChiWatSupSet(
y(displayUnit="degC", unit="K"),
height=+5,
duration=1000,
offset=dat.TEvaLvg_nominal) ;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1(
table=[0,1,1; 0.5,1,1; 0.5,1,0; 0.8,1,0; 0.8,0,0; 1,0,0],
timeScale=1000,
period=1000) ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[chi.nUni]
;
equation
connect(chi.port_b1, retConWat.ports[1]);
connect(supConWat.ports[1], chi.port_a1);
connect(retChiWat.ports[1], chi.port_a2);
connect(supChiWat.ports[1], chi.port_b2);
connect(TChiWatSupSet.y, chi.TSet);
connect(y1.y, chi.y1);
connect(y1.y, booToRea.u);
connect(booToRea.y, chi.yValCon);
connect(booToRea.y, chi.yValEva);
end ChillerGroup;
Validation of heat recovery chiller group model
Information
This model validates
Buildings.Experimental.DHC.Plants.Combined.Subsystems.ChillerHeatRecoveryGroup
in a configuration with two HRCs.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Connectors
Type | Name | Description |
replaceable package Medium | Medium model |
Modelica definition
model ChillerHeatRecoveryGroup
extends Modelica.Icons.Example;
replaceable package Medium=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
final parameter Integer nChiHea(
final min=1, start=1)=2
;
parameter Fluid.Chillers.Data.ElectricReformulatedEIR.ReformEIRChiller_Carrier_19XR_1403kW_7_09COP_VSD
dat(
EIRFunT={0.0101739374, 0.0607200115, 0.0003348647, 0.003162578, 0.0002388594, -0.0014121289},
capFunT={0.0387084662, 0.2305017927, 0.0004779504, 0.0178244359, -8.48808e-05, -0.0032406711},
EIRFunPLR={0.4304252832, -0.0144718912, 5.12039e-05, -0.7562386674, 0.5661683373,
0.0406987748, 3.0278e-06, -0.3413411197, -0.000469572, 0.0055009208},
QEva_flow_nominal=-1E6,
COP_nominal=2.5,
mEva_flow_nominal=20,
mCon_flow_nominal=22,
TEvaLvg_nominal=279.15,
TEvaLvgMin=277.15,
TEvaLvgMax=308.15,
TConLvg_nominal=333.15,
TConLvgMin=296.15,
TConLvgMax=336.15)
;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.ChillerHeatRecoveryGroup
chi(
redeclare final package Medium =
Medium,
show_T=true,
final nUni=nChiHea,
dpEva_nominal=3E5,
dpCon_nominal=3E5,
final dat=dat,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) ;
Fluid.Sources.Boundary_pT bouChiWat(
redeclare final package Medium =
Medium,
p=300000,
nPorts=1) ;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1(
table=[0,1,1; 0.8,1,1; 0.8,1,0; 0.9,1,0; 0.9,0,0; 1,0,0],
timeScale=2000,
period=2000) ;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1Coo(
table=[0,0,0; 0.2,0,0; 0.2,0,1; 0.6,0,1; 0.6,1,1; 1,1,1],
timeScale=2000,
period=2000)
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1HeaCoo(
table=[0,0,0; 0.4,0,0; 0.4,1,0; 0.6,1,0; 0.6,0,0; 1,0,0],
timeScale=2000,
period=2000)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSet[nChiHea](
each final k=chi.TChiWatSup_nominal, y(
each final unit="K",
each
displayUnit="degC")) ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[chi.nUni]
;
Fluid.Sensors.TemperatureTwoPort THeaWatSup(
redeclare final package Medium =
Medium,
final m_flow_nominal=chi.mConWat_flow_nominal)
;
Fluid.Sensors.MassFlowRate floHeaWat(
redeclare final package Medium =
Medium) ;
Fluid.Sensors.MassFlowRate floChiWat(
redeclare final package Medium =
Medium) ;
Fluid.Sensors.TemperatureTwoPort TChiWatSup(
redeclare final package Medium =
Medium,
final m_flow_nominal=chi.mChiWat_flow_nominal)
;
Buildings.Controls.OBC.CDL.Logical.Or cooOrDir[nChiHea]
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal yValConSwi[nChiHea]
;
Buildings.Controls.OBC.CDL.Logical.Not hea[nChiHea] ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt[nChiHea]
;
Buildings.Controls.OBC.CDL.Integers.MultiSum numHea(nin=nChiHea)
;
Buildings.Controls.OBC.CDL.Integers.Less intLes[nChiHea]
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant idx[nChiHea](
final k={i
for i
in 1:nChiHea}) ;
Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator rep(
final nout=
nChiHea) ;
Buildings.Controls.OBC.CDL.Logical.Or mul[nChiHea]
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal yValEvaSwi[nChiHea]
;
Buildings.Controls.OBC.CDL.Logical.Not heaAndCas[nChiHea]
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1[nChiHea]
;
Buildings.Controls.OBC.CDL.Integers.MultiSum numHeaAndCas(nin=nChiHea)
;
Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator rep1(
final nout=
nChiHea) ;
Buildings.Controls.OBC.CDL.Integers.Less intLes1
[nChiHea]
;
Buildings.Controls.OBC.CDL.Logical.Or mul1
[nChiHea]
;
Buildings.Controls.OBC.CDL.Reals.Switch TChiHeaSupSet[nChiHea]
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSet[nChiHea](
each final k=chi.THeaWatSup_nominal, y(
each final unit="K",
each
displayUnit="degC")) ;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumChiWat(
redeclare package Medium =
Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
nPum=1,
have_var=false,
have_valve=true,
final mPum_flow_nominal=chi.mChiWat_flow_nominal,
final dpPum_nominal=chi.dpEva_nominal)
;
Buildings.Controls.OBC.CDL.Logical.MultiOr y1PumConWatCon(nin=2)
;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumHeaWat(
redeclare package Medium =
Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
nPum=1,
have_var=false,
have_valve=true,
final mPum_flow_nominal=chi.mConWat_flow_nominal,
final dpPum_nominal=chi.dpCon_nominal)
;
Buildings.Controls.OBC.CDL.Logical.And onAndHea[nChiHea]
;
Buildings.Controls.OBC.CDL.Logical.MultiOr y1PumHeaWat(nin=2)
;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumConWatCon(
redeclare package Medium =
Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
nPum=1,
have_var=false,
have_valve=true,
final mPum_flow_nominal=chi.mConWat_flow_nominal,
final dpPum_nominal=chi.dpCon_nominal)
;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumConWatEva(
redeclare package Medium =
Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
nPum=1,
have_var=false,
have_valve=true,
final mPum_flow_nominal=chi.mChiWat_flow_nominal,
final dpPum_nominal=chi.dpEva_nominal)
;
Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold y1PumConWatEva(t=1)
;
Buildings.Controls.OBC.CDL.Logical.MultiOr y1PumChiWat(nin=2)
;
Fluid.HeatExchangers.SensibleCooler_T disHeaWat(
redeclare final package Medium =
Medium,
final m_flow_nominal=THeaWatRet.k,
final dp_nominal=0,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=300,
T_start=chi.THeaWatSup_nominal - 12)
;
Fluid.HeatExchangers.Heater_T disConWatEva(
redeclare final package Medium =
Medium,
final m_flow_nominal=chi.mChiWat_flow_nominal,
final dp_nominal=0,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=300,
T_start=TConWatEvaSup.k)
;
Fluid.HeatExchangers.SensibleCooler_T disConWatCon(
redeclare final package Medium =
Medium,
final m_flow_nominal=TConWatConSup.k,
final dp_nominal=0,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=300,
T_start=chi.TCasCooEnt_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatRet(
final k=chi.THeaWatSup_nominal - 12,
y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TConWatConSup(
final k=
chi.TCasCooEnt_nominal, y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TConWatEvaSup(
final k=
chi.TCasHeaEnt_nominal, y(
final unit="K", displayUnit="degC"))
;
Fluid.HeatExchangers.Heater_T disChiWat(
redeclare final package Medium =
Medium,
final m_flow_nominal=TChiWatRet.k,
final dp_nominal=0,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=300,
T_start=chi.TChiWatSup_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatRet(
final k=chi.TChiWatSup_nominal + 6, y(
final unit="K", displayUnit="degC"))
;
Fluid.Sources.Boundary_pT bouHeaWat(
redeclare final package Medium =
Medium,
p=300000,
nPorts=1) ;
equation
connect(y1.y, chi.y1);
connect(y1Coo.y, chi.y1Coo);
connect(y1.y, booToRea.u);
connect(booToRea.y, chi.yValEva);
connect(chi.port_b1, THeaWatSup.port_a);
connect(floChiWat.port_b, chi.port_a4);
connect(TChiWatSup.port_a, chi.port_b4);
connect(y1Coo.y, cooOrDir.u1);
connect(y1HeaCoo.y, cooOrDir.u2);
connect(y1Coo.y, hea.u);
connect(hea.y, booToInt.u);
connect(booToInt.y, numHea.u);
connect(idx.y, intLes.u1);
connect(rep.y, intLes.u2);
connect(intLes.y, mul.u2);
connect(mul.y, yValConSwi.u);
connect(yValConSwi.y, chi.yValConSwi);
connect(y1Coo.y[1:2], mul.u1);
connect(yValEvaSwi.y, chi.yValEvaSwi);
connect(numHea.y, rep.u);
connect(cooOrDir.y, heaAndCas.u);
connect(heaAndCas.y, booToInt1.u);
connect(booToInt1.y, numHeaAndCas.u);
connect(numHeaAndCas.y, rep1.u);
connect(rep1.y, intLes1.u2);
connect(idx.y, intLes1.u1);
connect(cooOrDir.y, mul1.u1);
connect(intLes1.y, mul1.u2);
connect(mul1.y, yValEvaSwi.u);
connect(TChiWatSet.y, TChiHeaSupSet.u1);
connect(THeaWatSet.y, TChiHeaSupSet.u3);
connect(y1Coo.y, TChiHeaSupSet.u2);
connect(TChiHeaSupSet.y, chi.TSet);
connect(pumChiWat.port_b, floChiWat.port_a);
connect(y1Coo.y[1:2], y1PumConWatCon.u[1:2]);
connect(pumHeaWat.port_b, floHeaWat.port_a);
connect(y1.y[1:2], onAndHea.u1);
connect(hea.y, onAndHea.u2);
connect(onAndHea.y, y1PumHeaWat.u[1:2]);
connect(y1PumHeaWat.y, pumHeaWat.y1[1]);
connect(THeaWatSup.port_b, pumHeaWat.port_a);
connect(pumConWatEva.port_b, chi.port_a2);
connect(chi.port_b3, pumConWatCon.port_a);
connect(numHeaAndCas.y, y1PumConWatEva.u);
connect(y1PumConWatEva.y, pumConWatEva.y1[1]);
connect(y1PumConWatCon.y, pumConWatCon.y1[1]);
connect(y1PumChiWat.y, pumChiWat.y1[1]);
connect(cooOrDir.y, y1PumChiWat.u[1:2]);
connect(floHeaWat.port_b, disHeaWat.port_a);
connect(disHeaWat.port_b, chi.port_a1);
connect(chi.port_b2, disConWatEva.port_a);
connect(disConWatEva.port_b, pumConWatEva.port_a);
connect(pumConWatCon.port_b, disConWatCon.port_a);
connect(disConWatCon.port_b, chi.port_a3);
connect(THeaWatRet.y, disHeaWat.TSet);
connect(TConWatConSup.y, disConWatCon.TSet);
connect(TConWatEvaSup.y, disConWatEva.TSet);
connect(disChiWat.port_b, pumChiWat.port_a);
connect(TChiWatSup.port_b, disChiWat.port_a);
connect(TChiWatRet.y, disChiWat.TSet);
connect(bouChiWat.ports[1], pumChiWat.port_a);
connect(booToRea.y, chi.yValCon);
connect(bouHeaWat.ports[1], pumHeaWat.port_a);
end ChillerHeatRecoveryGroup;
Validation of cooling tower group model
Information
This model validates
Buildings.Experimental.DHC.Plants.Combined.Subsystems.CoolingTowerGroup
in a configuration with two tower cells.
The tower cells are initially enabled and they are disabled one after the other
as the CW supply temperature setpoint is increasing after an initial
period where it is fixed at its design value.
The Start command of the CW pumps is the same signal
as the one used for the cooling towers.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
replaceable package MediumConWat | Buildings.Media.Water | CW medium |
Connectors
Type | Name | Description |
replaceable package MediumConWat | CW medium |
Modelica definition
model CoolingTowerGroup
extends Modelica.Icons.Example;
replaceable package MediumConWat=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.CoolingTowerGroup coo(
redeclare final package Medium =
MediumConWat,
show_T=true,
nUni=2,
mConWatUni_flow_nominal=1,
dpConWatFriUni_nominal=1E4,
mAirUni_flow_nominal=coo.mConWatUni_flow_nominal/1.45,
TWetBulEnt_nominal=297.05,
TConWatRet_nominal=308.15,
TConWatSup_nominal=302.55,
PFanUni_nominal=340*coo.mConWatUni_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Fluid.Sources.Boundary_pT bouConWat(
redeclare final package Medium =
MediumConWat,
T=coo.TConWatRet_nominal,
nPorts=2)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp TConWatSupSet(
height=+3,
duration=500,
offset=coo.TConWatSup_nominal,
startTime=500,
y(displayUnit="degC", unit="K"))
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1(
table=[0,1,1; 0.4,1,1; 0.4,1,0; 0.8,1,0; 0.8,0,0; 1,0,0],
timeScale=1000,
period=1000)
;
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
filNam=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos"))
;
Fluid.Sensors.TemperatureTwoPort TConWatSup(
redeclare package Medium =
MediumConWat,
final m_flow_nominal=coo.mConWat_flow_nominal)
;
Fluid.Sensors.TemperatureTwoPort TConWatRet(
redeclare package Medium =
MediumConWat,
final m_flow_nominal=coo.mConWat_flow_nominal)
;
EnergyTransferStations.Combined.Controls.PIDWithEnable ctl(
k=1,
Ti=60,
reverseActing=false) ;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pum(
redeclare package Medium =
MediumConWat,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final nPum=coo.nUni,
have_var=false,
have_valve=false,
final mPum_flow_nominal=coo.mConWatUni_flow_nominal,
final dpPum_nominal=coo.dpConWatFriUni_nominal)
;
equation
connect(y1.y, coo.y1);
connect(weaDat.weaBus, coo.weaBus);
connect(coo.port_b, TConWatSup.port_a);
connect(bouConWat.ports[1],TConWatRet. port_a);
connect(TConWatRet.port_b, coo.port_a);
connect(coo.TConWatSup, ctl.u_m);
connect(y1.y[1], ctl.uEna);
connect(TConWatSupSet.y, ctl.u_s);
connect(ctl.y, coo.y);
connect(pum.port_b, bouConWat.ports[2]);
connect(TConWatSup.port_b, pum.port_a);
connect(y1.y, pum.y1);
end CoolingTowerGroup;
Validation of heat pump group model
Information
This model validates
Buildings.Experimental.DHC.Plants.Combined.Subsystems.HeatPumpGroup
in a configuration with two heat pumps.
The heat pumps are initially On and they are switched Off one after the other
as they are exposed to an increasing HW return temperature.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
replaceable package MediumHeaWat | Buildings.Media.Water | CHW medium |
replaceable package MediumAir | Buildings.Media.Air | CW medium |
Generic | dat | dat(dpHeaLoa_nominal=50000, ... | Heat pump parameters (each unit) |
Connectors
Type | Name | Description |
replaceable package MediumHeaWat | CHW medium |
replaceable package MediumAir | CW medium |
Modelica definition
model HeatPumpGroup
extends Modelica.Icons.Example;
replaceable package MediumHeaWat=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
replaceable package MediumAir=
Buildings.Media.Air
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Fluid.HeatPumps.Data.EquationFitReversible.Generic dat(
dpHeaLoa_nominal=50000,
dpHeaSou_nominal=100,
hea(
mLoa_flow=dat.hea.Q_flow / 10 / 4186,
mSou_flow=1E-4 * dat.hea.Q_flow,
Q_flow=1E6,
P=dat.hea.Q_flow / 2.2,
coeQ={-5.64420084, 1.95212447, 9.96663913, 0.23316322, -5.64420084},
coeP={-3.96682255, 6.8419453, 1.99606939, 0.01393387, -3.96682255},
TRefLoa=298.15,
TRefSou=253.15),
coo(
mLoa_flow=0,
mSou_flow=0,
Q_flow=-1,
P=0,
coeQ=
fill(0, 5),
coeP=
fill(0, 5),
TRefLoa=273.15,
TRefSou=273.15))
;
Buildings.Experimental.DHC.Plants.Combined.Subsystems.HeatPumpGroup heaPum(
redeclare final package Medium =
MediumHeaWat,
redeclare final package MediumAir =
MediumAir,
show_T=true,
nUni=2,
final dat=dat,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Fluid.Sources.Boundary_pT bouHeaWat(
redeclare final package Medium =
MediumHeaWat,
use_T_in=true,
nPorts=2)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSupSet(
k=dat.hea.TRefLoa+ 10,
y(displayUnit="degC", unit="K")) ;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1(
table=[0,1,1; 0.5,1,1; 0.5,1,0; 0.8,1,0; 0.8,0,0; 1,0,0],
timeScale=1000,
period=1000)
;
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
filNam=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp THeaWatRetBou(
y(displayUnit="degC", unit="K"),
height=+5,
duration=1000,
offset=dat.hea.TRefLoa) ;
Fluid.Sensors.TemperatureTwoPort THeaWatSup(
redeclare package Medium =
MediumHeaWat,
final m_flow_nominal=heaPum.mHeaWat_flow_nominal)
;
Fluid.Sensors.TemperatureTwoPort THeaWatRet(
redeclare package Medium =
MediumHeaWat,
final m_flow_nominal=heaPum.mHeaWat_flow_nominal)
;
equation
connect(THeaWatSupSet.y,heaPum. TSet);
connect(y1.y,heaPum. y1);
connect(weaDat.weaBus,heaPum. weaBus);
connect(THeaWatRetBou.y, bouHeaWat.T_in);
connect(heaPum.port_b, THeaWatSup.port_a);
connect(THeaWatSup.port_b, bouHeaWat.ports[1]);
connect(bouHeaWat.ports[2], THeaWatRet.port_a);
connect(THeaWatRet.port_b, heaPum.port_a);
end HeatPumpGroup;
Validation of multiple pumps model with dp-controlled pump model
Information
This model validates
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsDp
by comparing an instance of that model with two instances of
Buildings.Fluid.Movers.FlowControlled_dp
connected in parallel.
The two pumps are commanded On one after the other as they receive
an increasing differential pressure setpoint and work
against a two-way modulating valve that gets progressively opened.
Extends from BaseClasses.PartialMultiplePumps (Base class for validating the multiple pumps model).
Parameters
Type | Name | Default | Description |
Integer | nPum | 2 | Number of pumps |
Pressure | p_min | 2E5 | Circuit minimum pressure [Pa] |
PressureDifference | dp_nominal | dpPum_nominal | Circuit total pressure drop at design conditions [Pa] |
Nominal condition |
MassFlowRate | mPum_flow_nominal | 1 | Pump mass flow rate (each pump) [kg/s] |
PressureDifference | dpPum_nominal | 1E5 | Pump head (each pump) [Pa] |
Modelica definition
model MultiplePumpsDp
extends BaseClasses.PartialMultiplePumps(
redeclare final Subsystems.MultiplePumpsDp pum,
redeclare final Buildings.Fluid.Movers.FlowControlled_dp pum1(
final m_flow_nominal=mPum_flow_nominal,
final dp_nominal=dpPum_nominal),
redeclare final Buildings.Fluid.Movers.FlowControlled_dp pum2(
final m_flow_nominal=mPum_flow_nominal,
final dp_nominal=dpPum_nominal));
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp dpSet(
height=dpPum_nominal, duration=500)
;
equation
connect(dpSet.y, inp1.u1);
connect(dpSet.y, inp2.u1);
connect(inp1.y, pum1.dp_in);
connect(inp2.y, pum2.dp_in);
connect(dpSet.y, pum.dp_in);
end MultiplePumpsDp;
Validation of multiple pumps model with flow-controlled pump model
Information
This model validates
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsFlow
by comparing an instance of that model with two instances of
Buildings.Fluid.Movers.FlowControlled_m_flow
connected in parallel.
The two pumps are commanded On one after the other as they receive
an increasing flow setpoint and work against a two-way modulating
valve that gets progressively opened.
Extends from BaseClasses.PartialMultiplePumps (Base class for validating the multiple pumps model).
Parameters
Type | Name | Default | Description |
Integer | nPum | 2 | Number of pumps |
Pressure | p_min | 2E5 | Circuit minimum pressure [Pa] |
PressureDifference | dp_nominal | dpPum_nominal | Circuit total pressure drop at design conditions [Pa] |
Nominal condition |
MassFlowRate | mPum_flow_nominal | 1 | Pump mass flow rate (each pump) [kg/s] |
PressureDifference | dpPum_nominal | 1E5 | Pump head (each pump) [Pa] |
Modelica definition
model MultiplePumpsFlow
extends BaseClasses.PartialMultiplePumps(
redeclare final Subsystems.MultiplePumpsFlow pum,
redeclare final Buildings.Fluid.Movers.FlowControlled_m_flow pum1(
final m_flow_nominal=mPum_flow_nominal,
final dp_nominal=dpPum_nominal),
redeclare final Buildings.Fluid.Movers.FlowControlled_m_flow pum2(
final m_flow_nominal=mPum_flow_nominal,
final dp_nominal=dpPum_nominal));
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp floSet(height=
mPum_flow_nominal, duration=500) ;
Buildings.Controls.OBC.CDL.Reals.Add floTotSet
;
equation
connect(floSet.y, inp1.u1);
connect(floSet.y, inp2.u1);
connect(inp2.y, pum2.m_flow_in);
connect(inp1.y, pum1.m_flow_in);
connect(floTotSet.y, pum.m_flow_in);
connect(inp1.y, floTotSet.u1);
connect(inp2.y, floTotSet.u2);
end MultiplePumpsFlow;
Validation of multiple pumps model with speed-controlled pump model
Information
This model validates
Buildings.Experimental.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed
by comparing an instance of that model with two instances of
Buildings.Fluid.Movers.SpeedControlled_y
connected in parallel.
The two pumps are commanded On one after the other as they receive
an increasing speed signal and work against a two-way modulating valve
that gets progressively opened.
Extends from BaseClasses.PartialMultiplePumps (Base class for validating the multiple pumps model).
Parameters
Type | Name | Default | Description |
Integer | nPum | 2 | Number of pumps |
Pressure | p_min | 2E5 | Circuit minimum pressure [Pa] |
PressureDifference | dp_nominal | dpPum_nominal | Circuit total pressure drop at design conditions [Pa] |
Nominal condition |
MassFlowRate | mPum_flow_nominal | 1 | Pump mass flow rate (each pump) [kg/s] |
PressureDifference | dpPum_nominal | 1E5 | Pump head (each pump) [Pa] |
Modelica definition
Validation model for the computation of the valve opening ensuring flow balancing
Information
This model validates the computation of the valve opening that ensures
flow balancing proportional to design flow in the case of linear valves
configured with a pressure drop varying linearly with the flow rate.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
replaceable package Medium | Buildings.Media.Water | CHW medium |
Real | m1_flow | 1 | Valve #1 design mass flow rate |
Real | m2_flow | 1.5 | Valve #2 design mass flow rate |
Real | dpv1 | 1E3 | Valve #1 design pressure drop |
Real | dpv2 | 1E3 | Valve #2 design pressure drop |
Real | dpf1 | 3E4 | Design pressure drop of fixed flow resistance in series with valve #1 |
Real | dpf2 | 5E4 | Design pressure drop of fixed flow resistance in series with valve #2 |
Real | dps | 20E4 | |
Real | y1 | if dpf2 + dpv2 - dpf1 <= 0 t... | Valve #1 opening |
Real | y2 | if dpf1 + dpv1 - dpf2 <= 0 t... | Valve #2 opening |
Connectors
Type | Name | Description |
replaceable package Medium | CHW medium |
Modelica definition
model ValveOpeningFlowBalancing
extends Modelica.Icons.Example;
replaceable package Medium=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Real m1_flow = 1
;
parameter Real m2_flow = 1.5
;
parameter Real dpv1 = 1E3
;
parameter Real dpv2 = 1E3
;
parameter Real dpf1 = 3E4
;
parameter Real dpf2 = 5E4
;
parameter Real dps = 20E4;
parameter Real y1 =
if dpf2 + dpv2 - dpf1 <= 0
then 1
else
(dpv1 / (dpf2 + dpv2 - dpf1))^0.5
;
parameter Real y2 =
if dpf1 + dpv1 - dpf2 <= 0
then 1
else
(dpv2 / (dpf1 + dpv1 - dpf2))^0.5
;
Fluid.Actuators.Valves.TwoWayLinear val1(
redeclare package Medium =
Medium,
m_flow_nominal=m1_flow,
linearized=true,
dpValve_nominal=dpv1,
use_inputFilter=false,
dpFixed_nominal=dpf1)
;
Fluid.Actuators.Valves.TwoWayLinear val2(
redeclare package Medium=
Medium,
m_flow_nominal=m2_flow,
linearized=true,
dpValve_nominal=dpv2,
use_inputFilter=false,
dpFixed_nominal=dpf2)
;
Fluid.Sources.Boundary_pT bou(
p=Medium.p_default + dps, nPorts=2,
redeclare package Medium=
Medium)
;
Fluid.Sources.Boundary_pT bou1(nPorts=2,
redeclare package Medium=
Medium)
;
Modelica.Blocks.Sources.RealExpression y[2](y={y1, y2})
;
equation
connect(bou.ports[1], val1.port_a);
connect(val1.port_b, bou1.ports[1]);
connect(bou.ports[2],val2. port_a);
connect(val2.port_b, bou1.ports[2]);
connect(y[1].y, val1.y);
connect(y[2].y,val2. y);
end ValveOpeningFlowBalancing;