gascompressibility.pseudocritical.Sutton#

class Sutton[source]#

Bases: object

Class object to calculate pseudo-critical properties based on Sutton’s method.

The model uses Sutton’s model (1985) [1] to correlate specific gravity (\(\gamma_g\)) to pseudo-critical pressure (\(P_{pc}\)) and pseudo-critical temperature (\(T_{pc}\)). It supports corrections for acid gas fractions (\(H_2S\) and \(CO_2\)) using Wichert & Aziz method (1970) [2].

Basic Usage#

Sutton class object uses instance method that requires instantiation. This means you first have to initiate the object like this:

>>> from gascompressibility.pseudocritical import Sutton
>>>
>>> obj = Sutton()
>>> obj
<gascompressibility.pseudocritical.Sutton> class object with the following calculated attributes:
{
   Tpc: None
   Ppc: None
   e_correction: None
   Tpc_corrected: None
   Ppc_corrected: None
   Tr: None
   Pr: None
}

Once a class instance is instantiated, you can run methods from the instantiated object:

>>> obj.calc_Pr(sg=0.7, P=2010)
3.052524774343535

Running a method from the instantiated object updates the associated variables computed during the calculation process:

>>> obj
<gascompressibility.pseudocritical.Sutton> class object with the following calculated attributes:
{
   Tpc: None
   Ppc: 663.2869999999999
   e_correction: None
   Tpc_corrected: None
   Ppc_corrected: 663.2869999999999
   Tr: None
   Pr: 3.052524774343535
}

You can access the computed variables in a form of class attributes:

>>> obj.Ppc
663.2869999999999
>>> obj.Pr
3.052524774343535

Examples#


Import

>>> from gascompressibility.pseudocritical import Sutton

Direct calculation

>>> Sutton().calc_Pr(sg=0.7, P=2000, H2S=0.07, CO2=0.1)
3.2070266223893724

Instantiaing an object and retrieving its attribute

>>> obj = Sutton()
>>> _ = obj.calc_Pr(sg=0.7, P=2000, H2S=0.07, CO2=0.1)
>>> obj.Pr
3.2070266223893724

.ps_props attribute to retrieve all associated calculated pseudo-critical properties

>>> obj = Sutton()
>>> _ = obj.calc_Pr(sg=0.7, P=2000, H2S=0.07, CO2=0.1)
>>> obj.ps_props
{'Tpc': 377.59,
 'Ppc': 663.2869999999999,
 'e_correction': 21.277806029218723,
 'Tpc_corrected': 356.31219397078127,
 'Ppc_corrected': 628.2143047814683,
 'Tr': None,
 'Pr': 3.2070266223893724}

More examples

>>> # pseudo-critical pressure, Ppc (psia)
>>> Sutton().calc_Ppc(sg=0.7)
663.2869999999999
>>> # pseudo-critical temperature, Tpc (°R)
>>> Sutton().calc_Tpc(sg=0.7)
377.59
>>> # temperature correction factor for acid gases ε (°R)
>>> Sutton().calc_e_correction(H2S=0.05, CO2=0.1)
>>> 19.34753439832438
>>> # corrected pseudo-critical pressure, Ppc_corrected (psia)
>>> Sutton().calc_Ppc_corrected(sg=0.7, H2S=0.05, CO2=0.1)
630.8358627422825
>>> # corrected pseudo-critical temperature, Tpc_corrected (°R)
>>> Sutton().calc_Tpc_corrected(sg=0.7, H2S=0.05, CO2=0.1)
358.2424656016756
>>> # reduced pseudo-critical pressure, Pr (dimensionless)
>>> Sutton().calc_Pr(sg=0.7, H2S=0.05, CO2=0.1, P=2010)
3.2095511995759147
>>> # reduced pseudo-critical temperature, Tr (dimensionless)
>>> Sutton().calc_Tr(sg=0.7, H2S=0.05, CO2=0.1, T=75)
1.4924807953797739

Methods#


calc_Tpc

Calculates pseudo-critical temperature, Tpc (°R)

calc_Ppc

Calculates pseudo-critical pressure, Ppc (psia)

calc_e_correction

Calculates temperature-correction factor for acid gases, ε (°R)

calc_Tpc_corrected

Calculates corrected pseudo-critical temperature, T'pc (°R)

calc_Ppc_corrected

Calculates corrected pseudo-critical pressure, P'pc (psia)

calc_Tr

Calculates pseudo-reduced temperature, Tr (dimensionless)

calc_Pr

Calculates pseudo-reduced pressure, Pr (dimensionless)

Attributes#


Attributes

sg

specific gravity (dimensionless)

T_f

temperature (°F)

T

temperature (°R)

P_g

pressure (psig)

P

pressure (psia)

H2S

mole fraction of H2S (dimensionless)

CO2

mole fraction of CO2 (dimensionless)

Tpc

pseudo-critical temperature, Tpc (°R)

Ppc

pseudo-critical pressure, Ppc (psia)

Tpc_corrected

corrected pseudo-critical temperature, T'pc (°R)

Ppc_corrected

corrected pseudo-critical pressure, P'pc (psia)

Tr

pseudo-reduced temperature, Tr (dimensionless)

Pr

pseudo-reduced pressure, Pr (dimensionless)

ps_props

dictionary of pseudo-critical properties.

References#