Contents
Index
Clapeyron.AntoineSaturation
Clapeyron.ChemPotDensitySaturation
Clapeyron.ChemPotVSaturation
Clapeyron.ClapeyronSaturation
Clapeyron.IsoFugacitySaturation
Clapeyron.acentric_factor
Clapeyron.crit_pure
Clapeyron.enthalpy_vap
Clapeyron.melting_pressure
Clapeyron.melting_temperature
Clapeyron.saturation_pressure
Clapeyron.saturation_temperature
Clapeyron.sublimation_pressure
Clapeyron.sublimation_temperature
Clapeyron.triple_point
Fluid Single component properties
Clapeyron.saturation_pressure
— Functionsaturation_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)
Clapeyron.saturation_temperature
— Functionsaturation_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 pressure T
, of one mol of pure sustance specified by model
Returns (T₀, Vₗ, Vᵥ)
where p₀
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)
By default, it uses AntoineSaturation
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)
Clapeyron.enthalpy_vap
— Functionenthalpy_vap(model::EoSModel, T,method = ChemPotVSaturation(x0_sat_pure(model,T)))
Calculates ΔH
, the difference between saturated vapour and liquid enthalpies at temperature T
, in J
Clapeyron.crit_pure
— Functioncrit_pure(model::EoSModel,x0=nothing)
Calculates the critical point of a single component modelled by model
. Returns (Tc, pc, Vc)
where Tc
is the critical temperature (in K), pc
is the critical pressure (in Pa) and Vc
is the critical volume (in m³)
Clapeyron.acentric_factor
— Functionacentric_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)
)
Solid-Fluid Single component properties
Clapeyron.melting_pressure
— Functionpm,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 pressure. You can pass a tuple of initial values for the volumes (vs0,vl0)
.
returns:
- Melting Pressure [
Pa
] - melting solid volume at specified temperature [
m³
] - melting liquid volume at specified temperature [
m³
]
Clapeyron.melting_temperature
— Functionpm,vs,vl = melting_temperature(model::CompositeModel,T;v0=x0_melting_pressure(model,T))
Calculates the melting temperature of a CompositeModel
containing a solid and fluid phase EoS, at a specified pressure. 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³
]
Clapeyron.sublimation_pressure
— Functionpsub,vs,vv = sublimation_pressure(model::CompositeModel,T;v0=x0_sublimation_pressure(model,T))
Calculates the sublimation pressure of a CompositeModel
containing a solid and fluid phase EoS, at a specified pressure. 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³
]
Clapeyron.sublimation_temperature
— Functionpm,vs,vl = sublimation_temperature(model::CompositeModel,T;v0=x0_sublimation_pressure(model,T))
Calculates the sublimation temperature of a CompositeModel
containing a solid and fluid phase EoS, at a specified pressure. You can pass a tuple of initial values for the volumes (vs0,vl0)
.
returns:
- Sublimation Temperature [
K
] - sublimation solid volume at specified pressure [
m³
] - sublimation vapour volume at specified pressure [
m³
]
Clapeyron.triple_point
— FunctionTt,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³
]
Saturation methods
Clapeyron.ChemPotVSaturation
— TypeChemPotVSaturation <: 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
. If those initial guesses fail and the specification is near critical point, it will try one more time, using Corresponding States instead. 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.
Clapeyron.ChemPotDensitySaturation
— TypeChemPotDensitySaturation <: 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.
Clapeyron.IsoFugacitySaturation
— TypeIsoFugacitySaturation <: 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
.
Clapeyron.ClapeyronSaturation
— TypeClapeyronSaturation <: 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
Clapeyron.AntoineSaturation
— TypeAntoineSaturation <: 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.