Buildings.Fluid.DXSystems.Cooling.AirSource.Examples

Package with example of DX cooling coil models

Information

This package contains examples that use air source DX heating and cooling coil models.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.MultiStage MultiStage Test model for multi stage DX cooling coil
Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SingleSpeed SingleSpeed Test model for single speed cooling DX coil
Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling SpaceCooling Space cooling with DX coils
Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.VariableSpeed VariableSpeed Test model for variable speed DX coil
Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves PerformanceCurves Package with several performance curves

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.MultiStage Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.MultiStage

Test model for multi stage DX cooling coil

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.MultiStage

Information

This is a test model for Buildings.Fluid.DXSystems.Cooling.AirSource.MultiStage. The model has open-loop control and time-varying input conditions.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominaldatCoi.sta[datCoi.nSta].nomV...Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal1000Pressure drop at m_flow_nominal [Pa]
DXCoildatCoidatCoi(nSta=4, sta={Building...Coil data

Modelica definition

model MultiStage "Test model for multi stage DX cooling coil" extends Modelica.Icons.Example; package Medium = Buildings.Media.Air "Fluid medium for the model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=datCoi.sta[datCoi.nSta].nomVal.m_flow_nominal "Nominal mass flow rate"; parameter Modelica.Units.SI.PressureDifference dp_nominal=1000 "Pressure drop at m_flow_nominal"; Buildings.Fluid.DXSystems.Cooling.AirSource.MultiStage mulStaDX( redeclare package Medium = Medium, final dp_nominal=dp_nominal, final datCoi=datCoi, final T_start=datCoi.sta[1].nomVal.TEvaIn_nominal, final show_T=true, final from_dp=true, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Multispeed DX coil"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, final nPorts=1, final p(displayUnit="Pa") = 101325, final T=293.15) "Sink"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, final nPorts=1, final p(displayUnit="Pa") = 101325 + dp_nominal, final use_T_in=true, final use_p_in=true, final T=299.85) "Source"; Modelica.Blocks.Sources.Ramp TEvaIn( final duration=600, final startTime=2400, final height=-5, final offset=273.15 + 23) "Temperature"; Modelica.Blocks.Sources.Ramp p( final duration=600, final startTime=600, final height=dp_nominal, final offset=101325) "Pressure"; parameter Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.DXCoil datCoi( nSta=4, sta={Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=900/60, nomVal=Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-12000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=0.9), perCur=Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=1200/60, nomVal=Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-18000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=1.2), perCur=Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=1800/60, nomVal=Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-21000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=1.5), perCur=Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_II()), Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=2400/60, nomVal=Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-30000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=1.8), perCur=Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_III())}) "Coil data"; Modelica.Blocks.Sources.IntegerTable speRat( final table=[0.0,0.0; 900,1; 1800,4; 2700,3; 3600,2]) "Speed ratio "; Modelica.Blocks.Sources.Constant TConIn( final k=273.15 + 25) "Condenser inlet temperature"; 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.TOut); end MultiStage;

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SingleSpeed Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SingleSpeed

Test model for single speed cooling DX coil

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SingleSpeed

Information

This is a test model for Buildings.Fluid.DXSystems.Cooling.AirSource.SingleSpeed. The model has open-loop control and time-varying input conditions.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominaldatCoi.sta[datCoi.nSta].nomV...Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal1000Pressure drop at m_flow_nominal [Pa]
DXCoildatCoidatCoi(sta={Buildings.Fluid....Coil data

Modelica definition

model SingleSpeed "Test model for single speed cooling DX coil" extends Modelica.Icons.Example; package Medium = Buildings.Media.Air "Fluid medium for the model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=datCoi.sta[datCoi.nSta].nomVal.m_flow_nominal "Nominal mass flow rate"; parameter Modelica.Units.SI.PressureDifference dp_nominal=1000 "Pressure drop at m_flow_nominal"; parameter Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.DXCoil datCoi( sta={ Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=1800/60, nomVal= Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-21000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=1.5), perCur= Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_II())}, nSta=1) "Coil data"; Buildings.Fluid.DXSystems.Cooling.AirSource.SingleSpeed sinSpeDX( redeclare package Medium = Medium, final dp_nominal=dp_nominal, final datCoi=datCoi, final T_start=datCoi.sta[1].nomVal.TEvaIn_nominal, final show_T=true, final from_dp=true, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Single speed DX coil"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, final p(displayUnit="Pa") = 101325, final nPorts=1, final T=303.15) "Sink"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, p(displayUnit="Pa") = 101325 + dp_nominal, final use_T_in=true, final nPorts=1, final use_p_in=true, final T=299.85) "Source"; Modelica.Blocks.Sources.BooleanStep onOff( final startTime=600) "Compressor on-off signal"; Modelica.Blocks.Sources.Ramp TEvaIn( final duration=600, final startTime=2400, final height=-5, final offset=273.15 + 23) "Temperature"; Modelica.Blocks.Sources.Ramp p( final duration=600, final startTime=600, final height=dp_nominal, final offset=101325) "Pressure"; Modelica.Blocks.Sources.Constant TConIn( final k=273.15 + 25) "Condenser inlet temperature"; 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.TOut); end SingleSpeed;

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling

Space cooling with DX coils

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling

Information

This model illustrates the use of the air source 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.

image

Implementation

The model is based on Buildings.Examples.Tutorial.SpaceCooling.System3.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.AirFluid medium for the model
VolumeV6*10*3Room volume [m3]
Realeps0.8Heat recovery effectiveness
TemperatureTASup_nominal273.15 + 18Nominal air temperature supplied to room [K]
TemperatureTRooSet273.15 + 24Nominal room air temperature [K]
TemperatureTOut_nominal273.15 + 30Design outlet air temperature [K]
TemperatureTHeaRecLvgTOut_nominal - eps*(TOut_nom...Air temperature leaving the heat recovery [K]
HeatFlowRateQRooInt_flow1000Internal heat gains of the room [W]
HeatFlowRateQRooC_flow_nominal-QRooInt_flow - 10E3/30*(TOu...Nominal cooling load of the room [W]
MassFlowRatemA_flow_nominal1.3*QRooC_flow_nominal/1006/...Nominal air mass flow rate, increased by factor 1.3 to allow for recovery after temperature setback [kg/s]
TemperatureDifferencedTFan2Estimated temperature raise across fan that needs to be made up by the cooling coil [K]
HeatFlowRateQCoiC_flow_nominal(QRooC_flow_nominal + mA_flo...Cooling load of coil, taking into account economizer, and increased due to latent heat removal [W]
DXCoildatCoidatCoi(sta={Buildings.Fluid....Data record for single-speed coil
DXCoildatCoiMulSpedatCoiMulSpe(nSta=2, sta={Bu...Coil data multi-stage and variable speed cooling coils

Connectors

TypeNameDescription
replaceable package MediumFluid medium for the model
BusweaBusWeather bus

Modelica definition

model SpaceCooling "Space cooling with DX coils" extends Modelica.Icons.Example; replaceable package Medium = Buildings.Media.Air "Fluid medium for the model"; parameter Modelica.Units.SI.Volume V=6*10*3 "Room volume"; ////////////////////////////////////////////////////////// // Heat recovery effectiveness parameter Real eps = 0.8 "Heat recovery effectiveness"; ///////////////////////////////////////////////////////// // Air temperatures at design conditions parameter Modelica.Units.SI.Temperature TASup_nominal=273.15 + 18 "Nominal air temperature supplied to room"; parameter Modelica.Units.SI.Temperature TRooSet=273.15 + 24 "Nominal room air temperature"; parameter Modelica.Units.SI.Temperature TOut_nominal=273.15 + 30 "Design outlet air temperature"; parameter Modelica.Units.SI.Temperature THeaRecLvg=TOut_nominal - eps*( TOut_nominal - TRooSet) "Air temperature leaving the heat recovery"; ///////////////////////////////////////////////////////// // Cooling loads and air mass flow rates parameter Modelica.Units.SI.HeatFlowRate QRooInt_flow=1000 "Internal heat gains of the room"; parameter Modelica.Units.SI.HeatFlowRate QRooC_flow_nominal= -QRooInt_flow - 10E3/30*(TOut_nominal - TRooSet) "Nominal cooling load of the room"; parameter Modelica.Units.SI.MassFlowRate mA_flow_nominal= 1.3*QRooC_flow_nominal/1006/(TASup_nominal - TRooSet) "Nominal air mass flow rate, increased by factor 1.3 to allow for recovery after temperature setback"; parameter Modelica.Units.SI.TemperatureDifference dTFan=2 "Estimated temperature raise across fan that needs to be made up by the cooling coil"; parameter Modelica.Units.SI.HeatFlowRate QCoiC_flow_nominal= (QRooC_flow_nominal + mA_flow_nominal*(TASup_nominal - THeaRecLvg - dTFan)*1006) "Cooling load of coil, taking into account economizer, and increased due to latent heat removal"; parameter Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.DXCoil datCoi( sta={Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=1800/60, nomVal=Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=QCoiC_flow_nominal, COP_nominal=3, SHR_nominal=0.7, m_flow_nominal=mA_flow_nominal), perCur=Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_I())}, nSta=1) "Data record for single-speed coil"; parameter Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.DXCoil datCoiMulSpe( nSta=2, sta={ Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=900/60, nomVal= Buildings.Fluid.DXSystems.Cooling.AirSource.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= Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=2400/60, nomVal= Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=QCoiC_flow_nominal, COP_nominal=3, SHR_nominal=0.7, m_flow_nominal=mA_flow_nominal), perCur= Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_I())}) "Coil data multi-stage and variable speed cooling coils"; Buildings.Fluid.Movers.FlowControlled_m_flow fan( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal, final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Supply air fan"; Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex( redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, final m1_flow_nominal=mA_flow_nominal, final m2_flow_nominal=mA_flow_nominal, final dp1_nominal=200, final dp2_nominal=200, final eps=eps) "Heat recovery"; Buildings.Fluid.Sources.Outside out( final nPorts=6, redeclare package Medium = Medium) "Source for outdoor air"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat( final pAtmSou=Buildings.BoundaryConditions.Types.DataSource.Parameter, final TDryBul=TOut_nominal, final filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), final TDryBulSou=Buildings.BoundaryConditions.Types.DataSource.File) "Weather data reader"; BoundaryConditions.WeatherData.Bus weaBus "Weather bus"; Modelica.Blocks.Sources.Constant mAir_flow( final k=mA_flow_nominal) "Fan air flow rate"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemHXEvaOut( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal) "Temperature sensor for heat recovery outlet on supply side"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemSupAir( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal) "Temperature sensor for supply air"; Modelica.Blocks.Logical.OnOffController con( final bandwidth=1, final pre_y_start=true) "Controller to enable component when measurement falls below setpoint"; Modelica.Blocks.Sources.Constant TRooSetPoi( final k=TRooSet) "Room temperature set point"; Buildings.Fluid.DXSystems.Cooling.AirSource.SingleSpeed sinSpeDX( redeclare package Medium = Medium, final datCoi=datCoi, final dp_nominal=400, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Single-speed DX cooling coil"; SimpleRoom rooSinSpe( redeclare package Medium = Medium, final nPorts=2, final QRooInt_flow=QRooInt_flow, final mA_flow_nominal=mA_flow_nominal) "Room model connected to single speed coil"; Buildings.Fluid.Movers.FlowControlled_m_flow fan1( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal, final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Supply air fan"; Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex1( redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, final m1_flow_nominal=mA_flow_nominal, final m2_flow_nominal=mA_flow_nominal, final dp1_nominal=200, final dp2_nominal=200, final eps=eps) "Heat recovery"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemHXEvaOut1( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal) "Temperature sensor for heat recovery outlet on supply side"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemSupAir1( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal) "Temperature sensor for supply air"; Buildings.Fluid.DXSystems.Cooling.AirSource.MultiStage mulStaDX( redeclare package Medium = Medium, final dp_nominal=400, final datCoi=datCoiMulSpe, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Multi-speed DX coil"; SimpleRoom rooMulSpe( redeclare package Medium = Medium, final nPorts=2, final QRooInt_flow=QRooInt_flow, final mA_flow_nominal=mA_flow_nominal) "Room model connected to multi stage coil"; ControllerTwoStage mulSpeCon "Controller for multi-stage coil"; SimpleRoom rooVarSpe( redeclare package Medium = Medium, final nPorts=2, final QRooInt_flow=QRooInt_flow, final mA_flow_nominal=mA_flow_nominal) "Room model connected to variable speed coil"; Buildings.Fluid.Movers.FlowControlled_m_flow fan2( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal, final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Supply air fan"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemSupAir2( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal) "Temperature sensor for supply air"; Buildings.Fluid.DXSystems.Cooling.AirSource.VariableSpeed varSpeDX( redeclare package Medium = Medium, final dp_nominal=400, final datCoi=datCoiMulSpe, final minSpeRat=0.2, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Variable-speed DX coil"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemHXEvaOut2( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal) "Temperature sensor for heat recovery outlet on supply side"; Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex2( redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, final m1_flow_nominal=mA_flow_nominal, final m2_flow_nominal=mA_flow_nominal, final dp1_nominal=200, final dp2_nominal=200, final eps=eps) "Heat recovery"; Modelica.Blocks.Continuous.Integrator sinSpePow( y(final unit="J")) "Power consumed by single speed coil"; Modelica.Blocks.Continuous.Integrator mulSpePow( y(final unit="J")) "Power consumed by multi-stage coil"; Modelica.Blocks.Continuous.Integrator varSpePow( y(final unit="J")) "Power consumed by multi-stage coil"; Modelica.Blocks.Logical.Not not1 "Turn on DX coil when measured temperature is above setpoint"; Buildings.Controls.Continuous.LimPID conVarSpe( final controllerType=Modelica.Blocks.Types.SimpleController.P, final Ti=1, final Td=1, final reverseActing=false) "Controller for variable speed DX coil"; 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 "Simple model of a room" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the room"; parameter Integer nPorts=0 "Number of ports"; final parameter Modelica.Units.SI.Volume V=6*10*3 "Room volume"; parameter Modelica.Units.SI.HeatFlowRate QRooInt_flow "Internal heat gains of the room"; parameter Modelica.Units.SI.MassFlowRate mA_flow_nominal "Nominal air mass flow rate"; Modelica.Blocks.Interfaces.RealInput TOutDryBul "Outdoor drybulb temperature"; Modelica.Blocks.Interfaces.RealOutput TRoo( final unit="K") "Room temperature"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b ports[nPorts]( redeclare each package Medium = Medium) "Port for inlet air into and exhaust air from the zone"; Buildings.Fluid.MixingVolumes.MixingVolume vol( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal, final V=V, final nPorts=2, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Mixed air volume representing air in the zone"; Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon( final G=10000/30, final port_a(T(start=Medium.T_default))) "Thermal conductance with the ambient"; Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TOut( port( T(final start=Medium.T_default))) "Outside temperature"; Modelica.Thermal.HeatTransfer.Sources.FixedHeatFlow preHea( final Q_flow=QRooInt_flow) "Prescribed heat flow"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemRoo "Room temperature sensor"; Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heaCap( final C=2*V*1.2*1006) "Heat capacity for furniture and walls"; 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.TOut, 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.TOut, weaBus.TDryBul); connect(fan1.port_b, rooMulSpe.ports[1]); connect(rooMulSpe.ports[2], hex1.port_a2); connect(rooMulSpe.TOutDryBul, weaBus.TDryBul); public model ControllerTwoStage "Controller for two stage coil" extends Buildings.BaseClasses.BaseIcon; parameter Real bandwidth=1 "Bandwidth around reference signal"; Modelica.Blocks.Logical.OnOffController con1( final bandwidth=bandwidth/2, final pre_y_start=true) "Controller for second stage"; Modelica.Blocks.Logical.OnOffController con2( final bandwidth=bandwidth/2, final pre_y_start=true) "Controller for first stage"; Modelica.Blocks.Interfaces.RealInput u "Measured signal"; Modelica.Blocks.Interfaces.RealInput reference "Connector of Real input signal used as reference signal"; Modelica.Blocks.Math.Add add( final k2=-1) "Calculate value to turn on the second stage"; Modelica.Blocks.Sources.Constant const( final k=bandwidth/2) "Constant bandwidth-value source"; Modelica.Blocks.Math.Add add1 "Calculate value to turn on the first stage"; Modelica.Blocks.MathInteger.MultiSwitch multiSwitch1( final expr={2,1}, final y_default=0, final use_pre_as_default=false, final nu=2) "Switch on appropriate stage based on Boolean signals received"; Modelica.Blocks.Interfaces.IntegerOutput stage "Coil stage control signal"; Modelica.Blocks.Logical.Not not1 "Turn on second stage when measurement exceeds higher temperature limit"; Modelica.Blocks.Logical.Not not2 "Enable first stage when measurement exceeds lower temperature limit"; 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.TOut, 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;

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.VariableSpeed Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.VariableSpeed

Test model for variable speed DX coil

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.VariableSpeed

Information

This is a test model for Buildings.Fluid.DXSystems.Cooling.AirSource.VariableSpeed. The model has open-loop control and time-varying input conditions.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominaldatCoi.sta[datCoi.nSta].nomV...Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal1000Pressure drop at m_flow_nominal [Pa]
DXCoildatCoidatCoi(nSta=4, sta={Building...Coil data

Modelica definition

model VariableSpeed "Test model for variable speed DX coil" extends Modelica.Icons.Example; package Medium = Buildings.Media.Air "Medium model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=datCoi.sta[datCoi.nSta].nomVal.m_flow_nominal "Nominal mass flow rate"; parameter Modelica.Units.SI.PressureDifference dp_nominal=1000 "Pressure drop at m_flow_nominal"; parameter Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.DXCoil datCoi( nSta=4, sta={Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=900/60, nomVal= Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-12000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=0.9), perCur= Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=1200/60, nomVal= Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-18000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=1.2), perCur= Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=1800/60, nomVal= Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-21000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=1.5), perCur= Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_II()), Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.Stage( spe=2400/60, nomVal= Buildings.Fluid.DXSystems.Cooling.AirSource.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-30000, COP_nominal=3, SHR_nominal=0.8, m_flow_nominal=1.8), perCur= Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.PerformanceCurves.Curve_III())}) "Coil data"; Buildings.Fluid.DXSystems.Cooling.AirSource.VariableSpeed varSpeDX( redeclare package Medium = Medium, final dp_nominal=dp_nominal, final datCoi=datCoi, final minSpeRat=datCoi.minSpeRat, final T_start=datCoi.sta[1].nomVal.TEvaIn_nominal, final from_dp=true, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Variable speed DX coil"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, final nPorts=1, final p = 101325, final T=293.15) "Sink"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, final nPorts=1, final p = 101325 + dp_nominal, final use_T_in=true, final use_p_in=true, final T=299.85) "Source"; Modelica.Blocks.Sources.Ramp TEvaIn( final duration=600, final startTime=900, final height=5, final offset=273.15 + 20) "Evaporator coil inlet air temperature"; Modelica.Blocks.Sources.TimeTable speRat( final table=[0.0,0.0; 100,0.0; 900,0.2; 1800,0.8; 2700,0.75; 3600,0.75]) "Speed ratio "; Modelica.Blocks.Sources.Ramp p( final duration=600, final height=dp_nominal, final offset=101325, final startTime=100) "Pressure of inlet air"; Modelica.Blocks.Sources.Constant TConIn( final k=273.15 + 25) "Condenser inlet temperature"; 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.TOut, TConIn.y); end VariableSpeed;

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling.SimpleRoom Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling.SimpleRoom

Simple model of a room

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling.SimpleRoom

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the room
HeatFlowRateQRooInt_flow Internal heat gains of the room [W]
MassFlowRatemA_flow_nominal Nominal air mass flow rate [kg/s]

Connectors

TypeNameDescription
replaceable package MediumMedium in the room
input RealInputTOutDryBulOutdoor drybulb temperature
output RealOutputTRooRoom temperature [K]
VesselFluidPorts_bports[nPorts]Port for inlet air into and exhaust air from the zone

Modelica definition

model SimpleRoom "Simple model of a room" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the room"; parameter Integer nPorts=0 "Number of ports"; final parameter Modelica.Units.SI.Volume V=6*10*3 "Room volume"; parameter Modelica.Units.SI.HeatFlowRate QRooInt_flow "Internal heat gains of the room"; parameter Modelica.Units.SI.MassFlowRate mA_flow_nominal "Nominal air mass flow rate"; Modelica.Blocks.Interfaces.RealInput TOutDryBul "Outdoor drybulb temperature"; Modelica.Blocks.Interfaces.RealOutput TRoo( final unit="K") "Room temperature"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b ports[nPorts]( redeclare each package Medium = Medium) "Port for inlet air into and exhaust air from the zone"; Buildings.Fluid.MixingVolumes.MixingVolume vol( redeclare package Medium = Medium, final m_flow_nominal=mA_flow_nominal, final V=V, final nPorts=2, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Mixed air volume representing air in the zone"; Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon( final G=10000/30, final port_a(T(start=Medium.T_default))) "Thermal conductance with the ambient"; Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TOut( port( T(final start=Medium.T_default))) "Outside temperature"; Modelica.Thermal.HeatTransfer.Sources.FixedHeatFlow preHea( final Q_flow=QRooInt_flow) "Prescribed heat flow"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemRoo "Room temperature sensor"; Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heaCap( final C=2*V*1.2*1006) "Heat capacity for furniture and walls"; 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;

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling.ControllerTwoStage Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling.ControllerTwoStage

Controller for two stage coil

Buildings.Fluid.DXSystems.Cooling.AirSource.Examples.SpaceCooling.ControllerTwoStage

Information

Extends from Buildings.BaseClasses.BaseIcon (Base icon).

Parameters

TypeNameDefaultDescription
Realbandwidth1Bandwidth around reference signal

Connectors

TypeNameDescription
input RealInputuMeasured signal
input RealInputreferenceConnector of Real input signal used as reference signal
output IntegerOutputstageCoil stage control signal

Modelica definition

model ControllerTwoStage "Controller for two stage coil" extends Buildings.BaseClasses.BaseIcon; parameter Real bandwidth=1 "Bandwidth around reference signal"; Modelica.Blocks.Logical.OnOffController con1( final bandwidth=bandwidth/2, final pre_y_start=true) "Controller for second stage"; Modelica.Blocks.Logical.OnOffController con2( final bandwidth=bandwidth/2, final pre_y_start=true) "Controller for first stage"; Modelica.Blocks.Interfaces.RealInput u "Measured signal"; Modelica.Blocks.Interfaces.RealInput reference "Connector of Real input signal used as reference signal"; Modelica.Blocks.Math.Add add( final k2=-1) "Calculate value to turn on the second stage"; Modelica.Blocks.Sources.Constant const( final k=bandwidth/2) "Constant bandwidth-value source"; Modelica.Blocks.Math.Add add1 "Calculate value to turn on the first stage"; Modelica.Blocks.MathInteger.MultiSwitch multiSwitch1( final expr={2,1}, final y_default=0, final use_pre_as_default=false, final nu=2) "Switch on appropriate stage based on Boolean signals received"; Modelica.Blocks.Interfaces.IntegerOutput stage "Coil stage control signal"; Modelica.Blocks.Logical.Not not1 "Turn on second stage when measurement exceeds higher temperature limit"; Modelica.Blocks.Logical.Not not2 "Enable first stage when measurement exceeds lower temperature limit"; 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;