Buildings.Applications.BaseClasses.Equipment.Validation
Collection of validation models
Information
This package contains validation models for the classes in Buildings.Applications.BaseClasses.Equipment.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
ElectricChillerParallel | Model that test electric chiller parallel |
PumpParallel | Example that tests the model pump parallels |
Buildings.Applications.BaseClasses.Equipment.Validation.ElectricChillerParallel
Model that test electric chiller parallel
Information
This example demonstrates how the chiller parallel can operate under different performance curves.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Power | P_nominal | -per1.QEva_flow_nominal/per1... | Nominal compressor power (at y=1) [W] |
TemperatureDifference | dTEva_nominal | 10 | Temperature difference evaporator inlet-outlet [K] |
TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet [K] |
Real | COPc_nominal | 3 | Chiller COP |
MassFlowRate | mEva_flow_nominal | per1.mEva_flow_nominal | Nominal mass flow rate at evaporator [kg/s] |
MassFlowRate | mCon_flow_nominal | per1.mCon_flow_nominal | Nominal mass flow rate at condenser [kg/s] |
ElectricEIRChiller_McQuay_WSC_471kW_5_89COP_Vanes | per1 | Chiller performance data | |
ElectricEIRChiller_York_YT_563kW_10_61COP_Vanes | per2 | Chiller performance data |
Modelica definition
model ElectricChillerParallel "Model that test electric chiller parallel"
extends Modelica.Icons.Example;
package Medium1 = Buildings.Media.Water "Medium model";
package Medium2 = Buildings.Media.Water "Medium model";
parameter Modelica.Units.SI.Power P_nominal=-per1.QEva_flow_nominal/per1.COP_nominal
"Nominal compressor power (at y=1)";
parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=10
"Temperature difference evaporator inlet-outlet";
parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10
"Temperature difference condenser outlet-inlet";
parameter Real COPc_nominal = 3 "Chiller COP";
parameter Modelica.Units.SI.MassFlowRate mEva_flow_nominal=per1.mEva_flow_nominal
"Nominal mass flow rate at evaporator";
parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal=per1.mCon_flow_nominal
"Nominal mass flow rate at condenser";
parameter Buildings.Fluid.Chillers.Data.ElectricEIR.ElectricEIRChiller_McQuay_WSC_471kW_5_89COP_Vanes
per1 "Chiller performance data";
parameter Buildings.Fluid.Chillers.Data.ElectricEIR.ElectricEIRChiller_York_YT_563kW_10_61COP_Vanes
per2 "Chiller performance data";
Buildings.Applications.BaseClasses.Equipment.ElectricChillerParallel chiPar(
num=2,
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
m1_flow_nominal=mEva_flow_nominal,
m2_flow_nominal=mCon_flow_nominal,
dp1_nominal=6000,
dp2_nominal=6000,
dpValve_nominal={6000,6000},
per={per1,per2})
"Chillers with identical nominal parameters but different performance curves";
Fluid.Sources.Boundary_pT sou1(
redeclare package Medium = Medium1,
p=Medium1.p_default + 18E3,
use_T_in=true,
T=298.15,
nPorts=1) "Pressure boundary condition";
Fluid.Sources.Boundary_pT sou2(
redeclare package Medium = Medium2,
p=Medium2.p_default + 18E3,
use_T_in=true,
T=291.15,
nPorts=1) "Pressure boundary condition";
Buildings.Fluid.Sources.Boundary_pT sin1(
redeclare package Medium = Medium1, nPorts=1) "Pressure boundary condition";
Buildings.Fluid.Sources.Boundary_pT sin2(
redeclare package Medium = Medium2, nPorts=1) "Pressure boundary condition";
Modelica.Blocks.Sources.Ramp TSet(
duration=3600,
startTime=3*3600,
offset=273.15 + 10,
height=8) "Set point for leaving chilled water temperature";
Modelica.Blocks.Sources.Ramp TCon_in(
height=10,
offset=273.15 + 20,
duration=3600,
startTime=2*3600) "Condenser inlet temperature";
Modelica.Blocks.Sources.Ramp TEva_in(
offset=273.15 + 15,
height=5,
startTime=3600,
duration=3600) "Evaporator inlet temperature";
Modelica.Blocks.Sources.Pulse pulse(period=3600/2)
"Pulse input signal";
Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=0.5)
"Switch to switch chiller on or off";
Buildings.Fluid.FixedResistances.PressureDrop res1(
redeclare package Medium = Medium1,
m_flow_nominal=mCon_flow_nominal,
dp_nominal=6000) "Flow resistance";
Buildings.Fluid.FixedResistances.PressureDrop res2(
dp_nominal=6000,
redeclare package Medium = Medium2,
m_flow_nominal=mEva_flow_nominal) "Flow resistance";
equation
connect(chiPar.port_b1, res1.port_a);
connect(res2.port_a, chiPar.port_b2);
connect(greaterThreshold.y, chiPar.on[1]);
connect(greaterThreshold.y, chiPar.on[2]);
connect(TSet.y, chiPar.TSet);
connect(TCon_in.y, sou1.T_in);
connect(TEva_in.y, sou2.T_in);
connect(greaterThreshold.u, pulse.y);
connect(res1.port_b, sin1.ports[1]);
connect(sou1.ports[1], chiPar.port_a1);
connect(res2.port_b, sin2.ports[1]);
connect(chiPar.port_a2, sou2.ports[1]);
end ElectricChillerParallel;
Buildings.Applications.BaseClasses.Equipment.Validation.PumpParallel
Example that tests the model pump parallels
Information
This example demonstrates the use of the flow model with two different configurations. At steady-state, all flow models have the same mass flow rate and pressure difference.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | numPum | 2 | The number of pumps |
MassFlowRate | m_flow_nominal | 6000/3600*1.2 | Nominal mass flow rate [kg/s] |
Real | thr1 | 1E-4 | Threshold for shutoff valves in parallel 1 |
Real | thr2 | thr1*m_flow_nominal | Threshold for shutoff valves in parallel 2 |
Modelica definition
model PumpParallel "Example that tests the model pump parallels"
extends Modelica.Icons.Example;
package MediumW = Buildings.Media.Water "Medium model";
parameter Integer numPum=2 "The number of pumps";
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=6000/3600*1.2
"Nominal mass flow rate";
parameter Real thr1=1E-4 "Threshold for shutoff valves in parallel 1";
parameter Real thr2=thr1*m_flow_nominal "Threshold for shutoff valves in parallel 2";
Buildings.Applications.BaseClasses.Equipment.FlowMachine_y pumPar1(
redeclare package Medium = MediumW,
num=numPum,
dpValve_nominal=6000,
redeclare Buildings.Fluid.Movers.Data.Pumps.Wilo.Stratos32slash1to12 per,
m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
threshold=thr1,
tau=1,
use_inputFilter=false)
"Pumps with speed controlled";
Buildings.Fluid.FixedResistances.PressureDrop dp2(
redeclare package Medium = MediumW,
dp_nominal=3000,
m_flow_nominal=6000/3600*1.2)
"Pressure drop";
Buildings.Fluid.FixedResistances.PressureDrop dp1(
redeclare package Medium = MediumW,
m_flow_nominal=6000/3600*1.2,
dp_nominal=300)
"Pressure drop";
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = MediumW,
use_p_in=false,
nPorts=2,
p=101325,
T=293.15)
"Source";
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = MediumW,
use_p_in=false,
nPorts=2,
p=101325,
T=293.15)
"Sink";
Modelica.Blocks.Sources.Pulse y[numPum](
each amplitude=1,
each width=50,
each period=120,
each offset=0,
each startTime=0)
"Input signal";
Buildings.Applications.BaseClasses.Equipment.FlowMachine_m pumPar2(
redeclare package Medium = MediumW,
num=numPum,
dpValve_nominal=6000,
redeclare Buildings.Fluid.Movers.Data.Pumps.Wilo.Stratos32slash1to12 per,
m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
threshold=thr2,
tau=1)
"Pumps with m_flow controlled";
Buildings.Fluid.FixedResistances.PressureDrop dp3(
redeclare package Medium = MediumW,
m_flow_nominal=6000/3600*1.2,
dp_nominal=300)
"Pressure drop";
Buildings.Fluid.FixedResistances.PressureDrop dp4(
redeclare package Medium = MediumW,
dp_nominal=3000,
m_flow_nominal=6000/3600*1.2)
"Pressure drop";
equation
connect(dp2.port_a, pumPar1.port_b);
connect(dp1.port_b, pumPar1.port_a);
connect(sou.ports[1], dp1.port_a);
connect(y.y, pumPar1.u);
connect(dp3.port_a, sou.ports[2]);
connect(dp3.port_b, pumPar2.port_a);
connect(pumPar2.port_b, dp4.port_a);
connect(dp4.port_b, sin.ports[1]);
connect(y.y, pumPar2.u);
connect(dp2.port_b, sin.ports[2]);
end PumpParallel;