Skip to content
LIBRARY
Components.Compressor.md

Components.Compressor

Positive-displacement compressor with no mass or energy storage.

port_a is the suction side and port_b the discharge side; m_flow > 0 means flow enters through port_a. input_speed is the commanded shaft speed in rev/s. Volumetric and shaft-power behaviour are set by the polynomial coefficient arrays c_vol (length 6) and c_pow (length 5); shaft power is capped at maxPower.

Usage

HVACComponents.Components.Compressor(medium_data, speed_start, m_flow_start, hDischarge_start, hSuction_start, p_a_start, p_b_start, dp_start, dSuction_start=HVACComponents.Density_ph(p_a_start, hSuction_start, medium_data), c_vol, c_pow, Vmax, Vrel, zFw_shell, maxPower, zFw, scP, scCF, scVdot, V=Vrel * Vmax)

Parameters:

NameDescriptionUnitsDefault value
medium_dataRefrigerant medium properties
speed_startInitial compressor speed [rev/s] (solver guess)
m_flow_startInitial refrigerant mass flow [kg/s] (solver guess)
hDischarge_startInitial discharge specific enthalpy [J/kg] (solver guess)
hSuction_startInitial suction specific enthalpy [J/kg] (solver guess)
p_a_startInitial suction-side pressure [Pa] (solver guess)
p_b_startInitial discharge-side pressure [Pa] (solver guess)
dp_startInitial pressure rise across the compressor [Pa] (solver guess)
dSuction_startInitial suction density [kg/m^3] (derived from p_a_start, hSuction_start)HVACComponents.Density_ph(p_a_start, hSuction_start, medium_data)
c_volVolumetric efficiency polynomial coefficients (length 6)
c_powShaft power polynomial coefficients (length 5)
VmaxMaximum (geometric) displacement volume per revolution [m^3]
VrelRelative displacement fraction of Vmax used for the effective volume V
zFw_shellFraction of (shaftPower - refrigerantPortPower) lost as housing heat
maxPowerUpper bound on shaft power [W]
zFwThermal efficiency assigned to eta_therm
scPPressure scaling factor used in the polynomial correlations
scCFSpeed scaling factor used in the polynomial correlations
scVdotVolumetric-flow scaling factor used in the polynomial correlations
VEffective displacement volume per revolution [m^3] (= Vrel * Vmax)Vrel * Vmax

Connectors

Variables

NameDescriptionUnits
speedCompressor shaft speed [rev/s] (clamped at 1e-3 from below)
m_flow_compRefrigerant mass flow through the compressor [kg/s]
hDischargeDischarge specific enthalpy at port_b [J/kg]
eta_vVolumetric efficiency [-]
eta_thermThermal efficiency [-]
dpPressure rise port_b - port_a [Pa]
pRatPressure ratio port_b.p / port_a.p [-]
dSuctionSuction-side refrigerant density [kg/m^3]
H_flow_aEnthalpy flow at port_a [W]
H_flow_bEnthalpy flow at port_b [W]
hSuctionIsIsentropic suction enthalpy [J/kg] (simplified: pass-through from port_b)
hSuctionSuction specific enthalpy entering through port_a [J/kg]
shaftPowerShaft power [W] (clamped to [1e-3, maxPower])
refrigerantPortPowerNet power into the refrigerant at the ports [W]
housingHeatLossesHeat lost through the housing [W] (= zFw_shell * (shaftPower - refrigerantPortPower))
TDischargeDischarge temperature at port_b [K]
TSuctionSuction temperature at port_a [K]
psSuction pressure alias for port_a.p [Pa]
pdDischarge pressure alias for port_b.p [Pa]
vdotVolumetric flow rate [m^3/s] (= eta_v * V * speed)
ratPowRated power per unit suction-density flow used in the enthalpy rise equation
CFScScaled compressor speed (= scCF * speed)
PDisScScaled discharge pressure (= scP * pd)
PSucScScaled suction pressure (= scP * ps)
deltaPScScaled pressure difference (= PDisSc - PSucSc)
PRatScScaled pressure ratio (= PDisSc / PSucSc)
VdotScScaled volumetric flow rate (= scVdot * eta_v * V * CFSc)
shaftPower1Speed-dependent term of the shaft-power polynomial
shaftPower2Pressure/flow-dependent term of the shaft-power polynomial