Index
Clapeyron.JobackGCClapeyron.AlyLeeIdealClapeyron.BasicIdealClapeyron.CPLNGEstIdealClapeyron.GlennJLClapeyron.JobackIdealClapeyron.MonomerIdealClapeyron.PPDSIdealClapeyron.ReidIdealClapeyron.ShomateIdealClapeyron.WalkerIdeal
Ideal Models
All Clapeyron.jl models can be separated between an ideal and a residual contribution. The ideal contribution can be obtained via integration of the ideal isobaric heat capacity:
$\frac{A_{\mathrm{ideal}}}{Nk_\mathrm{B}T} = \sum_{i=1}^{N_{\mathrm{Component}}} x_i\left[\ln{\frac{\rho_i}{\rho_0}} + \frac{1}{Nk_\mathrm{B}T} \int_{T_0}^T \!\!C_{p,i}^0 dT + \frac{H_{0,i}}{Nk_\mathrm{B}T}- \frac{1}{Nk_{B}}\!\!\int_{T_0}^T \frac{C_{p,i}^0}{T} dT -\ln{\frac{T}{T_0}}-\frac{S_{0,i}}{Nk_\mathrm{B}} - 1\right]$
Normally, EoS models contain an ideal model. This model can be accessed by using Clapeyron.idealmodel.
Clapeyron.BasicIdeal — Type
BasicIdeal <: IdealModel
BasicIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
None
Description
Default Ideal Model. Constant specific heat capacity equal to 5R/2. It's Helmholtz energy is equal to:
a₀ = A₀/nRT = ∑(xᵢlog(nxᵢ/V)) - 1 - 1.5log(T)Model Construction Examples
# Because this model does not have parameters, all those constructors are equivalent:
idealmodel = BasicIdeal()
idealmodel = BasicIdeal("water")
idealmodel = BasicIdeal(["water","carbon dioxide"])Clapeyron.ReidIdeal — Type
ReidIdeal <: IdealModel
ReidIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
a: Single Parameter (Float64) - polynomial coefficientb: Single Parameter (Float64) - polynomial coefficientc: Single Parameter (Float64) - polynomial coefficientd: Single Parameter (Float64) - polynomial coefficiente: Single Parameter (optional) (Float64) - polynomial coefficientMw: Single Parameter (Float64) (Optional) - Molecular Weight[g·mol⁻¹]
Model parameters
a: Single Parameter (Float64) - polynomial coefficientb: Single Parameter (Float64) - polynomial coefficientc: Single Parameter (Float64) - polynomial coefficientd: Single Parameter (Float64) - polynomial coefficiente: Single Parameter (optional) (Float64) - polynomial coefficient for 1/T^2coeffs: Single Parameter (NTuple{5,Float64})Mw: Single Parameter (Float64) (Optional) - Molecular Weight[g·mol⁻¹]
Description
Reid Ideal Model. Helmholtz energy obtained via integration of specific heat capacity:
Cpᵢ(T) = aᵢ + bᵢT + cᵢT^2 + dᵢT^3 + eᵢT^4
Cp(T) = ∑CpᵢxᵢModel Construction Examples
# Using the default database
idealmodel = ReidIdeal("water") #single input
idealmodel = ReidIdeal(["water","ethanol"]) #multiple components
# Using user-provided parameters
# Passing files or folders
idealmodel = ReidIdeal(["neon","hydrogen"]; userlocations = ["path/to/my/db","reid.csv"])
# Passing parameters directly
idealmodel = ReidIdeal(["water","butane"];
userlocations = (a = [32.24, 9.487],
b = [0.00192, 0.3313],
c = [1.06e-5, -0.0001108],
d = [-3.6e-9, -2.822e-9],
Mw = [18.01, 58.12])
) #e is not usedClapeyron.JobackIdeal — Type
JobackIdeal <: JobackIdealModel
JobackIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]N_a: Single Parameter (Float64)T_c: Single Parameter (Float64)P_c: Single Parameter (Float64)V_c: Single Parameter (Float64)T_b: Single Parameter (Float64)T_m: Single Parameter (Float64)H_form: Single Parameter (Float64)G_form: Single Parameter (Float64)a: Single Parameter (Float64)b: Single Parameter (Float64)c: Single Parameter (Float64)d: Single Parameter (Float64)H_fusion: Single Parameter (Float64)H_vap: Single Parameter (Float64)eta_a: Single Parameter (Float64)eta_b: Single Parameter (Float64)
Description
Joback Group Contribution Ideal Model. GC version of ReidIdeal. Helmholtz energy obtained via integration of specific heat capacity:
aᵢ = ∑(νᵢₖbₖ) - 37.93
bᵢ = ∑(νᵢₖbₖ) + 0.210
cᵢ = ∑(νᵢₖcₖ) - 3.91e-4
dᵢ = ∑(νᵢₖbₖ) + 2.06e-7
Cpᵢ(T) = aᵢ + bᵢT + cᵢT^2 + dᵢT^3The GC-averaged Reid Model is available by using ReidIdeal(model::JobackIdeal). The estimated critical point of a single component can be obtained via crit_pure(model::JobackIdeal)
Molecule fragmentation into functional groups is available in GCIdentifier.jl, using JobackGroups
References
- Joback, K. G., & Reid, R. C. (1987). Estimation of pure-component properties from group-contributions. Chemical Engineering Communications, 57(1–6), 233–243. doi:10.1080/00986448708960487
List of available groups
| Name | Description |
|---|---|
| -CH3 | Methyl |
| -CH2- | Methylene |
| >CH- | |
| >C< | |
| CH2=CH- | |
| -CH=CH- | |
| =C< | |
| =C= | |
| CH | |
| C | |
| ring-CH2- | Cyclic alkane |
| ring>CH- | |
| ring>C< | |
| ring=CH- | Aromatic group |
| ring=C< | |
| -F | Fluoride |
| -Cl | Chloride |
| -Br | Bromide |
| -I | Iodide |
| -OH (alcohol) | Hydroxyl group |
| -OH (phenol) | |
| -O- (non-ring) | |
| -O- (ring) | |
| >C=O (non-ring) | Ketone |
| >C=O (ring) | |
| O=CH- (aldehyde) | Aldehyde |
| -COOH (acid) | Carboxylic acid |
| -COO- (ester) | Ester |
| O (other than above) | Ketone |
| -NH2 | Amine |
| >NH (non-ring) | |
| >NH (ring) | |
| >N- (non-ring) | |
| -N= (non-ring) | |
| -N= (ring) | |
| =NH | |
| -CN | Nitrile |
| -NO3 | Nitroxide |
| -SH | |
| -S- (non-ring) | |
| -S- (ring) |
Clapeyron.MonomerIdeal — Type
MonomerIdeal <: MonomerIdealModel
MonomerIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]
Model Parameters
None
Description
Monomer Ideal Model, result obtained from statistical mechanics Λ
Λᵢ = h/√(kᵦTMwᵢ/Nₐ)
a₀ = A₀/nRT = ∑xᵢlog(ρᵢΛᵢ^3)Model Construction Examples
# Using the default database
idealmodel = MonomerIdeal("water") #single input
idealmodel = MonomerIdeal(["water","ethanol"]) #multiple components
# Using user-provided parameters
# Passing files or folders
idealmodel = MonomerIdeal(["neon","hydrogen"]; userlocations = ["path/to/my/db","mw.csv"])
# Passing parameters directly
idealmodel = MonomerIdeal(["neon","hydrogen"];userlocations = (;Mw = [20.17, 2.]))Clapeyron.WalkerIdeal — Type
WalkerIdeal <: WalkerIdealModel
WalkerIdeal(components;
userlocations = String[],
group_userlocations = String[]
verbose = false)Input parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]Nrot: Single Parameter (Int)theta1: Single Parameter (Float64)theta2: Single Parameter (Float64)theta3: Single Parameter (Float64)theta4: Single Parameter (Float64)deg1: Single Parameter (Int)deg2: Single Parameter (Int)deg3: Single Parameter (Int)deg4: Single Parameter (Int)
Description
Walker [1] Group Contribution Ideal Model.
Cpᵢ(T)/R = (5+NRot)/2 ∑νᵢₖ∑gₖᵥ(θₖᵥ/T)^2*exp(θₖᵥ/T)/(1-exp(θₖᵥ/T)) , v ∈ 1:4 Molecule fragmentation into functional groups is available in GCIdentifier.jl, using WalkerGroups
References
- Walker, P. J., & Haslam, A. J. (2020). A new predictive group-contribution ideal-heat-capacity model and its influence on second-derivative properties calculated using a free-energy equation of state. Journal of Chemical and Engineering Data, 65(12), 5809–5829. doi:10.1021/acs.jced.0c00723
Clapeyron.AlyLeeIdeal — Type
AlyLeeIdeal <: AlyLeeIdealModel
AlyLeeIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
A: Single Parameter (Float64) - Model CoefficientB: Single Parameter (Float64) - Model CoefficientC: Single Parameter (Float64) - Model CoefficientD: Single Parameter (Float64) - Model CoefficientE: Single Parameter (Float64) - Model CoefficientF: Single Parameter (Float64) - Model CoefficientG: Single Parameter (Float64) - Model CoefficientH: Single Parameter (Float64) - Model CoefficientI: Single Parameter (Float64) - Model CoefficientMw: Single Parameter (Float64) (Optional) - Molecular Weight[g·mol⁻¹]
Description
Aly-Lee Ideal Model (extended):
Cpᵢ(T)/R = A + B(CT⁻¹/sinh(CT⁻¹))² + D(ET⁻¹/cosh(ET⁻¹))² + F(GT⁻¹/sinh(GT⁻¹))² + H(IT⁻¹/cosh(IT⁻¹))²Model Construction Examples
# Using the default database
idealmodel = AlyLeeIdeal("water") #single input
idealmodel = AlyLeeIdeal(["water","ethanol"]) #multiple components
# Using user-provided parameters
# Passing files or folders
idealmodel = AlyLeeIdeal(["neon","hydrogen"]; userlocations = ["path/to/my/db","alylee.csv"])
# Passing parameters directly
idealmodel = AlyLeeIdeal(["water","carbon dioxide"];
userlocations = (A = [4.004, 3.5],
B = [0.01, 2.044],
C = [268.8, 919.3],
D = [0.99, -1.06],
E = [1141.4, -865.1],
F = [3.07, 2.034],
G = [2507.37, 483.55],
H = [0.0, 0.0139],
I = [0.0, 341.11])
)References
- Aly, F. A., & Lee, L. L. (1981). Self-consistent equations for calculating the ideal gas heat capacity, enthalpy, and entropy. Fluid Phase Equilibria, 6(3–4), 169–179. doi:10.1016/0378-3812(81)85002-9
Clapeyron.PPDSIdeal — Type
PPDSIdeal <: PPDSIdealModel
PPDSIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
A: Single Parameter (Float64) - Model CoefficientB: Single Parameter (Float64) - Model CoefficientC: Single Parameter (Float64) - Model CoefficientD: Single Parameter (Float64) - Model CoefficientE: Single Parameter (Float64) - Model CoefficientF: Single Parameter (Float64) - Model CoefficientG: Single Parameter (Float64) - Model CoefficientMw: Single Parameter (Float64) (Optional) - Molecular Weight[g·mol⁻¹]
Description
PPDS Ideal Model:
Cpᵢ(T)/R = B + (C - B)y²[1 + (y − 1)(D + Ey + Fy² + Gy³)]
y = T/(A + T)Model Construction Examples
# Using the default database
idealmodel = PPDSIdeal("water") #single input
idealmodel = PPDSIdeal(["water","ethanol"]) #multiple components
# Using user-provided parameters
# Passing files or folders
idealmodel = PPDSIdeal(["neon","hydrogen"]; userlocations = ["path/to/my/db","alylee.csv"])
# Passing parameters directly
idealmodel = PPDSIdeal(["water","carbon dioxide"];
userlocations = (A = [4.004, 3.5],
B = [0.01, 2.044],
C = [268.8, 919.3],
D = [0.99, -1.06],
E = [1141.4, -865.1],
F = [3.07, 2.034],
G = [2507.37, 483.55],
H = [0.0, 0.0139],
I = [0.0, 341.11])
)References
- Gmehling, J., Kleiber, M., Kolbe, B., & Rarey, J. (2019). Chemical thermodynamics for process simulation (2nd ed.). Berlin, Germany: Blackwell Verlag.
Clapeyron.ShomateIdeal — Type
ShomateIdeal <: ShomateIdealModel
ShomateIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
a: Single Parameter (Float64) - polynomial coefficientb: Single Parameter (Float64) - polynomial coefficientc: Single Parameter (Float64) - polynomial coefficientd: Single Parameter (Float64) - polynomial coefficiente: Single Parameter (optional) (Float64) - polynomial coefficient for 1/T^2Mw: Single Parameter (Float64) (Optional) - Molecular Weight[g·mol⁻¹]
Model parameters
a: Single Parameter (Float64) - polynomial coefficientb: Single Parameter (Float64) - polynomial coefficientc: Single Parameter (Float64) - polynomial coefficientd: Single Parameter (Float64) - polynomial coefficiente: Single Parameter (optional) (Float64) - polynomial coefficient for 1/T^2coeffs: Single Parameter (NTuple{5,Float64})Mw: Single Parameter (Float64) (Optional) - Molecular Weight[g·mol⁻¹]
Description
Shomate Ideal Model. Helmholtz energy obtained via integration of specific heat capacity:
Cpᵢ(T) = aᵢ + bᵢT + cᵢT^2 + dᵢT^3 + eᵢT^-2
Cp(T) = ∑CpᵢxᵢModel Construction Examples
# Using the default database
idealmodel = ShomateIdeal("water") #single input
idealmodel = ShomateIdeal(["water","ethanol"]) #multiple components
# Using user-provided parameters
# Passing files or folders
idealmodel = ShomateIdeal(["neon","hydrogen"]; userlocations = ["path/to/my/db","shomate.csv"])
# Passing parameters directly
idealmodel = ShomateIdeal(["water","butane"];
userlocations = (a = [32.24, 9.487],
b = [0.00192, 0.3313],
c = [1.06e-5, -0.0001108],
d = [-3.6e-9, -2.822e-9],
Mw = [18.01, 58.12])
) #e is not usedClapeyron.CPLNGEstIdeal — Type
CPLNGEstIdeal <: ReidIdealModel
CPLNGEstIdeal(components;
userlocations = String[],
reference_state = nothing,
verbose = false)Input parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]
Model parameters
Mw: Single Parameter (Float64) - Molecular Weight[g·mol⁻¹]coeffs: Single Parameter (NTuple{5,Float64}) - polynomial coefficients
Description
Estimation of Reid polynomial, using the molecular weight as input:
Cpᵢ(T) = aᵢ + bᵢT + cᵢT^2 + dᵢT^3
Cp(T) = ∑Cpᵢxᵢ
a = -10.9602 * γ₀ + 25.9033
b = 2.1517e-1 * γ₀ - 6.8687e-2
c = -1.3337e-4 * γ₀ + 8.6387e-5
d = 3.1474e-8 * γ₀ -2.8396e-8
γ₀ = Mw/Mw(air)Model Construction Examples
# Using the default database
idealmodel = CPLNGEstIdeal("water") #single input
idealmodel = CPLNGEstIdeal(["water","ethanol"]) #multiple components
# Using user-provided parameters
# Passing files or folders
idealmodel = CPLNGEstIdeal(["neon","hydrogen"]; userlocations = ["path/to/my/db","mw.csv"])
# Passing parameters directly
idealmodel = CPLNGEstIdeal(["neon","hydrogen"];userlocations = (;Mw = [20.17, 2.]))References
- Kareem, L. A., Iwalewa, T. M., & Omeke, J. E. (2014). Isobaric specific heat capacity of natural gas as a function of specific gravity, pressure and temperature. Journal of Natural Gas Science and Engineering, 19, 74–83. doi:10.1016/j.jngse.2014.04.011
Clapeyron.GlennJL — Type
GlennJL <: IdealModel
GlennJL(calc::Union{Glenn.Calculator,Glenn.ThermoDB}, input;
Rgas = Clapeyron.Rgas(),
R0 = 8.314510,
reference_state = nothing,
verbose = false,
strict = true)Input arguments
calc: a database of Glenn.jl parametersinput: input species, it can be strings, integers (ID of the database),Glenn.SpeciesInfoor a vector of those elements.Rgas: molar gas constant used by the model.R0: molar gas constant used in the fitting of each species. by default it used the original R constant used in the fitting of NASA-7 polynomials.reference_state: if a change of reference state is needed.verbose: if set totrue, displays additional information to the REPL.strict: if set totrue, check if all components have the same phase and if their temperature ranges do not intersect
Description
Ideal model using the NASA-7 polynomial coefficients provided by the Glenn.jl package. the polynomials are standardized to fit specific values of enthalpy and entropy at 1 bar, 298.15K.
Clapeyron.GlennJL requires the package Glenn.jl to be loaded in the environment.
the integer identifiers of Glenn.jl are not stable between database rebuilds, so it is recommended to identify the species by name.
Model Construction Examples
# Using the default database
calc = Calculator()
# Using a string
idealmodel = GlennJL(calc,"o2")
# Using the ID of O2 in the default database
idealmodel = GlennJL(calc,931)
# Using a SpeciesInfo to search the database
o2 = only(get_available_species(calc, "O2", exact_match = true))
idealmodel = GlennJL(calc,o2)
# Multiple components, any of the types above can be used instead of strings
idealmodel = GlennJL(calc,["o2","n2"])Glenn.jl integrations
the model GlennJL has the following integrations with Glenn.jl package:
Glenn.calculate_h(model::GlennJL,T,z = [1.0])Glenn.calculate_s(model::GlennJL,T,z = [1.0])Glenn.calculate_cp(model::GlennJL,T,z = [1.0])Glenn.calculate_formation_enthalpy(model::GlennJL,T,z = [1.0])Glenn.calculate_enthalpy_change(model::GlennJL,T1,T2,z = [1.0])Glenn.calculate_properties(model::GlennJL,T,z = [1.0])Glenn.calculate_properties_range(model::GlennJL,T,z = [1.0])(Glenn.jl0.5 or later)Glenn.get_properties_range(model::GlennJL,T,z = [1.0])(theGlenn.jl0.4 name, deprecated inGlenn.jl0.5)
calculate_properties will return NaN for properties outside their ranges. in particular, calculate_properties_range (and its deprecated get_properties_range alias) will return a vector of the same size as the input, with NaN on invalid inputs.
References
- NASA TP-2002-211556, “NASA Glenn Coefficients for Calculating Thermodynamic Properties of Individual Species,” by B.J. McBride, M.J. Zehe, and S. Gordon. September 2002.
Joback GC Utilities
Clapeyron.JobackGC — Module
JobackGCModule containing group contribution calculations using the joback method. The available functions are:
JobackGC.T_c(model::JobackModel): critical temperature (in[K])JobackGC.P_c(model::JobackModel): critical pressure (in[Pa])JobackGC.V_c(model::JobackModel): critical volume (in[m³·mol⁻¹])JobackGC.T_b(model::JobackModel): normal boiling point (in[K])JobackGC.H_form(model::JobackModel): enthalpy of formation at 298 K, ideal gas (in[J·mol⁻¹])JobackGC.G_form(model::JobackModel): Gibbs energy of formation at 298 K, ideal gas (in[J·mol⁻¹])JobackGC.S_form(model::JobackModel): entropy of formation at 298 K, ideal gas (in[J·mol⁻¹·K⁻¹])JobackGC.H_fusion(model::JobackModel): enthalpy of fusion (in[J·mol⁻¹], at 1 atm)JobackGC.H_vap(model::JobackModel): molar enthalpy of vaporization (in[J·mol⁻¹], at normal boiling point)JobackGC.C_p(model::JobackModel, T): ideal gas isobaric heat capacity (in[J·mol⁻¹·K⁻¹])JobackGC.Visc(model::JobackModel, T): liquid dynamic viscocity (in[Pa·s])