Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
1,210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.15 KB | None | 0 0
  1. from pyXSteam.XSteam import XSteam
  2. import matplotlib.pyplot as plt
  3.  
  4. steamTable = XSteam(XSteam.UNIT_SYSTEM_BARE)  # m/kg/sec/K/MPa/W
  5.  
  6. # input:
  7. # dm_eth: massflow of ethanol gas from dest column [m^3/h] #10
  8. # h_eth1: enthalpy of ethanol gas from dest column [kJ/kg]
  9. # dm_c: mass flow cooling agent [kg/s]
  10. # h_c1: enthalpy cooling agent [kJ/kg]
  11.  
  12. # output:
  13. # h_eth2: enthalpy ethanol gas to B180 [kJ/kg]
  14. # h_c2: enthalpy cooling agent [kJ/kg]
  15. # Q_l: amount of energy transferred from ethanol gas to cooling agent
  16.  
  17. dm_eth = 11.37  # [m^3/h]
  18. dm_h2o = 18  # [kg/h]
  19. T1 = 74.3  # [C]
  20. T2 = 13.0  # [C]
  21. P2 = 0.3  # MPa
  22.  
  23.  
  24. def heat_exchange():
  25.     # density of ethanol
  26.     den = 785.3  # kg/m^3
  27.  
  28.     # specific heat capacity {isobaric gas} should be dynamic
  29.     c_eth = 2.18  # [kJ/kg K]
  30.  
  31.     # heat transferred to cooling agent
  32.     q_1 = dm_eth * c_eth * (T1 - T2) * den
  33.  
  34.     # entropy of water at atmospheric pressure
  35.     s2 = steamTable.sV_p(0.101325)
  36.  
  37.     # entropy after compression given ideal conditions
  38.     s3 = s2
  39.  
  40.     # enthalpy entering heat exchanger
  41.     h3 = steamTable.h_ps(P2, s3)
  42.  
  43.     return q_1, h3
  44.  
  45.  
  46. print(heat_exchange())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement