CoolProp.Plots.SimpleCyclesCompression module¶
- class CoolProp.Plots.SimpleCyclesCompression.BaseCompressionCycle(fluid_ref='HEOS::Water', graph_type='PH', **kwargs)¶
Bases:
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.
- class CoolProp.Plots.SimpleCyclesCompression.SimpleCompressionCycle(fluid_ref='HEOS::Water', graph_type='PH', **kwargs)¶
Bases:
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 SimpleCompressionCycle.<lambda>>, <function SimpleCompressionCycle.<lambda>>, <function SimpleCompressionCycle.<lambda>>, <function SimpleCompressionCycle.<lambda>>]¶
A list of lists of tuples that defines how the state transitions behave for the corresponding entry in BaseCycle.STATECOUNT
- STATECOUNT = 4¶
A list of accepted numbers of states
- 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)