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
def calc_st1_o(self): st1_o = Stream() st1_o.fluid = self.st1_i.fluid st1_o.flow_rate = self.st1_i.flow_rate st1_o.pressure = self.st1_i.pressure - self.pressure_drop( self.st1_i, self.st1_pip) h = self.st1_i.h - (self.st2_i.h - self.st2_o.h) * self.st2_i.flow_rate[0] \ / st1_o.flow_rate[0] / self.eta h_l = PropsSI('H', 'P', st1_o.pressure, 'Q', 0, st1_o.fluid) h_g = PropsSI('H', 'P', st1_o.pressure, 'Q', 1, st1_o.fluid) if h_l <= h <= h_g: st1_o.quality = PropsSI('Q', 'P', st1_o.pressure, 'H', h, st1_o.fluid) else: st1_o.T = PropsSI('T', 'P', st1_o.pressure, 'H', h, st1_o.fluid) self.st1_o = st1_o