Contents

Index

Fluid Single component properties

Clapeyron.saturation_pressureFunction
saturation_pressure(model::EoSModel, T)
saturation_pressure(model::EoSModel,T,method::SaturationMethod)
saturation_pressure(model,T,x0::Union{Tuple,Vector})

Performs a single component saturation equilibrium calculation, at the specified temperature T, of one mol of pure sustance specified by model. Returns (p₀, Vₗ, Vᵥ) where p₀ is the saturation pressure (in [Pa]), Vₗ is the liquid saturation volume (in [m³]) and Vᵥ is the vapour saturation volume (in [m³]).

If the calculation fails, returns (NaN, NaN, NaN)

By default, it uses ChemPotVSaturation

Examples:

julia> pr = PR(["water"])
PR{BasicIdeal, PRAlpha, NoTranslation, vdW1fRule} with 1 component:
  "water"
Contains parameters: a, b, Tc, Pc, Mw

julia> p,vl,vv = saturation_pressure(pr,373.15) #default, uses Clapeyron.ChemPotVSaturation
(96099.38979351855, 2.2674781912892906e-5, 0.03201681565699426)

julia> p,vl,vv = saturation_pressure(pr,373.15,IsoFugacitySaturation()) #iso fugacity
(96099.38979351871, 2.2674781912892933e-5, 0.03201681565699359)

julia> p,vl,vv = saturation_pressure(pr,373.15,IsoFugacitySaturation(p0 = 1.0e5)) #iso fugacity, with starting point
(96099.38979351871, 2.2674781912892933e-5, 0.03201681565699547)
source
Missing docstring.

Missing docstring for Clapeyron.saturation_liquid_density. Check Documenter's build log for details.

Clapeyron.saturation_temperatureFunction
saturation_temperature(model::EoSModel, p, kwargs...)
saturation_temperature(model::EoSModel, p, method::SaturationMethod)
saturation_temperature(model, p, T0::Number)

Performs a single component saturation temperature equilibrium calculation, at the specified temperature T, of one mol of pure sustance specified by model. Returns (T₀, Vₗ, Vᵥ) where T₀ is the saturation Temperature (in [K]), Vₗ is the liquid saturation volume (in [m³]) and Vᵥ is the vapour saturation volume (in [m³]).

If the calculation fails, returns (NaN, NaN, NaN)

Available methods

  • AntoineSaturation: (default) direct VT solver (fast and robust).
  • ClapeyronSaturation: Clapeyron-equation descent that repeatedly calls a saturation solver (reliable but slower; supports T0/crit).
  • SuperAncSaturation: superancillary correlations for supported EoS (cubic, PC-SAFT via extension); requires enabling superancillaries and is only available on supported models.

Examples

julia-repl

julia> pr = PR(["water"])
PR{BasicIdeal, PRAlpha, NoTranslation, vdW1fRule} with 1 component:
  "water"
Contains parameters: a, b, Tc, Pc, Mw

julia> Ts,vl,vv = saturation_temperature(pr,1e5) # AntoineSaturation by default
(374.24014010712983, 2.269760164801948e-5, 0.030849387955737825)

julia> saturation_pressure(pr,Ts)
(100000.00004314569, 2.269760164804427e-5, 0.03084938795785433)
source
Clapeyron.enthalpy_vapFunction
enthalpy_vap(model::EoSModel, T,method = ChemPotVSaturation(x0_sat_pure(model,T)))

Calculates ΔH, the difference between saturated vapour and liquid enthalpies at temperature T [K], in [J]

source
Clapeyron.crit_pureFunction
crit_pure(model::EoSModel,x0=nothing)

Calculates the critical point of a single component modelled by model. Returns a tuple, containing:

  • Critical temperature [K]
  • Critical pressure [Pa]
  • Critical molar volume [m³·mol⁻¹]
source
Clapeyron.acentric_factorFunction
acentric_factor(model::EoSModel;crit = crit_pure(model), satmethod = ChemPotVSaturation())

Calculates the acentric factor using its definition:

ω = -log10(psatᵣ) -1, at Tᵣ = 0.7

To do so, it calculates the critical temperature (using crit_pure) and performs a saturation calculation (with saturation_pressure(model,0.7Tc,satmethod))

source

Solid–Fluid Single component properties

Clapeyron.melting_pressureFunction
pm,vs,vl = melting_pressure(model::CompositeModel,T;v0=x0_melting_pressure(model,T))

Calculates the melting pressure of a CompositeModel containing a solid and fluid phase EoS, at a specified temperature T. You can pass a tuple of initial values for the volumes (vs0,vl0).

returns:

  • pm is melting Pressure [Pa]
  • vs is melting solid volume at specified temperature [m³]
  • vl is melting liquid volume at specified temperature [m³]
source
Clapeyron.melting_temperatureFunction
pm,vs,vl = melting_temperature(model::CompositeModel,p;v0=x0_melting_pressure(model,T))

Calculates the melting temperature of a CompositeModel containing a solid and fluid phase EoS, at a specified pressure p. You can pass a tuple of initial values for the volumes (vs0,vl0).

returns:

  • Melting Temperature [K]
  • melting solid volume at specified pressure [m³]
  • melting liquid volume at specified pressure [m³]
source
Clapeyron.sublimation_pressureFunction
psub,vs,vv = sublimation_pressure(model::CompositeModel,T;v0=x0_sublimation_pressure(model,T))

Calculates the sublimation pressure psub of a CompositeModel containing a solid and fluid phase EoS, at a specified temperature T. You can pass a tuple of initial values for the volumes (vs0,vv0).

returns:

  • Sublimation Pressure [Pa]
  • Sublimation solid volume at specified temperature [m³]
  • Sublimation vapour volume at specified temperature [m³]
source
Clapeyron.sublimation_temperatureFunction
pm,vs,vv = sublimation_temperature(model::CompositeModel,p;v0=x0_sublimation_pressure(model,T))

Calculates the sublimation temperature of a CompositeModel containing a solid and fluid phase EoS, at a specified pressure p. You can pass a tuple of initial values for the volumes (vs0,vv0).

returns:

  • Sublimation Temperature [K]
  • Sublimation solid volume at specified pressure [m³]
  • Sublimation vapour volume at specified pressure [m³]
source
Clapeyron.triple_pointFunction
Tt,pt,vs,vl,vv = triple_point(model::CompositeModel;v0 = x0_triple_point(model))

Calculates the triple point of a CompositeModel containing solid and fluid phase EoS.

returns:

  • Triple point Temperature [K]
  • Triple point Pressure [Pa]
  • Solid volume at Triple Point [m³]
  • Liquid volume at Triple Point [m³]
  • Vapour volume at Triple Point [m³]
source

Saturation methods

Clapeyron.ChemPotVSaturationType
ChemPotVSaturation <: SaturationMethod
ChemPotVSaturation(V0)
ChemPotVSaturation(;vl = nothing,
                    vv = nothing,
                    crit = nothing,
                    crit_retry = true
                    f_limit = 0.0,
                    atol = 1e-8,
                    rtol = 1e-12,
                    max_iters = 10^4)

Default saturation_pressure Saturation method used by Clapeyron.jl. It uses equality of Chemical Potentials with a volume basis. If no volumes are provided, it will use x0_sat_pure. When crit_retry is true, if the initial solve fail, it will try to obtain a better estimate by calculating the critical point. f_limit, atol, rtol, max_iters are passed to the non linear system solver.

source
Clapeyron.ChemPotDensitySaturationType
ChemPotDensitySaturation <: SaturationMethod
ChemPotDensitySaturation(;vl = nothing,
                        vv = nothing,
                        crit = nothing,
                        f_limit = 0.0,
                        atol = 1e-8,
                        rtol = 1e-12,
                        max_iters = 10^4)

Saturation method for saturation_pressure. It uses equality of Chemical Potentials with a density basis. If no volumes are provided, it will use x0_sat_pure. vl and vl are initial guesses for the liquid and vapour volumes. f_limit, atol, rtol, max_iters are passed to the non linear system solver.

source
Clapeyron.IsoFugacitySaturationType
IsoFugacitySaturation <: SaturationMethod
IsoFugacitySaturation(;p0 = nothing,
    vl = nothing,
    vv = nothing,
    crit = nothing,
    max_iters = 20,
    p_tol = sqrt(eps(Float64)))

Saturation method for saturation_pressure. Uses the isofugacity criteria. Ideal for Cubics or other EoS where the volume calculations are cheap. If p0 is not provided, it will be calculated via x0_psat.

source
Clapeyron.ClapeyronSaturationType
ClapeyronSaturation <: SaturationMethod
ClapeyronSaturation(T0 = nothing, crit = nothing, satmethod = ChemPotVSaturation())

Saturation method for saturation_temperature. It solves iteratively saturation_temperature(model,Ti,satmethod) until convergence, by using the Clapeyron equation:

dp/dT = ΔS/ΔV

It descends from the critical point (or T0, if provided). Reliable, but slow.

It is recommended that T0 > Tsat, as the temperature decrease iteration series is more stable. Default method for saturation_temperature until Clapeyron 0.3.7

source
Clapeyron.AntoineSaturationType
AntoineSaturation <: SaturationMethod
AntoineSaturation(;T0 = nothing,
                    vl = nothing,
                    vv = nothing,
                    f_limit = 0.0,
                    atol = 1e-8,
                    rtol = 1e-12,
                    max_iters = 10^4,
                    crit = nothing,
                    crit_retry = false)

Saturation method for saturation_temperature. Default method for saturation temperature from Clapeyron 0.3.7. It solves the Volume-Temperature system of equations for the saturation condition.

If only T0 is provided, vl and vv are obtained via x0_sat_pure. If T0 is not provided, it will be obtained via x0_saturation_temperature. It is recommended to overload x0_saturation_temperature, as the default starting point calls crit_pure, resulting in slower than ideal times. f_limit, atol, rtol, max_iters are passed to the non linear system solver.

source
Clapeyron.CritExtrapolationSaturationType
CritExtrapolationSaturation <: SaturationMethod
CritExtrapolationSaturation(;crit = nothing)

Saturation method that extrapolates the liquid and vapor volumes from the critical point. the extrapolation is defined as:

ρₓ = ρc ± sqrt(6* Tc * (Tc - T)/Tc * ∂²p∂ρ∂T / ∂³p∂ρ³)

This method is specially useful at calculating the liquid and vapor volumes when T > 0.999Tc.

References

  1. Bell, I. H., & Deiters, U. K. (2023). Superancillary equations for nonpolar pure fluids modeled with the PC-SAFT equation of state. Industrial & Engineering Chemistry Research. doi:10.1021/acs.iecr.2c02916
source
Clapeyron.SuperAncSaturationType
SuperAncSaturation <: SaturationMethod
SuperAncSaturation()

Saturation method for saturation_pressure. It uses Chebyshev expansions constructed with extended precision arithmetic to obtain the saturation curves of supported EoS within Float64 precision. Models supported are:

  • vdW models and variants
  • RK models and variants
  • PR models and variants
  • PCSAFT models and some variants (via EoSSuperancillaries.jl package extension)

References

  1. Bell, I. H., & Deiters, U. K. (2021). Superancillary equations for cubic equations of state. Industrial & Engineering Chemistry Research, 60(27), 9983–9991. doi:10.1021/acs.iecr.1c00847
source
Clapeyron.use_superancillaries!Function
use_superancillaries!(val::Bool = true)

Enable the use of cubic and PC-SAFT superancillaries as initial points for saturation_pressure. For PCSAFT it also enables the use of superancillaries for critical point calculations. This function requires EoSSuperancillaries.jl to be loaded in the current session (using EoSSuperancillaries).

source

Widom and CIIC loci

Clapeyron.widom_pressureFunction
pw, vw = widom_pressure(model, T; p0 = nothing, v0 = nothing)

Calculate the Widom pressure and corresponding volume at a given temperature for a thermodynamic model.

The Widom point represents the temperature T where maxima of the isobaric heat capacity occurs along an isobar in the supercritical region. In particular, widom_pressure calculates the widom point at a specified temperature.

Arguments

  • model: Thermodynamic model used for calculations.
  • T: Temperature at which to calculate the Widom pressure [K].
  • p0: Optional initial pressure guess [Pa]. If not provided, a default value will be used.
  • v0: Optional initial volume guess [m³]. If not provided, a default value will be used.

Returns

  • pw: Widom pressure at the specified temperature [Pa].
  • vw: Volume at the Widom pressure and specified temperature [m³].

Example

model = PCSAFT(["methane"])
T = 200.0  # 200 K
pw, vw = widom_pressure(model, T)
source
Clapeyron.widom_temperatureFunction
Tw, vw = widom_temperature(model, p; T0 = nothing, v0 = nothing)

Calculate the Widom temperature and corresponding volume at a given pressure for a thermodynamic model.

The Widom point represents the temperature T where maxima of the isobaric heat capacity occurs along an isobar in the supercritical region. In particular, widom_temperature calculates the widom point at a specified temperature.

Arguments

  • model: Thermodynamic model used for calculations
  • p: Pressure at which to calculate the Widom temperature [Pa]
  • T0: Optional initial temperature guess [K]. If not provided, a default value will be used.
  • v0: Optional initial volume guess [m³]. If not provided, a default value will be used.

Returns

  • Tw: Widom temperature at the specified pressure [K].
  • vw: Volume at the Widom temperature and specified pressure [m³].

Example

model = PCSAFT(["methane"])
p = 150e5  #150 bar, over critical pressure
Tw, vw = widom_temperature(model, p)
source
Clapeyron.ciic_pressureFunction
p_ciic, v_ciic = ciic_pressure(model, T; p0 = nothing, v0 = nothing)

Calculate the Characteristic Isobaric Inflection Curve (CIIC) point at a given temperature for a thermodynamic model.

The CIIC represents points of maximum isobaric heat capacity (Cp) along isotherms, in contrast to Widom lines which represent maxima of Cp along isobars.

Arguments

  • model: Thermodynamic model used for calculations.
  • T: Temperature at which to calculate the CIIC pressure [K].
  • p0: Optional initial pressure guess [Pa]. If not provided, a default value will be used.
  • v0: Optional initial volume guess [m³]. If not provided, a default value will be used.

Returns

  • p_ciic: Pressure at the CIIC point for the specified temperature [Pa].
  • v_ciic: Volume at the CIIC point [m³].

Example

model = PCSAFT(["methane"])
T = 200.0  # 200 K
p_ciic, v_ciic = ciic_pressure(model, T)
source
Clapeyron.ciic_temperatureFunction
T_ciic, v_ciic = ciic_temperature(model, p; T0 = nothing, v0 = nothing)

Calculate the Characteristic Isobaric Inflection Curve (CIIC) point at a given pressure for a thermodynamic model.

The CIIC represents points of maximum isobaric heat capacity (Cp) along isotherms, in contrast to Widom lines which represent maxima of Cp along isobars.

Arguments

  • model: Thermodynamic model used for calculations.
  • p: Pressure at which to calculate the CIIC temperature [Pa].
  • T0: Optional initial temperature guess [K]. If not provided, a default value will be used.
  • v0: Optional initial volume guess [m³]. If not provided, a default value will be used.

Returns

  • T_ciic: Temperature at the CIIC point for the specified pressure [K].
  • v_ciic: Volume at the CIIC point [m³].

Example

model = PCSAFT(["methane"])
p = 150e5  # 150 bar
T_ciic, v_ciic = ciic_temperature(model, p)
source