Buildings.Fluid.HeatPumps.Compressors.BaseClasses

Package with base classes for compressors

Information

This package contains base classes that are used to construct the models in Buildings.Fluid.HeatPumps.Compressors.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Fluid.HeatPumps.Compressors.BaseClasses.PartialCompressor PartialCompressor Partial compressor model

Buildings.Fluid.HeatPumps.Compressors.BaseClasses.PartialCompressor Buildings.Fluid.HeatPumps.Compressors.BaseClasses.PartialCompressor

Partial compressor model

Buildings.Fluid.HeatPumps.Compressors.BaseClasses.PartialCompressor

Information

This is the base class for the compressor model.

The model evaluates the evaporating pressure of the refrigerant peva, the specific enthalpy of the evaporating saturated refrigerant vapor heva, the condensing pressure of the refrigerant pcon and the specific enthalpy of the condensing saturated liquid refrigerant hcond at the evaporating temperature Teva = port_a.T and condensing temperature Tcon = port_b.T.

Thermodynamic properties are evaluated from functions contained in the specified refrigerant package.

Assumptions and limitations

The model assumes isothermal condensation and evaporation, therefore refrigerant mass flow is not accounted for and heat ports are used instead of fluid ports.

Parameters

TypeNameDefaultDescription
replaceable package refBuildings.Media.Refrigerants...Refrigerant in the component

Connectors

TypeNameDescription
replaceable package refRefrigerant in the component
HeatPort_aport_aRefrigerant connector a (corresponding to the evaporator)
HeatPort_bport_bRefrigerant connector b (corresponding to the condenser)
input RealInputyModulating signal for compressor frequency, equal to 1 at full load conditions [1]
output RealOutputPElectric power consumed by compressor [W]

Modelica definition

model PartialCompressor "Partial compressor model" replaceable package ref = Buildings.Media.Refrigerants.R410A "Refrigerant in the component"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a "Refrigerant connector a (corresponding to the evaporator)"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b "Refrigerant connector b (corresponding to the condenser)"; Modelica.Blocks.Interfaces.RealInput y(final unit = "1") "Modulating signal for compressor frequency, equal to 1 at full load conditions"; Modelica.Blocks.Interfaces.RealOutput P( final quantity="Power", final unit="W") "Electric power consumed by compressor"; Modelica.SIunits.SpecificEnthalpy hEva "Specific enthalpy of saturated vapor at evaporator temperature"; Modelica.SIunits.SpecificEnthalpy hCon "Specific enthalpy of saturated liquid at condenser temperature"; Modelica.SIunits.AbsolutePressure pEva(start = 100e3) "Pressure of saturated vapor at evaporator temperature"; Modelica.SIunits.AbsolutePressure pCon(start = 1000e3) "Pressure of saturated liquid at condenser temperature"; Boolean isOn(fixed=true, start=false) "State of the compressor, true if turned on"; equation when initial() then isOn = if y > 0.01 then true else false; elsewhen y > 0.01 then isOn = true; elsewhen y <= 0.0 then isOn = false; end when; // Saturation pressure of refrigerant vapor at condenser temperature pCon = ref.pressureSatVap_T(port_b.T); // Specific enthaply of saturated liquid refrigerant at condenser temperature hCon = ref.enthalpySatLiq_T(port_b.T); // Saturation pressure of refrigerant vapor at evaporator temperature pEva = ref.pressureSatVap_T(port_a.T); // Specific enthaply of saturated refrigerant vapor at evaporator temperature hEva = ref.enthalpySatVap_T(port_a.T); // Assert statements to verify that the refrigerant temperatures are within // bounds of the property data in the refrigerant package assert(port_b.T > ref.T_min and port_b.T < ref.TCri, "Condensing temperature must be above the minimum refrigerant temperature and below the critical temperature."); assert(port_a.T > ref.T_min and port_a.T < ref.TCri, "Evaporating temperature must be above the minimum refrigerant temperature and below the critical temperature."); end PartialCompressor;