Beispiel #1
0
 def calc_st2_o(self):
     st2_o = Stream()
     st2_o.fluid = self.st2_i.fluid
     st2_o.flow_rate = self.st2_i.flow_rate
     st2_o.pressure = self.st2_i.pressure - self.pressure_drop(
         self.st2_i, self.st2_pip)
     h = self.st2_i.h - (self.st1_i.h - self.st1_o.h) * self.st1_i.flow_rate[0] \
         / st2_o.flow_rate[0] / self.eta
     h_l = PropsSI('H', 'P', st2_o.pressure, 'Q', 0, st2_o.fluid)
     h_g = PropsSI('H', 'P', st2_o.pressure, 'Q', 1, st2_o.fluid)
     if h_l <= h <= h_g:
         st2_o.x = PropsSI('Q', 'P', st2_o.pressure, 'H', h, st2_o.fluid)
     else:
         st2_o.temperature = PropsSI('T', 'P', st2_o.pressure, 'H', h,
                                     st2_o.fluid)
     self.st2_o = st2_o
Beispiel #2
0
 def calc_st2_i(self):
     st2_i = Stream()
     st2_i.fluid = self.st2_o.fluid
     st2_i.flow_rate = self.st2_o.flow_rate
     st2_i.pressure = self.st2_o.pressure + self.pressure_drop(
         self.st2_o, self.st2_pip)
     h = self.st2_o.h + (self.st1_i.h - self.st1_o.h) * self.st1_i.flow_rate[0] \
         / self.st2_o.flow_rate[0] * self.eta
     h_l = PropsSI('H', 'P', st2_i.pressure, 'Q', 0, st2_i.fluid)
     h_g = PropsSI('H', 'P', st2_i.pressure, 'Q', 1, st2_i.fluid)
     if h_l <= h <= h_g:
         st2_i.x = PropsSI('Q', 'P', st2_i.pressure, 'H', h, st2_i.fluid)
     else:
         st2_i.T = PropsSI('T', 'P', st2_i.pressure, 'H', h,
                           self.st2_i.fluid)
     self.st2_i = st2_i