Index
Clapeyron.ChainLJScalingClapeyron.CorrespondingStatesModelClapeyron.ECSClapeyron.FeANNMieClapeyron.Johnson1993LJClapeyron.KolafaNezbedaClapeyron.LJRefClapeyron.LJScalingClapeyron.NoECSScalingClapeyron.PeTSClapeyron.PeTSLJClapeyron.Pohl2023Mie6Clapeyron.SPUNGScalingClapeyron.Thol2016LJClapeyron.SPUNGClapeyron.shape_factors
Potential models
A potential model is an EoS model that represents the shape of the residual Helmholtz surface of an intermolecular potential, expressed in reduced (natural) units rather than physical ones. In particular terms of the Clapeyron implementation:
T_scale(model,z) = 1Rgas(model) = 1
A potential model can be coupled with a (molecular) scaling model in a corresponding states framework to act directly as a provider of real thermodynamic properties, or may be the building block of a more complex EoS.
LJ Potentials
Clapeyron.Thol2016LJ — Type
Thol2016LJ <: LJPotentialModel
Thol2016LJ()Lennard-Jones Reference equation of state. Valid from 0.5 < T/Tc < 7 and pressures up to p/pc = 500.
τᵢ = 1.32/T
δᵢ = 1/0.31V
a⁰ᵢ(δ,τ) = log(δᵢ) + 1.5log(τᵢ) - 1.515151515τᵢ + 6.262265814
a⁰(δ,τ,z) = ∑xᵢ(a⁰ᵢ + log(xᵢ))
τ = 1.32ϵ/T
δ = n(Nₐσ^3)/0.31V
aʳ(δ,τ) = aʳ₁+ aʳ₂ + aʳ₃ + aʳ₄
aʳ₁(δ,τ) = ∑nᵢδ^(dᵢ)τ^(tᵢ), i ∈ 1:6
aʳ₂(δ,τ) = ∑nᵢexp(-δ^cᵢ)δ^(dᵢ)τ^(tᵢ), i ∈ 7:12
aʳ₃(δ,τ) = ∑nᵢexp(-ηᵢ(δ - εᵢ)^2 - βᵢ(τ - γᵢ)^2)δ^(dᵢ)τ^(tᵢ), i ∈ 13:23References
- Thol, M., Rutkai, G., Köster, A., Lustig, R., Span, R., & Vrabec, J. (2016). Equation of state for the Lennard-Jones fluid. Journal of physical and chemical reference data, 45(2), 023101. doi:10.1063/1.4945000
Clapeyron.Johnson1993LJ — Type
Johnson1993LJ <: LJPotentialModel
Johnson1993LJ()Description
Johnson equation of state for the Lennard-Jones fluid. Default reference LJ model for softSAFT
References
- Johnson, J. K., Zollweg, J. A., & Gubbins, K. E. (1993). The Lennard-Jones equation of state revisited. Molecular physics, 78(3), 591–618. doi:10.1080/00268979300100411
Missing docstring for Clapeyron.KolafaNezbedaLJ. Check Documenter's build log for details.
LJ-TS Potentials
Clapeyron.PeTSLJ — Type
PeTSLJ <: LJPotentialModel
PeTSLJ()Description
Perturbed, Truncated and Shifted (PeTS) Equation of State. Unscaled model.
References
- Heier, M., Stephan, S., Liu, J., Chapman, W. G., Hasse, H., & Langenbach, K. (2018). Equation of state for the Lennard-Jones truncated and shifted fluid with a cut-off radius of 2.5 σ based on perturbation theory and its applications to interfacial thermodynamics. Molecular Physics, 116(15–16), 2083–2094. doi:10.1080/00268976.2018.1447153
Mie Potentials
Clapeyron.FeANNMie — Type
FeANNMie(λr, λa; solid = false)Input arguments
λa: Real - Atractive range parameter (no units)λr: Real - Repulsive range parameter (no units)
Keyword arguments
solid: if set totrue, it will load the weights for theFe-ANN(s)-Miemodel instead of the weights for theFe-ANN-Mie.
Description
Free Energy Artificial Neural Network equation of state for the Mie fluid. There are two available models, that can be selected with the solid keyword argument:
- Fe-ANN-Mie: model trained on VLE data of the Mie fluid
- Fe-ANN(S)-Mie: Trained model using fluid and crystal Mie data
References
- Chaparro, G., & Müller, E. A. (2023). Development of thermodynamically consistent machine-learning equations of state: Application to the Mie fluid. The Journal of Chemical Physics, 158(18), 184505. doi:10.1063/5.0146634
- Chaparro, G., & Müller, E. A. (2024). Development of a Helmholtz free energy equation of state for fluid and solid phases via artificial neural networks. Communications Physics, 7(1). [doi:10.1038/s42005-024-01892-3]https://doi.org/10.1038/s42005-024-01892-3)
- Chaparro, G., & Müller, E. A. (2025). Fitting a square peg in a round hole: parameterisation of quasi-spherical molecules employing the Mie potential. Molecular Systems Design & Engineering, 10(8), 620–634. doi:10.1039/d5me00048c
Clapeyron.Pohl2023Mie6 — Type
Pohl2023Mie6 <: MiePotentialModel
Pohl2023Mie6(λr)Description
Multiparameter Equation of state for the ν-6 Mie fluid, with ν (c) between 11 and 13.
References
Pohl, S., Fingerhut, R., Thol, M., Vrabec, J., & Span, R. (2023). Equation of state for the Mie (λr,6) fluid with a repulsive exponent from 11 to 13. The Journal of Chemical Physics, 158(8), 084506. doi:10.1063/5.0133412
Corresponding states models
Corresponding states models inheriting the CorrespondingStatesModel in Clapeyron use the following API:
scaling = Clapeyron.scaling_model(model::CorrespondingStatesModel) #get inner scaling model
reference = Clapeyron.reference_model(model::CorrespondingStatesModel) #get inner reference model
f,h = Clapeyron.shape_factors(scaling::MyScalingModel,reference,T,z) #get temperature and volume scaling factors, as a method of the scaling model and the scaled temperature.
f,h = Clapeyron.inverse_shape_factors(scaling::MyScalingModel,reference,T,z) #instead of the scaled temperature, the reference temperature is used as input.Clapeyron provides specialized methods that reroute the evaluation of some properties to the reference model first, and then perform the scaling, instead of creating shape factors multiple times.
Corresponding states API
Clapeyron.CorrespondingStatesModel — Type
abstract type CorrespondingStatesModel <: EoSModel end
Abstract type containing corresponding states (CS) models. corresponding states models are defined as:
Aʳᵉˢ(T,v,x)/RT = Aʳᵉˢ₀(T₀,v₀)/R₀T₀ T₀ = T/f , v₀ = v/h
In particular, the code implementation is just two methods.
function a_res(model::CorrespondingStatesModel,V,T,z)
reference = reference_model(model)
scaling = scaling_model(model)
return a_res_ecs(reference,scaling,V,T,z)
end
function a_res_ecs(refmodel,scalingmodel,V,T,z)
f,h = shape_factors(scalingmodel,refmodel,T,z)
T0 = T/f
V0 = V/h
return a_res(refmodel,V0,T0,z)
endThe following functions are required:
reference_model: provides a single-component, helmholtz equation of state, used as reference for the shape theira_resV-T surface.scaling_model: provides a struct that defines the scaling between the real fluid and the reference fluid.shape_factors: the scaling model needs to definef,h = shape_factors(scaling::MyModel,reference,T,z).
Some reference models may carry its own scaling (or no scaling at all). For those cases, you may need to overload a_res_ecs
Missing docstring for Clapeyron.scaling_model. Check Documenter's build log for details.
Missing docstring for Clapeyron.reference_model. Check Documenter's build log for details.
Clapeyron.shape_factors — Function
shape_factors(model::CorrespondingStatesModel,T,z=SA[1.0])
shape_factors(scaling_model,reference_model,T,z)returns f,h scaling factors, used by subtypes of CorrespondingStatesModel. T is the scaled temperature. To calculate the shape factors given a reference temperature (T0 = T/f), use inverse_scaling_factors
Scaling models
Clapeyron.NoECSScaling — Type
NoECSScaling <: EoSModelInput parameters
None
Description
Null scaling model, to be used along a reference model. temperature and shape factors are equal to one.
Clapeyron.SPUNGScaling — Type
SPUNGScaling(components, reference_component, model, refmodel;
shape_userlocations = nothing,
shaperef_userlocations = nothing,
verbose = false)
SPUNGScaling(shape_model, shaperef_model)Input models
model: cubic equation of state that describes the fluid (or mixture) of interest, the shape equation (for exampleSRKorPR). A cubic built beforehand can also be passed; it is then used as it is.refmodel: cubic equation of state that represents the reference fluid. It must be the same equation asmodel: same functional form, sameα(T)function and same mixing and translation options. Only the substance, and the parameters describing it, may differ (see the notes below).
Input parameters
components: substances of the fluid or mixture of interest.reference_component: the reference substance, as named in the cubic-equation database.shape_userlocations: alternative parameter source (files or values) for the cubic of the fluid of interest. Replaces database critical constants, acentric factors or binary interaction parameters, and therefore changes the scale factors.shaperef_userlocations: the same, for the cubic of the reference fluid.verbose: prints information about the parameters used while the model is built. It does not change any result.
Description
Scaling model of the SPUNG equation of state, to be used with ECS. Its role is to say which state of the reference fluid corresponds to a given state of the fluid of interest: a state (T, v, x) is mapped to the reference state
T₀ = T/f
v₀ = v/hwhere f and h are the temperature and volume scale factors. They are obtained from the cubic equation of state, written as
P = RT/(v-b) - a(T)/((v+δ₁b)(v+δ₂b))Two states are considered corresponding when the two dimensionless groups of the cubic coincide,
Γ = a(T)/(b·R·T) β = b/vFor a cubic these two groups fully determine the reduced residual Helmholtz energy, so equality of Γ and β means equal reduced residual Helmholtz energy. This gives
h = v/v₀ = b/b₀
f = T/T₀ = [a(T)/b] / [a₀(T₀)/b₀]where a, b belong to the fluid of interest and a₀, b₀ to the reference fluid, both from the same cubic equation. f appears on both sides (T₀ = T/f), so it is the solution of an implicit equation. For pure fluids described by Soave-type α(T) functions (SRK, PR) the solution is available in closed form; in all other cases it is found iteratively. Both routes give the same value.
For mixtures, a and b are the mixture parameters given by the mixing rule of the cubic (van der Waals one-fluid rules by default), so the composition dependence of the scale factors, and the effect of the binary interaction parameters kᵢⱼ and lᵢⱼ, come entirely from the cubic. The scaling model supplies only the mapping; the accuracy of the final Helmholtz energy comes from the reference equation.
Notes
- If the fluid of interest is the reference fluid, and both cubics use the same parameters,
f = h = 1and the reference equation is recovered unchanged. - The two cubics must be the same equation because equality of
Γandβimplies equal Helmholtz energy only if both fluids obey the same functional form (sameδ₁,δ₂,α(T)and mixing rule).
Using different cubic equations for the fluid of interest and the reference fluid is not currently supported.
References
- Mollerup, J. (1998). Unification of the two-parameter equation of state and the principle of corresponding states. Fluid Phase Equilibria, 148(1–2), 1–19. doi:10.1016/s0378-3812(98)00230-1
- Michelsen, M. L., & Mollerup, J. M. (2007). Thermodynamic Models: Fundamentals and Computational Aspects, 2nd ed. Tie-Line Publications.
Clapeyron.LJScaling — Type
LJScaling <: LJScalingModel
LJScaling(components;
userlocations = String[],
verbose = false)Input parameters
sigma: Single Parameter (Float64) - particle size[Å]epsilon: Single Parameter (Float64) - dispersion energy[K]Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]k: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)l: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)
Model Parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]sigma: Pair Parameter (Float64) - particle size[m]epsilon: Pair Parameter (Float64) - dispersion energy[K]
Description
Lennard-Jones corresponding-states scaling model, used together with a Lennard-Jones reference equation of state.
Their shape factors are defined as:
σ³ = Σᵢ Σⱼ xᵢ xⱼ σᵢⱼ³
ϵmix = (1/σ³) Σᵢ Σⱼ xᵢ xⱼ σᵢⱼ³ ϵᵢⱼ
σᵢⱼ = (1 - lᵢⱼ)(σᵢ + σⱼ)/2 (Lorentz)
ϵᵢⱼ = (1 - kᵢⱼ)√(ϵᵢ ϵⱼ) (Berthelot)
f = ϵmix
h = N_A σ³Clapeyron.ChainLJScaling — Type
LJScaling <: LJScalingModel
LJScaling(components;
userlocations = String[],
verbose = false)Input parameters
sigma: Single Parameter (Float64) - particle size[Å]epsilon: Single Parameter (Float64) - dispersion energy[K]Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]k: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)l: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)segment: Single Parameter (Float64) - Number of segments (no units)
Model Parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]sigma: Pair Parameter (Float64) - particle size[m]segment: Single Parameter (Float64) - Number of segments (no units)epsilon: Pair Parameter (Float64) - dispersion energy[K]
Description
Lennard-Jones corresponding-states scaling model, used together with a Lennard-Jones reference equation of state. The volume shape factor is additionally scaled by the weighted segment parameter Their shape factors are defined as:
m̄ = Σᵢ xᵢ mᵢ
σ³ = Σᵢ Σⱼ xᵢ xⱼ σᵢⱼ³
ϵmix = (1/σ³) Σᵢ Σⱼ xᵢ xⱼ σᵢⱼ³ ϵᵢⱼ
σᵢⱼ = (1 - lᵢⱼ)(σᵢ + σⱼ)/2 (Lorentz)
ϵᵢⱼ = (1 - kᵢⱼ)√(ϵᵢ ϵⱼ) (Berthelot)
f = ϵmix
h = m̄ N_A σ³Corresponding States models
Clapeyron.ECS — Type
ExtendedCorrespondingStates <: CorrespondingStatesModel
function ECS(scaling,reference,idealmodel)
Input Models
scaling: determines the scales of temperature and volume for the model.reference: determines the shape of the helmholtz surface (V,T).idealmodel: determines the ideal gas model.
Description
Generic instance of a CorrespondingStatesModel EoS. It can be used to mix and match scaling and reference models.
Clapeyron.SPUNG — Function
SPUNG(components;
reference_model = PropaneRef(),
shape_model = SRK,
shaperef_model = shape_model,
idealmodel = BasicIdeal,
reference_component = only(Clapeyron.component_list(reference_model)),
ideal_userlocations = String[],
shape_userlocations = String[],
shaperef_userlocations = String[],
verbose = false,
reference_state = nothing)Input models
reference_model: accurate pure-fluid equation of state (normally a multiparameter Helmholtz equation) used as athe reference model. It must be already created.shape_model: cubic equation of state that defines the mapping between the fluid of interest and the reference fluid (for exampleSRKorPR).shaperef_model: cubic equation that represents the reference fluid in the mapping. Default: the same asshape_model. It must be the same model type asshape_model. It is created with components equal toreference_component.
Description
SPUNG: State Research Program for Utilization of Natural Gas
ECS method. The residual Helmholtz energy of a pure fluid or mixture is taken from a very accurate equation of state for a pure reference fluid, evaluated at a corresponding state:
Aʳᵉˢ(T,v,x)/RT = Aʳᵉˢ₀(T₀,v₀)/R₀T₀ T₀ = T/f , v₀ = v/hThe scale factors f and h depend on temperature and composition, and are calculated from a cubic equation of state (by default SRK) with the SPUNGScaling model: h is the ratio of the covolumes b/b₀, and f follows from equating a(T)/(bRT) for the fluid of interest and for the reference fluid. In mixtures the parameters a and b come from the cubic's mixing rules. If the reference equation is itself the same cubic, SPUNG reduces to that cubic.
The ideal-gas part is independent of the scaling and is given by idealmodel.
Model Construction Examples
# Default: SRK shape equation, propane reference fluid
model = SPUNG(["methane","carbon dioxide"])
# Another reference fluid (any pure-fluid Helmholtz equation)
model = SPUNG(["carbon dioxide","nitrogen"], reference_model = SingleFluid("methane"))
# Another shape equation (used for the mixture and for the reference fluid)
model = SPUNG(["methane","ethane"], shape_model = PR)
# Realistic ideal-gas heat capacities, for caloric properties
model = SPUNG(["methane","ethane"], idealmodel = ReidIdeal)
# Custom parameters (e.g. SPUNG-specific interaction parameters) for the mixture's cubic
model = SPUNG(["methane","ethane"], shape_userlocations = ["path/to/my/db"])References
- Mollerup, J. (1998). Unification of the two-parameter equation of state and the principle of corresponding states. Fluid Phase Equilibria, 148(1–2), 1–19. doi:10.1016/s0378-3812(98)00230-1
- Michelsen, M. L., & Mollerup, J. M. (2007). Thermodynamic Models: Fundamentals and Computational Aspects, 2nd ed. Tie-Line Publications.
Clapeyron.KolafaNezbeda — Type
KolafaNezbedaModel <: EoSModel
KolafaNezbeda(components;
idealmodel = BasicIdeal,
userlocations = String[],
ideal_userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]sigma: Single Parameter (Float64) - Lennard-Jones size parameter[Å]epsilon: Single Parameter (Float64) - Lennard-Jones energy parameter[K]k: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)
Model Parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]sigma: Pair Parameter (Float64) - Mixed Lennard-Jones size parameter[m]epsilon: Pair Parameter (Float64) - Mixed Lennard-Jones energy parameter[K]
Input models
idealmodel: Ideal Model
Description
Kolafa-Nezbeda equation of state for the Lennard-Jones fluid. Scaled via LJScaling
References
- Kolafa, J., & Nezbeda, I. (1994). The Lennard-Jones fluid: An accurate analytic and theoretically-based equation of state. Fluid Phase Equilibria, 100, 1–34. doi:10.1016/0378-3812(94)02573-G
Clapeyron.PeTS — Type
PeTSModel <: EoSModel
PeTS(components;
idealmodel = BasicIdeal,
userlocations = String[],
ideal_userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]segment: Single Parameter (Float64) - Number of segments (no units)sigma: Single Parameter (Float64) - Segment Diameter[Å]epsilon: Single Parameter (Float64) - Reduced dispersion energy[K]k: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)
Model Parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]segment: Single Parameter (Float64) - Number of segments (no units)sigma: Pair Parameter (Float64) - Mixed segment Diameter[m]epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
Input models
idealmodel: Ideal Model
Description
Perturbed, Truncated and Shifted (PeTS) Equation of State. Scaled via LJScaling
References
- Heier, M., Stephan, S., Liu, J., Chapman, W. G., Hasse, H., & Langenbach, K. (2018). Equation of state for the Lennard-Jones truncated and shifted fluid with a cut-off radius of 2.5 σ based on perturbation theory and its applications to interfacial thermodynamics. Molecular Physics, 116(15–16), 2083–2094. doi:10.1080/00268976.2018.1447153
Clapeyron.LJRef — Type
LJRef <: CorrespondingStatesModel
LJRef(components; idealmodel = BasicIdeal, ljmodel = Thol2016LJ(), userlocations = String[], verbose = false)Input parameters
sigma: Single Parameter (Float64) - particle size[Å]epsilon: Single Parameter (Float64) - dispersion energy[K]Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]k: Pair Parameter (Float64) (optional)
Model Parameters
sigma: Pair Parameter (Float64) - particle size[m]epsilon: Pair Parameter (Float64) - dispersion energy[K]Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]
Description
vdW-1 fluid scaling applied to a generic leonard jones model.
a_res(model,V,T,z) = a_res(reference_model(model),V/h,T/f)