Buildings.Fluid.Chillers.Examples.BaseClasses
Package with base classes for Buildings.Fluid.Chillers.Examples
Information
This package contains base classes that are used to construct the models in Buildings.Fluid.Chillers.Examples.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
PartialElectric | Base class for test model of chiller electric EIR |
PartialElectric_AirCooled | Base class for test model of chiller electric EIR with air-cooled condenser |
Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric
Base class for test model of chiller electric EIR
Parameters
Type | Name | Default | Description |
---|---|---|---|
Power | P_nominal | 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 | Nominal mass flow rate at evaporator [kg/s] | |
MassFlowRate | mCon_flow_nominal | Nominal mass flow rate at condenser [kg/s] |
Modelica definition
partial model PartialElectric
"Base class for test model of chiller electric EIR"
package Medium1 = Buildings.Media.Water "Medium model";
package Medium2 = Buildings.Media.Water "Medium model";
parameter Modelica.Units.SI.Power P_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
"Nominal mass flow rate at evaporator";
parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal
"Nominal mass flow rate at condenser";
Buildings.Fluid.Sources.MassFlowSource_T sou1(
redeclare package Medium = Medium1,
use_T_in=true,
m_flow=mCon_flow_nominal,
T=298.15) "Mass flow source";
Buildings.Fluid.Sources.MassFlowSource_T sou2(
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=mEva_flow_nominal,
T=291.15) "Mass flow source";
Buildings.Fluid.Sources.Boundary_pT sin1(
redeclare package Medium = Medium1,
nPorts=1) "Pressure source";
Buildings.Fluid.Sources.Boundary_pT sin2(
redeclare package Medium = Medium2,
nPorts=1) "Pressure source";
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 signal generator";
Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=0.5)
"Greater threshold";
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(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(res2.port_b, sin2.ports[1]);
end PartialElectric;
Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric_AirCooled
Base class for test model of chiller electric EIR with air-cooled condenser
Parameters
Type | Name | Default | Description |
---|---|---|---|
Power | P_nominal | 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 | Nominal mass flow rate at evaporator [kg/s] | |
MassFlowRate | mCon_flow_nominal | Nominal mass flow rate at condenser [kg/s] |
Modelica definition
partial model PartialElectric_AirCooled
"Base class for test model of chiller electric EIR with air-cooled condenser"
package Medium1 = Buildings.Media.Air "Medium model";
package Medium2 = Buildings.Media.Water "Medium model";
parameter Modelica.Units.SI.Power P_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
"Nominal mass flow rate at evaporator";
parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal
"Nominal mass flow rate at condenser";
Sources.MassFlowSource_WeatherData sou1(
redeclare package Medium = Medium1,
m_flow=mCon_flow_nominal)
"Weather data";
Buildings.Fluid.Sources.MassFlowSource_T sou2(
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=mEva_flow_nominal,
T=291.15) "Mass flow source";
Buildings.Fluid.Sources.Boundary_pT sin1(
redeclare package Medium = Medium1,
nPorts=1) "Pressure source";
Buildings.Fluid.Sources.Boundary_pT sin2(
redeclare package Medium = Medium2,
nPorts=1) "Pressure source";
Modelica.Blocks.Sources.Ramp TSet(
duration=3600*6,
startTime=197.25*24*3600,
offset=273.15 + 5,
height=5) "Set point for leaving chilled water temperature";
Modelica.Blocks.Sources.Ramp TEva_in(
offset=273.15 + 10,
height=6,
startTime=197*24*3600,
duration=12*3600)
"Evaporator inlet temperature";
Modelica.Blocks.Sources.Pulse pulse(period=3600/2)
"Pulse signal";
Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=0.5)
"Greater threshold";
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";
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"));
equation
connect(TEva_in.y, sou2.T_in);
connect(greaterThreshold.u, pulse.y);
connect(res1.port_b, sin1.ports[1]);
connect(res2.port_b, sin2.ports[1]);
connect(weaDat.weaBus, sou1.weaBus);
end PartialElectric_AirCooled;