Example #1
0
 def mixture(self):
     if self.wi is None:
         return mix(self._Components,
                    zs=self.MolarFractions,
                    T=self.Temperature,
                    P=self.Pressure)
     else:
         return mix(self._Components,
                    ws=self.MassFractions,
                    T=self.Temperature,
                    P=self.Pressure)
Example #2
0
 def GasConductivity(self):
     if self.SolidContent > 0:
         if self.GasContent > 0:
             return mix(self.GasComponents,
                        ws=self.GasFractions,
                        T=self.Temperature,
                        P=self.Pressure).kg
     else:
         return mix(self._Components,
                    ws=self.MassFractions,
                    T=self.Temperature,
                    P=self.Pressure).kg
Example #3
0
 def LiquidAlpha(self):
     if self.SolidContent > 0:
         if self.LiquidContent > 0:
             return mix(self.LiquidComponents,
                        ws=self.LiquidFractions,
                        T=self.Temperature,
                        P=self.Pressure).alphal
     else:
         return mix(self._Components,
                    ws=self.MassFractions,
                    T=self.Temperature,
                    P=self.Pressure).alphal
Example #4
0
 def SolidSpecificHeat(self):
     if self.SolidContent > 0:
         if self._IronOxide is True:
             return mix(self.SolidComponents, ws=self.SolidFractions, T=self.Temperature, P=self.Pressure).\
                        HeatCapacitySolidMixture(T=self.Temperature,P=self.Pressure,
                                                 zs=self.SolidFractions,ws=self.SolidFractions)
         else:
             return mix(self.SolidComponents,
                        ws=self.SolidFractions,
                        T=self.Temperature,
                        P=self.Pressure).Cp
     else:
         return 0.0
Example #5
0
 def Zl(self):
     if self.SolidContent != 1:
         return mix(self._Components,
                    ws=self.MassFractions,
                    T=self.Temperature,
                    P=self.Pressure).Zl
     else:
         return 'not a fluid!'
Example #6
0
 def LiquidSpecificHeat(self):
     if self.LiquidContent > 0:
         return mix(self.LiquidComponents,
                    ws=self.LiquidFractions,
                    T=self.Temperature,
                    P=self.Pressure).Cpl
     else:
         return 0.0
Example #7
0
 def GasSpecificHeat(self):
     if self.GasContent > 0:
         return mix(self.GasComponents,
                    ws=self.GasFractions,
                    T=self.Temperature,
                    P=self.Pressure).Cpg
     else:
         return 0.0
Example #8
0
 def LiquidDensity(self):
     if self.LiquidContent > 0:
         return mix(self.LiquidComponents,
                    ws=self.LiquidFractions,
                    T=self.Temperature,
                    P=self.Pressure).rhol
     else:
         return 'not a liquid!'
Example #9
0
 def GasDensity(self):
     if self.GasContent > 0:
         return mix(self.GasComponents,
                    ws=self.GasFractions,
                    T=self.Temperature,
                    P=self.Pressure).rhog
     else:
         return 'not a gas!'
Example #10
0
 def SolidDensity(self):
     if self.SolidContent > 0:
         rho = mix(self.SolidComponents,
                   ws=self.SolidFractions,
                   T=self.Temperature,
                   P=self.Pressure).rho
         if rho is None:
             rho = 0
             for i, c in enumerate(self.SolidComponents):
                 rho += self.SolidFractions[i] / che(c).rhos
             return 1 / rho
         else:
             return mix(self.SolidComponents,
                        ws=self.SolidFractions,
                        T=self.Temperature,
                        P=self.Pressure).rho
     else:
         return 'not a solid!'
Example #11
0
 def GasViscosity(self):
     if self.GasContent > 0:
         if self.SolidContent != 1:
             mu = mix(self.GasComponents,
                      ws=self.GasFractions,
                      T=self.Temperature,
                      P=self.Pressure).mug
             return mu
         else:
             return 'not a fluid!'
Example #12
0
    def Pdew(self):
        return mix(self._Components,
                   ws=self.MassFractions,
                   T=self.Temperature,
                   P=self.Pressure).Pdew

        if self.isElectrolyte is False:
            return self.mixture.mu
        else:
            return el.Laliberte_viscosity(self.Temperature,
                                          self._MassFractions, self._CAS)
Example #13
0
 def LiquidViscosity(self):
     if self.LiquidContent > 0:
         if self.SolidContent != 1:
             if self.isElectrolyte is False:
                 mu = mix(self.LiquidComponents,
                          ws=self.LiquidFractions,
                          T=self.Temperature,
                          P=self.Pressure).mul
                 return mu
             else:
                 return el.Laliberte_viscosity(self.Temperature,
                                               self._MassFractions,
                                               self._CAS)
         return 'not a fluid!'
Example #14
0
 def Phase(self):
     if self._IronOxide is True:
         if self.SolidContent > 0:
             if self.SolidContent < 1:
                 return 'two-phase'
             else:
                 return 's'
         else:
             if self.GasContent == 1.0:
                 return 'g'
             elif self.LiquidContent == 1.0:
                 return 'l'
             elif self.SolidContent == 1.0:
                 return 's'
             else:
                 return 'two-phase'
     else:
         return mix(self._Components,
                    ws=self.MassFractions,
                    T=self.Temperature,
                    P=self.Pressure).phase
Example #15
0
 def ElementMolarFractions(self):
     return mix(self._Components,
                ws=self.MassFractions,
                T=self.Temperature,
                P=self.Pressure).atom_fractions
Example #16
0
 def Pbubble(self):
     return mix(self._Components,
                ws=self.MassFractions,
                T=self.Temperature,
                P=self.Pressure).Pbubble
Example #17
0
 def Psats(self):
     Psats_list = mix(self._Components,
                      ws=self.MassFractions,
                      T=self.Temperature,
                      P=self.Pressure).Psats
     return Psats_list
Example #18
0
 def gammaModUNIFAC(self):
     ModUNIFAC_groups = mix(self.Components,
                            ws=self.MassFractions).UNIFAC_groups
     return UNIFAC(self.Temperature,
                   xs=self.MolarFractions,
                   chemgroups=ModUNIFAC_groups)
Example #19
0
 def Hcs(self):
     values = mix(self._Components,
                  ws=self.MassFractions,
                  T=self.Temperature,
                  P=self.Pressure).Hcs
     return OrderedDict(zip(self._Components, values))
Example #20
0
 def Formulas(self):
     return mix(self._Components,
                ws=self.MassFractions,
                T=self.Temperature,
                P=self.Pressure).formulas
Example #21
0
 def Enthalpy(self):
     return mix(self._Components,
                ws=self.MassFractions,
                T=self.Temperature,
                P=self.Pressure).H
Example #22
0
 def SurfaceTension(self):
     return mix(self._Components,
                ws=self.MassFractions,
                T=self.Temperature,
                P=self.Pressure).sigma