CoolProp.Plots.SimpleCyclesCompression module

class CoolProp.Plots.SimpleCyclesCompression.BaseCompressionCycle(fluid_ref='HEOS::Water', graph_type='PH', **kwargs)

Bases: CoolProp.Plots.SimpleCycles.BaseCycle

A thermodynamic cycle for vapour compression processes.

Defines the basic properties and methods to unify access to compression cycle-related quantities.

see CoolProp.Plots.SimpleCycles.BaseCycle for details.

eta_carnot_cooling()

Carnot efficiency

Calculates the Carnot efficiency for a cooling process, :math:`eta_c =

rac{T_c}{T_h-T_c}`.

float
eta_carnot_heating()

Carnot efficiency

Calculates the Carnot efficiency for a heating process, :math:`eta_c =

rac{T_h}{T_h-T_c}`.

float
class CoolProp.Plots.SimpleCyclesCompression.SimpleCompressionCycle(fluid_ref='HEOS::Water', graph_type='PH', **kwargs)

Bases: CoolProp.Plots.SimpleCyclesCompression.BaseCompressionCycle

A simple vapour compression cycle

see CoolProp.Plots.SimpleCyclesCompression.BaseCompressionCycle for details.

COP_cooling()

COP for a cooling process

Calculates the coefficient of performance for a cooling process, :math:`COP_c =

rac{q_{eva}}{w_{comp}}`.

float
COP_heating()

COP for a heating process

Calculates the coefficient of performance for a heating process, :math:`COP_h =

rac{q_{con}}{w_{comp}}`.

float
STATECHANGE = [<function <lambda> at 0x10d7a3aa0>, <function <lambda> at 0x10d7a3b18>, <function <lambda> at 0x10d7a3b90>, <function <lambda> at 0x10d7a3c08>]
STATECOUNT = 4
simple_solve(T0, p0, T2, p2, eta_com, fluid=None, SI=True)

” A simple vapour compression cycle calculation

Parameters:
  • T0 (float) – The evaporated fluid, before the compressor
  • p0 (float) – The evaporated fluid, before the compressor
  • T2 (float) – The condensed fluid, before the expansion valve
  • p2 (float) – The condensed fluid, before the expansion valve
  • eta_com (float) – Isentropic compressor efficiency

Examples

>>> import CoolProp
>>> from CoolProp.Plots import PropertyPlot
>>> from CoolProp.Plots import SimpleCompressionCycle
>>> pp = PropertyPlot('HEOS::R134a', 'PH', unit_system='EUR')
>>> pp.calc_isolines(CoolProp.iQ, num=11)
>>> cycle = SimpleCompressionCycle('HEOS::R134a', 'PH', unit_system='EUR')
>>> T0 = 280
>>> pp.state.update(CoolProp.QT_INPUTS,0.0,T0-15)
>>> p0 = pp.state.keyed_output(CoolProp.iP)
>>> T2 = 310
>>> pp.state.update(CoolProp.QT_INPUTS,1.0,T2+10)
>>> p2 = pp.state.keyed_output(CoolProp.iP)
>>> cycle.simple_solve(T0, p0, T2, p2, 0.7, SI=True)
>>> cycle.steps = 50
>>> sc = cycle.get_state_changes()
>>> import matplotlib.pyplot as plt
>>> plt.close(cycle.figure)
>>> pp.draw_process(sc)
simple_solve_dt(Te, Tc, dT_sh, dT_sc, eta_com, fluid=None, SI=True)

” A simple vapour compression cycle calculation based on superheat, subcooling and temperatures.

Parameters:
  • Te (float) – The evaporation temperature
  • Tc (float) – The condensation temperature
  • dT_sh (float) – The superheat after the evaporator
  • dT_sc (float) – The subcooling after the condenser
  • eta_com (float) – Isentropic compressor efficiency

Examples

>>> import CoolProp
>>> from CoolProp.Plots import PropertyPlot
>>> from CoolProp.Plots import SimpleCompressionCycle
>>> pp = PropertyPlot('HEOS::R134a', 'PH', unit_system='EUR')
>>> pp.calc_isolines(CoolProp.iQ, num=11)
>>> cycle = SimpleCompressionCycle('HEOS::R134a', 'PH', unit_system='EUR')
>>> Te = 265
>>> Tc = 300
>>> cycle.simple_solve_dt(Te, Tc, 10, 15, 0.7, SI=True)
>>> cycle.steps = 50
>>> sc = cycle.get_state_changes()
>>> import matplotlib.pyplot as plt
>>> plt.close(cycle.figure)
>>> pp.draw_process(sc)