Exemplo n.º 1
0
 def plot_Ts():
     pp = PropertyPlot('HEOS::R134a', 'TS', unit_system='EUR', tp_limits='ACHP')
     pp.calc_isolines()
     cycle = SimpleCompressionCycle('HEOS::R134a', 'TS', unit_system='EUR', tp_limits='ACHP')
     cycle.simple_solve_dt(Te=T_K_sat_evaporating ,Tc=T_K_sat_condensing, dT_sh=superheat, dT_sc=subcooling, eta_com= Isentropic_Efficiency/100, SI=True)
     cycle.steps = 50
     sc = cycle.get_state_changes()
     plt.close(cycle.figure)
     pp.draw_process(sc)
     pp.savefig('T-s.svg')
     pp.show()
Exemplo n.º 2
0
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 - 10)
p0 = pp.state.keyed_output(CoolProp.iP)
T2 = 310
pp.state.update(CoolProp.QT_INPUTS, 1.0, T2 + 15)
p2 = pp.state.keyed_output(CoolProp.iP)
pp.calc_isolines(CoolProp.iT, [T0 - 273.15, T2 - 273.15], num=2)
cycle.simple_solve(T0, p0, T2, p2, 0.7, SI=True)
cycle.steps = 50
sc = cycle.get_state_changes()
pp.draw_process(sc)
import matplotlib.pyplot as plt
plt.close(cycle.figure)
pp.show()

#%%

import CoolProp.CoolProp as CP
fluid = 'Water'
pressure_at_critical_point = CP.PropsSI(fluid, 'pcrit')
# Massic volume (in m^3/kg) is the inverse of density
# (or volumic mass in kg/m^3). Let's compute the massic volume of liquid
# at 1bar (1e5 Pa) of pressure
vL = 1 / CP.PropsSI('D', 'P', 1e5, 'Q', 0, fluid)
Exemplo n.º 3
0
cycle_states = StateContainer()
cycle_states[0, 'H'] = h0
cycle_states[0]['S'] = s0
cycle_states[0][CoolProp.iP] = p0
cycle_states[0, CoolProp.iT] = T0
cycle_states[1, "T"] = 300.064
print(cycle_states)

#%%

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 - 10)
p0 = pp.state.keyed_output(CoolProp.iP)
T2 = 310
pp.state.update(CoolProp.QT_INPUTS, 1.0, T2 + 15)
p2 = pp.state.keyed_output(CoolProp.iP)
pp.calc_isolines(CoolProp.iT, [T0 - 273.15, T2 - 273.15], num=2)
cycle.simple_solve(T0, p0, T2, p2, 0.7, SI=True)
cycle.steps = 50
sc = cycle.get_state_changes()
pp.draw_process(sc)
import matplotlib.pyplot as plt
plt.close(cycle.figure)
pp.show()