Index

Correlation Models

Correlation models are, as their name says, fitted equations that express one property of a compound. they meant to be used in conjunction with other models (like Activity models that require a saturated liquid volume), or via a CompositeModel. because they only overload one property, the way to define a correlation is different than normal EoSModels

Saturation Correlations

Saturation Correlations are any EoSModel that are subtypes of SaturationModel. return psat(T) and the upper limit (Tc,Pc) pair. To define saturation correlations, you need to overload:

function crit_pure(model::MySaturationModel <: SaturationModel)
    ...
    return (Tc,Pc,NaN)
end

function Clapeyron.saturation_pressure_impl(model::MySaturationModel <: SaturationModel,T,::SaturationCorrelation)
    ...
    return (psat,NaN,NaN)
end

Saturation Models and Types

Clapeyron.LeeKeslerSatType
LeeKeslerSat <: SaturationModel

LeeKeslerSat(components;
userlocations = String[],
verbose::Bool=false)

Input Parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • acentricfactor: Single Parameter (Float64) - acentric factor

Description

Lee-Kesler correlation for saturation pressure:

psat(T) = f₀ + ω•f₁
Tr = T/Tc
f₀ = 5.92714 - 6.09648/Tr - 1.28862•log(Tr) + 0.169347•Tr⁶
f₁ = 15.2518 - 15.6875/Tr - 13.4721•log(Tr) + 0.43577•Tr⁶

Model Construction Examples

# Using the default database
sat = LeeKeslerSat("water") #single input
sat = LeeKeslerSat(["water","ethanol"]) #multiple components

# User-provided parameters, passing files or folders
sat = LeeKeslerSat(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical.csv"])

# User-provided parameters, passing parameters directly

sat = LeeKeslerSat(["neon","hydrogen"];
        userlocations = (;Tc = [44.492,33.19],
                        Pc = [2679000, 1296400],
                        acentricfactor = [-0.03,-0.21])
                    )

References

  1. Lee, B. I., & Kesler, M. G. (1975). A generalized thermodynamic correlation based on three-parameter corresponding states. AIChE journal. American Institute of Chemical Engineers, 21(3), 510–527. doi:10.1002/aic.690210313
Clapeyron.DIPPR101SatType
DIPPR101Sat <: SaturationModel

DIPPR101Sat(components;
userlocations = String[],
verbose::Bool=false)

Input Parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • A: Single Parameter (Float64)
  • B: Single Parameter (Float64)
  • C: Single Parameter (Float64)
  • D: Single Parameter (Float64)
  • E: Single Parameter (Float64)
  • Tmin: Single Parameter (Float64) - mininum Temperature range [K]
  • Tmax: Single Parameter (Float64) - maximum Temperature range [K]

Model Parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • A: Single Parameter (Float64)
  • B: Single Parameter (Float64)
  • C: Single Parameter (Float64)
  • D: Single Parameter (Float64)
  • E: Single Parameter (Float64)
  • Tmin: Single Parameter (Float64) - mininum Temperature range [K]
  • Tmax: Single Parameter (Float64) - maximum Temperature range [K]

Description

DIPPR 101 Equation for saturation pressure:

psat(T) = exp(A + B/T + C•log(T) + D•T^E)

References

  1. Design Institute for Physical Properties, 1996. DIPPR Project 801 DIPPR/AIChE

Liquid Volume Correlations

Liquid Volume Correlations are any EoSModel that are subtypes of LiquidVolumeModel. They return volume(model,p,T,z, phase = :liquid).

Clapeyron.RackettLiquidType
RackettLiquid(components;
userlocations::Vector{String}=String[],
verbose::Bool=false)

Input parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • Vc: Single Parameter (Float64) - Critical Volume [m³/mol]

Model Parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • Zc: Single Parameter (Float64) - Critical Compressibility Factor

Description

Rackett Equation of State for saturated liquids. it is independent of the pressure.

Tr = T/Tc
V = (R̄Tc/Pc)Zc^(1+(1-Tr)^(2/7))

Model Construction Examples

# Using the default database
model = RackettLiquid("water") #single input
model = RackettLiquid(["water","ethanol"]) #multiple components

# User-provided parameters, passing files or folders
model = RackettLiquid(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical.csv"])

# User-provided parameters, passing parameters directly

model = RackettLiquid(["neon","hydrogen"];
        userlocations = (;Tc = [44.492,33.19],
                        Vc = [4.25e-5, 6.43e-5],
                        Pc = [2679000, 1296400])
                    )

References

  • Rackett, H. G. (1970). Equation of state for saturated liquids. Journal of Chemical and Engineering Data, 15(4), 514–517. doi:10.1021/je60047a012
Clapeyron.YamadaGunnLiquidFunction
YamadaGunnLiquid(components;
            userlocations::Vector{String}=String[],
            verbose::Bool=false)::RackettLiquid

Input parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • acentricfactor: Single Parameter (Float64) - Acentric Factor

Model Parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • Zc: Single Parameter (Float64) - Critical Compressibility Factor

Description

The Yamada-Gunn equation of state is a modification of the Rackett equation of state that uses a different approach to calculate the compressibility factor Zc:

Tr = T/Tc
Zc = 0.29056 - 0.08775ω
V = (R̄Tc/Pc)Zc^(1+(1-Tr)^(2/7))

It can be used as a substitute of RackettLiquid when Vc is not known.

Model Construction Examples

# Using the default database
model = YamadaGunnLiquid("water") #single input
model = YamadaGunnLiquid(["water","ethanol"]) #multiple components

# User-provided parameters, passing files or folders
model = YamadaGunnLiquid(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical.csv"])

# User-provided parameters, passing parameters directly

model = YamadaGunnLiquid(["neon","hydrogen"];
        userlocations = (;Tc = [44.492,33.19],
                        Pc = [2679000, 1296400],
                        acentricfactor = [-0.03,-0.21])
                    )

References

  • Rackett, H. G. (1970). Equation of state for saturated liquids. Journal of Chemical and Engineering Data, 15(4), 514–517. doi:10.1021/je60047a012
  • Gunn, R. D., & Yamada, T. (1971). A corresponding states correlation of saturated liquid volumes. AIChE Journal. American Institute of Chemical Engineers, 17(6), 1341–1345. doi:10.1002/aic.690170613
Clapeyron.COSTALDType
COSTALD(components; 
            userlocations::Vector{String}=String[], 
            verbose::Bool=false)

Input parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Vc: Single Parameter (Float64) - Critical Volume [m³/mol]
  • acentricfactor: Single Parameter (Float64) - Acentric Factor

Description

COSTALD Equation of State for saturated liquids. it is independent of the pressure.

Model Construction Examples

# Using the default database
model = COSTALD("water") #single input
model = COSTALD(["water","ethanol"]) #multiple components

# User-provided parameters, passing files or folders
model = COSTALD(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical.csv"])

# User-provided parameters, passing parameters directly

model = COSTALD(["neon","hydrogen"];
        userlocations = (;Tc = [44.492,33.19],
                        Vc = [4.25e-5, 6.43e-5],
                        acentricfactor = [-0.03,-0.21])
                    )

References

Hankinson, R. W., & Thomson, G. H. (1979). A new correlation for saturated densities of liquids and their mixtures. AIChE Journal. American Institute of Chemical Engineers, 25(4), 653–663. doi:10.1002/aic.690250412

Virial Models

Virial models are defined in terms of the second virial coefficient, B(T,z). the reduced residual helmholtz energy is defined as:

$\frac{A_\mathrm{res}}{Nk_\mathrm{B}T} = \frac{B}{V}$,

To implement a virial model, it is necessary to overload Clapeyron.second_virial_coefficient_impl(model::<:SecondVirialModel,T,z).

Clapeyron.AbbottVirialType
AbbottVirial <: SecondVirialModel
AbbottVirial(components;
            idealmodel = BasicIdeal,
            userlocations = String[],
            ideal_userlocations = String[],
            verbose = false)

Input parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • acentricfactor: Single Parameter (Float64) - Acentric Factor
  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]

Input models

  • idealmodel: Ideal Model

Description

Virial model using Corresponding State Principles:

B = ∑xᵢxⱼBᵢⱼ
Bᵢⱼ = BrᵢⱼRTcᵢⱼ/Pcᵢⱼ
Brᵢⱼ = B₀ + ωᵢⱼB₁
B₀ = 0.083 + 0.422/Trᵢⱼ^1.6
B₁ = 0.139 - 0.172/Trᵢⱼ^4.2
Trᵢⱼ = T/Tcᵢⱼ
Tcᵢⱼ = √TcᵢTcⱼ
Pcᵢⱼ = (Pcᵢ + Pcⱼ)/2
ωᵢⱼ = (ωᵢ + ωⱼ)/2

Model Construction Examples

# Using the default database
model = AbbottVirial("water") #single input
model = AbbottVirial(["water","ethanol"]) #multiple components
model = AbbottVirial(["water","ethanol"], idealmodel = ReidIdeal) #modifying ideal model

# Passing a prebuilt model

my_idealmodel = MonomerIdeal(["neon","hydrogen"];userlocations = (;Mw = [20.17, 2.]))
model = AbbottVirial(["neon","hydrogen"],idealmodel = my_idealmodel)

# User-provided parameters, passing files or folders
model = AbbottVirial(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical.csv"])

# User-provided parameters, passing parameters directly

model = AbbottVirial(["neon","hydrogen"];
        userlocations = (;Tc = [44.492,33.19],
                        Pc = [2679000, 1296400],
                        Mw = [20.17, 2.],
                        acentricfactor = [-0.03,-0.21])
                    )

References

  1. Smith, H. C. Van Ness Joseph M. Introduction to Chemical Engineering Thermodynamics 4E 1987.
Clapeyron.TsonopoulosVirialType
TsonopoulosVirial <: SecondVirialModel
TsonopoulosVirial(components;
        idealmodel = BasicIdeal,
        userlocations = String[],
        ideal_userlocations = String[],
        verbose = false)

Input parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • acentricfactor: Single Parameter (Float64) - Acentric Factor
  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]

Input models

  • idealmodel: Ideal Model

Description

Virial model using Corresponding State Principles:

B = ∑xᵢxⱼBᵢⱼ
Bᵢⱼ = BrᵢⱼRTcᵢⱼ/Pcᵢⱼ
Brᵢⱼ = B₀ + ωᵢⱼB₁
B₀ = 0.1445 - 0.330/Trᵢⱼ - 0.1385/Trᵢⱼ^2 - 0.0121/Trᵢⱼ^3 - 0.000607/Trᵢⱼ^8
B₁ = 0.0637 + 0.331/Trᵢⱼ - 0.423/Trᵢⱼ^2 - 0.423/Trᵢⱼ^3 - 0.008/Trᵢⱼ^8
Trᵢⱼ = T/Tcᵢⱼ
Tcᵢⱼ = √TcᵢTcⱼ
Pcᵢⱼ = (Pcᵢ + Pcⱼ)/2
ωᵢⱼ = (ωᵢ + ωⱼ)/2

Model Construction Examples

# Using the default database
model = TsonopoulosVirial("water") #single input
model = TsonopoulosVirial(["water","ethanol"]) #multiple components
model = TsonopoulosVirial(["water","ethanol"], idealmodel = ReidIdeal) #modifying ideal model

# Passing a prebuilt model

my_idealmodel = MonomerIdeal(["neon","hydrogen"];userlocations = (;Mw = [20.17, 2.]))
model = TsonopoulosVirial(["neon","hydrogen"],idealmodel = my_idealmodel)

# User-provided parameters, passing files or folders
model = TsonopoulosVirial(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical.csv"])

# User-provided parameters, passing parameters directly

model = TsonopoulosVirial(["neon","hydrogen"];
        userlocations = (;Tc = [44.492,33.19],
                        Pc = [2679000, 1296400],
                        Mw = [20.17, 2.],
                        acentricfactor = [-0.03,-0.21])
                    )

References

  1. Tsonopoulos, C. (1974). An empirical correlation of second virial coefficients. AIChE Journal. American Institute of Chemical Engineers, 20(2), 263–272. doi:10.1002/aic.690200209
Clapeyron.EoSVirial2Type
EoSVirial2 <: SecondVirialModel
EoSVirial2(model;idealmodel = idealmodel(model))

Input models

  • model: Model providing second virial coefficient is obtained
  • idealmodel: Ideal Model

Description

Virial model, that just calls the second virial coefficient of the underlying model.

B(T,z) = B(model,T,z)

Solid Models

Solid models provide simple approximations to the excess chemical potential in the solid phase. Intended to be used in conjuction with a liquid model within a CompositeModel

Clapeyron.SolidHfusType
SolidHfusModel <: EoSModel

SolidHfus(components;
userlocations = String[],
verbose::Bool=false)

Parameters

  • Hfus: Single Parameter (Float64) - Enthalpy of Fusion at 1 bar [J/mol]
  • Tm: Single Parameter (Float64) - Melting Temperature [K]
  • CpSL: Single Parameter (Float64) (optional) - Heat Capacity of the Solid-Liquid Phase Transition [J/mol/K]

Description

Approximation of the excess chemical potential in the solid phase (CpSL is not necessary by default):

ln(xᵢγᵢ) = Hfusᵢ*T*(1/Tmᵢ-1/T)-CpSLᵢ/R̄*(Tmᵢ/T-1-log(Tmᵢ/T))
Clapeyron.SolidKsType
SolidKsModel <: EoSModel

SolidKs(components;
userlocations = String[],
verbose::Bool=false)

Parameters

  • Hfus: Single Parameter (Float64) - Enthalpy of Fusion at 1 bar [J/mol]
  • Tm: Single Parameter (Float64) - Melting Temperature [K]
  • CpSL: Single Parameter (Float64) - Heat Capacity of the Solid-Liquid Phase Transition [J/mol/K]

Description

Approximation of the excess chemical potential in the solid phase, using enthalpies and gibbs energies of formation:

ln(xᵢγᵢ) = -Gformᵢ*T/Trefᵢ - Hformᵢ*(1 - T/Trefᵢ)