Package with example of DX cooling coil models
Information
This package contains examples that use air-cooled DX cooling coil models.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
MultiStage
|
Test model for multi stage DX coil |
SingleSpeed
|
Test model for single speed DX coil |
SpaceCooling
|
Space cooling with DX coils |
VariableSpeed
|
Test model for variable speed DX coil |
PerformanceCurves
|
Package with sevral performance curves |
Test model for multi stage DX coil
Information
This is a test model for
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.MultiStage.
The model has open-loop control and time-varying input conditions.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | datCoi.sta[datCoi.nSta].nomV... | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | 1000 | Pressure drop at m_flow_nominal [Pa] |
DXCoil | datCoi | datCoi(nSta=4, sta={Data.Gen... | Coil data |
Modelica definition
model MultiStage
package Medium =
Buildings.Media.Air;
extends Modelica.Icons.Example;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal = datCoi.sta[datCoi.nSta].nomVal.m_flow_nominal
;
parameter Modelica.SIunits.PressureDifference dp_nominal = 1000
;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
nPorts=1,
p(displayUnit="Pa") = 101325,
T=293.15) ;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
nPorts=1,
p(displayUnit="Pa") = 101325 + dp_nominal,
use_T_in=true,
use_p_in=true,
T=299.85) ;
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.MultiStage mulStaDX(
redeclare package Medium = Medium,
dp_nominal=dp_nominal,
datCoi=datCoi,
T_start=datCoi.sta[1].nomVal.TEvaIn_nominal,
show_T=true,
from_dp=true,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Modelica.Blocks.Sources.Ramp TEvaIn(
duration=600,
startTime=2400,
height=-5,
offset=273.15 + 23) ;
Modelica.Blocks.Sources.Ramp p(
duration=600,
startTime=600,
height=dp_nominal,
offset=101325) ;
parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.DXCoil
datCoi(
nSta=4, sta={
Data.Generic.BaseClasses.Stage(
spe=900/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-12000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=0.9),
perCur=
PerformanceCurves.Curve_I()),
Data.Generic.BaseClasses.Stage(
spe=1200/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-18000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=1.2),
perCur=
PerformanceCurves.Curve_I()),
Data.Generic.BaseClasses.Stage(
spe=1800/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-21000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=1.5),
perCur=
PerformanceCurves.Curve_II()),
Data.Generic.BaseClasses.Stage(
spe=2400/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-30000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=1.8),
perCur=
PerformanceCurves.Curve_III())}) ;
Modelica.Blocks.Sources.IntegerTable speRat(table=[
0.0,0.0;
900,1;
1800,4;
2700,3;
3600,2]) ;
Modelica.Blocks.Sources.Constant TConIn(k=273.15 + 25)
;
equation
connect(sou.ports[1], mulStaDX.port_a);
connect(mulStaDX.port_b, sin.ports[1]);
connect(TEvaIn.y, sou.T_in);
connect(p.y, sou.p_in);
connect(speRat.y, mulStaDX.stage);
connect(TConIn.y, mulStaDX.TConIn);
end MultiStage;
Test model for single speed DX coil
Information
This is a test model for
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.SingleSpeed.
The model has open-loop control and time-varying input conditions.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | datCoi.sta[datCoi.nSta].nomV... | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | 1000 | Pressure drop at m_flow_nominal [Pa] |
DXCoil | datCoi | datCoi(sta={Buildings.Fluid.... | Coil data |
Modelica definition
model SingleSpeed
package Medium =
Buildings.Media.Air;
extends Modelica.Icons.Example;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal = datCoi.sta[datCoi.nSta].nomVal.m_flow_nominal
;
parameter Modelica.SIunits.PressureDifference dp_nominal = 1000
;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
p(displayUnit="Pa") = 101325,
nPorts=1,
T=303.15) ;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
p(displayUnit="Pa") = 101325 + dp_nominal,
use_T_in=true,
nPorts=1,
use_p_in=true,
T=299.85) ;
Modelica.Blocks.Sources.BooleanStep onOff(startTime=600)
;
Modelica.Blocks.Sources.Ramp TEvaIn(
duration=600,
startTime=2400,
height=-5,
offset=273.15 + 23) ;
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.SingleSpeed sinSpeDX(
redeclare package Medium = Medium,
dp_nominal=dp_nominal,
datCoi=datCoi,
T_start=datCoi.sta[1].nomVal.TEvaIn_nominal,
show_T=true,
from_dp=true,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Modelica.Blocks.Sources.Ramp p(
duration=600,
startTime=600,
height=dp_nominal,
offset=101325) ;
parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.DXCoil
datCoi(
sta={
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.Stage(
spe=1800/60,
nomVal=
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-21000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=1.5),
perCur=
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Examples.PerformanceCurves.Curve_II())}, nSta=1) ;
Modelica.Blocks.Sources.Constant TConIn(k=273.15 + 25)
;
equation
connect(TEvaIn.y, sou.T_in);
connect(onOff.y, sinSpeDX.on);
connect(sou.ports[1], sinSpeDX.port_a);
connect(sinSpeDX.port_b, sin.ports[1]);
connect(p.y, sou.p_in);
connect(TConIn.y, sinSpeDX.TConIn);
end SingleSpeed;
Space cooling with DX coils
Information
This model illustrates the use of the air-cooled DX coil models with
single speed compressor, multi-stage compressor, and variable
speed compressor.
The three systems all have the same simple model for a room,
and the same HVAC components, except for the coil.
The top system has a DX coil with single speed compressor
and on/off control with dead-band.
The middle system has a DX coil with two stages, each
representing a different compressor speed.
The bottom system has a DX coil with variable speed control
for the compressor.
All coils are controlled based on the respective room air temperature.
The plot below shows how room air temperatures and humidity levels
are controlled with the respective coils.
The single speed coil has the highest room air humidity level because
during its off-time, water that accumulated on the coil evaporates
into the air stream.
This effect is smaller for the coil with two compressor stages
and for the coil with variable compressor speed, as both of these coils
switch off less frequent.
Implementation
The model is based on
Buildings.Examples.Tutorial.SpaceCooling.System3.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
replaceable package Medium | Buildings.Media.Air | |
Volume | V | 6*10*3 | Room volume [m3] |
Real | eps | 0.8 | Heat recovery effectiveness |
Temperature | TASup_nominal | 273.15 + 18 | Nominal air temperature supplied to room [K] |
Temperature | TRooSet | 273.15 + 24 | Nominal room air temperature [K] |
Temperature | TOut_nominal | 273.15 + 30 | Design outlet air temperature [K] |
Temperature | THeaRecLvg | TOut_nominal - eps*(TOut_nom... | Air temperature leaving the heat recovery [K] |
HeatFlowRate | QRooInt_flow | 1000 | Internal heat gains of the room [W] |
HeatFlowRate | QRooC_flow_nominal | -QRooInt_flow - 10E3/30*(TOu... | Nominal cooling load of the room [W] |
MassFlowRate | mA_flow_nominal | 1.3*QRooC_flow_nominal/1006/... | Nominal air mass flow rate, increased by factor 1.3 to allow for recovery after temperature setback [kg/s] |
TemperatureDifference | dTFan | 2 | Estimated temperature raise across fan that needs to be made up by the cooling coil [K] |
HeatFlowRate | QCoiC_flow_nominal | (QRooC_flow_nominal + mA_flo... | Cooling load of coil, taking into account economizer, and increased due to latent heat removal [W] |
DXCoil | datCoi | datCoi(sta={Data.Generic.Bas... | |
DXCoil | datCoiMulSpe | datCoiMulSpe(nSta=2, sta={Da... | Coil data |
Connectors
Type | Name | Description |
replaceable package Medium | |
Bus | weaBus | |
Modelica definition
model SpaceCooling
extends Modelica.Icons.Example;
replaceable package Medium =
Buildings.Media.Air;
parameter Modelica.SIunits.Volume V=6*10*3 ;
parameter Real eps = 0.8 ;
parameter Modelica.SIunits.Temperature TASup_nominal = 273.15+18
;
parameter Modelica.SIunits.Temperature TRooSet = 273.15+24
;
parameter Modelica.SIunits.Temperature TOut_nominal = 273.15+30
;
parameter Modelica.SIunits.Temperature THeaRecLvg=
TOut_nominal - eps*(TOut_nominal-TRooSet)
;
parameter Modelica.SIunits.HeatFlowRate QRooInt_flow=
1000 ;
parameter Modelica.SIunits.HeatFlowRate QRooC_flow_nominal=
-QRooInt_flow-10E3/30*(TOut_nominal-TRooSet)
;
parameter Modelica.SIunits.MassFlowRate mA_flow_nominal=
1.3*QRooC_flow_nominal/1006/(TASup_nominal-TRooSet)
;
parameter Modelica.SIunits.TemperatureDifference dTFan = 2
;
parameter Modelica.SIunits.HeatFlowRate QCoiC_flow_nominal=
(QRooC_flow_nominal + mA_flow_nominal*(TASup_nominal-THeaRecLvg-dTFan)*1006)
;
Buildings.Fluid.Movers.FlowControlled_m_flow fan(
redeclare package Medium =
Medium,
m_flow_nominal=mA_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex(
redeclare package Medium1 =
Medium,
redeclare package Medium2 =
Medium,
m1_flow_nominal=mA_flow_nominal,
m2_flow_nominal=mA_flow_nominal,
dp1_nominal=200,
dp2_nominal=200,
eps=eps) ;
Buildings.Fluid.Sources.Outside out(nPorts=6,
redeclare package Medium =
Medium);
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
pAtmSou=Buildings.BoundaryConditions.Types.DataSource.Parameter,
TDryBul=TOut_nominal,
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"),
TDryBulSou=Buildings.BoundaryConditions.Types.DataSource.File)
;
BoundaryConditions.WeatherData.Bus weaBus;
Modelica.Blocks.Sources.Constant mAir_flow(k=mA_flow_nominal)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTemHXEvaOut(
redeclare package
Medium =
Medium, m_flow_nominal=mA_flow_nominal)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTemSupAir(
redeclare package
Medium =
Medium, m_flow_nominal=mA_flow_nominal)
;
Modelica.Blocks.Logical.OnOffController con(bandwidth=1, pre_y_start=true)
;
Modelica.Blocks.Sources.Constant TRooSetPoi(k=TRooSet)
;
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.SingleSpeed sinSpeDX(
redeclare package Medium =
Medium,
datCoi=datCoi,
dp_nominal=400,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
SimpleRoom rooSinSpe(
redeclare package Medium =
Medium,
nPorts=2,
QRooInt_flow=QRooInt_flow,
mA_flow_nominal=mA_flow_nominal)
;
Buildings.Fluid.Movers.FlowControlled_m_flow fan1(
redeclare package Medium =
Medium,
m_flow_nominal=mA_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex1(
redeclare package Medium1 =
Medium,
redeclare package Medium2 =
Medium,
m1_flow_nominal=mA_flow_nominal,
m2_flow_nominal=mA_flow_nominal,
dp1_nominal=200,
dp2_nominal=200,
eps=eps) ;
Buildings.Fluid.Sensors.TemperatureTwoPort senTemHXEvaOut1(
redeclare package Medium =
Medium,
m_flow_nominal=mA_flow_nominal)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTemSupAir1(
redeclare package Medium =
Medium,
m_flow_nominal=mA_flow_nominal)
;
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.MultiStage mulStaDX(
redeclare package Medium =
Medium,
dp_nominal=400,
datCoi=datCoiMulSpe,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
SimpleRoom rooMulSpe(
redeclare package Medium =
Medium,
nPorts=2,
QRooInt_flow=QRooInt_flow,
mA_flow_nominal=mA_flow_nominal) ;
parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.DXCoil
datCoi(
sta={
Data.Generic.BaseClasses.Stage(
spe=1800/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=QCoiC_flow_nominal,
COP_nominal=3,
SHR_nominal=0.7,
m_flow_nominal=mA_flow_nominal),
perCur=
PerformanceCurves.Curve_I())}, nSta=1);
parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.DXCoil
datCoiMulSpe(nSta=2, sta={
Data.Generic.BaseClasses.Stage(
spe=900/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=QCoiC_flow_nominal*900/2400,
COP_nominal=3,
SHR_nominal=0.7,
m_flow_nominal=mA_flow_nominal*900/2400),
perCur=
PerformanceCurves.Curve_I()),
Data.Generic.BaseClasses.Stage(
spe=2400/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=QCoiC_flow_nominal,
COP_nominal=3,
SHR_nominal=0.7,
m_flow_nominal=mA_flow_nominal),
perCur=
PerformanceCurves.Curve_III())}) ;
ControllerTwoStage mulSpeCon ;
SimpleRoom rooVarSpe(
redeclare package Medium =
Medium,
nPorts=2,
QRooInt_flow=QRooInt_flow,
mA_flow_nominal=mA_flow_nominal)
;
Buildings.Fluid.Movers.FlowControlled_m_flow fan2(
redeclare package Medium =
Medium,
m_flow_nominal=mA_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Buildings.Fluid.Sensors.TemperatureTwoPort senTemSupAir2(
redeclare package Medium =
Medium, m_flow_nominal=mA_flow_nominal)
;
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.VariableSpeed varSpeDX(
redeclare package Medium =
Medium,
dp_nominal=400,
datCoi=datCoiMulSpe,
minSpeRat=0.2,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTemHXEvaOut2(
redeclare package Medium =
Medium, m_flow_nominal=mA_flow_nominal)
;
Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex2(
redeclare package Medium1 =
Medium,
redeclare package Medium2 =
Medium,
m1_flow_nominal=mA_flow_nominal,
m2_flow_nominal=mA_flow_nominal,
dp1_nominal=200,
dp2_nominal=200,
eps=eps) ;
Modelica.Blocks.Continuous.Integrator sinSpePow(y(unit="J"))
;
Modelica.Blocks.Continuous.Integrator mulSpePow(y(unit="J"))
;
Modelica.Blocks.Continuous.Integrator varSpePow(y(unit="J"))
;
Modelica.Blocks.Logical.Not not1;
Buildings.Controls.Continuous.LimPID conVarSpe(
controllerType=Modelica.Blocks.Types.SimpleController.P,
Ti=1,
Td=1,
reverseActing=false) ;
equation
connect(out.ports[1], hex.port_a1);
connect(out.ports[2], hex.port_b2);
connect(weaDat.weaBus, out.weaBus);
connect(weaDat.weaBus, weaBus);
connect(fan.m_flow_in, mAir_flow.y);
connect(hex.port_b1, senTemHXEvaOut.port_a);
connect(senTemSupAir.port_b, fan.port_a);
connect(senTemHXEvaOut.port_b, sinSpeDX.port_a);
connect(sinSpeDX.port_b, senTemSupAir.port_a);
public
model SimpleRoom
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium ;
Buildings.Fluid.MixingVolumes.MixingVolume vol(
redeclare package Medium =
Medium,
m_flow_nominal=mA_flow_nominal,
V=V,
nPorts=2,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon(
G=10000/30,
port_a(T(start=Medium.T_default))) ;
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TOut(
port(T(start=Medium.T_default))) ;
Modelica.Thermal.HeatTransfer.Sources.FixedHeatFlow preHea(
Q_flow=QRooInt_flow) ;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemRoo
;
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heaCap(C=2*V*1.2*1006)
;
parameter Integer nPorts=0 ;
final parameter Modelica.SIunits.Volume V=6*10*3 ;
parameter Modelica.SIunits.HeatFlowRate QRooInt_flow
;
parameter Modelica.SIunits.MassFlowRate mA_flow_nominal
;
Modelica.Blocks.Interfaces.RealInput TOutDryBul
;
Modelica.Blocks.Interfaces.RealOutput TRoo(unit="K") ;
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b ports[nPorts](
redeclare
each package Medium =
Medium);
equation
connect(theCon.port_b,vol. heatPort);
connect(preHea.port,vol. heatPort);
connect(TOut.port,theCon. port_a);
connect(vol.heatPort,senTemRoo. port);
connect(heaCap.port,vol. heatPort);
connect(TRoo, senTemRoo.T);
connect(ports, vol.ports);
connect(TOut.T, TOutDryBul);
end SimpleRoom;
equation
connect(sinSpeDX.TConIn, weaBus.TDryBul);
connect(fan.port_b, rooSinSpe.ports[1]);
connect(rooSinSpe.ports[2], hex.port_a2);
connect(hex1.port_b1, senTemHXEvaOut1.port_a);
connect(senTemSupAir1.port_b, fan1.port_a);
connect(senTemHXEvaOut1.port_b, mulStaDX.port_a);
connect(mulStaDX.port_b, senTemSupAir1.port_a);
connect(mulStaDX.TConIn, weaBus.TDryBul);
connect(fan1.port_b, rooMulSpe.ports[1]);
connect(rooMulSpe.ports[2], hex1.port_a2);
connect(rooMulSpe.TOutDryBul, weaBus.TDryBul);
public
model ControllerTwoStage
parameter Real bandwidth=1 ;
extends Buildings.BaseClasses.BaseIcon;
Modelica.Blocks.Logical.OnOffController con1(bandwidth=bandwidth/2,
pre_y_start=true) ;
Modelica.Blocks.Logical.OnOffController con2(bandwidth=bandwidth/2,
pre_y_start=true) ;
Modelica.Blocks.Interfaces.RealInput u;
Modelica.Blocks.Interfaces.RealInput reference
;
Modelica.Blocks.Math.Add add(k2=-1);
Modelica.Blocks.Sources.Constant const(k=bandwidth/2);
Modelica.Blocks.Math.Add add1;
Modelica.Blocks.MathInteger.MultiSwitch multiSwitch1(
expr={2,1},
y_default=0,
use_pre_as_default=false,
nu=2);
Modelica.Blocks.Interfaces.IntegerOutput stage ;
Modelica.Blocks.Logical.Not not1;
Modelica.Blocks.Logical.Not not2;
equation
connect(con1.reference, reference);
connect(const.y, add.u2);
connect(const.y, add1.u1);
connect(add.u1, u);
connect(add1.u2, u);
connect(add.y, con1.u);
connect(add1.y, con2.u);
connect(reference, con2.reference);
connect(multiSwitch1.y, stage);
connect(not2.y, multiSwitch1.u[1]);
connect(not1.y, multiSwitch1.u[2]);
connect(con1.y, not1.u);
connect(con2.y, not2.u);
end ControllerTwoStage;
equation
connect(mulSpeCon.stage, mulStaDX.stage);
connect(rooVarSpe.TOutDryBul, weaBus.TDryBul);
connect(senTemSupAir2.port_b,fan2. port_a);
connect(varSpeDX.port_b, senTemSupAir2.port_a);
connect(senTemHXEvaOut2.port_b, varSpeDX.port_a);
connect(varSpeDX.TConIn, weaBus.TDryBul);
connect(hex2.port_b1,senTemHXEvaOut2. port_a);
connect(out.ports[3], hex1.port_a1);
connect(out.ports[4], hex1.port_b2);
connect(out.ports[5], hex2.port_a1);
connect(out.ports[6], hex2.port_b2);
connect(fan2.port_b, rooVarSpe.ports[1]);
connect(rooVarSpe.ports[2], hex2.port_a2);
connect(mAir_flow.y, fan1.m_flow_in);
connect(mAir_flow.y, fan2.m_flow_in);
connect(rooSinSpe.TOutDryBul, weaBus.TDryBul);
connect(sinSpePow.u, sinSpeDX.P);
connect(mulSpePow.u, mulStaDX.P);
connect(varSpeDX.P, varSpePow.u);
connect(TRooSetPoi.y, con.reference);
connect(rooSinSpe.TRoo, con.u);
connect(not1.u, con.y);
connect(not1.y, sinSpeDX.on);
connect(mulSpeCon.reference, TRooSetPoi.y);
connect(rooMulSpe.TRoo, mulSpeCon.u);
connect(TRooSetPoi.y, conVarSpe.u_s);
connect(conVarSpe.u_m, rooVarSpe.TRoo);
connect(conVarSpe.y, varSpeDX.speRat);
end SpaceCooling;
Test model for variable speed DX coil
Information
This is a test model for
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.VariableSpeed.
The model has open-loop control and time-varying input conditions.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | datCoi.sta[datCoi.nSta].nomV... | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | 1000 | Pressure drop at m_flow_nominal [Pa] |
DXCoil | datCoi | datCoi(nSta=4, sta={Data.Gen... | Coil data |
Modelica definition
model VariableSpeed
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal = datCoi.sta[datCoi.nSta].nomVal.m_flow_nominal
;
parameter Modelica.SIunits.PressureDifference dp_nominal = 1000
;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
nPorts=1,
p(displayUnit="Pa") = 101325,
T=293.15) ;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
nPorts=1,
p(displayUnit="Pa") = 101325 + dp_nominal,
use_T_in=true,
use_p_in=true,
T=299.85) ;
Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.VariableSpeed varSpeDX(
redeclare package Medium = Medium,
dp_nominal=dp_nominal,
datCoi=datCoi,
minSpeRat=datCoi.minSpeRat,
T_start=datCoi.sta[1].nomVal.TEvaIn_nominal,
from_dp=true,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Modelica.Blocks.Sources.Ramp TEvaIn(
duration=600,
startTime=900,
height=5,
offset=273.15 + 20,
y(unit="K")) ;
Modelica.Blocks.Sources.TimeTable speRat(table=[0.0,0.0; 100,0.0; 900,0.2;
1800,0.8; 2700,0.75; 3600,0.75]) ;
Modelica.Blocks.Sources.Ramp p(
duration=600,
height=dp_nominal,
offset=101325,
startTime=100) ;
parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.DXCoil
datCoi(
nSta=4, sta={
Data.Generic.BaseClasses.Stage(
spe=900/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-12000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=0.9),
perCur=
PerformanceCurves.Curve_I()),
Data.Generic.BaseClasses.Stage(
spe=1200/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-18000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=1.2),
perCur=
PerformanceCurves.Curve_I()),
Data.Generic.BaseClasses.Stage(
spe=1800/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-21000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=1.5),
perCur=
PerformanceCurves.Curve_II()),
Data.Generic.BaseClasses.Stage(
spe=2400/60,
nomVal=
Data.Generic.BaseClasses.NominalValues(
Q_flow_nominal=-30000,
COP_nominal=3,
SHR_nominal=0.8,
m_flow_nominal=1.8),
perCur=
PerformanceCurves.Curve_III())}) ;
Modelica.Blocks.Sources.Constant TConIn(k=273.15 + 25)
;
equation
connect(sou.ports[1], varSpeDX.port_a);
connect(varSpeDX.port_b, sin.ports[1]);
connect(TEvaIn.y, sou.T_in);
connect(speRat.y, varSpeDX.speRat);
connect(p.y, sou.p_in);
connect(varSpeDX.TConIn, TConIn.y);
end VariableSpeed;
Simple model of a room
Parameters
Type | Name | Default | Description |
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium in the room |
HeatFlowRate | QRooInt_flow | | Internal heat gains of the room [W] |
MassFlowRate | mA_flow_nominal | | Nominal air mass flow rate [kg/s] |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the room |
input RealInput | TOutDryBul | Outdoor drybulb temperature |
output RealOutput | TRoo | Room temperature [K] |
VesselFluidPorts_b | ports[nPorts] | |
Modelica definition
model SimpleRoom
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium ;
Buildings.Fluid.MixingVolumes.MixingVolume vol(
redeclare package Medium =
Medium,
m_flow_nominal=mA_flow_nominal,
V=V,
nPorts=2,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon(
G=10000/30,
port_a(T(start=Medium.T_default))) ;
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TOut(
port(T(start=Medium.T_default))) ;
Modelica.Thermal.HeatTransfer.Sources.FixedHeatFlow preHea(
Q_flow=QRooInt_flow) ;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemRoo
;
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heaCap(C=2*V*1.2*1006)
;
parameter Integer nPorts=0 ;
final parameter Modelica.SIunits.Volume V=6*10*3 ;
parameter Modelica.SIunits.HeatFlowRate QRooInt_flow
;
parameter Modelica.SIunits.MassFlowRate mA_flow_nominal
;
Modelica.Blocks.Interfaces.RealInput TOutDryBul
;
Modelica.Blocks.Interfaces.RealOutput TRoo(unit="K") ;
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b ports[nPorts](
redeclare
each package Medium =
Medium);
equation
connect(theCon.port_b,vol. heatPort);
connect(preHea.port,vol. heatPort);
connect(TOut.port,theCon. port_a);
connect(vol.heatPort,senTemRoo. port);
connect(heaCap.port,vol. heatPort);
connect(TRoo, senTemRoo.T);
connect(ports, vol.ports);
connect(TOut.T, TOutDryBul);
end SimpleRoom;
Controller for two stage coil
Information
Extends from Buildings.BaseClasses.BaseIcon (Base icon).
Parameters
Type | Name | Default | Description |
Real | bandwidth | 1 | Bandwidth around reference signal |
Connectors
Type | Name | Description |
input RealInput | u | |
input RealInput | reference | Connector of Real input signal used as reference signal |
output IntegerOutput | stage | Coil stage control signal |
Modelica definition
model ControllerTwoStage
parameter Real bandwidth=1 ;
extends Buildings.BaseClasses.BaseIcon;
Modelica.Blocks.Logical.OnOffController con1(bandwidth=bandwidth/2,
pre_y_start=true) ;
Modelica.Blocks.Logical.OnOffController con2(bandwidth=bandwidth/2,
pre_y_start=true) ;
Modelica.Blocks.Interfaces.RealInput u;
Modelica.Blocks.Interfaces.RealInput reference
;
Modelica.Blocks.Math.Add add(k2=-1);
Modelica.Blocks.Sources.Constant const(k=bandwidth/2);
Modelica.Blocks.Math.Add add1;
Modelica.Blocks.MathInteger.MultiSwitch multiSwitch1(
expr={2,1},
y_default=0,
use_pre_as_default=false,
nu=2);
Modelica.Blocks.Interfaces.IntegerOutput stage ;
Modelica.Blocks.Logical.Not not1;
Modelica.Blocks.Logical.Not not2;
equation
connect(con1.reference, reference);
connect(const.y, add.u2);
connect(const.y, add1.u1);
connect(add.u1, u);
connect(add1.u2, u);
connect(add.y, con1.u);
connect(add1.y, con2.u);
connect(reference, con2.reference);
connect(multiSwitch1.y, stage);
connect(not2.y, multiSwitch1.u[1]);
connect(not1.y, multiSwitch1.u[2]);
connect(con1.y, not1.u);
connect(con2.y, not2.u);
end ControllerTwoStage;