From 5611a70b0dad3d954dfa38493e490632565066c1 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 23 Jan 2025 21:51:57 +0000 Subject: [PATCH] build based on 2044cae --- dev/.documenter-siteinfo.json | 2 +- dev/api/association/index.html | 12 +- dev/api/estimation/index.html | 10 +- dev/api/macros/index.html | 6 +- dev/api/parameters/index.html | 36 +++--- dev/dev/index.html | 2 +- dev/eos/activity/index.html | 30 ++--- dev/eos/correlations/index.html | 22 ++-- dev/eos/cubic/index.html | 118 +++++++++--------- dev/eos/electrolytes/index.html | 30 ++--- dev/eos/empiric/index.html | 42 +++---- dev/eos/ideal/index.html | 16 +-- dev/eos/misc/index.html | 18 +-- dev/eos/saft/index.html | 58 ++++----- dev/faq/index.html | 2 +- dev/index.html | 2 +- dev/installation/index.html | 2 +- dev/notebook_examples/index.html | 2 +- dev/properties/basic/index.html | 14 +-- dev/properties/bulk/index.html | 24 ++-- dev/properties/electrolytes/index.html | 8 +- dev/properties/multi/index.html | 10 +- dev/properties/single/index.html | 14 +-- dev/theory/background/index.html | 2 +- dev/to-do_list/index.html | 2 +- .../basics_model_construction/index.html | 2 +- .../binary_phase_diagrams/index.html | 2 +- dev/tutorials/bulk_properties/index.html | 2 +- dev/tutorials/extensions_coolprop/index.html | 2 +- dev/tutorials/mixing_functions/index.html | 2 +- .../pure_saturation_curves/index.html | 2 +- dev/tutorials/sle_phase_diagrams/index.html | 2 +- .../ternary_phase_diagrams/index.html | 2 +- dev/tutorials/tp_flash/index.html | 2 +- .../user_defined_parameters/index.html | 2 +- dev/user_guide/basic_usage/index.html | 2 +- dev/user_guide/custom_dtb/index.html | 2 +- dev/user_guide/custom_methods/index.html | 2 +- dev/user_guide/custom_model/index.html | 2 +- 39 files changed, 256 insertions(+), 256 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 7a6d1d282..af29db751 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-22T19:24:52","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-23T21:51:47","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/api/association/index.html b/dev/api/association/index.html index 29c230597..7541e8efa 100644 --- a/dev/api/association/index.html +++ b/dev/api/association/index.html @@ -52,7 +52,7 @@ julia> assoc1.values[1] = 100; (vals,assoc1.values[1]) ([3.0], 100.0) julia> assoc2.values[1] = 100; (vals,assoc2.values[1]) -([100.0], 100.0)source
Clapeyron.assoc_pair_lengthFunction
assoc_pair_length(model::EoSModel)

Indicates the number of pair combinations between the different sites in an association model. By default uses length(assoc_shape(model).values)

Example:

julia> model = PCSAFT(["water"])
+([100.0], 100.0)
source
Clapeyron.assoc_pair_lengthFunction
assoc_pair_length(model::EoSModel)

Indicates the number of pair combinations between the different sites in an association model. By default uses length(assoc_shape(model).values)

Example:

julia> model = PCSAFT(["water"])
 PCSAFT{BasicIdeal} with 1 component:
  "water"
 Contains parameters: Mw, segment, sigma, epsilon, epsilon_assoc, bondvol
@@ -62,9 +62,9 @@
 ("water", "e") >=< ("water", "H"): 0.034868
 
 julia> Clapeyron.assoc_pair_length(model)
-1
source
Clapeyron.assoc_similarFunction
assoc_similar(mat::Compressed4DMatrix)
-assoc_similar(mat::Compressed4DMatrix,::Type{𝕋}) where 𝕋 <:Number)

returns a Clapeyron.Compressed4DMatrix of the same shape as the input, with the same element type as 𝕋

source
assoc_similar(param::SiteParam)
-assoc_similar(param::SiteParam,::Type{𝕋}) where 𝕋 <:Number)

returns a Clapeyron.Compressed4DMatrix with the smae number of components as the input AssocParam, with the same element type as 𝕋. All site combinations are filled.

source
Clapeyron.assoc_optionsFunction
assoc_options(model::EoSModel)

Returns association options used in the association solver.

source
Clapeyron.assoc_strengthFunction
assoc_strength(model::EoSModel,V,T,z,i,j,a,b,data = Clapeyron.data(Model,V,T,z))
+1
source
Clapeyron.assoc_similarFunction
assoc_similar(mat::Compressed4DMatrix)
+assoc_similar(mat::Compressed4DMatrix,::Type{𝕋}) where 𝕋 <:Number)

returns a Clapeyron.Compressed4DMatrix of the same shape as the input, with the same element type as 𝕋

source
assoc_similar(param::SiteParam)
+assoc_similar(param::SiteParam,::Type{𝕋}) where 𝕋 <:Number)

returns a Clapeyron.Compressed4DMatrix with the smae number of components as the input AssocParam, with the same element type as 𝕋. All site combinations are filled.

source
Clapeyron.assoc_optionsFunction
assoc_options(model::EoSModel)

Returns association options used in the association solver.

source
Clapeyron.assoc_strengthFunction
assoc_strength(model::EoSModel,V,T,z,i,j,a,b,data = Clapeyron.data(Model,V,T,z))
 Δ(model::EoSModel,V,T,z,i,j,a,b,data = Clapeyron.data(Model,V,T,z))

Calculates the asssociation strength between component i at site a and component j at site b.

Any precomputed values can be passed along by calling Clapeyron.data.

Example

julia> model = PCSAFT(["water"])
 PCSAFT{BasicIdeal} with 1 component:
  "water"
@@ -82,7 +82,7 @@
 ([2.991688553098391e-10], 1.3440137996322956e28, 4.020870699566213e18, 1.2029192845380957e9, 0.3598759853853927, 1.0656)
 
 julia> Clapeyron.Δ(model,2.5e-5,298.15,[1.0],1,1,1,2,_data)
-1.293144062056963e-26
source
Clapeyron.assoc_fractionsFunction
assoc_fractions(model::EoSModel, V, T, z,data = nothing)

Returns the solution for the association site fractions. used internally by all models that require association. The result is of type PackedVectorsOfVectors.PackedVectorOfVectors, with length = length(model), and x[i][a] representing the empty fraction of the site a at component i

Example:

julia> model = PCSAFT(["water","methanol","ethane"],assoc_options = AssocOptions(combining = :esd))
+1.293144062056963e-26
source
Clapeyron.assoc_fractionsFunction
assoc_fractions(model::EoSModel, V, T, z,data = nothing)

Returns the solution for the association site fractions. used internally by all models that require association. The result is of type PackedVectorsOfVectors.PackedVectorOfVectors, with length = length(model), and x[i][a] representing the empty fraction of the site a at component i

Example:

julia> model = PCSAFT(["water","methanol","ethane"],assoc_options = AssocOptions(combining = :esd))
 PCSAFT{BasicIdeal} with 3 components:
  "water"
  "methanol"
@@ -93,4 +93,4 @@
 3-element pack(::Vector{Vector{Float64}}):
  [0.041396427041509046, 0.041396427041509046]
  [0.018874664357682362, 0.018874664357682362]
- 0-element view(::Vector{Float64}, 5:4) with eltype Float64
source
+ 0-element view(::Vector{Float64}, 5:4) with eltype Float64source diff --git a/dev/api/estimation/index.html b/dev/api/estimation/index.html index a24a881d7..85704e9af 100644 --- a/dev/api/estimation/index.html +++ b/dev/api/estimation/index.html @@ -1,7 +1,7 @@ Parameter Estimation · Clapeyron.jl

Contents

Index

Estimation Tools

Clapeyron.ToEstimateType
ToEstimate
-ToEstimate(params_dict)

Input parameters: A dictionary with the following potential entries

  • params: The name of the parameter being fitted (Symbol)
  • indices: The index of the parameter being fitted (Integer or Tuple{Integer,Integer})
  • factor: Factor to multiply parameter being fitted to have it in the correct units (Float64)
  • symmetric: For PairParam, if the parameter is symmetric or asymmetric (Bool)
  • cross_assoc: For AssocParam, if the parameter is for cross-association (Bool)
  • recombine: For PairParam, if the combining rules must be applied for unlike interactions (Bool)
  • lower: Lower bound for the parameter (Float64)
  • upper: Upper bound for the parameter (Float64)
  • guess: Initial guess for the parameter (Float64)

Output:

A ToEstimate struct

Description

Turns the input parameter dictionary into a ToEstimate struct to be used within the parameter estimation.

source
Clapeyron.EstimationType
Estimation
-Estimation(model,toestimate,filepaths,ignorefield,objective_form)

Input parameters:

  • model: The initial model containing the species we wish to parameterise
  • toestimate: The dictionary of parameters being fitted
  • filepaths or filepaths_weights: The location of the data files used to fit. Can also contain the weights of each dataset
  • ignorefield: Specify which EoSModel fields to ignore in the main model
  • objective_form: Specify the functional form of the objective function in the form objective_form(pred,exp)

Output:

Estimator object which contains the following:

  • model: The model whose parameters will be varied
  • initial_model: The initial model before parameterisation
  • toestimate: ToEstimate struct which contains all the information on the parameters
  • data: Vector of EstimationData structs where all the information on the data is stored
  • ignorefield: Vector of fields to ignore in the parameter estimation
  • objective_form: Function to evaluate the error measure for the objective function

The following objects are also output:

  • objective: The objective function which is used to fit the parameters
  • x0: Initial guesses for the parameters
  • upper: Upper bounds for the parameters
  • lower: Lower bounds for the parameters

Description

Produces the estimator and other useful objects used within parameter estimation

source
Clapeyron.EstimationDataType
EstimationData
-EstimationData(filepaths)

Input parameters:

  • filepaths or filepaths_weights: The filepath of the data used in parameter estimation. Optionally, a tuple containing the weights of each dataset.

Output:

An EstimationData struct with the following fields:

  • method: The property estimation method which is used to obtain predictions for a given input
  • inputs_name: The variable names for the inputs
  • outputs_name: The variable names for the outputs
  • inputs: Vector for each input
  • outputs: Vector for each output
  • weights: The weight for this particular dataset

Description

For a given input data set, produce an EstimationData struct.

source
Clapeyron.return_modelFunction
return_model
-return_model(estimation,model,params)

Input parameters:

  • estimation: The estimator object
  • model: The model whose parameters we are varying
  • params: The new parameters which we want to change

Output:

  • model: The new model with the updated parameters

Description

Based on the parameters provided and the estimator, a new model is produced from the input.

source
Clapeyron.objective_functionFunction
objective_function
-objective_function(estimation,params)

Input parameters:

  • estimation: The estimator object
  • params: The new parameters which we want to evaluate the objective function for

Output: The relate root mean square error given the data and parameters provided

Description

The objective function used within parameter estimation.

source
+ToEstimate(params_dict)

Input parameters: A dictionary with the following potential entries

Output:

A ToEstimate struct

Description

Turns the input parameter dictionary into a ToEstimate struct to be used within the parameter estimation.

source
Clapeyron.EstimationType
Estimation
+Estimation(model,toestimate,filepaths,ignorefield,objective_form)

Input parameters:

  • model: The initial model containing the species we wish to parameterise
  • toestimate: The dictionary of parameters being fitted
  • filepaths or filepaths_weights: The location of the data files used to fit. Can also contain the weights of each dataset
  • ignorefield: Specify which EoSModel fields to ignore in the main model
  • objective_form: Specify the functional form of the objective function in the form objective_form(pred,exp)

Output:

Estimator object which contains the following:

  • model: The model whose parameters will be varied
  • initial_model: The initial model before parameterisation
  • toestimate: ToEstimate struct which contains all the information on the parameters
  • data: Vector of EstimationData structs where all the information on the data is stored
  • ignorefield: Vector of fields to ignore in the parameter estimation
  • objective_form: Function to evaluate the error measure for the objective function

The following objects are also output:

  • objective: The objective function which is used to fit the parameters
  • x0: Initial guesses for the parameters
  • upper: Upper bounds for the parameters
  • lower: Lower bounds for the parameters

Description

Produces the estimator and other useful objects used within parameter estimation

source
Clapeyron.EstimationDataType
EstimationData
+EstimationData(filepaths)

Input parameters:

  • filepaths or filepaths_weights: The filepath of the data used in parameter estimation. Optionally, a tuple containing the weights of each dataset.

Output:

An EstimationData struct with the following fields:

  • method: The property estimation method which is used to obtain predictions for a given input
  • inputs_name: The variable names for the inputs
  • outputs_name: The variable names for the outputs
  • inputs: Vector for each input
  • outputs: Vector for each output
  • weights: The weight for this particular dataset

Description

For a given input data set, produce an EstimationData struct.

source
Clapeyron.return_modelFunction
return_model
+return_model(estimation,model,params)

Input parameters:

  • estimation: The estimator object
  • model: The model whose parameters we are varying
  • params: The new parameters which we want to change

Output:

  • model: The new model with the updated parameters

Description

Based on the parameters provided and the estimator, a new model is produced from the input.

source
Clapeyron.objective_functionFunction
objective_function
+objective_function(estimation,params)

Input parameters:

  • estimation: The estimator object
  • params: The new parameters which we want to evaluate the objective function for

Output: The relate root mean square error given the data and parameters provided

Description

The objective function used within parameter estimation.

source
diff --git a/dev/api/macros/index.html b/dev/api/macros/index.html index eea00b15e..fe76107b9 100644 --- a/dev/api/macros/index.html +++ b/dev/api/macros/index.html @@ -1,5 +1,5 @@ -Macros · Clapeyron.jl

Contents

Index

Model Macros

Clapeyron.@newmodelgcMacro
@newmodelgc modelname parent paramstype [sitemodel = true, use_struct_param = false]

This is a data type that contains all the information needed to use an EoS model. It also functions as an identifier to ensure that the right functions are called.

You can pass an optional 4th Bool argument indicating if you want to use sites with this model or not. defaults to true

You can also pass another optional 5th Bool argument indicating if a second order GroupParam (StructGroupParam) is used or not. defaults to false

= Fields = The Struct consists of the following fields:

  • components: a string lists of components
  • groups: a GroupParam
  • sites: a SiteParam (optional)
  • params: the Struct paramstype that contains all parameters in the model
  • idealmodel: the IdealModel struct that determines which ideal model to use
  • assoc_options: struct containing options for the association solver. see AssocOptions
  • references: reference for this EoS

See the tutorial or browse the implementations to see how this is used.

source
Clapeyron.@newmodelMacro
@newmodel name parent paramstype [sitemodel = true]

This is exactly the same as the above but for non-GC models. All group parameters are absent in this struct. The sites are associated to the main component rather than the groups, and the respective fieldnames are named correspondingly.

You can pass an optional bool indicating if you want to use sites with this model or not. defaults to true

Example

struct MySAFTParam
+Macros · Clapeyron.jl

Contents

Index

Model Macros

Clapeyron.@newmodelgcMacro
@newmodelgc modelname parent paramstype [sitemodel = true, use_struct_param = false]

This is a data type that contains all the information needed to use an EoS model. It also functions as an identifier to ensure that the right functions are called.

You can pass an optional 4th Bool argument indicating if you want to use sites with this model or not. defaults to true

You can also pass another optional 5th Bool argument indicating if a second order GroupParam (StructGroupParam) is used or not. defaults to false

= Fields = The Struct consists of the following fields:

  • components: a string lists of components
  • groups: a GroupParam
  • sites: a SiteParam (optional)
  • params: the Struct paramstype that contains all parameters in the model
  • idealmodel: the IdealModel struct that determines which ideal model to use
  • assoc_options: struct containing options for the association solver. see AssocOptions
  • references: reference for this EoS

See the tutorial or browse the implementations to see how this is used.

source
Clapeyron.@newmodelMacro
@newmodel name parent paramstype [sitemodel = true]

This is exactly the same as the above but for non-GC models. All group parameters are absent in this struct. The sites are associated to the main component rather than the groups, and the respective fieldnames are named correspondingly.

You can pass an optional bool indicating if you want to use sites with this model or not. defaults to true

Example

struct MySAFTParam
     a::SingleParam{Float64}
     b::SingleParam{Float64}
     epsilon_assoc::AssocParam{Float64}
@@ -13,7 +13,7 @@
     b::SingleParam{Float64}
 end
 
-@newmodel MyModel EoSModel MyModelParam false #defines a model without sites
source
Clapeyron.@newmodelsimpleMacro
@newmodelsimple name parent paramstype

Even simpler model, primarily for the ideal models. Contains neither sites nor ideal models.

source
Clapeyron.@newmodelsingletonMacro
@newmodelsingleton name parent

A macro that defines an EoSModel without any fields ("singleton" struct.). useful for defining EoS that don't use any parameters, while being composable with other EoSModels.

source
Clapeyron.@registermodelMacro
@registermodel(model)

given an existing model, composed of Clapeyron EoS models, ClapeyronParams or EoSParams, it will generate the necessary traits to make the model compatible with Clapeyron routines.

Info

This macro is a no-op from Clapeyron 0.5 onwards.

source

Functions used by the Model Macros

Clapeyron.default_referencesFunction
default_references(::Type{<:EoSModel})::Vector{String}

Return the default references of a model. If you are using the @newmodel, @newmodelsimple or @newmodelgc macros, define this function to set the references for the defined EoS.

source
Clapeyron.default_locationsFunction
default_locations(::Type{T}) where T <: EoSModel

Used for models defined via the @newmodel, @newmodelsimple or @newmodelgc macros.

Defines the default locations used for parsing the parameters for the input EoSModel type, relative to the database location.

source
Clapeyron.default_gclocationsFunction
default_gclocations(::Type{T}) where T <: EoSModel

Used for models defined via the @newmodel, @newmodelsimple or @newmodelgc macros.

Defines the default locations used for parsing groups for the input EoSModel type, relative to the database location.

source
Clapeyron.default_getparams_argumentsFunction
default_getparams_arguments(::Type{T},userlocations,verbose) where T <: EoSModel

Used for models defined via the @newmodel, @newmodelsimple or @newmodelgc macros.

Defines the ParamsOptions object that is passed as arguments to getparams, when building the input EoSModel.

source
Clapeyron.transform_paramsFunction
transform_params(::Type{T},params) where T <: EoSModel
+@newmodel MyModel EoSModel MyModelParam false #defines a model without sites
source
Clapeyron.@newmodelsimpleMacro
@newmodelsimple name parent paramstype

Even simpler model, primarily for the ideal models. Contains neither sites nor ideal models.

source
Clapeyron.@newmodelsingletonMacro
@newmodelsingleton name parent

A macro that defines an EoSModel without any fields ("singleton" struct.). useful for defining EoS that don't use any parameters, while being composable with other EoSModels.

source
Clapeyron.@registermodelMacro
@registermodel(model)

given an existing model, composed of Clapeyron EoS models, ClapeyronParams or EoSParams, it will generate the necessary traits to make the model compatible with Clapeyron routines.

Info

This macro is a no-op from Clapeyron 0.5 onwards.

source

Functions used by the Model Macros

Clapeyron.default_referencesFunction
default_references(::Type{<:EoSModel})::Vector{String}

Return the default references of a model. If you are using the @newmodel, @newmodelsimple or @newmodelgc macros, define this function to set the references for the defined EoS.

source
Clapeyron.default_locationsFunction
default_locations(::Type{T}) where T <: EoSModel

Used for models defined via the @newmodel, @newmodelsimple or @newmodelgc macros.

Defines the default locations used for parsing the parameters for the input EoSModel type, relative to the database location.

source
Clapeyron.default_gclocationsFunction
default_gclocations(::Type{T}) where T <: EoSModel

Used for models defined via the @newmodel, @newmodelsimple or @newmodelgc macros.

Defines the default locations used for parsing groups for the input EoSModel type, relative to the database location.

source
Clapeyron.default_getparams_argumentsFunction
default_getparams_arguments(::Type{T},userlocations,verbose) where T <: EoSModel

Used for models defined via the @newmodel, @newmodelsimple or @newmodelgc macros.

Defines the ParamsOptions object that is passed as arguments to getparams, when building the input EoSModel.

source
Clapeyron.transform_paramsFunction
transform_params(::Type{T},params) where T <: EoSModel
 transform_params(::Type{T},params,components_or_groups) where T <: EoSModel
 transform_params(::Type{T},params,components_or_groups,verbose) where T <: EoSModel

Used for models defined via the @newmodel, @newmodelsimple or @newmodelgc macros.

Given a collection of params, with (keytype(params)) isa String, returns a modified collection with all the parameters necessary to build the params field contained in the EoSModel.

You can overload the 2, 3 or 4-argument version, depending on the need of a components vector (or GroupParam in a GC model), or if you want to customize the verbose message.

Example

For the PC-SAFT equation of state, we perform Lorentz-Berthelot mixing of epsilon and sigma, and we scale the sigma parameters:

function transform_params(::Type{PCSAFT},params)
     segment = params["segment"]
@@ -24,4 +24,4 @@
         params["sigma"] = sigma
         params["epsilon"] = epsilon
         return params
-    end
source

Utility Macros

Clapeyron.@compsMacro
@comps

This macro is an alias to 1:length(model) The caveat is that model has to exist in the local namespace. model is expected to any struct that has length defined in terms of the amount of components.

source
Clapeyron.@groupsMacro
@groups

This macro is an alias to

1:length(model.groups.flattenedgroups)
source
@groups(component)

This macro is an alias to

model.groups.i_groups[component]

i_groups[component] is an iterator that goes through all groups in relevent to a given component.

source
Clapeyron.@sitesMacro
@sites(component)

This macro is an alias to

model.sites.i_sites[component]

i_sites[component] is an iterator that goes through all sites relevant to each group in a GC model, and to each main component in a non-GC model.

source
Clapeyron.@fMacro
@f(func,a,b,c,...)

This macro is an alias to

func(model, V, T, z, a, b, c, ...)

where func is the name of the function, model is the model struct, V is the volume, T is the absolute temperature, z is an array of number of moles of each component, and a, b, c, ... are arbitrary parameters that get passed to func.

It is very common for functions that are involved in the models to contain the model, V, T and z parameters, so this macro helps reduce code repetition as long as the first four parameters in the function are written exactly as above.

source
Clapeyron.@nanMacro
@nan(function_call,default=NaN)

Wraps the function in a try-catch block, and if a DomainError or DivideError is raised, then returns default. for better results, its best to generate the default result beforehand

source
+ end
source

Utility Macros

Clapeyron.@compsMacro
@comps

This macro is an alias to 1:length(model) The caveat is that model has to exist in the local namespace. model is expected to any struct that has length defined in terms of the amount of components.

source
Clapeyron.@groupsMacro
@groups

This macro is an alias to

1:length(model.groups.flattenedgroups)
source
@groups(component)

This macro is an alias to

model.groups.i_groups[component]

i_groups[component] is an iterator that goes through all groups in relevent to a given component.

source
Clapeyron.@sitesMacro
@sites(component)

This macro is an alias to

model.sites.i_sites[component]

i_sites[component] is an iterator that goes through all sites relevant to each group in a GC model, and to each main component in a non-GC model.

source
Clapeyron.@fMacro
@f(func,a,b,c,...)

This macro is an alias to

func(model, V, T, z, a, b, c, ...)

where func is the name of the function, model is the model struct, V is the volume, T is the absolute temperature, z is an array of number of moles of each component, and a, b, c, ... are arbitrary parameters that get passed to func.

It is very common for functions that are involved in the models to contain the model, V, T and z parameters, so this macro helps reduce code repetition as long as the first four parameters in the function are written exactly as above.

source
Clapeyron.@nanMacro
@nan(function_call,default=NaN)

Wraps the function in a try-catch block, and if a DomainError or DivideError is raised, then returns default. for better results, its best to generate the default result beforehand

source
diff --git a/dev/api/parameters/index.html b/dev/api/parameters/index.html index fc1cbf00f..ea82ae2c3 100644 --- a/dev/api/parameters/index.html +++ b/dev/api/parameters/index.html @@ -1,5 +1,5 @@ -Parameters · Clapeyron.jl

Contents

Index

Parsing Parameters from Files

Clapeyron.ParamOptionsType
ParamOptions(;kwargs...)

Struct containing all the options related to parameter parsing:

  • userlocations = String[]: List of used-defined locations to search.
  • group_userlocations = String[]: List of used-defined group locations to search.
  • asymmetricparams::Vector{String} = String[]: List of pair parameters that follow that param[i,j] ≠ param[j,i]. if not set on asymmetric pairs, the asymmetric values will be overwritten!
  • ignore_headers::Vector{String} = ["dipprnumber", "smiles"]: List of ignored headers.
  • ignore_missing_singleparams::Vector{String} = String[]: List of parameters where checking for missing parameter values (in SingleParam) or the diagonal (on PairParam) are ignored.
  • verbose::Bool = false: If true, show all operations done by getparams displayed in the terminal. this includes the warnings emmited by CSV.jl
  • species_columnreference::String ="species": column name to check for components. in pair and association params, it will check for #species#1 and #species#2, where #species# is the value of this option.
  • site_columnreference::String ="site": column name to check for sites in association params, it will check for #site#1 and #site#2, where #site# is the value of this option.
  • normalisecomponents::Bool = true: If true, performs normalization of strings, on the CSV and input components
  • n_sites_columns::Dict{String,String} = Dict( "e" => "n_e","e1" => "n_e1","e2" => "n_e2","H" => "n_H"): dictionary to look number of sites. the number of sites is stored as columns in a single parameter csv file. for example, the number of sites of name e will be looked on the column n_e
  • return_sites::Bool = true: If set to false, association params will be ignored and sites will not be created, even if they exist in the list of locations.
  • component_delimiter::String = "~|~": When there are multiple component names to match, seperate them by this delimiter.
source
Clapeyron.getparamsFunction
params, sites = getparams(components,locations;kwargs...)

returns a Dict{String,ClapeyronParam} containing all the parameters found for the list of components in the available CSVs. locations are the locations relative to Clapeyron database. the available keywords are the ones used ∈ ParamOptions if return_sites is set to false, getparams will only return the found params.

Single to Pair promotion

When reading multiple CSVs, if a parameter name appears in a single paramter file and in a pair parameter file, the single parameter values will be promoted to be the diagonal values of the pair interaction matrix:

my_parameter_single.csv

Clapeyron Database File
+Parameters · Clapeyron.jl

Contents

Index

Parsing Parameters from Files

Clapeyron.ParamOptionsType
ParamOptions(;kwargs...)

Struct containing all the options related to parameter parsing:

  • userlocations = String[]: List of used-defined locations to search.
  • group_userlocations = String[]: List of used-defined group locations to search.
  • asymmetricparams::Vector{String} = String[]: List of pair parameters that follow that param[i,j] ≠ param[j,i]. if not set on asymmetric pairs, the asymmetric values will be overwritten!
  • ignore_headers::Vector{String} = ["dipprnumber", "smiles"]: List of ignored headers.
  • ignore_missing_singleparams::Vector{String} = String[]: List of parameters where checking for missing parameter values (in SingleParam) or the diagonal (on PairParam) are ignored.
  • verbose::Bool = false: If true, show all operations done by getparams displayed in the terminal. this includes the warnings emmited by CSV.jl
  • species_columnreference::String ="species": column name to check for components. in pair and association params, it will check for #species#1 and #species#2, where #species# is the value of this option.
  • site_columnreference::String ="site": column name to check for sites in association params, it will check for #site#1 and #site#2, where #site# is the value of this option.
  • normalisecomponents::Bool = true: If true, performs normalization of strings, on the CSV and input components
  • n_sites_columns::Dict{String,String} = Dict( "e" => "n_e","e1" => "n_e1","e2" => "n_e2","H" => "n_H"): dictionary to look number of sites. the number of sites is stored as columns in a single parameter csv file. for example, the number of sites of name e will be looked on the column n_e
  • return_sites::Bool = true: If set to false, association params will be ignored and sites will not be created, even if they exist in the list of locations.
  • component_delimiter::String = "~|~": When there are multiple component names to match, seperate them by this delimiter.
source
Clapeyron.getparamsFunction
params, sites = getparams(components,locations;kwargs...)

returns a Dict{String,ClapeyronParam} containing all the parameters found for the list of components in the available CSVs. locations are the locations relative to Clapeyron database. the available keywords are the ones used ∈ ParamOptions if return_sites is set to false, getparams will only return the found params.

Single to Pair promotion

When reading multiple CSVs, if a parameter name appears in a single paramter file and in a pair parameter file, the single parameter values will be promoted to be the diagonal values of the pair interaction matrix:

my_parameter_single.csv

Clapeyron Database File
 like parameters
 species,a
 sp1,1000
@@ -84,7 +84,7 @@
        """

If we pass the same parameters, with different group types, the parser will fail

julia> Clapeyron.getparams(["sp1","sp2"],userlocations = [x1,x2])
 ERROR: cannot join two databases with different group types:
 current group type: param1
-incoming group type: fitted

Note, that the parser will not fail if you pass different parameters with different group types (For example if a has param1 group type and b has fit group type)

source

Creating Files from Parameters

Clapeyron.ParamTableFunction
ParamTable(type::Symbol,table;
+incoming group type: fitted

Note, that the parser will not fail if you pass different parameters with different group types (For example if a has param1 group type and b has fit group type)

source

Creating Files from Parameters

Clapeyron.ParamTableFunction
ParamTable(type::Symbol,table;
 location = nothing,
 name = nothing,
 grouptype = :unknown,
@@ -101,7 +101,7 @@
 julia> model.params.Mw
 SingleParam{Float64}("Mw") with 2 components:
  "water" => 18.9
- "methanol" => 32.042
source
Clapeyron.cleartemp!Function
cleartemp!()

Deletes all files in the temporary Clapeyron scratch space, used to store the csvs created by ParamTable.

source

Parameter types

Clapeyron.SingleParamType
SingleParam{T}

Struct designed to contain single parameters. Basically a vector with some extra info.

Creation:

julia> mw = SingleParam("molecular weight",["water","ammonia"],[18.01,17.03])
+ "methanol" => 32.042
source
Clapeyron.cleartemp!Function
cleartemp!()

Deletes all files in the temporary Clapeyron scratch space, used to store the csvs created by ParamTable.

source

Parameter types

Clapeyron.SingleParamType
SingleParam{T}

Struct designed to contain single parameters. Basically a vector with some extra info.

Creation:

julia> mw = SingleParam("molecular weight",["water","ammonia"],[18.01,17.03])
 SingleParam{Float64}("molecular weight") with 2 components:
  "water" => 18.01
  "ammonia" => 17.03
@@ -127,7 +127,7 @@
         res += molar_frac[i]*mw[i]
     end
     return res
-end
source
Clapeyron.PairParamType
PairParam{T}

Struct designed to contain pair data. used a matrix as underlying data storage.

Creation:

julia> kij = PairParam("interaction params",["water","ammonia"],[0.1 0.0;0.1 0.0])
+end
source
Clapeyron.PairParamType
PairParam{T}

Struct designed to contain pair data. used a matrix as underlying data storage.

Creation:

julia> kij = PairParam("interaction params",["water","ammonia"],[0.1 0.0;0.1 0.0])
 PairParam{Float64}(["water", "ammonia"]) with values:
 2×2 Matrix{Float64}:
  0.1  0.0
@@ -152,7 +152,7 @@
         end
     end
     return res
-end
source
Clapeyron.GroupParamType
GroupParam

Struct holding group parameters.contains:

  • components: a list of all components
  • groups: a list of groups names for each component
  • grouptype: used to differenciate between different group models.
  • i_groups: a list containing the number of groups for each component
  • n_groups: a list of the group multiplicity of each group corresponding to each group in i_groups
  • n_intragroups: a list containining the connectivity graph (as a matrix) between each group for each component.
  • flattenedgroups: a list of all unique groups–the parameters correspond to this list
  • n_flattenedgroups: the group multiplicities corresponding to each group in flattenedgroups

You can create a group param by passing a `Vector{Tuple{String, Vector{Pair{String, Int64}}}}. For example:

julia> grouplist = [
+end
source
Clapeyron.GroupParamType
GroupParam

Struct holding group parameters.contains:

  • components: a list of all components
  • groups: a list of groups names for each component
  • grouptype: used to differenciate between different group models.
  • i_groups: a list containing the number of groups for each component
  • n_groups: a list of the group multiplicity of each group corresponding to each group in i_groups
  • n_intragroups: a list containining the connectivity graph (as a matrix) between each group for each component.
  • flattenedgroups: a list of all unique groups–the parameters correspond to this list
  • n_flattenedgroups: the group multiplicities corresponding to each group in flattenedgroups

You can create a group param by passing a `Vector{Tuple{String, Vector{Pair{String, Int64}}}}. For example:

julia> grouplist = [
            ("ethanol", ["CH3"=>1, "CH2"=>1, "OH"=>1]),
            ("nonadecanol", ["CH3"=>1, "CH2"=>18, "OH"=>1]),
            ("ibuprofen", ["CH3"=>3, "COOH"=>1, "aCCH"=>1, "aCCH2"=>1, "aCH"=>4])];
@@ -192,7 +192,7 @@
            GroupParam with 3 components:
             "ethanol": "CH2OH" => 1, "CH3" => 1
             "nonadecanol": "CH3" => 1, "CH2" => 18, "OH" => 1
-            "ibuprofen": "CH3" => 3, "COOH" => 1, "aCCH" => 1, "aCCH2" => 1, "aCH" => 4

In this case, SAFTGammaMie files support the second order group CH2OH.

source
Clapeyron.SiteParamType
SiteParam

Struct holding site parameters. Is built by parsing all association parameters in the input CSV files. It has the following fields:

  • components: a list of all components (or groups in Group Contribution models)
  • sites: a list containing a list of all sites corresponding to each component (or group) in the components field
  • n_sites: a list of the site multiplicities corresponding to each site in flattenedsites
  • flattenedsites: a list of all unique sites
  • i_sites: an iterator that goes through the indices corresponding to each site in flattenedsites
  • n_flattenedsites: the site multiplicities corresponding to each site in flattenedsites
  • i_flattenedsites: an iterator that goes through the indices for each flattened site

Let's explore the sites in a 3-component SAFTGammaMie model:

julia> model3 = SAFTgammaMie([    
+            "ibuprofen": "CH3" => 3, "COOH" => 1, "aCCH" => 1, "aCCH2" => 1, "aCH" => 4

In this case, SAFTGammaMie files support the second order group CH2OH.

source
Clapeyron.SiteParamType
SiteParam

Struct holding site parameters. Is built by parsing all association parameters in the input CSV files. It has the following fields:

  • components: a list of all components (or groups in Group Contribution models)
  • sites: a list containing a list of all sites corresponding to each component (or group) in the components field
  • n_sites: a list of the site multiplicities corresponding to each site in flattenedsites
  • flattenedsites: a list of all unique sites
  • i_sites: an iterator that goes through the indices corresponding to each site in flattenedsites
  • n_flattenedsites: the site multiplicities corresponding to each site in flattenedsites
  • i_flattenedsites: an iterator that goes through the indices for each flattened site

Let's explore the sites in a 3-component SAFTGammaMie model:

julia> model3 = SAFTgammaMie([    
                 "ethanol",
                 ("nonadecanol", ["CH3"=>1, "CH2"=>18, "OH"=>1]),     
                 ("ibuprofen", ["CH3"=>3, "COOH"=>1, "aCCH"=>1, "aCCH2"=>1, "aCH"=>4])
@@ -236,28 +236,28 @@
  [2, 1, 2]
  []
  []
- []
source
Clapeyron.AssocOptionsType
AssocOptions(;rtol = 1e-12,atol = 1e-12,max_iters = 1000,dampingfactor = 0.5,combining =:nocombining)

Struct containing iteration parameters for the solver of association sites. the combining option controls the type of combining rule applied to the association strength:

  • nocombining (default). Does not perform any combination rules.
  • :cr1: "combining rule - 1": ε[i,j][a,b] = (ε[i,i][a,b] + ε[j,j][a,b])/2 β[i,j][a,b] = √(β[i,i][a,b] * β[j,j][a,b])
  • :esd,:elliott: Elliott–Suresh–Donohue combining rule: ε[i,j][a,b] = (ε[i,i][a,b] + ε[j,j][a,b])/2 β[i,j][a,b] = √(β[i,i][a,b] * β[j,j][a,b]) * (σ[i]*σ[j]/σ[i,j])^3
  • :esd_runtime,:elliott_runtime: combining rule, performed at runtime: Δ[i,j][a,b] = √(Δ[i,i][a,b] * Δ[j,j][a,b])
  • :dufal,mie15: combining rule used for SAFTVRMie15 ε[i,j][a,b] = (ε[i,i][a,b] + ε[j,j][a,b])/2 β[i,j][a,b] = (∛β[i,i][a,b] + ∛β[j,j][a,b])^3 / 8
Association Scheme matters

all combining rules implicitly requires that both Δ(i,i,a,b) and Δ(j,j,a,b) are non-zero, that means that components that don't self associate will not be combined.

source

Combining Rules

Clapeyron.AssocOptionsType
AssocOptions(;rtol = 1e-12,atol = 1e-12,max_iters = 1000,dampingfactor = 0.5,combining =:nocombining)

Struct containing iteration parameters for the solver of association sites. the combining option controls the type of combining rule applied to the association strength:

  • nocombining (default). Does not perform any combination rules.
  • :cr1: "combining rule - 1": ε[i,j][a,b] = (ε[i,i][a,b] + ε[j,j][a,b])/2 β[i,j][a,b] = √(β[i,i][a,b] * β[j,j][a,b])
  • :esd,:elliott: Elliott–Suresh–Donohue combining rule: ε[i,j][a,b] = (ε[i,i][a,b] + ε[j,j][a,b])/2 β[i,j][a,b] = √(β[i,i][a,b] * β[j,j][a,b]) * (σ[i]*σ[j]/σ[i,j])^3
  • :esd_runtime,:elliott_runtime: combining rule, performed at runtime: Δ[i,j][a,b] = √(Δ[i,i][a,b] * Δ[j,j][a,b])
  • :dufal,mie15: combining rule used for SAFTVRMie15 ε[i,j][a,b] = (ε[i,i][a,b] + ε[j,j][a,b])/2 β[i,j][a,b] = (∛β[i,i][a,b] + ∛β[j,j][a,b])^3 / 8
Association Scheme matters

all combining rules implicitly requires that both Δ(i,i,a,b) and Δ(j,j,a,b) are non-zero, that means that components that don't self associate will not be combined.

source

Combining Rules

Clapeyron.kij_mixFunction
kij_mix(f,p::ClapeyronParam,k::PairParam)::PairParam
 kij_mix(f,p::ClapeyronParam)::PairParam

General combining rule for pair parameter with a kᵢⱼ interaction parameter. returns a pair parameter with non diagonal entries equal to:

pᵢⱼ = f(pᵢ,pⱼ,kᵢⱼ)

Where f is a 'combining' function that follows the rules:

f(pᵢ,pⱼ,0) = f(pⱼ,pᵢ,0)
-f(pᵢ,pᵢ,0) = pᵢ

and k must follow:

kᵢᵢ = 0 

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with pᵢᵢ = pᵢ.

source
Clapeyron.pair_mixFunction
pair_mix(g,P::ClapeyronParam,Q::ClapeyronParam)::PairParam
+f(pᵢ,pᵢ,0) = pᵢ

and k must follow:

kᵢᵢ = 0 

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with pᵢᵢ = pᵢ.

source
Clapeyron.pair_mixFunction
pair_mix(g,P::ClapeyronParam,Q::ClapeyronParam)::PairParam
 pair_mix(g,P::ClapeyronParam,Q::ClapeyronParam)::PairParam

General combining rule for a pair and a single parameter. returns a pair parameter P with non diagonal entries equal to:

Pᵢⱼ = g(Pᵢ,Pⱼ,Qᵢ,Qⱼ,Qᵢⱼ)

Where f is a 'combining' function that follows the rules:

Pᵢⱼ = Pⱼᵢ = g(Pᵢ,Pⱼ,Qᵢ,Qⱼ,Qᵢⱼ) = g(Pⱼ,Pᵢ,Qⱼ,Qᵢ,Qᵢⱼ)
 g(Pᵢ,Pᵢ,Qᵢ,Qᵢ,Qᵢ) = Pᵢ

it is a more general form of kij_mix, where kij_mix(f,P,Q) == pair_mix(g,P,Q) is correct if:

f(Pᵢ,Pⱼ,Qᵢⱼ) = g(Pᵢ,Pⱼ,_,_,Qᵢⱼ)
 
-If you pass a `SingleParam` or a vector as input for `Q`, then `Qᵢⱼ` will be considered 0.
source
Clapeyron.mirror_pairFunction
mirror_pair(param::PairParam,f = identity)

performs an operation f over the indices of p such as p[j,i] = f(p[i,j]). by default, f = identity (a symmetric matrix). One key difference is that it sets the ismissingvalues field for each modified index to false

source
Clapeyron.sigma_LorentzBerthelotFunction
sigma_LorentzBerthelot(σ::SingleOrPair,ζ::PairParam)::PairParam
-sigma_LorentzBerthelot(σ::SingleOrPair)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

σᵢⱼ = (1 - ζᵢⱼ)*(σᵢ + σⱼ)/2

If ζᵢⱼ is not defined, the definition is reduced to a simple arithmetic mean:

σᵢⱼ = (σᵢ + σⱼ)/2

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with σᵢᵢ = σᵢ.

source
Clapeyron.epsilon_LorentzBerthelotFunction
epsilon_LorentzBerthelot(ϵ::SingleOrPair,k::PairParam)::PairParam
-epsilon_LorentzBerthelot(ϵ::SingleOrPair)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

ϵᵢⱼ = (1 - kᵢⱼ)*√(ϵᵢϵⱼ)

If kᵢⱼ is not defined, the definition is reduced to a simple geometric mean:

ϵᵢⱼ = √(ϵᵢϵⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with ϵᵢᵢ = ϵᵢ.

source
Clapeyron.epsilon_HudsenMcCoubreyFunction
epsilon_HudsenMcCoubrey(ϵ::SingleOrPair,σ::PairParam)::PairParam
-epsilon_HudsenMcCoubrey(ϵ::SingleOrPair)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

ϵᵢⱼ = √(ϵᵢϵⱼ)*(σᵢᵢ^3 * σⱼⱼ^3)/σᵢⱼ^6 

If σᵢⱼ is not defined, the definition is reduced to a simple geometric mean:

ϵᵢⱼ = √(ϵᵢϵⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with ϵᵢᵢ = ϵᵢ.

source
Clapeyron.lambda_LorentzBerthelotFunction
lambda_LorentzBerthelot(λ::ClapeyronParam,k = 3)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

λᵢⱼ = k + √((λᵢᵢ - k)(λⱼⱼ - k))

with k = 0 the definition is reduced to a simple geometric mean:

ϵᵢⱼ = √(ϵᵢϵⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with λᵢᵢ = λᵢ.

source
Clapeyron.lambda_squarewellFunction
lambda_squarewell(λ::SingleOrPair,σ::PairParam)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

λᵢⱼ = (σᵢᵢλᵢᵢ + σⱼⱼλⱼⱼ)/(σᵢᵢ + σⱼⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with λᵢᵢ = λᵢ.

source

Group Combining Rules

Clapeyron.group_sumFunction
group_sum(groups::GroupParam,P::SingleParameter)

Given a GroupParam and a Single Parameter P for group data, it will return a single parameter p of component data, where:

pᵢ = ∑Pₖνᵢₖ

where νᵢₖ is the number of groups k at component i.

source
group_sum(groups::GroupParam,P::AbstractVector)

Given a GroupParam and a Vector P for group data, it will return a Vector p of component data, where:

pᵢ = ∑Pₖνᵢₖ

where νᵢₖ is the number of groups k at component i.

source
group_sum(groups::GroupParam,::Nothing)

Given a GroupParam, it will return a vector p of component data, where:

pᵢ = ∑νᵢₖ

where νᵢₖ is the number of groups k at component i.

source
Clapeyron.group_pairmeanFunction
group_pairmean(groups::GroupParam,param::PairParam)
-group_pairmean(f,groups::GroupParam,param::SingleParam)

Given a GroupParam and a parameter P it will return a single parameter p of component data, where:

pᵢ = ∑νᵢₖ(∑(νᵢₗ*P(i,j))) / ∑νᵢₖ(∑νᵢₗ)

where νᵢₖ is the number of groups k at component i and P(i,j) depends on the type of P:

  • if P is a single paremeter, then P(i,j) = f(P[i],P[j])
  • if P is a pair paremeter, then P(i,j) = p[i,j]
source
Clapeyron.group_matrixFunction
group_matrix(groups::GroupParam)

returns a matrix of size (k,i) with values νₖᵢ. when multiplied with a molar amount, it returns the amount of moles of each group.

source

Model Splitting

Clapeyron.split_modelFunction
split_model(model::EoSModel)

Takes in a model for a multi-component system and returns a vector of model for each pure system.

Example:

julia> gerg2 = GERG2008(["propane","pentane"])
+If you pass a `SingleParam` or a vector as input for `Q`, then `Qᵢⱼ` will be considered 0.
source
Clapeyron.mirror_pairFunction
mirror_pair(param::PairParam,f = identity)

performs an operation f over the indices of p such as p[j,i] = f(p[i,j]). by default, f = identity (a symmetric matrix). One key difference is that it sets the ismissingvalues field for each modified index to false

source
Clapeyron.sigma_LorentzBerthelotFunction
sigma_LorentzBerthelot(σ::SingleOrPair,ζ::PairParam)::PairParam
+sigma_LorentzBerthelot(σ::SingleOrPair)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

σᵢⱼ = (1 - ζᵢⱼ)*(σᵢ + σⱼ)/2

If ζᵢⱼ is not defined, the definition is reduced to a simple arithmetic mean:

σᵢⱼ = (σᵢ + σⱼ)/2

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with σᵢᵢ = σᵢ.

source
Clapeyron.epsilon_LorentzBerthelotFunction
epsilon_LorentzBerthelot(ϵ::SingleOrPair,k::PairParam)::PairParam
+epsilon_LorentzBerthelot(ϵ::SingleOrPair)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

ϵᵢⱼ = (1 - kᵢⱼ)*√(ϵᵢϵⱼ)

If kᵢⱼ is not defined, the definition is reduced to a simple geometric mean:

ϵᵢⱼ = √(ϵᵢϵⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with ϵᵢᵢ = ϵᵢ.

source
Clapeyron.epsilon_HudsenMcCoubreyFunction
epsilon_HudsenMcCoubrey(ϵ::SingleOrPair,σ::PairParam)::PairParam
+epsilon_HudsenMcCoubrey(ϵ::SingleOrPair)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

ϵᵢⱼ = √(ϵᵢϵⱼ)*(σᵢᵢ^3 * σⱼⱼ^3)/σᵢⱼ^6 

If σᵢⱼ is not defined, the definition is reduced to a simple geometric mean:

ϵᵢⱼ = √(ϵᵢϵⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with ϵᵢᵢ = ϵᵢ.

source
Clapeyron.lambda_LorentzBerthelotFunction
lambda_LorentzBerthelot(λ::ClapeyronParam,k = 3)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

λᵢⱼ = k + √((λᵢᵢ - k)(λⱼⱼ - k))

with k = 0 the definition is reduced to a simple geometric mean:

ϵᵢⱼ = √(ϵᵢϵⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with λᵢᵢ = λᵢ.

source
Clapeyron.lambda_squarewellFunction
lambda_squarewell(λ::SingleOrPair,σ::PairParam)::PairParam

Combining rule for a single or pair parameter. returns a pair parameter with non diagonal entries equal to:

λᵢⱼ = (σᵢᵢλᵢᵢ + σⱼⱼλⱼⱼ)/(σᵢᵢ + σⱼⱼ)

Ignores non-diagonal entries already set.

If a Single Parameter is passed as input, it will be converted to a Pair Parameter with λᵢᵢ = λᵢ.

source

Group Combining Rules

Clapeyron.group_sumFunction
group_sum(groups::GroupParam,P::SingleParameter)

Given a GroupParam and a Single Parameter P for group data, it will return a single parameter p of component data, where:

pᵢ = ∑Pₖνᵢₖ

where νᵢₖ is the number of groups k at component i.

source
group_sum(groups::GroupParam,P::AbstractVector)

Given a GroupParam and a Vector P for group data, it will return a Vector p of component data, where:

pᵢ = ∑Pₖνᵢₖ

where νᵢₖ is the number of groups k at component i.

source
group_sum(groups::GroupParam,::Nothing)

Given a GroupParam, it will return a vector p of component data, where:

pᵢ = ∑νᵢₖ

where νᵢₖ is the number of groups k at component i.

source
Clapeyron.group_pairmeanFunction
group_pairmean(groups::GroupParam,param::PairParam)
+group_pairmean(f,groups::GroupParam,param::SingleParam)

Given a GroupParam and a parameter P it will return a single parameter p of component data, where:

pᵢ = ∑νᵢₖ(∑(νᵢₗ*P(i,j))) / ∑νᵢₖ(∑νᵢₗ)

where νᵢₖ is the number of groups k at component i and P(i,j) depends on the type of P:

  • if P is a single paremeter, then P(i,j) = f(P[i],P[j])
  • if P is a pair paremeter, then P(i,j) = p[i,j]
source
Clapeyron.group_matrixFunction
group_matrix(groups::GroupParam)

returns a matrix of size (k,i) with values νₖᵢ. when multiplied with a molar amount, it returns the amount of moles of each group.

source

Model Splitting

Clapeyron.split_modelFunction
split_model(model::EoSModel)

Takes in a model for a multi-component system and returns a vector of model for each pure system.

Example:

julia> gerg2 = GERG2008(["propane","pentane"])
 GERG008 model with 2 components:
 "propane"
 "pentane"
 julia> split_model(gerg2)
 2-element Vector{GERG2008}:
  GERG2008("propane")
- GERG2008("pentane")
source
Clapeyron.is_splittableFunction
is_splittable(model)::Bool

Trait to determine if a EoSModel should be splitted by itself or can be simply filled into a vector. This is useful in the case of models without any parameters, as those models are impossible by definition to split, because they don't have any underlying data. The Default is is_splittable(model) = true.

source
Clapeyron.is_splittableFunction
is_splittable(model)::Bool

Trait to determine if a EoSModel should be splitted by itself or can be simply filled into a vector. This is useful in the case of models without any parameters, as those models are impossible by definition to split, because they don't have any underlying data. The Default is is_splittable(model) = true.

source
Clapeyron.index_reductionFunction
index_reduction(model::EoSModel,z,zmin = sum(z)*4*eps(eltype(z)))
 index_reduction(model::EoSModel,bools <: AbstractVector{Bool})

Removes any component with composition z[i] < zmin. returns a reduced model model_r and a vector of indices idx_r, such as:

model_r,idx_r = index_reduction(model,z)
-eos(model,V,T,z) ≈ eos(model_r,V,T,z[idx_r])

if the model does not have empty compositions, it will just return the input model.

The function will error if the reduction results in an empty model.

you can pass an arbitrary boolean vector (bools) to perform the reduction. ```

source

Model Exporting

Clapeyron.export_modelFunction
export_model(model::EoSModel,name="";location=".")

Exports model parameters to CSVs. Unless the name kwarg is specified, the name of the files will follow the convention singledata_EoS, pairdata_EoS and assocdata_EoS. Files will be saved within the current directory unless the location argument is specified.

Note that it will export all submodel parameters (e.g. Alpha function parameters for cubic EoS).

source

Model Citing

Clapeyron.doiFunction
doi(model)

Returns a Vector of strings containing the top-level bibliographic references of the model, in DOI format. if there isn't a references field, it defaults to default_references(model)

julia> umr = UMRPR(["water"],idealmodel = WalkerIdeal);Clapeyron.doi(umr)
+eos(model,V,T,z) ≈ eos(model_r,V,T,z[idx_r])

if the model does not have empty compositions, it will just return the input model.

The function will error if the reduction results in an empty model.

you can pass an arbitrary boolean vector (bools) to perform the reduction. ```

source

Model Exporting

Clapeyron.export_modelFunction
export_model(model::EoSModel,name="";location=".")

Exports model parameters to CSVs. Unless the name kwarg is specified, the name of the files will follow the convention singledata_EoS, pairdata_EoS and assocdata_EoS. Files will be saved within the current directory unless the location argument is specified.

Note that it will export all submodel parameters (e.g. Alpha function parameters for cubic EoS).

source

Model Citing

Clapeyron.doiFunction
doi(model)

Returns a Vector of strings containing the top-level bibliographic references of the model, in DOI format. if there isn't a references field, it defaults to default_references(model)

julia> umr = UMRPR(["water"],idealmodel = WalkerIdeal);Clapeyron.doi(umr)
 1-element Vector{String}:
- "10.1021/I160057A011"
source
Clapeyron.citeFunction
cite(model,out = :doi)

Returns a Vector of strings containing all bibliographic references of the model, in the format indicated by the out argument. this includes any nested models.

julia> umr = UMRPR(["water"],idealmodel = WalkerIdeal);Clapeyron.cite(umr) #should cite UMRPR, UNIFAC, WalkerIdeal
+ "10.1021/I160057A011"
source
Clapeyron.citeFunction
cite(model,out = :doi)

Returns a Vector of strings containing all bibliographic references of the model, in the format indicated by the out argument. this includes any nested models.

julia> umr = UMRPR(["water"],idealmodel = WalkerIdeal);Clapeyron.cite(umr) #should cite UMRPR, UNIFAC, WalkerIdeal
 4-element Vector{String}:
  "10.1021/I160057A011"
  "10.1021/ie049580p"
@@ -274,7 +274,7 @@
 }"
  "@article{Aasen_2020,
 	doi = {10" ⋯ 452 bytes ⋯ "Journal of Chemical Physics}
-}"

This list will displayed by each EoSModel on future versions. you can enable/disable this by setting ENV["CLAPEYRON_SHOW_REFERENCES"] = "TRUE"/"FALSE"

source
Clapeyron.doi2bibFunction
doi2bib(doi::String)

given a DOI identifier, returns a BibTeX entry. requires an internet connection. if the value is not found, returns an empty string. results are cached in Clapeyron.DOI2BIB_CACHE

Example

julia> Clapeyron.doi2bib("10.1063/1.5136079")
+}"

This list will displayed by each EoSModel on future versions. you can enable/disable this by setting ENV["CLAPEYRON_SHOW_REFERENCES"] = "TRUE"/"FALSE"

source
Clapeyron.doi2bibFunction
doi2bib(doi::String)

given a DOI identifier, returns a BibTeX entry. requires an internet connection. if the value is not found, returns an empty string. results are cached in Clapeyron.DOI2BIB_CACHE

Example

julia> Clapeyron.doi2bib("10.1063/1.5136079")
 "@article{Aasen_2020,
 	doi = {10.1063/1.5136079},
 	url = {https://doi.org/10.1063%2F1.5136079},
@@ -287,4 +287,4 @@
 	author = {Ailo Aasen and Morten Hammer and Erich A. Müller and {\O}ivind Wilhelmsen},
 	title = {Equation of state and force fields for Feynman{\textendash}Hibbs-corrected Mie fluids. {II}. Application to mixtures of helium, neon, hydrogen, and deuterium},
 	journal = {The Journal of Chemical Physics}
-}"
source
+}"
source
diff --git a/dev/dev/index.html b/dev/dev/index.html index 27e77c5f6..421c9f457 100644 --- a/dev/dev/index.html +++ b/dev/dev/index.html @@ -1,2 +1,2 @@ -Developer's Guide · Clapeyron.jl
+Developer's Guide · Clapeyron.jl
diff --git a/dev/eos/activity/index.html b/dev/eos/activity/index.html index 19e0feb3d..b0ad17063 100644 --- a/dev/eos/activity/index.html +++ b/dev/eos/activity/index.html @@ -30,7 +30,7 @@ Pc = [2.19e7, 6.12e6], acentricfactor = [0.343, 0.643], Mw = [18.015, 46.069]) - )

References

  1. Wilson, G. M. (1964). Vapor-liquid equilibrium. XI. A new expression for the excess free energy of mixing. Journal of the American Chemical Society, 86(2), 127–130. doi:10.1021/ja01056a002
source
Clapeyron.NRTLType
NRTL <: ActivityModel
+                        )

References

  1. Wilson, G. M. (1964). Vapor-liquid equilibrium. XI. A new expression for the excess free energy of mixing. Journal of the American Chemical Society, 86(2), 127–130. doi:10.1021/ja01056a002
source
Clapeyron.NRTLType
NRTL <: ActivityModel
 
 function NRTL(components;
 puremodel=PR,
@@ -59,7 +59,7 @@
 userlocations = (a = [0.0 3.458; -0.801 0.0],
                 b = [0.0 -586.1; 246.2 0.0],
                 c = [0.0 0.3; 0.3 0.0])
-            )

References

  1. Renon, H., & Prausnitz, J. M. (1968). Local compositions in thermodynamic excess functions for liquid mixtures. AIChE journal. American Institute of Chemical Engineers, 14(1), 135–144. doi:10.1002/aic.690140124
source
Clapeyron.aspenNRTLType
aspenNRTL <: ActivityModel
+            )

References

  1. Renon, H., & Prausnitz, J. M. (1968). Local compositions in thermodynamic excess functions for liquid mixtures. AIChE journal. American Institute of Chemical Engineers, 14(1), 135–144. doi:10.1002/aic.690140124
source
Clapeyron.aspenNRTLType
aspenNRTL <: ActivityModel
 
 function aspenNRTL(components;
 puremodel=PR,
@@ -91,7 +91,7 @@
                 t1 = [0.0 -415.527344; -88.8125 0.0],
                 t2 = [0.0 -1.913689; -2.930901 0.0],
                 t3 = [0.0 0.00153; 0.005305 0.0])
-            )

References

  1. Renon, H., & Prausnitz, J. M. (1968). Local compositions in thermodynamic excess functions for liquid mixtures. AIChE journal. American Institute of Chemical Engineers, 14(1), 135–144. doi:10.1002/aic.690140124
source
Clapeyron.UNIQUACType
UNIQUACModel <: ActivityModel
+            )

References

  1. Renon, H., & Prausnitz, J. M. (1968). Local compositions in thermodynamic excess functions for liquid mixtures. AIChE journal. American Institute of Chemical Engineers, 14(1), 135–144. doi:10.1002/aic.690140124
source
Clapeyron.UNIQUACType
UNIQUACModel <: ActivityModel
 
 UNIQUAC(components;
 puremodel = PR,
@@ -126,7 +126,7 @@
                         q = [1.4, 1.97],
                         q_p = [1.0, 0.92],
                         Mw = [18.015, 46.069])
-                    )

References

  1. Abrams, D. S., & Prausnitz, J. M. (1975). Statistical thermodynamics of liquid mixtures: A new expression for the excess Gibbs energy of partly or completely miscible systems. AIChE journal. American Institute of Chemical Engineers, 21(1), 116–128. doi:10.1002/aic.690210115
source
Clapeyron.ogUNIFACType
ogUNIFACModel <: UNIFACModel
+                    )

References

  1. Abrams, D. S., & Prausnitz, J. M. (1975). Statistical thermodynamics of liquid mixtures: A new expression for the excess Gibbs energy of partly or completely miscible systems. AIChE journal. American Institute of Chemical Engineers, 21(1), 116–128. doi:10.1002/aic.690210115
source
Clapeyron.ogUNIFACType
ogUNIFACModel <: UNIFACModel
 
 ogUNIFAC(components;
 puremodel = PR, 
@@ -142,7 +142,7 @@
 v̄ = ∑∑xᵢνᵢₖ for k ∈ groups,  for i ∈ components
 Xₖ = (∑xᵢνᵢₖ)/v̄ for i ∈ components 
 Θₖ = QₖXₖ/∑QₖXₖ
-Ψₖₘ = exp(-(Aₖₘ/T)

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. doi:10.1021/i260064a004
source
Clapeyron.UNIFACType
UNIFACModel <: ActivityModel
+Ψₖₘ = exp(-(Aₖₘ/T)

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. doi:10.1021/i260064a004
source
Clapeyron.UNIFACType
UNIFACModel <: ActivityModel
 
 UNIFAC(components;
 puremodel = PR,
@@ -159,13 +159,13 @@
 v̄ = ∑∑xᵢνᵢₖ for k ∈ groups,  for i ∈ components
 Xₖ = (∑xᵢνᵢₖ)/v̄ for i ∈ components
 Θₖ = QₖXₖ/∑QₖXₖ
-Ψₖₘ = exp(-(Aₖₘ + BₖₘT + CₖₘT²)/T)

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. doi:10.1021/i260064a004
  2. Weidlich, U.; Gmehling, J. A modified UNIFAC model. 1. Prediction of VLE, hE, and.gamma..infin. Ind. Eng. Chem. Res. 1987, 26, 1372–1381.

List of groups available

NameDescription
CH3Methyl group
CH2Methylene group
CH
C
CH2=CH
CH=CH
CH2=C
CH=C
ACHAromatic CH
AC
ACCH3
ACCH2
ACCH
OH (P)Primary alcohol
CH3OHMethanol
H2OWater
ACOH
CH3COMethyl ketone
CH2COMethylene ketone
CHO
CH3COOAcetate group
CH2COO
HCOO
CH3OMethoxy group
CH2O
CHO
THFTetrahydrofuran
CH3NH2Methylamine
CH2NH2
CHNH2
CH3NH
CH2NH
CHNH
CH3N
CH2N
ACNH2
AC2H2N
AC2HN
AC2N
CH3CNAcetonitrile
CH2CN
COOEster group
COOHCarboxylate group
HCOOHFormic acid
CH2CL
CHCL
CCL
CH2CL2Dichloromethane
CHCL2
CCL2
CHCL3Chloroform
CCL3
CCL4Carbon tetrachloride
ACCL
CH3NO2Nitromethane
CH2NO2
CHNO2
ACNO2
CS2Carbon disulfide
CH3SHMethanethiol
CH2SH
FURFURALFurfural
DOH
IIodine group
BRBromine group
CH=-C
C=-C
DMSODimethyl sulfoxide
ACRYAcrylate
CL-(C=C)
C=C
ACF
DMFDimethylformamide
HCON(CH2)2
CF3
CF2
CF
CY-CH2Cycloalkane group
CY-CH
CY-C
OH (S)Second hydroxyl group
OH (T)Tertiary hydroxyl group
CY-CH2O
TRIOXANTrioxane
CNH2
NMPN-Methylpyrrolidone
NEP
NIPP
NTBP
CONH2
CONHCH3
CONHCH2
source
Clapeyron.PSRKUNIFACType
PSRKUNIFAC(components;
+Ψₖₘ = exp(-(Aₖₘ + BₖₘT + CₖₘT²)/T)

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. doi:10.1021/i260064a004
  2. Weidlich, U.; Gmehling, J. A modified UNIFAC model. 1. Prediction of VLE, hE, and.gamma..infin. Ind. Eng. Chem. Res. 1987, 26, 1372–1381.

List of groups available

NameDescription
CH3Methyl group
CH2Methylene group
CH
C
CH2=CH
CH=CH
CH2=C
CH=C
ACHAromatic CH
AC
ACCH3
ACCH2
ACCH
OH (P)Primary alcohol
CH3OHMethanol
H2OWater
ACOH
CH3COMethyl ketone
CH2COMethylene ketone
CHO
CH3COOAcetate group
CH2COO
HCOO
CH3OMethoxy group
CH2O
CHO
THFTetrahydrofuran
CH3NH2Methylamine
CH2NH2
CHNH2
CH3NH
CH2NH
CHNH
CH3N
CH2N
ACNH2
AC2H2N
AC2HN
AC2N
CH3CNAcetonitrile
CH2CN
COOEster group
COOHCarboxylate group
HCOOHFormic acid
CH2CL
CHCL
CCL
CH2CL2Dichloromethane
CHCL2
CCL2
CHCL3Chloroform
CCL3
CCL4Carbon tetrachloride
ACCL
CH3NO2Nitromethane
CH2NO2
CHNO2
ACNO2
CS2Carbon disulfide
CH3SHMethanethiol
CH2SH
FURFURALFurfural
DOH
IIodine group
BRBromine group
CH=-C
C=-C
DMSODimethyl sulfoxide
ACRYAcrylate
CL-(C=C)
C=C
ACF
DMFDimethylformamide
HCON(CH2)2
CF3
CF2
CF
CY-CH2Cycloalkane group
CY-CH
CY-C
OH (S)Second hydroxyl group
OH (T)Tertiary hydroxyl group
CY-CH2O
TRIOXANTrioxane
CNH2
NMPN-Methylpyrrolidone
NEP
NIPP
NTBP
CONH2
CONHCH3
CONHCH2
source
Clapeyron.PSRKUNIFACType
PSRKUNIFAC(components;
 puremodel = BasicIdeal,
 userlocations = String[],
 group_userlocations = String[],
 pure_userlocations = String[],
 verbose = false,
-reference_state = nothing)

Input parameters

  • R: Single Parameter (Float64) - Normalized group Van der Vals volume
  • Q: Single Parameter (Float64) - Normalized group Surface Area
  • A: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • B: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • C: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter

Input models

  • puremodel: model to calculate pure pressure-dependent properties

Description

UNIFAC (UNIQUAC Functional-group Activity Coefficients) activity model.

Modified UNIFAC (Dortmund) implementation, with parameters tuned to the Predictive Soave-Redlich-Kwong (PSRK) EoS.

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. doi:10.1021/i260064a004
  2. Weidlich, U.; Gmehling, J. A modified UNIFAC model. 1. Prediction of VLE, hE, and.gamma..infin. Ind. Eng. Chem. Res. 1987, 26, 1372–1381.
  3. Horstmann, S., Jabłoniec, A., Krafczyk, J., Fischer, K., & Gmehling, J. (2005). PSRK group contribution equation of state: comprehensive revision and extension IV, including critical constants and α-function parameters for 1000 components. Fluid Phase Equilibria, 227(2), 157–164. doi:10.1016/j.fluid.2004.11.002"
source
Clapeyron.VTPRUNIFACType
VTPRUNIFACModel <: UNIFACModel
+reference_state = nothing)

Input parameters

  • R: Single Parameter (Float64) - Normalized group Van der Vals volume
  • Q: Single Parameter (Float64) - Normalized group Surface Area
  • A: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • B: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • C: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter

Input models

  • puremodel: model to calculate pure pressure-dependent properties

Description

UNIFAC (UNIQUAC Functional-group Activity Coefficients) activity model.

Modified UNIFAC (Dortmund) implementation, with parameters tuned to the Predictive Soave-Redlich-Kwong (PSRK) EoS.

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. doi:10.1021/i260064a004
  2. Weidlich, U.; Gmehling, J. A modified UNIFAC model. 1. Prediction of VLE, hE, and.gamma..infin. Ind. Eng. Chem. Res. 1987, 26, 1372–1381.
  3. Horstmann, S., Jabłoniec, A., Krafczyk, J., Fischer, K., & Gmehling, J. (2005). PSRK group contribution equation of state: comprehensive revision and extension IV, including critical constants and α-function parameters for 1000 components. Fluid Phase Equilibria, 227(2), 157–164. doi:10.1016/j.fluid.2004.11.002"
source
Clapeyron.VTPRUNIFACType
VTPRUNIFACModel <: UNIFACModel
 
 VTPRUNIFAC(components;
 puremodel = BasicIdeal,
@@ -177,7 +177,7 @@
 v̄ = ∑∑xᵢνᵢₖ for k ∈ groups,  for i ∈ components
 Xₖ = (∑xᵢνᵢₖ)/v̄ for i ∈ components
 Θₖ = QₖXₖ/∑QₖXₖ
-Ψₖₘ = exp(-(Aₖₘ + BₖₘT + CₖₘT²)/T)

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. "doi:10.1021/i260064a004"
  2. Weidlich, U.; Gmehling, J. A modified UNIFAC model. 1. Prediction of VLE, hE, and.gamma..infin. Ind. Eng. Chem. Res. 1987, 26, 1372–1381.
  3. Ahlers, J., & Gmehling, J. (2001). Development of an universal group contribution equation of state. Fluid Phase Equilibria, 191(1–2), 177–188. doi:10.1016/s0378-3812(01)00626-4
source
Clapeyron.UNIFACFVType
UNIFACFVModel <: ActivityModel
+Ψₖₘ = exp(-(Aₖₘ + BₖₘT + CₖₘT²)/T)

References

  1. Fredenslund, A., Gmehling, J., Michelsen, M. L., Rasmussen, P., & Prausnitz, J. M. (1977). Computerized design of multicomponent distillation columns using the UNIFAC group contribution method for calculation of activity coefficients. Industrial & Engineering Chemistry Process Design and Development, 16(4), 450–462. "doi:10.1021/i260064a004"
  2. Weidlich, U.; Gmehling, J. A modified UNIFAC model. 1. Prediction of VLE, hE, and.gamma..infin. Ind. Eng. Chem. Res. 1987, 26, 1372–1381.
  3. Ahlers, J., & Gmehling, J. (2001). Development of an universal group contribution equation of state. Fluid Phase Equilibria, 191(1–2), 177–188. doi:10.1016/s0378-3812(01)00626-4
source
Clapeyron.UNIFACFVType
UNIFACFVModel <: ActivityModel
 
 UNIFACFV(components;
 puremodel = PR,
@@ -185,14 +185,14 @@
 group_userlocations = String[],
 pure_userlocations = String[],
 verbose = false,
-reference_state = nothing)

Input parameters

  • volume: Single Parameter (Float64) - specific volume of species [g/cm^3]
  • R: Single Parameter (Float64) - Normalized group Van der Vals volume
  • Q: Single Parameter (Float64) - Normalized group Surface Area
  • A: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • Mw: Single Parameter (Float64) - Molecular weight of groups

Input models

  • puremodel: model to calculate pure pressure-dependent properties

Description

UNIFACFV (UNIFAC Free Volume) activity model. specialized for solvent-polymer mixtures

The Combinatorial part corresponds to an GC-averaged modified UNIQUAC model.

Gᴱ = nRT(gᴱ(comb) + gᴱ(res) + gᴱ(FV))

References

source
Clapeyron.UNIFACFVPolyType
UNIFACFVPolyModel <: ActivityModel
+reference_state = nothing)

Input parameters

  • volume: Single Parameter (Float64) - specific volume of species [g/cm^3]
  • R: Single Parameter (Float64) - Normalized group Van der Vals volume
  • Q: Single Parameter (Float64) - Normalized group Surface Area
  • A: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • Mw: Single Parameter (Float64) - Molecular weight of groups

Input models

  • puremodel: model to calculate pure pressure-dependent properties

Description

UNIFACFV (UNIFAC Free Volume) activity model. specialized for solvent-polymer mixtures

The Combinatorial part corresponds to an GC-averaged modified UNIQUAC model.

Gᴱ = nRT(gᴱ(comb) + gᴱ(res) + gᴱ(FV))

References

source
Clapeyron.UNIFACFVPolyType
UNIFACFVPolyModel <: ActivityModel
 
 UNIFACFVPoly(components;
 puremodel = PR,
 userlocations = String[],
 pure_userlocations = String[],
 verbose = false,
-reference_state = nothing)

Input parameters

  • volume: Single Parameter (Float64) - specific volume of species [g/cm^3]
  • c Single Parameter (Float64) - number of external degrees of freedom per solvent molecule
  • R: Single Parameter (Float64) - Normalized group Van der Vals volume
  • Q: Single Parameter (Float64) - Normalized group Surface Area
  • A: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • Mw: Single Parameter (Float64) - Molecular weight of groups

Input models

  • puremodel: model to calculate pure pressure-dependent properties

Description

UNIFAC-FV (polymer) (UNIFAC Free Volume) activity model. specialized for polymer blends

The Combinatorial part corresponds to an GC-averaged modified UNIQUAC model.

Gᴱ = nRT(gᴱ(comb) + gᴱ(res) + gᴱ(FV))
source
Clapeyron.tcPRWilsonResType
tcPRWilsonRes <: WilsonModel
+reference_state = nothing)

Input parameters

  • volume: Single Parameter (Float64) - specific volume of species [g/cm^3]
  • c Single Parameter (Float64) - number of external degrees of freedom per solvent molecule
  • R: Single Parameter (Float64) - Normalized group Van der Vals volume
  • Q: Single Parameter (Float64) - Normalized group Surface Area
  • A: Pair Parameter (Float64, asymetrical, defaults to 0) - Binary group Interaction Energy Parameter
  • Mw: Single Parameter (Float64) - Molecular weight of groups

Input models

  • puremodel: model to calculate pure pressure-dependent properties

Description

UNIFAC-FV (polymer) (UNIFAC Free Volume) activity model. specialized for polymer blends

The Combinatorial part corresponds to an GC-averaged modified UNIQUAC model.

Gᴱ = nRT(gᴱ(comb) + gᴱ(res) + gᴱ(FV))
source
Clapeyron.tcPRWilsonResType
tcPRWilsonRes <: WilsonModel
 tcPRWilsonRes(components;
 puremodel = BasicIdeal,
 userlocations = String[],
@@ -215,22 +215,22 @@
 model = tcPRWilsonRes(["water","ethanol"];userlocations = ["path/to/my/db","tcpr_wilson.csv"])
 
 # Passing parameters directly
-model = tcPRWilsonRes(["water","ethanol"],userlocations = (;g = [0.0 3988.52; 1360.117 0.0]))

References

  1. Wilson, G. M. (1964). Vapor-liquid equilibrium. XI. A new expression for the excess free energy of mixing. Journal of the American Chemical Society, 86(2), 127–130. doi:10.1021/ja01056a002
  2. Piña-Martinez, A., Privat, R., Nikolaidis, I. K., Economou, I. G., & Jaubert, J.-N. (2021). What is the optimal activity coefficient model to be combined with the translated–consistent Peng–Robinson equation of state through advanced mixing rules? Cross-comparison and grading of the Wilson, UNIQUAC, and NRTL aE models against a benchmark database involving 200 binary systems. Industrial & Engineering Chemistry Research, 60(47), 17228–17247. doi:10.1021/acs.iecr.1c03003
source
Clapeyron.COSMOSAC02Type
COSMOSAC02(components;
+model = tcPRWilsonRes(["water","ethanol"],userlocations = (;g = [0.0 3988.52; 1360.117 0.0]))

References

  1. Wilson, G. M. (1964). Vapor-liquid equilibrium. XI. A new expression for the excess free energy of mixing. Journal of the American Chemical Society, 86(2), 127–130. doi:10.1021/ja01056a002
  2. Piña-Martinez, A., Privat, R., Nikolaidis, I. K., Economou, I. G., & Jaubert, J.-N. (2021). What is the optimal activity coefficient model to be combined with the translated–consistent Peng–Robinson equation of state through advanced mixing rules? Cross-comparison and grading of the Wilson, UNIQUAC, and NRTL aE models against a benchmark database involving 200 binary systems. Industrial & Engineering Chemistry Research, 60(47), 17228–17247. doi:10.1021/acs.iecr.1c03003
source
Clapeyron.COSMOSAC02Type
COSMOSAC02(components;
 puremodel = PR,
 userlocations = String[],
 pure_userlocations = String[],
 verbose = false,
-reference_state = nothing)

Input parameters:

  • Pi :Single Parameter{String}
  • V: Single Parameter{Float64}
  • A: Single Parameter{Float64}

Description

An activity coefficient model using molecular solvation based on the COSMO-RS method.

References

  1. Klamt, A. (1995). Conductor-like screening model for real solvents: A new approach to the quantitative calculation of solvation phenomena. Journal of Physical Chemistry, 99(7), 2224–2235. doi:10.1021/j100007a062
  2. Lin, S-T. & Sandler, S.I. (2002). A priori phase equilibrium prediction from a segment contribution solvation model. Industrial & Engineering Chemistry Research, 41(5), 899–913. doi:10.1021/ie001047w
source
Clapeyron.COSMOSAC10Type
COSMOSAC10(components;
+reference_state = nothing)

Input parameters:

  • Pi :Single Parameter{String}
  • V: Single Parameter{Float64}
  • A: Single Parameter{Float64}

Description

An activity coefficient model using molecular solvation based on the COSMO-RS method.

References

  1. Klamt, A. (1995). Conductor-like screening model for real solvents: A new approach to the quantitative calculation of solvation phenomena. Journal of Physical Chemistry, 99(7), 2224–2235. doi:10.1021/j100007a062
  2. Lin, S-T. & Sandler, S.I. (2002). A priori phase equilibrium prediction from a segment contribution solvation model. Industrial & Engineering Chemistry Research, 41(5), 899–913. doi:10.1021/ie001047w
source
Clapeyron.COSMOSAC10Type
COSMOSAC10(components;
 puremodel = PR,
 userlocations = String[],
 pure_userlocations = String[],
 verbose = false,
-reference_state = nothing)

Input parameters:

  • Pnhb :Single Parameter{String}
  • POH :Single Parameter{String}
  • POT :Single Parameter{String}
  • V: Single Parameter{Float64}
  • A: Single Parameter{Float64}

Description

An activity coefficient model using molecular solvation based on the COSMO-RS method. Sigma profiles are now split by non-hydrogen bonding, hydrogen acceptor and hydrogen donor.

References

  1. Klamt, A. (1995). Conductor-like screening model for real solvents: A new approach to the quantitative calculation of solvation phenomena. Journal of Physical Chemistry, 99(7), 2224–2235. doi:10.1021/j100007a062
  2. Lin, S-T. & Sandler, S.I. (2002). A priori phase equilibrium prediction from a segment contribution solvation model. Industrial & Engineering Chemistry Research, 41(5), 899–913. doi:10.1021/ie001047w
  3. Hsieh, C-H., Sandler, S.I., & Lin, S-T. (2010). Improvements of COSMO-SAC for vapor–liquid and liquid–liquid equilibrium predictions. Fluid Phase Equilibria, 297(1), 90-97. doi:10.1016/j.fluid.2010.06.011
source
Clapeyron.COSMOSACdspType
COSMOSACdsp(components;
+reference_state = nothing)

Input parameters:

  • Pnhb :Single Parameter{String}
  • POH :Single Parameter{String}
  • POT :Single Parameter{String}
  • V: Single Parameter{Float64}
  • A: Single Parameter{Float64}

Description

An activity coefficient model using molecular solvation based on the COSMO-RS method. Sigma profiles are now split by non-hydrogen bonding, hydrogen acceptor and hydrogen donor.

References

  1. Klamt, A. (1995). Conductor-like screening model for real solvents: A new approach to the quantitative calculation of solvation phenomena. Journal of Physical Chemistry, 99(7), 2224–2235. doi:10.1021/j100007a062
  2. Lin, S-T. & Sandler, S.I. (2002). A priori phase equilibrium prediction from a segment contribution solvation model. Industrial & Engineering Chemistry Research, 41(5), 899–913. doi:10.1021/ie001047w
  3. Hsieh, C-H., Sandler, S.I., & Lin, S-T. (2010). Improvements of COSMO-SAC for vapor–liquid and liquid–liquid equilibrium predictions. Fluid Phase Equilibria, 297(1), 90-97. doi:10.1016/j.fluid.2010.06.011
source
Clapeyron.COSMOSACdspType
COSMOSACdsp(components;
 puremodel = PR,
 userlocations = String[],
 pure_userlocations = String[],
 verbose = false,
-reference_state = nothing)

Input parameters:

  • Pnhb :Single Parameter{String}
  • POH :Single Parameter{String}
  • POT :Single Parameter{String}
  • V: Single Parameter{Float64}
  • A: Single Parameter{Float64}
  • epsilon: Single Parameter{Float64}
  • COOH: Single Parameter{Float64}
  • water: Single Parameter{Float64}
  • hb_acc: Single Parameter{Float64}
  • hb_don: Single Parameter{Float64}

Description

An activity coefficient model using molecular solvation based on the COSMO-RS method. Sigma profiles are now split by non-hydrogen bonding, hydrogen acceptor and hydrogen donor. A dispersive correction is included.

References

  1. Klamt, A. (1995). Conductor-like screening model for real solvents: A new approach to the quantitative calculation of solvation phenomena. Journal of Physical Chemistry, 99(7), 2224–2235. doi:10.1021/j100007a062
  2. Lin, S-T. & Sandler, S.I. (2002). A priori phase equilibrium prediction from a segment contribution solvation model. Industrial & Engineering Chemistry Research, 41(5), 899–913. doi:10.1021/ie001047w
  3. Hsieh, C-H., Sandler, S.I., & Lin, S-T. (2010). Improvements of COSMO-SAC for vapor–liquid and liquid–liquid equilibrium predictions. Fluid Phase Equilibria, 297(1), 90-97. doi:10.1016/j.fluid.2010.06.011
  4. Hsieh, C-H., Lin, S-T. & Vrabec, J. (2014). Considering the dispersive interactions in the COSMO-SAC model for more accurate predictions of fluid phase behavior. Fluid Phase Equilibria, 367, 109-116. doi:10.1016/j.fluid.2014.01.032
source
ClapeyronHANNA.HANNAType
HANNA <: ActivityModel
+reference_state = nothing)

Input parameters:

  • Pnhb :Single Parameter{String}
  • POH :Single Parameter{String}
  • POT :Single Parameter{String}
  • V: Single Parameter{Float64}
  • A: Single Parameter{Float64}
  • epsilon: Single Parameter{Float64}
  • COOH: Single Parameter{Float64}
  • water: Single Parameter{Float64}
  • hb_acc: Single Parameter{Float64}
  • hb_don: Single Parameter{Float64}

Description

An activity coefficient model using molecular solvation based on the COSMO-RS method. Sigma profiles are now split by non-hydrogen bonding, hydrogen acceptor and hydrogen donor. A dispersive correction is included.

References

  1. Klamt, A. (1995). Conductor-like screening model for real solvents: A new approach to the quantitative calculation of solvation phenomena. Journal of Physical Chemistry, 99(7), 2224–2235. doi:10.1021/j100007a062
  2. Lin, S-T. & Sandler, S.I. (2002). A priori phase equilibrium prediction from a segment contribution solvation model. Industrial & Engineering Chemistry Research, 41(5), 899–913. doi:10.1021/ie001047w
  3. Hsieh, C-H., Sandler, S.I., & Lin, S-T. (2010). Improvements of COSMO-SAC for vapor–liquid and liquid–liquid equilibrium predictions. Fluid Phase Equilibria, 297(1), 90-97. doi:10.1016/j.fluid.2010.06.011
  4. Hsieh, C-H., Lin, S-T. & Vrabec, J. (2014). Considering the dispersive interactions in the COSMO-SAC model for more accurate predictions of fluid phase behavior. Fluid Phase Equilibria, 367, 109-116. doi:10.1016/j.fluid.2014.01.032
source
ClapeyronHANNA.HANNAType
HANNA <: ActivityModel
 HANNA(components;
 puremodel = nothing,
 userlocations = String[],
@@ -243,4 +243,4 @@
 smiles = ["O", "CC(C)CO"]
 
 model = HANNA(components,userlocations=(;Mw=Mw, canonicalsmiles=smiles))
-# model = HANNA(components) # also works if components are in the database 

References

  1. Specht, T., Nagda, M., Fellenz, S., Mandt, S., Hasse, H., Jirasek, F., HANNA: Hard-Constraint Neural Network for Consistent Activity Coefficient Prediction. Chemical Science 2024. 10.1039/D4SC05115G.
source
+# model = HANNA(components) # also works if components are in the database

References

  1. Specht, T., Nagda, M., Fellenz, S., Mandt, S., Hasse, H., Jirasek, F., HANNA: Hard-Constraint Neural Network for Consistent Activity Coefficient Prediction. Chemical Science 2024. 10.1039/D4SC05115G.
source diff --git a/dev/eos/correlations/index.html b/dev/eos/correlations/index.html index 83d3fe8d2..e8393bea1 100644 --- a/dev/eos/correlations/index.html +++ b/dev/eos/correlations/index.html @@ -7,7 +7,7 @@ function Clapeyron.saturation_pressure_impl(model::MySaturationModel <: SaturationModel,T,::SaturationCorrelation) ... return (psat,NaN,NaN) -end

Saturation Models and Types

Clapeyron.SaturationModelType
SaturationModel <: EoSModel

Abstract type for Saturation correlation models.

source
Clapeyron.SaturationCorrelationType
SaturationCorrelation <: SaturationMethod

saturation method used for dispatch on saturation correlations.

source
Clapeyron.LeeKeslerSatType
LeeKeslerSat <: SaturationModel
+end

Saturation Models and Types

Clapeyron.LeeKeslerSatType
LeeKeslerSat <: SaturationModel
 
 LeeKeslerSat(components;
 userlocations = String[],
@@ -27,11 +27,11 @@
         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
source
Clapeyron.DIPPR101SatType
DIPPR101Sat <: SaturationModel
+                    )

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
source
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
source

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;
+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
source

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
@@ -47,7 +47,7 @@
         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
source
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ω
@@ -64,7 +64,7 @@
         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
source
Clapeyron.COSTALDType
COSTALD(components; 
+                    )

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
source
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
@@ -79,7 +79,7 @@
         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

source

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
+                    )

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

source

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[],
@@ -112,7 +112,7 @@
                         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.
source
Clapeyron.TsonopoulosVirialType
TsonopoulosVirial <: SecondVirialModel
+                    )

References

  1. Smith, H. C. Van Ness Joseph M. Introduction to Chemical Engineering Thermodynamics 4E 1987.
source
Clapeyron.TsonopoulosVirialType
TsonopoulosVirial <: SecondVirialModel
 TsonopoulosVirial(components;
         idealmodel = BasicIdeal,
         userlocations = String[],
@@ -145,13 +145,13 @@
                         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
source
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)
source

Solid Models

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

Clapeyron.SolidHfusType
SolidHfusModel <: EoSModel
+                    )

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
source
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)
source

Solid Models

Solid models provide simple approximations to the excess chemical potential in the solid phase. Intended to be used in conjunction 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))
source
Clapeyron.SolidKsType
SolidKsModel <: EoSModel
+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))
source
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ᵢ)
source
+verbose::Bool=false)

Parameters

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ᵢ)
source diff --git a/dev/eos/cubic/index.html b/dev/eos/cubic/index.html index 20885e1ae..4ba50729d 100644 --- a/dev/eos/cubic/index.html +++ b/dev/eos/cubic/index.html @@ -19,13 +19,13 @@ # depends on the specific EoS return result end

Common Definitions

Clapeyron.ab_premixingFunction
ab_premixing(model,mixing,kij = nothing,lij = nothing)

given a model::CubicModel, that has a::PairParam, b::PairParam, a mixing::MixingRule and kij,lij matrices, ab_premixing will perform an implace calculation to obtain the values of a and b, containing values aᵢⱼ and bᵢⱼ. by default, it performs the van der Wals One-Fluid mixing rule. that is:

aᵢⱼ = sqrt(aᵢ*aⱼ)*(1-kᵢⱼ)
-bᵢⱼ = (bᵢ + bⱼ)/2
source
Clapeyron.mixing_ruleFunction
mixing_rule(model::CubicModel,V,T,z,mixing_model::MixingRule,α,a,b,c)

Interface function used by cubic models. with matrices a and b, vectors α and c, a model::CubicModel and mixing_model::MixingRule, returns the scalars , and , corresponding to the values mixed by the amount of components and the specifics of the mixing rule.

Example

function mixing_rule(model::CubicModel,V,T,z,mixing_model::vdW1fRule,α,a,b,c)
+bᵢⱼ = (bᵢ + bⱼ)/2
source
Clapeyron.mixing_ruleFunction
mixing_rule(model::CubicModel,V,T,z,mixing_model::MixingRule,α,a,b,c)

Interface function used by cubic models. with matrices a and b, vectors α and c, a model::CubicModel and mixing_model::MixingRule, returns the scalars , and , corresponding to the values mixed by the amount of components and the specifics of the mixing rule.

Example

function mixing_rule(model::CubicModel,V,T,z,mixing_model::vdW1fRule,α,a,b,c)
     ∑z = sum(z)
     ā = dot(z .* sqrt(α),a,z .* sqrt(α))/(∑z*∑z) #∑∑aᵢⱼxᵢxⱼ√(αᵢαⱼ)
     b̄ = dot(z,b,z)/(∑z*∑z)  #∑∑bᵢⱼxᵢxⱼ
     c̄ = dot(z,c)/∑z ∑cᵢxᵢ
     return ā,b̄,c̄
-end
source

Main Models

Clapeyron.vdWType
vdW(components;
+end
source

Main Models

Clapeyron.vdWType
vdW(components;
 idealmodel = BasicIdeal,
 alpha = NoAlpha,
 mixing = vdW1fRule,
@@ -65,7 +65,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. van der Waals JD. Over de Continuiteit van den Gasen Vloeistoftoestand. PhD thesis, University of Leiden; 1873
source
Clapeyron.ClausiusType
Clausius(components;
+                    )

References

  1. van der Waals JD. Over de Continuiteit van den Gasen Vloeistoftoestand. PhD thesis, University of Leiden; 1873
source
Clapeyron.ClausiusType
Clausius(components;
 idealmodel = BasicIdeal,
 alpha = NoAlpha,
 mixing = vdW1fRule,
@@ -85,7 +85,7 @@
 cᵢ = 3/8 * RTcᵢ/Pcᵢ - Vcᵢ
 
 Δ₀ = ∑cᵢxᵢ/∑bᵢxᵢ
-

References

  1. Clausius, R. (1880). Ueber das Verhalten der Kohlensäure in Bezug auf Druck, Volumen und Temperatur. Annalen der Physik, 245(3), 337–357. doi:10.1002/andp.18802450302
source
Clapeyron.RKType
RK(components; 
+

References

  1. Clausius, R. (1880). Ueber das Verhalten der Kohlensäure in Bezug auf Druck, Volumen und Temperatur. Annalen der Physik, 245(3), 337–357. doi:10.1002/andp.18802450302
source
Clapeyron.RKType
RK(components; 
 idealmodel = BasicIdeal,
 alpha = PRAlpha,
 mixing = vdW1fRule,
@@ -126,7 +126,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Redlich, O., & Kwong, J. N. S. (1949). On the thermodynamics of solutions; an equation of state; fugacities of gaseous solutions. Chemical Reviews, 44(1), 233–244. doi:10.1021/cr60137a013
source
Clapeyron.PRType
PR(components;
+                    )

References

  1. Redlich, O., & Kwong, J. N. S. (1949). On the thermodynamics of solutions; an equation of state; fugacities of gaseous solutions. Chemical Reviews, 44(1), 233–244. doi:10.1021/cr60137a013
source
Clapeyron.PRType
PR(components;
 idealmodel = BasicIdeal,
 alpha = PRAlpha,
 mixing = vdW1fRule,
@@ -167,7 +167,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Peng, D.Y., & Robinson, D.B. (1976). A New Two-Constant Equation of State. Industrial & Engineering Chemistry Fundamentals, 15, 59-64. doi:10.1021/I160057A011
source
Clapeyron.RKPRType
RKPR(components;
+                    )

References

  1. Peng, D.Y., & Robinson, D.B. (1976). A New Two-Constant Equation of State. Industrial & Engineering Chemistry Fundamentals, 15, 59-64. doi:10.1021/I160057A011
source
Clapeyron.RKPRType
RKPR(components;
 idealmodel = BasicIdeal,
 alpha = RKPRAlpha,
 mixing = vdW1fRule,
@@ -222,7 +222,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Cismondi, M., & Mollerup, J. (2005). Development and application of a three-parameter RK–PR equation of state. Fluid Phase Equilibria, 232(1–2), 74–89. doi:10.1016/j.fluid.2005.03.020
  2. Tassin, N. G., Mascietti, V. A., & Cismondi, M. (2019). Phase behavior of multicomponent alkane mixtures and evaluation of predictive capacity for the PR and RKPR EoS’s. Fluid Phase Equilibria, 480, 53–65. doi:10.1016/j.fluid.2018.10.005
source
Clapeyron.PatelTejaType
PatelTeja(components;
+                    )

References

  1. Cismondi, M., & Mollerup, J. (2005). Development and application of a three-parameter RK–PR equation of state. Fluid Phase Equilibria, 232(1–2), 74–89. doi:10.1016/j.fluid.2005.03.020
  2. Tassin, N. G., Mascietti, V. A., & Cismondi, M. (2019). Phase behavior of multicomponent alkane mixtures and evaluation of predictive capacity for the PR and RKPR EoS’s. Fluid Phase Equilibria, 480, 53–65. doi:10.1016/j.fluid.2018.10.005
source
Clapeyron.PatelTejaType
PatelTeja(components;
 idealmodel = BasicIdeal,
 alpha = NoAlpha,
 mixing = vdW1fRule,
@@ -276,7 +276,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Patel, N. C., & Teja, A. S. (1982). A new cubic equation of state for fluids and fluid mixtures. Chemical Engineering Science, 37(3), 463–473. doi:10.1016/0009-2509(82)80099-7
source
Clapeyron.KUType
KU(components;
+                    )

References

  1. Patel, N. C., & Teja, A. S. (1982). A new cubic equation of state for fluids and fluid mixtures. Chemical Engineering Science, 37(3), 463–473. doi:10.1016/0009-2509(82)80099-7
source
Clapeyron.KUType
KU(components;
 idealmodel = BasicIdeal,
 alpha = KUAlpha,
 mixing = vdW1fRule,
@@ -323,7 +323,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Kumar, A., & Upadhyay, R. (2021). A new two-parameters cubic equation of state with benefits of three-parameters. Chemical Engineering Science, 229(116045), 116045. doi:10.1016/j.ces.2020.116045
source

Variant Models

Clapeyron.BerthelotType
Berthelot(components;
+                    )

References

  1. Kumar, A., & Upadhyay, R. (2021). A new two-parameters cubic equation of state with benefits of three-parameters. Chemical Engineering Science, 229(116045), 116045. doi:10.1016/j.ces.2020.116045
source

Variant Models

Clapeyron.BerthelotType
Berthelot(components;
 idealmodel = BasicIdeal,
 alpha = ClausiusAlpha,
 mixing = vdW1fRule,
@@ -340,7 +340,7 @@
 b = Vc/3
 R = (8/3)*Pc*Vc/Tc
 P = RT/(V-Nb) + a•α(T)/V²
-α(T) = Tc/T

References

  1. Berthelot, D. (1899). Sur une méthode purement physique pour la détermination des poids moléculaires des gaz et des poids atomiques de leurs éléments. Journal de Physique Théorique et Appliquée, 8(1), 263–274. doi:10.1051/jphystap:018990080026300
source
Clapeyron.SRKFunction
SRK(components::Vector{String};
+α(T) = Tc/T

References

  1. Berthelot, D. (1899). Sur une méthode purement physique pour la détermination des poids moléculaires des gaz et des poids atomiques de leurs éléments. Journal de Physique Théorique et Appliquée, 8(1), 263–274. doi:10.1051/jphystap:018990080026300
source
Clapeyron.SRKFunction
SRK(components::Vector{String};
 idealmodel = BasicIdeal,
 alpha = SoaveAlpha,
 mixing = vdW1fRule,
@@ -380,7 +380,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Soave, G. (1972). Equilibrium constants from a modified Redlich-Kwong equation of state. Chemical Engineering Science, 27(6), 1197–1203. doi:10.1016/0009-2509(72)80096-4
source
Clapeyron.PSRKFunction
function PSRK(components;
+                    )

References

  1. Soave, G. (1972). Equilibrium constants from a modified Redlich-Kwong equation of state. Chemical Engineering Science, 27(6), 1197–1203. doi:10.1016/0009-2509(72)80096-4
source
Clapeyron.PSRKFunction
function PSRK(components;
 idealmodel = BasicIdeal,
 alpha = SoaveAlpha,
 mixing = PSRKRule,
@@ -393,7 +393,7 @@
 activity_userlocations = String[],
 translation_userlocations = String[],
 reference_state = nothing,
-verbose = false)

Description

Predictive Soave-Redlich-Kwong equation of state. it uses the following models:

References

  1. Horstmann, S., Jabłoniec, A., Krafczyk, J., Fischer, K., & Gmehling, J. (2005). PSRK group contribution equation of state: comprehensive revision and extension IV, including critical constants and α-function parameters for 1000 components. Fluid Phase Equilibria, 227(2), 157–164. doi:10.1016/j.fluid.2004.11.002
source
Clapeyron.tcRKFunction
tcRK(components::Vector{String};
+verbose = false)

Description

Predictive Soave-Redlich-Kwong equation of state. it uses the following models:

References

  1. Horstmann, S., Jabłoniec, A., Krafczyk, J., Fischer, K., & Gmehling, J. (2005). PSRK group contribution equation of state: comprehensive revision and extension IV, including critical constants and α-function parameters for 1000 components. Fluid Phase Equilibria, 227(2), 157–164. doi:10.1016/j.fluid.2004.11.002
source
Clapeyron.tcRKFunction
tcRK(components::Vector{String};
 idealmodel = BasicIdeal,
 userlocations = String[],
 ideal_userlocations = String[],
@@ -404,7 +404,7 @@
 reference_state = nothing,
 verbose = false,
 estimate_alpha = true,
-estimate_translation = true)

translated and consistent Redlich-Kwong equation of state. it uses the following models:

If Twu parameters are not provided, they can be estimated from the acentric factor (acentricfactor). If translation is not provided, it can be estimated, using Rackett compresibility Factor (ZRA) or the acentric factor (acentricfactor).

The use of estimates for the alpha function and volume translation can be turned off by passing estimate_alpha = false or estimate_translation = false.

References

  1. Le Guennec, Y., Privat, R., & Jaubert, J.-N. (2016). Development of the translated-consistent tc-PR and tc-RK cubic equations of state for a safe and accurate prediction of volumetric, energetic and saturation properties of pure compounds in the sub- and super-critical domains. Fluid Phase Equilibria, 429, 301–312. doi:10.1016/j.fluid.2016.09.003
  2. Pina-Martinez, A., Le Guennec, Y., Privat, R., Jaubert, J.-N., & Mathias, P. M. (2018). Analysis of the combinations of property data that are suitable for a safe estimation of consistent twu α-function parameters: Updated parameter values for the translated-consistent tc-PR and tc-RK cubic equations of state. Journal of Chemical and Engineering Data, 63(10), 3980–3988. doi:10.1021/acs.jced.8b00640
  3. Piña-Martinez, A., Privat, R., & Jaubert, J.-N. (2022). Use of 300,000 pseudo‐experimental data over 1800 pure fluids to assess the performance of four cubic equations of state: SRK , PR , tc ‐RK , and tc ‐PR. AIChE Journal. American Institute of Chemical Engineers, 68(2). doi:10.1002/aic.17518
source
Clapeyron.PR78Function
PR78(components::Vector{String};
+estimate_translation = true)

translated and consistent Redlich-Kwong equation of state. it uses the following models:

If Twu parameters are not provided, they can be estimated from the acentric factor (acentricfactor). If translation is not provided, it can be estimated, using Rackett compresibility Factor (ZRA) or the acentric factor (acentricfactor).

The use of estimates for the alpha function and volume translation can be turned off by passing estimate_alpha = false or estimate_translation = false.

References

  1. Le Guennec, Y., Privat, R., & Jaubert, J.-N. (2016). Development of the translated-consistent tc-PR and tc-RK cubic equations of state for a safe and accurate prediction of volumetric, energetic and saturation properties of pure compounds in the sub- and super-critical domains. Fluid Phase Equilibria, 429, 301–312. doi:10.1016/j.fluid.2016.09.003
  2. Pina-Martinez, A., Le Guennec, Y., Privat, R., Jaubert, J.-N., & Mathias, P. M. (2018). Analysis of the combinations of property data that are suitable for a safe estimation of consistent twu α-function parameters: Updated parameter values for the translated-consistent tc-PR and tc-RK cubic equations of state. Journal of Chemical and Engineering Data, 63(10), 3980–3988. doi:10.1021/acs.jced.8b00640
  3. Piña-Martinez, A., Privat, R., & Jaubert, J.-N. (2022). Use of 300,000 pseudo‐experimental data over 1800 pure fluids to assess the performance of four cubic equations of state: SRK , PR , tc ‐RK , and tc ‐PR. AIChE Journal. American Institute of Chemical Engineers, 68(2). doi:10.1002/aic.17518
source
Clapeyron.PR78Function
PR78(components::Vector{String};
 idealmodel = BasicIdeal,
 alpha = PR78Alpha,
 mixing = vdW1fRule,
@@ -442,7 +442,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Robinson DB, Peng DY. The characterization of the heptanes and heavier fractions for the GPA Peng-Robinson programs. Tulsa: Gas Processors Association; 1978
source
Clapeyron.PTVType
PTV(components;
+                    )

References

  1. Robinson DB, Peng DY. The characterization of the heptanes and heavier fractions for the GPA Peng-Robinson programs. Tulsa: Gas Processors Association; 1978
source
Clapeyron.PTVType
PTV(components;
 idealmodel = BasicIdeal,
 alpha = NoAlpha,
 mixing = vdW1fRule,
@@ -496,7 +496,7 @@
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.], #k,l can be ommited in single-component models.
                         l = [0. 0.01; 0.01 0.])
-                    )

References

  1. Valderrama, J. O. (1990). A generalized Patel-Teja equation of state for polar and nonpolar fluids and their mixtures. Journal of Chemical Engineering of Japan, 23(1), 87–91. doi:10.1252/jcej.23.87
source
Clapeyron.EPPR78Function
EPPR78(components_or_groups;
+                    )

References

  1. Valderrama, J. O. (1990). A generalized Patel-Teja equation of state for polar and nonpolar fluids and their mixtures. Journal of Chemical Engineering of Japan, 23(1), 87–91. doi:10.1252/jcej.23.87
source
Clapeyron.EPPR78Function
EPPR78(components_or_groups;
 idealmodel = BasicIdeal,
 alpha = PR78Alpha,
 mixing = PPR78Rule,
@@ -508,7 +508,7 @@
 mixing_userlocations = String[],
 translation_userlocations = String[],
 reference_state = nothing,
-verbose = false)

Enhanced Predictive Peng Robinson equation of state. it uses the following models:

References

  1. Jaubert, J.-N., Privat, R., & Mutelet, F. (2010). Predicting the phase equilibria of synthetic petroleum fluids with the PPR78 approach. AIChE Journal. American Institute of Chemical Engineers, 56(12), 3225–3235. doi:10.1002/aic.12232
  2. Jaubert, J.-N., Qian, J.-W., Lasala, S., & Privat, R. (2022). The impressive impact of including enthalpy and heat capacity of mixing data when parameterising equations of state. Application to the development of the E-PPR78 (Enhanced-Predictive-Peng-Robinson-78) model. Fluid Phase Equilibria, (113456), 113456. doi:10.1016/j.fluid.2022.113456
source
Clapeyron.UMRPRFunction
UMRPR(components;
+verbose = false)

Enhanced Predictive Peng Robinson equation of state. it uses the following models:

References

  1. Jaubert, J.-N., Privat, R., & Mutelet, F. (2010). Predicting the phase equilibria of synthetic petroleum fluids with the PPR78 approach. AIChE Journal. American Institute of Chemical Engineers, 56(12), 3225–3235. doi:10.1002/aic.12232
  2. Jaubert, J.-N., Qian, J.-W., Lasala, S., & Privat, R. (2022). The impressive impact of including enthalpy and heat capacity of mixing data when parameterising equations of state. Application to the development of the E-PPR78 (Enhanced-Predictive-Peng-Robinson-78) model. Fluid Phase Equilibria, (113456), 113456. doi:10.1016/j.fluid.2022.113456
source
Clapeyron.UMRPRFunction
UMRPR(components;
 idealmodel = BasicIdeal,
 userlocations = String[],
 group_userlocations = String[],
@@ -518,7 +518,7 @@
 activity_userlocations = String[],
 translation_userlocations = String[],
 reference_state = nothing,
-verbose = false)

Universal Mixing Rule Peng Robinson equation of state. it uses the following models:

References

  1. Voutsas, E., Magoulas, K., & Tassios, D. (2004). Universal mixing rule for cubic equations of state applicable to symmetric and asymmetric systems: Results with the Peng−Robinson equation of state. Industrial & Engineering Chemistry Research, 43(19), 6238–6246. doi:10.1021/ie049580p
source
Clapeyron.VTPRFunction
VTPR(components;
+verbose = false)

Universal Mixing Rule Peng Robinson equation of state. it uses the following models:

References

  1. Voutsas, E., Magoulas, K., & Tassios, D. (2004). Universal mixing rule for cubic equations of state applicable to symmetric and asymmetric systems: Results with the Peng−Robinson equation of state. Industrial & Engineering Chemistry Research, 43(19), 6238–6246. doi:10.1021/ie049580p
source
Clapeyron.VTPRFunction
VTPR(components;
 idealmodel = BasicIdeal,
 userlocations = String[],
 group_userlocations = String[]
@@ -528,7 +528,7 @@
 activity_userlocations = String[],
 translation_userlocations = String[],
 reference_state = nothing,
-verbose = false)

Volume-translated Peng Robinson equation of state. it uses the following models:

References

  1. Ahlers, J., & Gmehling, J. (2001). Development of an universal group contribution equation of state. Fluid Phase Equilibria, 191(1–2), 177–188. doi:10.1016/s0378-3812(01)00626-4
source
Clapeyron.tcPRFunction
tcPR(components;
+verbose = false)

Volume-translated Peng Robinson equation of state. it uses the following models:

References

  1. Ahlers, J., & Gmehling, J. (2001). Development of an universal group contribution equation of state. Fluid Phase Equilibria, 191(1–2), 177–188. doi:10.1016/s0378-3812(01)00626-4
source
Clapeyron.tcPRFunction
tcPR(components;
 idealmodel = BasicIdeal,
 userlocations = String[],
 ideal_userlocations = String[],
@@ -539,7 +539,7 @@
 reference_state = nothing,
 verbose = false,
 estimate_alpha = true,
-estimate_translation = true)

translated and consistent Peng Robinson equation of state. it uses the following models:

If Twu parameters are not provided, they can be estimated from the acentric factor (acentricfactor). If translation is not provided, it can be estimated, using Rackett compresibility Factor (ZRA) or the acentric factor (acentricfactor).

References

  1. Le Guennec, Y., Privat, R., & Jaubert, J.-N. (2016). Development of the translated-consistent tc-PR and tc-RK cubic equations of state for a safe and accurate prediction of volumetric, energetic and saturation properties of pure compounds in the sub- and super-critical domains. Fluid Phase Equilibria, 429, 301–312. doi:10.1016/j.fluid.2016.09.003
  2. Pina-Martinez, A., Le Guennec, Y., Privat, R., Jaubert, J.-N., & Mathias, P. M. (2018). Analysis of the combinations of property data that are suitable for a safe estimation of consistent twu α-function parameters: Updated parameter values for the translated-consistent tc-PR and tc-RK cubic equations of state. Journal of Chemical and Engineering Data, 63(10), 3980–3988. doi:10.1021/acs.jced.8b00640
  3. Piña-Martinez, A., Privat, R., & Jaubert, J.-N. (2022). Use of 300,000 pseudo‐experimental data over 1800 pure fluids to assess the performance of four cubic equations of state: SRK , PR , tc ‐RK , and tc ‐PR. AIChE Journal. American Institute of Chemical Engineers, 68(2). doi:10.1002/aic.17518
source
Clapeyron.tcPRWFunction
tcPR(components;
+estimate_translation = true)

translated and consistent Peng Robinson equation of state. it uses the following models:

If Twu parameters are not provided, they can be estimated from the acentric factor (acentricfactor). If translation is not provided, it can be estimated, using Rackett compresibility Factor (ZRA) or the acentric factor (acentricfactor).

References

  1. Le Guennec, Y., Privat, R., & Jaubert, J.-N. (2016). Development of the translated-consistent tc-PR and tc-RK cubic equations of state for a safe and accurate prediction of volumetric, energetic and saturation properties of pure compounds in the sub- and super-critical domains. Fluid Phase Equilibria, 429, 301–312. doi:10.1016/j.fluid.2016.09.003
  2. Pina-Martinez, A., Le Guennec, Y., Privat, R., Jaubert, J.-N., & Mathias, P. M. (2018). Analysis of the combinations of property data that are suitable for a safe estimation of consistent twu α-function parameters: Updated parameter values for the translated-consistent tc-PR and tc-RK cubic equations of state. Journal of Chemical and Engineering Data, 63(10), 3980–3988. doi:10.1021/acs.jced.8b00640
  3. Piña-Martinez, A., Privat, R., & Jaubert, J.-N. (2022). Use of 300,000 pseudo‐experimental data over 1800 pure fluids to assess the performance of four cubic equations of state: SRK , PR , tc ‐RK , and tc ‐PR. AIChE Journal. American Institute of Chemical Engineers, 68(2). doi:10.1002/aic.17518
source
Clapeyron.tcPRWFunction
tcPR(components;
 idealmodel = BasicIdeal,
 userlocations = String[],
 ideal_userlocations = String[],
@@ -548,7 +548,7 @@
 activity_userlocations = String[],
 translation_userlocations = String[],
 reference_state = nothing,
-verbose = false)

translated and consistent Peng Robinson equation of state,with an gE mixing rule. it uses the following models:

If Twu parameters are not provided, they can be estimated from the acentric factor (acentricfactor). If translation is not provided, it can be estimated, using Rackett compresibility Factor (ZRA) or the acentric factor (acentricfactor).

References

  1. Le Guennec, Y., Privat, R., & Jaubert, J.-N. (2016). Development of the translated-consistent tc-PR and tc-RK cubic equations of state for a safe and accurate prediction of volumetric, energetic and saturation properties of pure compounds in the sub- and super-critical domains. Fluid Phase Equilibria, 429, 301–312. doi:10.1016/j.fluid.2016.09.003
  2. Pina-Martinez, A., Le Guennec, Y., Privat, R., Jaubert, J.-N., & Mathias, P. M. (2018). Analysis of the combinations of property data that are suitable for a safe estimation of consistent twu α-function parameters: Updated parameter values for the translated-consistent tc-PR and tc-RK cubic equations of state. Journal of Chemical and Engineering Data, 63(10), 3980–3988. doi:10.1021/acs.jced.8b00640
  3. Piña-Martinez, A., Privat, R., & Jaubert, J.-N. (2022). Use of 300,000 pseudo‐experimental data over 1800 pure fluids to assess the performance of four cubic equations of state: SRK , PR , tc ‐RK , and tc ‐PR. AIChE Journal. American Institute of Chemical Engineers, 68(2). doi:10.1002/aic.17518
  4. Piña-Martinez, A., Privat, R., Nikolaidis, I. K., Economou, I. G., & Jaubert, J.-N. (2021). What is the optimal activity coefficient model to be combined with the translated–consistent Peng–Robinson equation of state through advanced mixing rules? Cross-comparison and grading of the Wilson, UNIQUAC, and NRTL aE models against a benchmark database involving 200 binary systems. Industrial & Engineering Chemistry Research, 60(47), 17228–17247. doi:10.1021/acs.iecr.1c03003
source
Clapeyron.cPRFunction
cPR(components::Vector{String};
+verbose = false)

translated and consistent Peng Robinson equation of state,with an gE mixing rule. it uses the following models:

If Twu parameters are not provided, they can be estimated from the acentric factor (acentricfactor). If translation is not provided, it can be estimated, using Rackett compresibility Factor (ZRA) or the acentric factor (acentricfactor).

References

  1. Le Guennec, Y., Privat, R., & Jaubert, J.-N. (2016). Development of the translated-consistent tc-PR and tc-RK cubic equations of state for a safe and accurate prediction of volumetric, energetic and saturation properties of pure compounds in the sub- and super-critical domains. Fluid Phase Equilibria, 429, 301–312. doi:10.1016/j.fluid.2016.09.003
  2. Pina-Martinez, A., Le Guennec, Y., Privat, R., Jaubert, J.-N., & Mathias, P. M. (2018). Analysis of the combinations of property data that are suitable for a safe estimation of consistent twu α-function parameters: Updated parameter values for the translated-consistent tc-PR and tc-RK cubic equations of state. Journal of Chemical and Engineering Data, 63(10), 3980–3988. doi:10.1021/acs.jced.8b00640
  3. Piña-Martinez, A., Privat, R., & Jaubert, J.-N. (2022). Use of 300,000 pseudo‐experimental data over 1800 pure fluids to assess the performance of four cubic equations of state: SRK , PR , tc ‐RK , and tc ‐PR. AIChE Journal. American Institute of Chemical Engineers, 68(2). doi:10.1002/aic.17518
  4. Piña-Martinez, A., Privat, R., Nikolaidis, I. K., Economou, I. G., & Jaubert, J.-N. (2021). What is the optimal activity coefficient model to be combined with the translated–consistent Peng–Robinson equation of state through advanced mixing rules? Cross-comparison and grading of the Wilson, UNIQUAC, and NRTL aE models against a benchmark database involving 200 binary systems. Industrial & Engineering Chemistry Research, 60(47), 17228–17247. doi:10.1021/acs.iecr.1c03003
source
Clapeyron.cPRFunction
cPR(components::Vector{String};
 idealmodel = BasicIdeal,
 userlocations = String[],
 ideal_userlocations = String[],
@@ -557,7 +557,7 @@
 activity_userlocations = String[],
 translation_userlocations = String[],
 reference_state = nothing,
-verbose = false)

consistent Peng Robinson equation of state. it uses the following models:

References

  1. Bell, I. H., Satyro, M., & Lemmon, E. W. (2018). Consistent twu parameters for more than 2500 pure fluids from critically evaluated experimental data. Journal of Chemical and Engineering Data, 63(7), 2402–2409. doi:10.1021/acs.jced.7b00967
source
Clapeyron.QCPRFunction
QCPR(components;
+verbose = false)

consistent Peng Robinson equation of state. it uses the following models:

References

  1. Bell, I. H., Satyro, M., & Lemmon, E. W. (2018). Consistent twu parameters for more than 2500 pure fluids from critically evaluated experimental data. Journal of Chemical and Engineering Data, 63(7), 2402–2409. doi:10.1021/acs.jced.7b00967
source
Clapeyron.QCPRFunction
QCPR(components;
     idealmodel = BasicIdeal,
     userlocations = String[], 
     ideal_userlocations = String[],
@@ -566,12 +566,12 @@
     activity_userlocations = String[],
     translation_userlocations = String[],
     reference_state = nothing,
-    verbose = false)

Quantum-corrected Peng Robinson equation of state. it uses the following models:

References

  1. Aasen, A., Hammer, M., Lasala, S., Jaubert, J.-N., & Wilhelmsen, Ø. (2020). Accurate quantum-corrected cubic equations of state for helium, neon, hydrogen, deuterium and their mixtures. Fluid Phase Equilibria, 524(112790), 112790. doi:10.1016/j.fluid.2020.112790
source

Alpha (α(T)) Models

Clapeyron.α_functionFunction
α_function(model::CubicModel,V,T,z,αmodel::AlphaModel)

Interface function used in cubic models. it should return a vector of αᵢ(T).

Example:

function α_function(model::CubicModel,V,T,z,alpha_model::RKAlphaModel)
+    verbose = false)

Quantum-corrected Peng Robinson equation of state. it uses the following models:

References

  1. Aasen, A., Hammer, M., Lasala, S., Jaubert, J.-N., & Wilhelmsen, Ø. (2020). Accurate quantum-corrected cubic equations of state for helium, neon, hydrogen, deuterium and their mixtures. Fluid Phase Equilibria, 524(112790), 112790. doi:10.1016/j.fluid.2020.112790
source

Alpha (α(T)) Models

Clapeyron.α_functionFunction
α_function(model::CubicModel,V,T,z,αmodel::AlphaModel)

Interface function used in cubic models. it should return a vector of αᵢ(T).

Example:

function α_function(model::CubicModel,V,T,z,alpha_model::RKAlphaModel)
     return 1 ./ sqrt.(T ./ Tc)
-end
source
Clapeyron.NoAlphaType
NoAlpha(args...) <: NoAlphaModel

Input Parameters

None

Description

Cubic alpha (α(T)) model. Default for vdW EoS

αᵢ = 1 ∀ i

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
+end
source
Clapeyron.NoAlphaType
NoAlpha(args...) <: NoAlphaModel

Input Parameters

None

Description

Cubic alpha (α(T)) model. Default for vdW EoS

αᵢ = 1 ∀ i

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
 alpha = NoAlpha()
 alpha = NoAlpha("water")
-alpha = NoAlpha(["water","carbon dioxide"])
source
Clapeyron.ClausiusAlphaType
ClausiusAlpha <: ClausiusAlphaModel
+alpha = NoAlpha(["water","carbon dioxide"])
source
Clapeyron.ClausiusAlphaType
ClausiusAlpha <: ClausiusAlphaModel
 
 ClausiusAlpha(components;
 userlocations = String[],
@@ -579,7 +579,7 @@
 Trᵢ = T/Tcᵢ

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
 alpha = ClausiusAlpha()
 alpha = ClausiusAlpha("water")
-alpha = ClausiusAlpha(["water","carbon dioxide"])
source
Clapeyron.RKAlphaType
RKAlpha <: RKAlphaModel
+alpha = ClausiusAlpha(["water","carbon dioxide"])
source
Clapeyron.RKAlphaType
RKAlpha <: RKAlphaModel
 
 RKAlpha(components;
 userlocations = String[],
@@ -587,7 +587,7 @@
 Trᵢ = T/Tcᵢ

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
 alpha = RKAlpha()
 alpha = RKAlpha("water")
-alpha = RKAlpha(["water","carbon dioxide"])
source
Clapeyron.SoaveAlphaType
SoaveAlpha <: SoaveAlphaModel
+alpha = RKAlpha(["water","carbon dioxide"])
source
Clapeyron.SoaveAlphaType
SoaveAlpha <: SoaveAlphaModel
 
 SoaveAlpha(components;
 userlocations = String[],
@@ -603,7 +603,7 @@
 alpha = SoaveAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = SoaveAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.Soave2019AlphaType
Soave2019Alpha <: SoaveAlphaModel
+alpha = SoaveAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.Soave2019AlphaType
Soave2019Alpha <: SoaveAlphaModel
 
 Soave2019Alpha(components::Vector{String};
 userlocations = String[],
@@ -619,7 +619,7 @@
 alpha = Soave2019Alpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = Soave2019Alpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Pina-Martinez, A., Privat, R., Jaubert, J.-N., & Peng, D.-Y. (2019). Updated versions of the generalized Soave α-function suitable for the Redlich-Kwong and Peng-Robinson equations of state. Fluid Phase Equilibria, 485, 264–269. doi:10.1016/j.fluid.2018.12.007
source
Clapeyron.PRAlphaType
PRAlpha <: SoaveAlphaModel
+alpha = Soave2019Alpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Pina-Martinez, A., Privat, R., Jaubert, J.-N., & Peng, D.-Y. (2019). Updated versions of the generalized Soave α-function suitable for the Redlich-Kwong and Peng-Robinson equations of state. Fluid Phase Equilibria, 485, 264–269. doi:10.1016/j.fluid.2018.12.007
source
Clapeyron.PRAlphaType
PRAlpha <: SoaveAlphaModel
 
 PRAlpha(components;
 userlocations = String[],
@@ -635,7 +635,7 @@
 alpha = PRAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = PRAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.PR78AlphaType
PR78Alpha <: PR78AlphaModel
+alpha = PRAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.PR78AlphaType
PR78Alpha <: PR78AlphaModel
 
 PR78Alpha(components;
 userlocations = String[],
@@ -654,7 +654,7 @@
 alpha = PR78Alpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = PR78Alpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.CPAAlphaType
CPAAlpha <: CPAAlphaModel
+alpha = PR78Alpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.CPAAlphaType
CPAAlpha <: CPAAlphaModel
 
 CPAAlpha(components;
 userlocations = String[],
@@ -668,7 +668,7 @@
 alpha = CPAAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","cpa/alpha.csv"])
 
 # Passing parameters directly
-alpha = CPAAlpha(["water","carbon dioxide"];userlocations = (;c1 = [0.67,0.76]))
source
Clapeyron.sCPAAlphaType
sCPAAlpha <: sCPAAlphaModel
+alpha = CPAAlpha(["water","carbon dioxide"];userlocations = (;c1 = [0.67,0.76]))
source
Clapeyron.sCPAAlphaType
sCPAAlpha <: sCPAAlphaModel
 
 sCPAAlpha(components;
 userlocations = String[],
@@ -682,7 +682,7 @@
 alpha = sCPAAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","scpa/alpha.csv"])
 
 # Passing parameters directly
-alpha = sCPAAlpha(["water","carbon dioxide"];userlocations = (;c1 = [0.67,0.76]))
source
Clapeyron.MTAlphaType
MTAlpha <: MTAlphaModel
+alpha = sCPAAlpha(["water","carbon dioxide"];userlocations = (;c1 = [0.67,0.76]))
source
Clapeyron.MTAlphaType
MTAlpha <: MTAlphaModel
 
 MTAlpha(components;
 userlocations = String[],
@@ -698,7 +698,7 @@
 alpha = MTAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = MTAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Magoulas, K., & Tassios, D. (1990). Thermophysical properties of n-Alkanes from C1 to C20 and their prediction for higher ones. Fluid Phase Equilibria, 56, 119–140. doi:10.1016/0378-3812(90)85098-u
source
Clapeyron.BMAlphaType
BMAlpha <: BMAlphaModel
+alpha = MTAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Magoulas, K., & Tassios, D. (1990). Thermophysical properties of n-Alkanes from C1 to C20 and their prediction for higher ones. Fluid Phase Equilibria, 56, 119–140. doi:10.1016/0378-3812(90)85098-u
source
Clapeyron.BMAlphaType
BMAlpha <: BMAlphaModel
 
 BMAlpha(components;
 userlocations = String[],
@@ -722,7 +722,7 @@
 alpha = BMAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = BMAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. .M. Boston, P.M. Mathias, Proceedings of the 2nd International Conference on Phase Equilibria and Fluid Properties in the Chemical Process Industries, West Berlin, March, 1980, pp. 823–849
source
Clapeyron.TwuAlphaType
TwuAlpha <: TwuAlphaModel
+alpha = BMAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. .M. Boston, P.M. Mathias, Proceedings of the 2nd International Conference on Phase Equilibria and Fluid Properties in the Chemical Process Industries, West Berlin, March, 1980, pp. 823–849
source
Clapeyron.TwuAlphaType
TwuAlpha <: TwuAlphaModel
 Twu91Alpha = TwuAlpha
 TwuAlpha(components;
 userlocations = String[],
@@ -742,7 +742,7 @@
     userlocations = (;L = [0.40453, 156.21],
                     M = [0.95861, -0.0062072],
                     N = [0.8396, 5.047])
-                )

References

  1. Twu, C. H., Lee, L. L., & Starling, K. E. (1980). Improved analytical representation of argon thermodynamic behavior. Fluid Phase Equilibria, 4(1–2), 35–44. doi:10.1016/0378-3812(80)80003-3
source
Clapeyron.Twu88AlphaFunction
Twu88Alpha::TwuAlpha
+                )

References

  1. Twu, C. H., Lee, L. L., & Starling, K. E. (1980). Improved analytical representation of argon thermodynamic behavior. Fluid Phase Equilibria, 4(1–2), 35–44. doi:10.1016/0378-3812(80)80003-3
source
Clapeyron.Twu88AlphaFunction
Twu88Alpha::TwuAlpha
 
 Twu88Alpha(components::Vector{String};
 userlocations = String[],
@@ -762,7 +762,7 @@
     userlocations = (;L = [0.40453, 156.21],
                     M = [0.95861, -0.0062072],
                     N = [0.8396, 5.047]) #if we don't pass N, then is assumed N = 2
-                )

References

  1. Twu, C. H., Lee, L. L., & Starling, K. E. (1980). Improved analytical representation of argon thermodynamic behavior. Fluid Phase Equilibria, 4(1–2), 35–44. doi:10.1016/0378-3812(80)80003-3
source
Clapeyron.PatelTejaAlphaType
PatelTejaAlpha <: SoaveAlphaModel
+                )

References

  1. Twu, C. H., Lee, L. L., & Starling, K. E. (1980). Improved analytical representation of argon thermodynamic behavior. Fluid Phase Equilibria, 4(1–2), 35–44. doi:10.1016/0378-3812(80)80003-3
source
Clapeyron.PatelTejaAlphaType
PatelTejaAlpha <: SoaveAlphaModel
 
 PatelTejaAlpha(components;
 userlocations = String[],
@@ -778,7 +778,7 @@
 alpha = PatelTejaAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = PatelTejaAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.KUAlphaType
KUAlpha <: AlphaModel
+alpha = PatelTejaAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source
Clapeyron.KUAlphaType
KUAlpha <: AlphaModel
 
 KUAlpha(components;
 userlocations = String[],
@@ -795,7 +795,7 @@
 alpha = KUAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = KUAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Kumar, A., & Upadhyay, R. (2021). A new two-parameters cubic equation of state with benefits of three-parameters. Chemical Engineering Science, 229(116045), 116045. doi:10.1016/j.ces.2020.116045
source
Clapeyron.RKPRAlphaType
RKPRAlpha <: RKPRAlphaModel
+alpha = KUAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Kumar, A., & Upadhyay, R. (2021). A new two-parameters cubic equation of state with benefits of three-parameters. Chemical Engineering Science, 229(116045), 116045. doi:10.1016/j.ces.2020.116045
source
Clapeyron.RKPRAlphaType
RKPRAlpha <: RKPRAlphaModel
 
 RKPRAlpha(components;
 userlocations = String[],
@@ -811,7 +811,7 @@
 alpha = RKPRAlpha(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-alpha = RKPRAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source

Volume Translation Models

Clapeyron.translationFunction
translation(model::CubicModel,V,T,z,translation_model::TranslationModel)

Interface function used in cubic models. it should return a vector of cᵢ. such as Ṽ = V + mixing(c,z)

Example:

function translation(model::CubicModel,V,T,z,translation_model::RackettTranslation)
+alpha = RKPRAlpha(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))
source

Volume Translation Models

Clapeyron.translationFunction
translation(model::CubicModel,V,T,z,translation_model::TranslationModel)

Interface function used in cubic models. it should return a vector of cᵢ. such as Ṽ = V + mixing(c,z)

Example:

function translation(model::CubicModel,V,T,z,translation_model::RackettTranslation)
     Tc = model.params.Tc.values
     Pc = model.params.Pc.values
     Vc = translation_model.params.Vc.values
@@ -819,11 +819,11 @@
     Zc = Pc .* Vc ./ (R .* Tc)
     c = 0.40768 .* (0.29441 .- Zc) .* R .* Tc ./ Pc
     return c
-end
source
Clapeyron.NoTranslationType
NoTranslation(args...) <: TranslationModel

Input Parameters

None

Description

Default volume translation model for cubic models. it performs no translation:

V = V₀ + mixing_rule(cᵢ)
+end
source
Clapeyron.NoTranslationType
NoTranslation(args...) <: TranslationModel

Input Parameters

None

Description

Default volume translation model for cubic models. it performs no translation:

V = V₀ + mixing_rule(cᵢ)
 cᵢ = 0 ∀ i

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
 translation = NoTranslation()
 translation = NoTranslation("water")
-translation = NoTranslation(["water","carbon dioxide"])
source
Clapeyron.ConstantTranslationType
ConstantTranslation <: ConstantTranslationModel
+translation = NoTranslation(["water","carbon dioxide"])
source
Clapeyron.ConstantTranslationType
ConstantTranslation <: ConstantTranslationModel
 ConstantTranslation(components;
 userlocations = String[],
 verbose::Bool=false)

Input Parameters

  • v_shift: Single Parameter (Float64) - Volume shift [m³/mol]

Description

Constant Translation model for cubics:

V = V₀ + mixing_rule(cᵢ)

where cᵢ is constant. It does not have parameters by default, the volume shifts must be user-supplied.

Model Construction Examples

# Using user-provided parameters
@@ -832,7 +832,7 @@
 translation = ConstantTranslation(["neon","hydrogen"]; userlocations = ["path/to/my/db","properties/critical.csv"])
 
 # Passing parameters directly
-translation = ConstantTranslation(["neon","hydrogen"];userlocations = (;Vc = [4.25e-5, 6.43e-5]))
source
Clapeyron.RackettTranslationType
RackettTranslation <: RackettTranslationModel
+translation = ConstantTranslation(["neon","hydrogen"];userlocations = (;Vc = [4.25e-5, 6.43e-5]))
source
Clapeyron.RackettTranslationType
RackettTranslation <: RackettTranslationModel
 
 RackettTranslation(components;
 userlocations = String[],
@@ -848,7 +848,7 @@
 translation = RackettTranslation(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/Vc.csv"])
 
 # Passing parameters directly
-translation = RackettTranslation(["neon","hydrogen"];userlocations = (;Vc = [4.25e-5, 6.43e-5]))

References

  1. Rackett, H. G. (1970). Equation of state for saturated liquids. Journal of Chemical and Engineering Data, 15(4), 514–517. doi:10.1021/je60047a012
source
Clapeyron.PenelouxTranslationType
PenelouxTranslation <: PenelouxTranslationModel
+translation = RackettTranslation(["neon","hydrogen"];userlocations = (;Vc = [4.25e-5, 6.43e-5]))

References

  1. Rackett, H. G. (1970). Equation of state for saturated liquids. Journal of Chemical and Engineering Data, 15(4), 514–517. doi:10.1021/je60047a012
source
Clapeyron.PenelouxTranslationType
PenelouxTranslation <: PenelouxTranslationModel
 
 PenelouxTranslation(components;
 userlocations = String[],
@@ -864,7 +864,7 @@
 translation = PenelouxTranslation(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/Vc.csv"])
 
 # Passing parameters directly
-translation = PenelouxTranslation(["neon","hydrogen"];userlocations = (;Vc = [4.25e-5, 6.43e-5]))

References

  1. Péneloux A, Rauzy E, Fréze R. (1982) A consistent correction for Redlich‐Kwong‐Soave volumes. Fluid Phase Equilibria 1, 8(1), 7–23. doi:10.1016/0378-3812(82)80002-2
source
Clapeyron.MTTranslationType

MTTranslation <: MTTranslationModel

MTTranslation(components;
+translation = PenelouxTranslation(["neon","hydrogen"];userlocations = (;Vc = [4.25e-5, 6.43e-5]))

References

  1. Péneloux A, Rauzy E, Fréze R. (1982) A consistent correction for Redlich‐Kwong‐Soave volumes. Fluid Phase Equilibria 1, 8(1), 7–23. doi:10.1016/0378-3812(82)80002-2
source
Clapeyron.MTTranslationType

MTTranslation <: MTTranslationModel

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

Input Parameters

  • acentricfactor: Single Parameter (Float64)

Description

Magoulas Tassios Translation model for cubics:

V = V₀ + mixing_rule(cᵢ)
 cᵢ = T₀ᵢ+(T̄cᵢ-T̄₀ᵢ)*exp(β*abs(1-Trᵢ))
@@ -882,7 +882,7 @@
 translation = MTTranslation(["neon","hydrogen"]; userlocations = ["path/to/my/db","critical/acentric.csv"])
 
 # Passing parameters directly
-translation = MTTranslation(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Magoulas, K., & Tassios, D. (1990). Thermophysical properties of n-Alkanes from C1 to C20 and their prediction for higher ones. Fluid Phase Equilibria, 56, 119–140. doi:10.1016/0378-3812(90)85098-u
source

Mixing Rule Models

Clapeyron.vdW1fRuleType
vdW1fRule <: vdW1fRuleModel
+translation = MTTranslation(["neon","hydrogen"];userlocations = (;acentricfactor = [-0.03,-0.21]))

References

  1. Magoulas, K., & Tassios, D. (1990). Thermophysical properties of n-Alkanes from C1 to C20 and their prediction for higher ones. Fluid Phase Equilibria, 56, 119–140. doi:10.1016/0378-3812(90)85098-u
source

Mixing Rule Models

Clapeyron.vdW1fRuleType
vdW1fRule <: vdW1fRuleModel
 
 vdW1fRule(components;
 userlocations = String[],
@@ -893,7 +893,7 @@
 c̄ = ∑cᵢxᵢ

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
 mixing = vdW1fRule()
 mixing = vdW1fRule("water")
-mixing = vdW1fRule(["water","carbon dioxide"])
source
Clapeyron.KayRuleType
KayRule <: KayRuleModel
+mixing = vdW1fRule(["water","carbon dioxide"])
source
Clapeyron.KayRuleType
KayRule <: KayRuleModel
 
 KayRule(components;
 userlocations = String[],
@@ -904,7 +904,7 @@
 c̄ = ∑cᵢxᵢ

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
 mixing = KayRule()
 mixing = KayRule("water")
-mixing = KayRule(["water","carbon dioxide"])
source
Clapeyron.HVRuleType
HVRule{γ} <: HVRuleModel
+mixing = KayRule(["water","carbon dioxide"])
source
Clapeyron.HVRuleType
HVRule{γ} <: HVRuleModel
 
 HVRule(components;
 activity = Wilson,
@@ -937,7 +937,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )
source
Clapeyron.MHV1RuleType
MHV1Rule{γ} <: MHV1RuleModel
+                )
source
Clapeyron.MHV1RuleType
MHV1Rule{γ} <: MHV1RuleModel
 
 MHV1Rule(components;
 activity = Wilson,
@@ -972,7 +972,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )

References

  1. Michelsen, M. L. (1990). A modified Huron-Vidal mixing rule for cubic equations of state. Fluid Phase Equilibria, 60(1–2), 213–219. doi:10.1016/0378-3812(90)85053-d
source
Clapeyron.MHV2RuleType
MHV2Rule{γ} <: MHV2RuleModel
+                )

References

  1. Michelsen, M. L. (1990). A modified Huron-Vidal mixing rule for cubic equations of state. Fluid Phase Equilibria, 60(1–2), 213–219. doi:10.1016/0378-3812(90)85053-d
source
Clapeyron.MHV2RuleType
MHV2Rule{γ} <: MHV2RuleModel
 
 MHV2Rule(components;
 activity = Wilson,
@@ -1010,7 +1010,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )

References

  1. Michelsen, M. L. (1990). A modified Huron-Vidal mixing rule for cubic equations of state. Fluid Phase Equilibria, 60(1–2), 213–219. doi:10.1016/0378-3812(90)85053-d
source
Clapeyron.LCVMRuleType
LCVMRule{γ} <: LCVMRuleModel
+                )

References

  1. Michelsen, M. L. (1990). A modified Huron-Vidal mixing rule for cubic equations of state. Fluid Phase Equilibria, 60(1–2), 213–219. doi:10.1016/0378-3812(90)85053-d
source
Clapeyron.LCVMRuleType
LCVMRule{γ} <: LCVMRuleModel
 
 LCVMRule(components;
 activity = Wilson,
@@ -1042,7 +1042,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )

References

  1. Boukouvalas, C., Spiliotis, N., Coutsikos, P., Tzouvaras, N., & Tassios, D. (1994). Prediction of vapor-liquid equilibrium with the LCVM model: a linear combination of the Vidal and Michelsen mixing rules coupled with the original UNIFAC. Fluid Phase Equilibria, 92, 75–106. doi:10.1016/0378-3812(94)80043-x
source
Clapeyron.WSRuleType
WSRule{γ} <: WSRuleModel
+                )

References

  1. Boukouvalas, C., Spiliotis, N., Coutsikos, P., Tzouvaras, N., & Tassios, D. (1994). Prediction of vapor-liquid equilibrium with the LCVM model: a linear combination of the Vidal and Michelsen mixing rules coupled with the original UNIFAC. Fluid Phase Equilibria, 92, 75–106. doi:10.1016/0378-3812(94)80043-x
source
Clapeyron.WSRuleType
WSRule{γ} <: WSRuleModel
 
 WSRule(components;
 activity = Wilson,
@@ -1079,7 +1079,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )

References

  1. Wong, D. S. H., & Sandler, S. I. (1992). A theoretically correct mixing rule for cubic equations of state. AIChE journal. American Institute of Chemical Engineers, 38(5), 671–680. doi:10.1002/aic.690380505
source
Clapeyron.modWSRuleType
modWSRule{γ} <: WSRuleModel
+                )

References

  1. Wong, D. S. H., & Sandler, S. I. (1992). A theoretically correct mixing rule for cubic equations of state. AIChE journal. American Institute of Chemical Engineers, 38(5), 671–680. doi:10.1002/aic.690380505
source
Clapeyron.modWSRuleType
modWSRule{γ} <: WSRuleModel
 
 modWSRule(components;
 activity = Wilson,
@@ -1115,7 +1115,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )

References

  1. Wong, D. S. H., & Sandler, S. I. (1992). A theoretically correct mixing rule for cubic equations of state. AIChE journal. American Institute of Chemical Engineers, 38(5), 671–680. doi:10.1002/aic.690380505
  2. Orbey, H., & Sandler, S. I. (1995). Reformulation of Wong-Sandler mixing rule for cubic equations of state. AIChE journal. American Institute of Chemical Engineers, 41(3), 683–690. doi:10.1002/aic.690410325
source
Clapeyron.VTPRRuleType
VTPRRule{γ} <: VTPRRuleModel
+                )

References

  1. Wong, D. S. H., & Sandler, S. I. (1992). A theoretically correct mixing rule for cubic equations of state. AIChE journal. American Institute of Chemical Engineers, 38(5), 671–680. doi:10.1002/aic.690380505
  2. Orbey, H., & Sandler, S. I. (1995). Reformulation of Wong-Sandler mixing rule for cubic equations of state. AIChE journal. American Institute of Chemical Engineers, 41(3), 683–690. doi:10.1002/aic.690410325
source
Clapeyron.VTPRRuleType
VTPRRule{γ} <: VTPRRuleModel
 
 VTPRRule(components;
 activity = UNIFAC,
@@ -1150,7 +1150,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )

References

  1. Ahlers, J., & Gmehling, J. (2001). Development of an universal group contribution equation of state. Fluid Phase Equilibria, 191(1–2), 177–188. doi:10.1016/s0378-3812(01)00626-4
source
Clapeyron.PSRKRuleType
PSRKRule{γ} <: MHV1RuleModel
+                )

References

  1. Ahlers, J., & Gmehling, J. (2001). Development of an universal group contribution equation of state. Fluid Phase Equilibria, 191(1–2), 177–188. doi:10.1016/s0378-3812(01)00626-4
source
Clapeyron.PSRKRuleType
PSRKRule{γ} <: MHV1RuleModel
 
 PSRKRule(components;
 activity = Wilson,
@@ -1179,7 +1179,7 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )
source
Clapeyron.UMRRuleType
UMRRule{γ} <: UMRRuleModel
+                )
source
Clapeyron.UMRRuleType
UMRRule{γ} <: UMRRuleModel
 
 UMRRule(components;
 activity = UNIFAC,
@@ -1191,7 +1191,7 @@
 c̄ = ∑cᵢxᵢ
 ā = b̄RT(∑[xᵢaᵢᵢαᵢ/(RTbᵢᵢ)] - [gᴱ/RT]/0.53)
 
-## Model Construction Examples

Note: this model was meant to be used exclusively with the UNIFAC activity model.

Using the default database

mixing = VTPRRule(["water","carbon dioxide"]) #default: UNIFAC Activity Coefficient. mixing = VTPRRule(["water","carbon dioxide"],activity = NRTL) #passing another Activity Coefficient Model mixing = VTPRRule([("ethane",["CH3" => 2]),("butane",["CH2" => 2,"CH3" => 2])],activity = ogUNIFAC) #passing a GC Activity Coefficient Model.

Passing a prebuilt model

actmodel = NRTL(["water","ethanol"],userlocations = (a = [0.0 3.458; -0.801 0.0],b = [0.0 -586.1; 246.2 0.0], c = [0.0 0.3; 0.3 0.0])) mixing = VTPRRule(["water","ethanol"],activity = actmodel)

Using user-provided parameters

Passing files or folders

mixing = VTPRRule(["water","ethanol"]; activity = NRTL, activityuserlocations = ["path/to/my/db","nrtlge.csv"])

Passing parameters directly

mixing = VTPRRule(["water","ethanol"]; activity = NRTL, userlocations = (a = [0.0 3.458; -0.801 0.0], b = [0.0 -586.1; 246.2 0.0], c = [0.0 0.3; 0.3 0.0]) )

source
Clapeyron.QCPRRuleType
QCPRRule <: MHV2RuleModel
+## Model Construction Examples

Note: this model was meant to be used exclusively with the UNIFAC activity model.

Using the default database

mixing = VTPRRule(["water","carbon dioxide"]) #default: UNIFAC Activity Coefficient. mixing = VTPRRule(["water","carbon dioxide"],activity = NRTL) #passing another Activity Coefficient Model mixing = VTPRRule([("ethane",["CH3" => 2]),("butane",["CH2" => 2,"CH3" => 2])],activity = ogUNIFAC) #passing a GC Activity Coefficient Model.

Passing a prebuilt model

actmodel = NRTL(["water","ethanol"],userlocations = (a = [0.0 3.458; -0.801 0.0],b = [0.0 -586.1; 246.2 0.0], c = [0.0 0.3; 0.3 0.0])) mixing = VTPRRule(["water","ethanol"],activity = actmodel)

Using user-provided parameters

Passing files or folders

mixing = VTPRRule(["water","ethanol"]; activity = NRTL, activityuserlocations = ["path/to/my/db","nrtlge.csv"])

Passing parameters directly

mixing = VTPRRule(["water","ethanol"]; activity = NRTL, userlocations = (a = [0.0 3.458; -0.801 0.0], b = [0.0 -586.1; 246.2 0.0], c = [0.0 0.3; 0.3 0.0]) )

source
Clapeyron.QCPRRuleType
QCPRRule <: MHV2RuleModel
 
 QCPRRule(components;
 activity = Wilson,
@@ -1203,7 +1203,7 @@
 βᵢ(T) = (1 + Aᵢ/(T + Bᵢ))^3 / (1 + Aᵢ/(Tcᵢ + Bᵢ))^3
 ā = ∑aᵢⱼxᵢxⱼ√(αᵢ(T)αⱼ(T))
 b̄ = ∑bᵢⱼxᵢxⱼ
-c̄ = ∑cᵢxᵢ

References

  1. Aasen, A., Hammer, M., Lasala, S., Jaubert, J.-N., & Wilhelmsen, Ø. (2020). Accurate quantum-corrected cubic equations of state for helium, neon, hydrogen, deuterium and their mixtures. Fluid Phase Equilibria, 524(112790), 112790. doi:10.1016/j.fluid.2020.112790
source
Clapeyron.PPR78RuleType
PPR78Rule <: PPR78RuleModel
+c̄ = ∑cᵢxᵢ

References

  1. Aasen, A., Hammer, M., Lasala, S., Jaubert, J.-N., & Wilhelmsen, Ø. (2020). Accurate quantum-corrected cubic equations of state for helium, neon, hydrogen, deuterium and their mixtures. Fluid Phase Equilibria, 524(112790), 112790. doi:10.1016/j.fluid.2020.112790
source
Clapeyron.PPR78RuleType
PPR78Rule <: PPR78RuleModel
 
 PPR78Rule(components;
 userlocations = String[],
@@ -1213,7 +1213,7 @@
 b̄ = ∑bᵢⱼxᵢxⱼ
 c̄ = ∑cᵢxᵢ
 ā = b̄(∑[xᵢaᵢαᵢ/(bᵢᵢ)] - ∑xᵢxⱼbᵢbⱼEᵢⱼ/2b̄)
-Eᵢⱼ = ∑(z̄ᵢₖ - z̄ⱼₖ)(z̄ᵢₗ - z̄ⱼₗ) × Aₖₗ × (298.15/T)^(Aₖₗ/Bₖₗ - 1)

References

  1. Jaubert, J.-N., Privat, R., & Mutelet, F. (2010). Predicting the phase equilibria of synthetic petroleum fluids with the PPR78 approach. AIChE Journal. American Institute of Chemical Engineers, 56(12), 3225–3235. doi:10.1002/aic.12232
  2. Jaubert, J.-N., Qian, J.-W., Lasala, S., & Privat, R. (2022). The impressive impact of including enthalpy and heat capacity of mixing data when parameterising equations of state. Application to the development of the E-PPR78 (Enhanced-Predictive-Peng-Robinson-78) model. Fluid Phase Equilibria, (113456), 113456. doi:10.1016/j.fluid.2022.113456
source
Clapeyron.gErRuleType
gErRule{γ} <: gErRuleModel
+Eᵢⱼ = ∑(z̄ᵢₖ - z̄ⱼₖ)(z̄ᵢₗ - z̄ⱼₗ) × Aₖₗ × (298.15/T)^(Aₖₗ/Bₖₗ - 1)

References

  1. Jaubert, J.-N., Privat, R., & Mutelet, F. (2010). Predicting the phase equilibria of synthetic petroleum fluids with the PPR78 approach. AIChE Journal. American Institute of Chemical Engineers, 56(12), 3225–3235. doi:10.1002/aic.12232
  2. Jaubert, J.-N., Qian, J.-W., Lasala, S., & Privat, R. (2022). The impressive impact of including enthalpy and heat capacity of mixing data when parameterising equations of state. Application to the development of the E-PPR78 (Enhanced-Predictive-Peng-Robinson-78) model. Fluid Phase Equilibria, (113456), 113456. doi:10.1016/j.fluid.2022.113456
source
Clapeyron.gErRuleType
gErRule{γ} <: gErRuleModel
 
 gErRule(components;
 activity = NRTL,
@@ -1244,4 +1244,4 @@
                 userlocations = (a = [0.0 3.458; -0.801 0.0],
                     b = [0.0 -586.1; 246.2 0.0],
                     c = [0.0 0.3; 0.3 0.0])
-                )

References

  1. Piña-Martinez, A., Privat, R., Nikolaidis, I. K., Economou, I. G., & Jaubert, J.-N. (2021). What is the optimal activity coefficient model to be combined with the translated–consistent Peng–Robinson equation of state through advanced mixing rules? Cross-comparison and grading of the Wilson, UNIQUAC, and NRTL aE models against a benchmark database involving 200 binary systems. Industrial & Engineering Chemistry Research, 60(47), 17228–17247. doi:10.1021/acs.iecr.1c03003
source
+ )

References

  1. Piña-Martinez, A., Privat, R., Nikolaidis, I. K., Economou, I. G., & Jaubert, J.-N. (2021). What is the optimal activity coefficient model to be combined with the translated–consistent Peng–Robinson equation of state through advanced mixing rules? Cross-comparison and grading of the Wilson, UNIQUAC, and NRTL aE models against a benchmark database involving 200 binary systems. Industrial & Engineering Chemistry Research, 60(47), 17228–17247. doi:10.1021/acs.iecr.1c03003
source diff --git a/dev/eos/electrolytes/index.html b/dev/eos/electrolytes/index.html index a08e77562..09f33a775 100644 --- a/dev/eos/electrolytes/index.html +++ b/dev/eos/electrolytes/index.html @@ -11,37 +11,37 @@ idealmodel = BasicIdeal, neutralmodel = pharmaPCSAFT, ionmodel = DH, - RSPmodel = ConstRSP)

Any of the available models in Clapeyron can be combined in the above. Note that neutral (solvent) species and ions are defined separately. Within Clapeyron, we will only support ion-based electrolyte models; as such, any salt-based approach (i.e. where the salt is treated as a separate species) will not be supported.

source

Ion Models

Clapeyron.BornType
Born(solvents::Array{String,1}, 
+            RSPmodel = ConstRSP)  

Any of the available models in Clapeyron can be combined in the above. Note that neutral (solvent) species and ions are defined separately. Within Clapeyron, we will only support ion-based electrolyte models; as such, any salt-based approach (i.e. where the salt is treated as a separate species) will not be supported.

source

Ion Models

Clapeyron.BornType
Born(solvents::Array{String,1}, 
      salts::Array{String,1}; 
      RSPmodel=ConstW, 
      SAFTlocations=String[], 
      userlocations=String[], 
-     verbose=false)

Input parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Born model. The Born term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Born, M. (1920). Z. Phys. 1, 45.
source
Clapeyron.DHType
DH(solvents::Array{String,1}, 
+     verbose=false)

Input parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Born model. The Born term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Born, M. (1920). Z. Phys. 1, 45.
source
Clapeyron.DHType
DH(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      RSPmodel=ConstW, 
      SAFTlocations=String[], 
      userlocations=String[], 
-     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Debye-Hückel model. The Debye-Hückel term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Debye, P., Huckel, E. (1923). Phys. Z. 24, 185.
source
Clapeyron.MSAType
MSA(solvents::Array{String,1}, 
+     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Debye-Hückel model. The Debye-Hückel term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Debye, P., Huckel, E. (1923). Phys. Z. 24, 185.
source
Clapeyron.MSAType
MSA(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      RSPmodel=ConstW, 
      SAFTlocations=String[], 
      userlocations=String[], 
-     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Hard-sphere diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Mean Spherical Approximation model. The MSA term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Blum, L. (1974). Solution of a model for the solvent‐electrolyte interactions in the mean spherical approximation, 61, 2129–2133.
source
Clapeyron.DHBornType
DHBorn(solvents::Array{String,1}, 
+     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Hard-sphere diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Mean Spherical Approximation model. The MSA term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Blum, L. (1974). Solution of a model for the solvent‐electrolyte interactions in the mean spherical approximation, 61, 2129–2133.
source
Clapeyron.DHBornType
DHBorn(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      RSPmodel=ConstW, 
      SAFTlocations=String[], 
      userlocations=String[], 
-     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Debye-Hückel-Born model. The Debye-Hückel-Born term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Debye, P., Huckel, E. (1923). Phys. Z. 24, 185.
  2. Born, M. (1920). Z. Phys. 1, 45.
source
Clapeyron.MSABornType
MSABorn(solvents::Array{String,1}, 
+     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Debye-Hückel-Born model. The Debye-Hückel-Born term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Debye, P., Huckel, E. (1923). Phys. Z. 24, 185.
  2. Born, M. (1920). Z. Phys. 1, 45.
source
Clapeyron.MSABornType
MSABorn(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      RSPmodel=ConstW, 
      SAFTlocations=String[], 
      userlocations=String[], 
-     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Hard-sphere diameter [m]
  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Mean Spherical Approximation-Born model. The MSA-Born term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Blum, L. (1974). Solution of a model for the solvent‐electrolyte interactions in the mean spherical approximation, 61, 2129–2133.
  2. Born, M. (1920). Z. Phys. 1, 45.
source
Clapeyron.GCMSABornType
GCMSABorn(solvents::Array{String,1}, 
+     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Hard-sphere diameter [m]
  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a Mean Spherical Approximation-Born model. The MSA-Born term gives the excess Helmholtz energy to account for the electrostatic interactions between ions in solution.

References

  1. Blum, L. (1974). Solution of a model for the solvent‐electrolyte interactions in the mean spherical approximation, 61, 2129–2133.
  2. Born, M. (1920). Z. Phys. 1, 45.
source
Clapeyron.GCMSABornType
GCMSABorn(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      RSPmodel=ConstW, 
      SAFTlocations=String[], 
      userlocations=String[], 
-     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Hard-sphere diameter [m]
  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a group-contribution Mean Spherical Approximation-Born model used in SAFT-gamma E Mie

source

Electrolyte Models

Clapeyron.ePCSAFTType
ePCSAFT(solvents::Array{String,1}, 
+     verbose=false)

Input parameters

  • sigma: Single Parameter (Float64) - Hard-sphere diameter [m]
  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • RSPmodel: Relative Static Permittivity Model

Description

This function is used to create a group-contribution Mean Spherical Approximation-Born model used in SAFT-gamma E Mie

source

Electrolyte Models

Clapeyron.ePCSAFTType
ePCSAFT(solvents::Array{String,1}, 
     ions::Array{String,1}; 
     idealmodel::IdealModel = BasicIdeal,
     neutralmodel::EoSModel = pharmaPCSAFT,
@@ -51,7 +51,7 @@
     ideal_userlocations::Vector{String} = [],
     assoc_options::AssocOptions = AssocOptions(),
     verbose::Bool = false,
-    reference_state = nothing)

Description

This function is used to create an ePCSAFT model which is a combination of the PC-SAFT and Debye-Hückel model. It is based on the ePC-SAFT Revised variant.

Input parameters

PC-SAFT 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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Debye-Hückel Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Held, C., Reschke, T., Mohammad, S., Luza, A., Sadowski, G. (2014). ePC-SAFT Revised. Chemical Engineering Research and Design, 92(12), 2884-2897.
source
Clapeyron.eSAFTVRMieType
eSAFTVRMie(solvents::Array{String,1}, 
+    reference_state = nothing)

Description

This function is used to create an ePCSAFT model which is a combination of the PC-SAFT and Debye-Hückel model. It is based on the ePC-SAFT Revised variant.

Input parameters

PC-SAFT 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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Debye-Hückel Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Held, C., Reschke, T., Mohammad, S., Luza, A., Sadowski, G. (2014). ePC-SAFT Revised. Chemical Engineering Research and Design, 92(12), 2884-2897.
source
Clapeyron.eSAFTVRMieType
eSAFTVRMie(solvents::Array{String,1}, 
     ions::Array{String,1}; 
     idealmodel::IdealModel = BasicIdeal,
     neutralmodel::EoSModel = SAFTVRMie15,
@@ -61,7 +61,7 @@
     ideal_userlocations::Vector{String} = [],
     assoc_options::AssocOptions = AssocOptions(),
     verbose::Bool = false,
-    reference_state = nothing)

Description

This function is used to create an eSAFTVRMie model which is a combination of the SAFTVR-Mie, Debye-Hückel and Born models.

Input parameters

SAFT-VR Mie 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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Debye-Hückel Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Born Parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Selam, M., Economou, I., Castier, M. (2018). A thermodynamic model for strong aqueous electrolytes based on the eSAFT-VR Mie equation of state. Fluid Phase Equilibria, 464, 47-63.
source
Clapeyron.SAFTVREMieFunction
SAFTVREMie(solvents::Array{String,1}, 
+    reference_state = nothing)

Description

This function is used to create an eSAFTVRMie model which is a combination of the SAFTVR-Mie, Debye-Hückel and Born models.

Input parameters

SAFT-VR Mie 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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Debye-Hückel Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Born Parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Selam, M., Economou, I., Castier, M. (2018). A thermodynamic model for strong aqueous electrolytes based on the eSAFT-VR Mie equation of state. Fluid Phase Equilibria, 464, 47-63.
source
Clapeyron.SAFTVREMieFunction
SAFTVREMie(solvents::Array{String,1}, 
     ions::Array{String,1}; 
     idealmodel::IdealModel = BasicIdeal,
     neutralmodel::EoSModel = SAFTVRMie,
@@ -71,7 +71,7 @@
     ideal_userlocations::Vector{String} = [],
     assoc_options::AssocOptions = AssocOptions(),
     verbose::Bool = false,
-    reference_state = nothing)

Description

This function is used to create an SAFT-VRE Mie model which is a combination of the SAFT-VR Mie, MSA and Born models.

Input parameters

SAFT-VR Mie 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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

MSA Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Born Parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Eriksen, D.K., Lazarou, G., Galindo, A., Jackson, G., Adjiman, C.S., & Haslam, A.J. (2016). Development of intermolecular potential models for electrolyte solutions using an electrolyte SAFT-VR Mie equation of state. Molecular Physics, 114(18), 2724-2749.
source
Clapeyron.SAFTgammaEMieFunction
SAFTgammaEMie(solvents::Array{String,1}, 
+    reference_state = nothing)

Description

This function is used to create an SAFT-VRE Mie model which is a combination of the SAFT-VR Mie, MSA and Born models.

Input parameters

SAFT-VR Mie 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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

MSA Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Born Parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Eriksen, D.K., Lazarou, G., Galindo, A., Jackson, G., Adjiman, C.S., & Haslam, A.J. (2016). Development of intermolecular potential models for electrolyte solutions using an electrolyte SAFT-VR Mie equation of state. Molecular Physics, 114(18), 2724-2749.
source
Clapeyron.SAFTgammaEMieFunction
SAFTgammaEMie(solvents::Array{String,1}, 
     ions::Array{String,1}; 
     idealmodel::IdealModel = BasicIdeal,
     neutralmodel::EoSModel = SAFTgammaMie,
@@ -80,17 +80,17 @@
     userlocations::Vector{String} = [],
     ideal_userlocations::Vector{String} = [],
     assoc_options::AssocOptions = AssocOptions(),
-    verbose::Bool = false)

Description

This function is used to create an SAFT-gammaE Mie model which is a combination of the SAFT-gamma Mie, MSA and Born models.

Input parameters

SAFT-VR Mie Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • vst: Single Parameter (Float64) - Number of segments (no units)
  • S: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

MSA Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Born Parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Haslam, A.J., González-Pérez, A., Di Lecce, S., Khalit, S.H., Perdomo, F.A., Kournopoulos, S., Kohns, M., Lindeboom, T., Wehbe, M., Febra, S., Jackson, G., Adjiman, C.S. & Galind, A. (2020). Expanding the Applications of the SAFT-γ Mie Group-Contribution Equation of State: Prediction of Thermodynamic Properties and Phase Behavior of Mixtures. Journal of Chemical Engineering Data, 65(12), 5862–5890
source

Relative Static Permittivity Models

Clapeyron.ConstRSPType
ConstRSP(solvents::Array{String,1}, 
+    verbose::Bool = false)

Description

This function is used to create an SAFT-gammaE Mie model which is a combination of the SAFT-gamma Mie, MSA and Born models.

Input parameters

SAFT-VR Mie Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • vst: Single Parameter (Float64) - Number of segments (no units)
  • S: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

MSA Parameters

  • sigma: Single Parameter (Float64) - Diameter of closest approach [m]
  • charge: Single Parameter (Float64) - Charge [-]

Born Parameters

  • sigma_born: Single Parameter (Float64) - Born Diameter [m]
  • charge: Single Parameter (Float64) - Charge [-]

Input models

  • idealmodel: Ideal Model
  • neutralmodel: Neutral EoS Model
  • ionmodel: Ion Model

References

  1. Haslam, A.J., González-Pérez, A., Di Lecce, S., Khalit, S.H., Perdomo, F.A., Kournopoulos, S., Kohns, M., Lindeboom, T., Wehbe, M., Febra, S., Jackson, G., Adjiman, C.S. & Galind, A. (2020). Expanding the Applications of the SAFT-γ Mie Group-Contribution Equation of State: Prediction of Thermodynamic Properties and Phase Behavior of Mixtures. Journal of Chemical Engineering Data, 65(12), 5862–5890
source

Relative Static Permittivity Models

Clapeyron.ConstRSPType
ConstRSP(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      userlocations::Vector{String}=[], 
      value::Float64 = 78.38484961, 
-     verbose::Bool=false)

Input parameters

  • value::Float64: Constant Relative Static Permittivity [-]

Description

This function is used to create a constant Relative Static Permittivity model, given by value.

source
Clapeyron.LinMixRSPType
LinMixRSP(solvents::Array{String,1}, 
+     verbose::Bool=false)

Input parameters

  • value::Float64: Constant Relative Static Permittivity [-]

Description

This function is used to create a constant Relative Static Permittivity model, given by value.

source
Clapeyron.LinMixRSPType
LinMixRSP(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      userlocations::Vector{String}=[], 
-     verbose::Bool=false)

Input parameters

  • dielectric_constant::Float64: Constant Relative Static Permittivity [-]

Description

This function is used to create a Linear Mixing-Rule Relative Static Permittivity model, for a mixture of solvents, where each solvent has a dielectric_constant.

source
Clapeyron.SchreckenbergType
Schreckenberg(solvents::Array{String,1}, 
+     verbose::Bool=false)

Input parameters

  • dielectric_constant::Float64: Constant Relative Static Permittivity [-]

Description

This function is used to create a Linear Mixing-Rule Relative Static Permittivity model, for a mixture of solvents, where each solvent has a dielectric_constant.

source
Clapeyron.SchreckenbergType
Schreckenberg(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      userlocations::Vector{String}=[], 
-     verbose::Bool=false)

Input parameters

  • d_T::Float64: Single Parameter - Temperature dependent dielectric constant [-]
  • d_V::Float64: Single Parameter - Volume dependent dielectric constant [-]
  • charge::Float64: Single Parameter - Charge [-]

Description

This function is used to create a Schreckenberg model. The Schreckenberg term estimates the dielectric constant for a mixture of solvents.

References

  1. Schreckenberg, J., Dufal, S., Haslam, A.J., Adjiman, C.S., Jackson, G., Galindo, A. (2014). Modelling of the thermodynamic and solvation properties of electrolyte solutions with the statistical associating fluid theory for potentials of variable range. Molecular Physics, 112(17), 2339-2364.
source
Clapeyron.ZuoFurstType
ZuoFurst(solvents::Array{String,1}, 
+     verbose::Bool=false)

Input parameters

  • d_T::Float64: Single Parameter - Temperature dependent dielectric constant [-]
  • d_V::Float64: Single Parameter - Volume dependent dielectric constant [-]
  • charge::Float64: Single Parameter - Charge [-]

Description

This function is used to create a Schreckenberg model. The Schreckenberg term estimates the dielectric constant for a mixture of solvents.

References

  1. Schreckenberg, J., Dufal, S., Haslam, A.J., Adjiman, C.S., Jackson, G., Galindo, A. (2014). Modelling of the thermodynamic and solvation properties of electrolyte solutions with the statistical associating fluid theory for potentials of variable range. Molecular Physics, 112(17), 2339-2364.
source
Clapeyron.ZuoFurstType
ZuoFurst(solvents::Array{String,1}, 
      ions::Array{String,1}; 
      userlocations::Vector{String}=[], 
-     verbose::Bool=false)

Description

This function is used to create a Zuo-First model. The Zuo-First expression estimates the dielectric constant of water for a range of temperatures.

References

  1. Zuo, Y-X., Fürst, W. (1997). Prediction of vapor pressure for nonaqueous electrolyte solutions using an electrolyte equation of state, Fluid Phase Equilibria, 138(1-2), 87-104.
source
+ verbose::Bool=false)

Description

This function is used to create a Zuo-First model. The Zuo-First expression estimates the dielectric constant of water for a range of temperatures.

References

  1. Zuo, Y-X., Fürst, W. (1997). Prediction of vapor pressure for nonaqueous electrolyte solutions using an electrolyte equation of state, Fluid Phase Equilibria, 138(1-2), 87-104.
source diff --git a/dev/eos/empiric/index.html b/dev/eos/empiric/index.html index 6f5b18e8d..d0baf42bd 100644 --- a/dev/eos/empiric/index.html +++ b/dev/eos/empiric/index.html @@ -53,7 +53,7 @@ Polynomial power terms: 7 Exponential terms: 44 Gaussian bell-shaped terms: 3 - Non Analytic terms: 2source
Clapeyron.SingleFluidIdealType
SingleFluidIdeal(components;
+ Non Analytic terms: 2
source
Clapeyron.SingleFluidIdealType
SingleFluidIdeal(components;
     userlocations = String[],
     Rgas = nothing,
     verbose = false,
@@ -65,7 +65,7 @@
 julia> model.ideal
 Ideal MultiParameter coefficients:
  Lead terms: -8.3204464837497 + 6.6832105275932*τ + 3.00632*log(τ)
- Plank-Einstein terms: 5
source
Clapeyron.MultiFluidType
MultiFluid(components;
+ Plank-Einstein terms: 5
source
Clapeyron.MultiFluidType
MultiFluid(components;
     idealmodel = nothing,
     ideal_userlocations = String[],
     pure_userlocations = String[],
@@ -78,12 +78,12 @@
     coolprop_userlocations = true,
     Rgas = nothing,
     reference_state = nothing,
-     verbose = false)

Input parameters

  • JSON data (CoolProp and teqp format)

Input models

  • idealmodel: Ideal Model. if it is nothing, then it will parse the ideal model from the input JSON.
  • mixing: mixing model for temperature and volume.
  • departure: departure model

Description

Instantiates a multi-component Empiric EoS model. Rgas can be used to set the value of the gas constant that is used during property calculations.

If coolprop_userlocations is true, then Clapeyron will try to look if the fluid is present in the CoolProp library.

If estimate_pure is true, then, if a JSON is not found, the pure model will be estimated, using the XiangDeiters model

estimate_mixing is used to fill missing mixing values in the case of using AsymmetricMixing. on other mixing models it has no effect.

  • estimate_mixing = :off will perform no calculation of mixing parameter, throwing an error if missing values are found.
  • estimate_mixing = :lb will perform Lorentz-Berthelot estimation of missing mixing parameters. (γT = βT = γv = βv = 1.0). additionally, you can pass LorentzBerthelotMixing to use k and l BIP instead.
  • estimate_mixing = :linear will perform averaging of γT and γv so that T(x) = ∑xᵢTᵢ and V(x) = ∑xᵢVᵢ on missing mixing parameters. Additionally, you can use LinearMixing to perform this directly.

Rgas sets the value of the gas constant to be used by the multifluid. The default is the following:

  • If Rgas is not specified and the input is a single component model, then the value of Rgas will be taken from the fluid json file.
  • If Rgas is not specified and the input is a multi-component model, then the value of Rgas will be set to Clapeyron.R̄ = Rgas() = 8.31446261815324 (2019 defined constant value)
source
Clapeyron.EmpiricIdealType
EmpiricIdeal(components;
+     verbose = false)

Input parameters

  • JSON data (CoolProp and teqp format)

Input models

  • idealmodel: Ideal Model. if it is nothing, then it will parse the ideal model from the input JSON.
  • mixing: mixing model for temperature and volume.
  • departure: departure model

Description

Instantiates a multi-component Empiric EoS model. Rgas can be used to set the value of the gas constant that is used during property calculations.

If coolprop_userlocations is true, then Clapeyron will try to look if the fluid is present in the CoolProp library.

If estimate_pure is true, then, if a JSON is not found, the pure model will be estimated, using the XiangDeiters model

estimate_mixing is used to fill missing mixing values in the case of using AsymmetricMixing. on other mixing models it has no effect.

  • estimate_mixing = :off will perform no calculation of mixing parameter, throwing an error if missing values are found.
  • estimate_mixing = :lb will perform Lorentz-Berthelot estimation of missing mixing parameters. (γT = βT = γv = βv = 1.0). additionally, you can pass LorentzBerthelotMixing to use k and l BIP instead.
  • estimate_mixing = :linear will perform averaging of γT and γv so that T(x) = ∑xᵢTᵢ and V(x) = ∑xᵢVᵢ on missing mixing parameters. Additionally, you can use LinearMixing to perform this directly.

Rgas sets the value of the gas constant to be used by the multifluid. The default is the following:

  • If Rgas is not specified and the input is a single component model, then the value of Rgas will be taken from the fluid json file.
  • If Rgas is not specified and the input is a multi-component model, then the value of Rgas will be set to Clapeyron.R̄ = Rgas() = 8.31446261815324 (2019 defined constant value)
source
Clapeyron.EmpiricIdealType
EmpiricIdeal(components;
 pure_userlocations = String[],
 estimate_pure = false,
 coolprop_userlocations = true,
 Rgas = R̄,
-verbose = false)

Input parameters

  • JSON data (CoolProp and teqp format)

Description

Instantiates the ideal part of a multi-component Empiric EoS model. Rgas can be used to set the value of the gas constant that is used during property calculations.

If coolprop_userlocations is true, then Clapeyron will try to look if the fluid is present in the CoolProp library.

If estimate_pure is true, then, if a JSON is not found, the pure model will be estimated, using the XiangDeiters model

source

SingleFluid Models

Clapeyron.XiangDeitersFunction
XiangDeiters::SingleFluid
+verbose = false)

Input parameters

  • JSON data (CoolProp and teqp format)

Description

Instantiates the ideal part of a multi-component Empiric EoS model. Rgas can be used to set the value of the gas constant that is used during property calculations.

If coolprop_userlocations is true, then Clapeyron will try to look if the fluid is present in the CoolProp library.

If estimate_pure is true, then, if a JSON is not found, the pure model will be estimated, using the XiangDeiters model

source

SingleFluid Models

Clapeyron.XiangDeitersFunction
XiangDeiters::SingleFluid
 XiangDeiters(component;
     idealmodel = BasicIdeal,
     userlocations = String[],
@@ -112,7 +112,7 @@
                         Vc = [4.25e-5],
                         Mw = [2.0],
                         acentricfactor = [-0.21])
-                    )

references

  1. Xiang, H. W., & Deiters, U. K. (2008). A new generalized corresponding-states equation of state for the extension of the Lee–Kesler equation to fluids consisting of polar and larger nonpolar molecules. Chemical Engineering Science, 63(6), 1490–1496. doi:10.1016/j.ces.2007.11.029
source
Clapeyron.IAPWS95Function
IAPWS95 <: EmpiricHelmholtzModel
+                    )

references

  1. Xiang, H. W., & Deiters, U. K. (2008). A new generalized corresponding-states equation of state for the extension of the Lee–Kesler equation to fluids consisting of polar and larger nonpolar molecules. Chemical Engineering Science, 63(6), 1490–1496. doi:10.1016/j.ces.2007.11.029
source
Clapeyron.IAPWS95Function
IAPWS95 <: EmpiricHelmholtzModel
 IAPWS95()

Input parameters

None

Description

IAPWS95 (International Association for the Properties of Water and Steam) Pure water Model, 2018 update.

δ = ρ/ρc
 τ = T/Tc
 a⁰(δ,τ) = log(δ) + n⁰₁ + n⁰₂τ + n⁰₃log(τ) + ∑n⁰ᵢ(1-exp(-γ⁰ᵢτ)), i ∈ 4:8
@@ -123,7 +123,7 @@
 aʳ₄(δ,τ) = ∑nᵢδΨΔ^(bᵢ), i ∈ 55:56
 Δ = θ^2 + Bᵢ[(δ - 1)^2]^aᵢ
 θ = (1 - τ) + Aᵢ[(δ - 1)^2]^(1/2βᵢ)
-Ψ = exp(-Cᵢ(δ - 1)^2 - Dᵢ(τ - 1)^2)

parameters n⁰,γ⁰,n,t,d,c,α,β,γ,ε,A,B,C,D where obtained via fitting.

References

  1. Wagner, W., & Pruß, A. (2002). The IAPWS formulation 1995 for the thermodynamic properties of ordinary water substance for general and scientific use. Journal of physical and chemical reference data, 31(2), 387–535. doi:10.1063/1.1461829
  2. IAPWS R6-95 (2018). Revised Release on the IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use
source
Clapeyron.PropaneRefFunction
PropaneRef <: EmpiricHelmholtzModel
+Ψ = exp(-Cᵢ(δ - 1)^2 - Dᵢ(τ - 1)^2)

parameters n⁰,γ⁰,n,t,d,c,α,β,γ,ε,A,B,C,D where obtained via fitting.

References

  1. Wagner, W., & Pruß, A. (2002). The IAPWS formulation 1995 for the thermodynamic properties of ordinary water substance for general and scientific use. Journal of physical and chemical reference data, 31(2), 387–535. doi:10.1063/1.1461829
  2. IAPWS R6-95 (2018). Revised Release on the IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use
source
Clapeyron.PropaneRefFunction
PropaneRef <: EmpiricHelmholtzModel
 PropaneRef()

Input parameters

None

Description

Propane Reference Equation of State

δ = ρ/ρc
 τ = T/Tc
 a⁰(δ,τ) = log(δ) + n⁰₁ + n⁰₂τ + n⁰₃log(τ) + ∑n⁰ᵢ(1-exp(-γ⁰ᵢτ)), i ∈ 4:7
@@ -131,7 +131,7 @@
 aʳ₁(δ,τ)  = ∑nᵢδ^(dᵢ)τ^(tᵢ), i ∈ 1:5
 aʳ₂(δ,τ)  = ∑nᵢexp(-δ^cᵢ)δ^(dᵢ)τ^(tᵢ), i ∈ 6:11
 aʳ₃(δ,τ)  = ∑nᵢexp(-ηᵢ(δ - εᵢ)^2 - βᵢ(τ - γᵢ)^2)δ^(dᵢ)τ^(tᵢ), i ∈ 12:18
-

parameters n⁰,γ⁰,n,t,d,c,η,β,γ,ε where obtained via fitting.

References

  1. Lemmon, E. W., McLinden, M. O., & Wagner, W. (2009). Thermodynamic properties of propane. III. A reference equation of state for temperatures from the melting line to 650 K and pressures up to 1000 MPa. Journal of Chemical and Engineering Data, 54(12), 3141–3180. doi:10.1021/je900217v
source
Clapeyron.TholLJFunction
TholLJ()

Lennard-Jones Reference equation of state. valid from 0.5 < T/Tc < 7 and pressures up to p/pc = 500. ``` τᵢ = 1.32/T δᵢ = n/0.31V a⁰ᵢ(δ,τ) = log(δᵢ) + 1.5log(τᵢ) - 1.515151515τᵢ + 6.262265814 a⁰(δ,τ,z) = ∑xᵢ(a⁰ᵢ + log(xᵢ)) 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:23

source
Clapeyron.Ammonia2023Function
Ammonia2023 <: EmpiricHelmholtzModel
+

parameters n⁰,γ⁰,n,t,d,c,η,β,γ,ε where obtained via fitting.

References

  1. Lemmon, E. W., McLinden, M. O., & Wagner, W. (2009). Thermodynamic properties of propane. III. A reference equation of state for temperatures from the melting line to 650 K and pressures up to 1000 MPa. Journal of Chemical and Engineering Data, 54(12), 3141–3180. doi:10.1021/je900217v
source
Clapeyron.TholLJFunction
TholLJ()

Lennard-Jones Reference equation of state. valid from 0.5 < T/Tc < 7 and pressures up to p/pc = 500. ``` τᵢ = 1.32/T δᵢ = n/0.31V a⁰ᵢ(δ,τ) = log(δᵢ) + 1.5log(τᵢ) - 1.515151515τᵢ + 6.262265814 a⁰(δ,τ,z) = ∑xᵢ(a⁰ᵢ + log(xᵢ)) 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:23

source
Clapeyron.Ammonia2023Function
Ammonia2023 <: EmpiricHelmholtzModel
 Ammonia2023()

Input parameters

None

Description

Ammonia Reference Equation of State (2023)

δ = ρ/ρc
 τ = T/Tc
 a⁰(δ,τ) = log(δ) + n⁰₁ + n⁰₂τ + n⁰₃log(τ) + ∑n⁰ᵢ(1-exp(-γ⁰ᵢτ)), i ∈ 4:7
@@ -140,7 +140,7 @@
 aʳ₂(δ,τ)  = ∑nᵢexp(-δ^cᵢ)δ^(dᵢ)τ^(tᵢ), i ∈ 6:8
 aʳ₃(δ,τ)  = ∑nᵢexp(-ηᵢ(δ - εᵢ)^2 - βᵢ(τ - γᵢ)^2)δ^(dᵢ)τ^(tᵢ), i ∈ 9:18
 aʳ₃(δ,τ)  = ∑nᵢexp(-ηᵢ(δ - εᵢ)^2 - 1/(βᵢ*(τ -γᵢ)^2 + bᵢ))δ^(dᵢ)τ^(tᵢ), i ∈ 19:20
-

parameters n⁰,γ⁰,n,t,d,c,η,β,γ,ε where obtained via fitting.

References

  1. Gao, K., Wu, J., Bell, I. H., Harvey, A. H., & Lemmon, E. W. (2023). A reference equation of state with an associating term for the thermodynamic properties of ammonia. Journal of Physical and Chemical Reference Data, 52(1), 013102. doi:10.1063/5.0128269
source

MultiComponent Models

Clapeyron.LJRefType
LJRef <: EmpiricHelmholtzModel
+

parameters n⁰,γ⁰,n,t,d,c,η,β,γ,ε where obtained via fitting.

References

  1. Gao, K., Wu, J., Bell, I. H., Harvey, A. H., & Lemmon, E. W. (2023). A reference equation of state with an associating term for the thermodynamic properties of ammonia. Journal of Physical and Chemical Reference Data, 52(1), 013102. doi:10.1063/5.0128269
source

MultiComponent Models

Clapeyron.LJRefType
LJRef <: EmpiricHelmholtzModel
 LJRef(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) - sigma mixing coefficient

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

Lennard-Jones Reference equation of state. valid from 0.5 < T/Tc < 7 and pressures up to p/pc = 500.

σᵢⱼ = (σᵢ + σⱼ)/2
@@ -156,7 +156,7 @@
 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:23

parameters n,t,d,c,η,β,γ,ε where obtained via fitting.

Multiple component warning

The original model was done with only one component in mind. to support multiple components, a VDW 1-fluid mixing rule (shown above) is implemented, but it is not tested.

References

  1. 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
source
Clapeyron.GERG2008Function
GERG2008::MultiFluid
+aʳ₃(δ,τ)  = ∑nᵢexp(-ηᵢ(δ - εᵢ)^2 - βᵢ(τ - γᵢ)^2)δ^(dᵢ)τ^(tᵢ), i ∈ 13:23

parameters n,t,d,c,η,β,γ,ε where obtained via fitting.

Multiple component warning

The original model was done with only one component in mind. to support multiple components, a VDW 1-fluid mixing rule (shown above) is implemented, but it is not tested.

References

  1. 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
source
Clapeyron.GERG2008Function
GERG2008::MultiFluid
 
 GERG2008(components;
         Rgas = 8.314472,
@@ -177,17 +177,17 @@
 Tᵣ = ∑∑xᵢxⱼβₜ₋ᵢⱼγₜ₋ᵢⱼ[(xᵢ+xⱼ)/(xᵢβₜ₋ᵢⱼ^2 + xⱼ)]•√(TcᵢTcⱼ)
 aʳ = ∑xᵢaᵣᵢ(τ,δ) + ∑∑xᵢxⱼFᵢⱼaʳᵢⱼ(τ,δ)
 aʳᵢ = ∑nᵢ₋ₖδ^(dᵢ₋ₖ)τ^(tᵢ₋ₖ)  + ∑nᵢ₋ₖδ^(dᵢ₋ₖ)τ^(tᵢ₋ₖ)exp(-δ^cᵢ₋ₖ)
-aʳᵢⱼ = ∑nᵢⱼ₋ₖδ^(dᵢⱼ₋ₖ)τ^(tᵢⱼ₋ₖ)  + ∑nᵢⱼ₋ₖδ^(dᵢⱼ₋ₖ)τ^(tᵢⱼ₋ₖ)exp(ηᵢⱼ₋ₖ(δ-εᵢⱼ₋ₖ)^2 + βᵢⱼ₋ₖ(δ-γᵢⱼ₋ₖ))

References

  1. Kunz, O., & Wagner, W. (2012). The GERG-2008 wide-range equation of state for natural gases and other mixtures: An expansion of GERG-2004. Journal of Chemical and Engineering Data, 57(11), 3032–3091. doi:10.1021/je300655b
source
Clapeyron.EOS_LNGFunction
EOS_LNG::MultiFluid
+aʳᵢⱼ = ∑nᵢⱼ₋ₖδ^(dᵢⱼ₋ₖ)τ^(tᵢⱼ₋ₖ)  + ∑nᵢⱼ₋ₖδ^(dᵢⱼ₋ₖ)τ^(tᵢⱼ₋ₖ)exp(ηᵢⱼ₋ₖ(δ-εᵢⱼ₋ₖ)^2 + βᵢⱼ₋ₖ(δ-γᵢⱼ₋ₖ))

References

  1. Kunz, O., & Wagner, W. (2012). The GERG-2008 wide-range equation of state for natural gases and other mixtures: An expansion of GERG-2004. Journal of Chemical and Engineering Data, 57(11), 3032–3091. doi:10.1021/je300655b
source
Clapeyron.EOS_LNGFunction
EOS_LNG::MultiFluid
 
 EOS_LNG(components::Vector{String};
 Rgas = 8.314472,
 reference_state = nothing,
-verbose = false)

input Parameters

None

Description

EOS-LNG: A Fundamental Equation of State for the Calculation of Thermodynamic Properties of Liquefied Natural Gases. valid for 21 compounds (Clapeyron.GERG2008_names). the EoS has new binary-specific parameters for methane + n-butane, methane + isobutane, methane + n-pentane, and methane + isopentane.

It uses the same functional form as GERG2008.

References

  1. Thol, M., Richter, M., May, E. F., Lemmon, E. W., & Span, R. (2019). EOS-LNG: A fundamental equation of state for the calculation of thermodynamic properties of liquefied natural gases. Journal of Physical and Chemical Reference Data, 48(3), 033102. doi:10.1063/1.5093800
  2. Kunz, O., & Wagner, W. (2012). The GERG-2008 wide-range equation of state for natural gases and other mixtures: An expansion of GERG-2004. Journal of Chemical and Engineering Data, 57(11), 3032–3091. doi:10.1021/je300655b
source
Clapeyron.EOS_CGFunction
EOS_LNG::MultiFluid
+verbose = false)

input Parameters

None

Description

EOS-LNG: A Fundamental Equation of State for the Calculation of Thermodynamic Properties of Liquefied Natural Gases. valid for 21 compounds (Clapeyron.GERG2008_names). the EoS has new binary-specific parameters for methane + n-butane, methane + isobutane, methane + n-pentane, and methane + isopentane.

It uses the same functional form as GERG2008.

References

  1. Thol, M., Richter, M., May, E. F., Lemmon, E. W., & Span, R. (2019). EOS-LNG: A fundamental equation of state for the calculation of thermodynamic properties of liquefied natural gases. Journal of Physical and Chemical Reference Data, 48(3), 033102. doi:10.1063/1.5093800
  2. Kunz, O., & Wagner, W. (2012). The GERG-2008 wide-range equation of state for natural gases and other mixtures: An expansion of GERG-2004. Journal of Chemical and Engineering Data, 57(11), 3032–3091. doi:10.1021/je300655b
source
Clapeyron.EOS_CGFunction
EOS_LNG::MultiFluid
 
 EOS_LNG(components::Vector{String};
 Rgas = R̄,
 reference_state = nothing,
-verbose = false)

input Parameters

None

Description

EOS-LNG: A Fundamental Equation of State for the Calculation of Thermodynamic Properties of Liquefied Natural Gases. valid for 21 compounds (Clapeyron.GERG2008_names). the EoS has new binary-specific parameters for methane + n-butane, methane + isobutane, methane + n-pentane, and methane + isopentane.

It uses the same functional form as GERG2008.

References

EOS-CG: : A Mixture Model for the Calculation of Thermodynamic Properties of CCS Mixtures

It uses the same functional form as GERG2008.

References

  1. Neumann, T., Herrig, S., Bell, I. H., Beckmüller, R., Lemmon, E. W., Thol, M., & Span, R. (2023). EOS-CG-2021: A mixture model for the calculation of thermodynamic properties of CCS mixtures. International Journal of Thermophysics, 44(12). doi:10.1007/s10765-023-03263-6
source
Clapeyron.HelmActFunction
HelmAct::MultiFluid
+verbose = false)

input Parameters

None

Description

EOS-LNG: A Fundamental Equation of State for the Calculation of Thermodynamic Properties of Liquefied Natural Gases. valid for 21 compounds (Clapeyron.GERG2008_names). the EoS has new binary-specific parameters for methane + n-butane, methane + isobutane, methane + n-pentane, and methane + isopentane.

It uses the same functional form as GERG2008.

References

EOS-CG: : A Mixture Model for the Calculation of Thermodynamic Properties of CCS Mixtures

It uses the same functional form as GERG2008.

References

  1. Neumann, T., Herrig, S., Bell, I. H., Beckmüller, R., Lemmon, E. W., Thol, M., & Span, R. (2023). EOS-CG-2021: A mixture model for the calculation of thermodynamic properties of CCS mixtures. International Journal of Thermophysics, 44(12). doi:10.1007/s10765-023-03263-6
source
Clapeyron.HelmActFunction
HelmAct::MultiFluid
 HelmAct(components;
     pure_userlocations = String[],
     activity = PSRKUNIFAC,
@@ -201,7 +201,7 @@
 τᵢ = Tcᵢ/T
 δref = ρref/ρr
 δrefᵢ = ρrefᵢ/ρcᵢ
-b = 1/1.17ρref

where gᴱᵣ is the residual part of the excess gibbs free energy obtained from an activity model.

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source

Mixing Models

Clapeyron.LinearMixingType
LinearMixing <: MultiFluidDepartureModel
+b = 1/1.17ρref

where gᴱᵣ is the residual part of the excess gibbs free energy obtained from an activity model.

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source

Mixing Models

Clapeyron.LinearMixingType
LinearMixing <: MultiFluidDepartureModel
 LinearMixing(components;
 userlocations = String[],
 verbose = false)

Input parameters

none

Description

Linear mixing rule for MultiParameter EoS models:

τ = T̄/T
@@ -210,7 +210,7 @@
 T̄ = ∑xᵢTcᵢ

Model Construction Examples

# Because this model does not have parameters, all those constructors are equivalent:
 mixing = LinearMixing()
 mixing = LinearMixing("water")
-mixing = LinearMixing(["water","carbon dioxide"])
source
Clapeyron.AsymmetricMixingType
AsymmetricMixing <: MultiFluidDepartureModel
+mixing = LinearMixing(["water","carbon dioxide"])
source
Clapeyron.AsymmetricMixingType
AsymmetricMixing <: MultiFluidDepartureModel
 AsymmetricMixing(components;
 userlocations = String[],
 verbose = false)

Input parameters

  • beta_v: Pair Parameter (Float64) - binary interaction parameter (no units)
  • gamma_v: Pair Parameter (Float64) - binary interaction parameter (no units)
  • beta_T: Pair Parameter (Float64) - binary interaction parameter (no units)
  • gamma_T: Pair Parameter (Float64) - binary interaction parameter (no units)

Description

Asymmetric mixing rule for MultiParameter EoS models:

τ = T̄/T
@@ -221,7 +221,7 @@
 Tᵣᵢⱼ = √(Tcᵢ*Tcⱼ)

With the asymmetry present in the β parameters:

βᵛᵢⱼ = 1/βᵛⱼᵢ
 βᵀᵢⱼ = 1/βᵀⱼᵢ

If there is no data present, the parameters can be estimated:

  • Linear estimation:
βᵛᵢⱼ = βᵛᵢⱼ = 1
 γᵛᵢⱼ = 4*(Vcᵢ + Vcⱼ)/(∛Vcᵢ + ∛Vcⱼ)^3
-γᵀᵢⱼ = 0.5*(Tcᵢ + Tcⱼ)/√(Tcᵢ*Tcⱼ)
  • Lorentz-Berthelot Estimation:
βᵛᵢⱼ = βᵛᵢⱼ = γᵛᵢⱼ = γᵀᵢⱼ = 1

References

  1. R. Klimeck, Ph.D. dissertation, Ruhr-Universit¨at Bochum, 2000
source
Clapeyron.LorentzBerthelotMixingFunction
LorentzBerthelotMixing::AsymmetricMixing
+γᵀᵢⱼ = 0.5*(Tcᵢ + Tcⱼ)/√(Tcᵢ*Tcⱼ)
  • Lorentz-Berthelot Estimation:
βᵛᵢⱼ = βᵛᵢⱼ = γᵛᵢⱼ = γᵀᵢⱼ = 1

References

  1. R. Klimeck, Ph.D. dissertation, Ruhr-Universit¨at Bochum, 2000
source
Clapeyron.LorentzBerthelotMixingFunction
LorentzBerthelotMixing::AsymmetricMixing
 LorentzBerthelotMixing(components;
 userlocations = String[],
 verbose = false)

Input parameters

  • k: Pair Parameter (Float64) - binary interaction parameter for temperature (no units)
  • l: Pair Parameter (Float64) - binary interaction parameter for volume (no units)

Description

Lorentz-Berthelot Mixing for MultiParameter EoS models:

τ = T̄/T
@@ -229,13 +229,13 @@
 V̄ = ∑xᵢxⱼ * Vᵣᵢⱼ * (1 - lᵢⱼ)
 T̄ = ∑xᵢxⱼ * Tᵣᵢⱼ * (1 - kᵢⱼ)
 Vᵣᵢⱼ = 0.125*(∛Vcᵢ + ∛Vcⱼ)^3
-Tᵣᵢⱼ = √(Tcᵢ*Tcⱼ)

missing parameters will be assumed kᵢⱼ = lᵢⱼ = 0

source

Departure Models

Clapeyron.EmpiricDepartureType

EmpiricDeparture <: MultiFluidDepartureModel EmpiricDeparture(components; userlocations = String[], verbose = false)

Input parameters

none

  • F: Pair Parameter (Float64) - binary interaction parameter (no units)
  • parameters: Pair Parameter (String) - JSON data containing the departure terms for the binary pair

Description

Departure that uses empiric departure functions:

aᵣ = ∑xᵢaᵣᵢ(δ,τ) + Δa
+Tᵣᵢⱼ = √(Tcᵢ*Tcⱼ)

missing parameters will be assumed kᵢⱼ = lᵢⱼ = 0

source

Departure Models

Clapeyron.EmpiricDepartureType

EmpiricDeparture <: MultiFluidDepartureModel EmpiricDeparture(components; userlocations = String[], verbose = false)

Input parameters

none

  • F: Pair Parameter (Float64) - binary interaction parameter (no units)
  • parameters: Pair Parameter (String) - JSON data containing the departure terms for the binary pair

Description

Departure that uses empiric departure functions:

aᵣ = ∑xᵢaᵣᵢ(δ,τ) + Δa
 Δa = ∑xᵢxⱼFᵢⱼaᵣᵢⱼ(δ,τ)
 
 aᵣᵢⱼ = ∑nᵢⱼ₋ₖδ^(dᵢⱼ₋ₖ)*τ^(tᵢⱼ₋ₖ) +
     ∑nᵢⱼ₋ₖδ^(dᵢⱼ₋ₖ)τ^(tᵢⱼ₋ₖ)*exp(-gᵢⱼ₋ₖδ^lᵢⱼ₋ₖ) +
     ∑nᵢⱼ₋ₖδ^(dᵢⱼ₋ₖ)τ^(tᵢⱼ₋ₖ)*exp(ηᵢⱼ₋ₖ(δ-εᵢⱼ₋ₖ)^2 + βᵢⱼ₋ₖ(τ-γᵢⱼ₋ₖ)^2)
-
source
Clapeyron.departure_functionsFunction
departure_functions(model::MultiFluid)

if the model is using a EmpiricDeparture departure model, return the matrix of departure functions. you can set a departure in the following way:

using CoolProp #load CoolProp models
+
source
Clapeyron.departure_functionsFunction
departure_functions(model::MultiFluid)

if the model is using a EmpiricDeparture departure model, return the matrix of departure functions. you can set a departure in the following way:

using CoolProp #load CoolProp models
 model = MultiFluid(["helium","methanol"],mixing = LorentzBerthelotMixing)
 dep_mat = departure_functions(model)
 
@@ -255,7 +255,7 @@
 #if you want to delete a departure model:
 
 dep_mat[1,2] = nothing
-using SparseArrays
source
Clapeyron.create_departureFunction
create_departure(data,F = 1.0;verbose = false)

Creates a departure model for use in a MultiFluid model with EmpiricDeparture.

If data is a String and starts with { or [, it will be recognized as JSON text. the text will be parsed as a file location otherwise. You can pass a Dict or NamedTuple if you want to skip the JSON parsing.

Examples

d1 = create_departure("/data/EthanePropane.json",0.9) # reading from a file
+using SparseArrays
source
Clapeyron.create_departureFunction
create_departure(data,F = 1.0;verbose = false)

Creates a departure model for use in a MultiFluid model with EmpiricDeparture.

If data is a String and starts with { or [, it will be recognized as JSON text. the text will be parsed as a file location otherwise. You can pass a Dict or NamedTuple if you want to skip the JSON parsing.

Examples

d1 = create_departure("/data/EthanePropane.json",0.9) # reading from a file
 
 dep = Dict(
     #reduced CoolProp Departure format, you only need the type and parameters.
@@ -267,13 +267,13 @@
     :l => [1,1,1,1],
 )
 
-d2 = create_departure(dep) #F is set to 1.0
source
Clapeyron.GEDepartureType

GEDeparture <: MultiFluidDepartureModel GEDeparture(components; activity = UNIFAC, userlocations = String[], verbose = false)

Input parameters

none

  • k1: Pair Parameter (Float64) - binary, T-dependent interaction parameter [K^-1]

Model parameters

  • vref: Single Parameter (Float64, calculated) - Reference pure molar volume [m3/mol]

Input models

  • activity: activity model

Description

Departure that uses the residual excess gibbs energy from an activity model:

aᵣ = ∑xᵢaᵣᵢ(δ,τ) + Δa
+d2 = create_departure(dep) #F is set to 1.0
source
Clapeyron.GEDepartureType

GEDeparture <: MultiFluidDepartureModel GEDeparture(components; activity = UNIFAC, userlocations = String[], verbose = false)

Input parameters

none

  • k1: Pair Parameter (Float64) - binary, T-dependent interaction parameter [K^-1]

Model parameters

  • vref: Single Parameter (Float64, calculated) - Reference pure molar volume [m3/mol]

Input models

  • activity: activity model

Description

Departure that uses the residual excess gibbs energy from an activity model:

aᵣ = ∑xᵢaᵣᵢ(δ,τ) + Δa
 Δa = gᴱᵣ/RT - log(1+bρ)/log(1+bρref) * ∑xᵢ(aᵣᵢ(δref,τ) - aᵣᵢ(δrefᵢ,τᵢ))
 τᵢ = Tcᵢ/T
 δref = ρref/ρr
 δrefᵢ = ρrefᵢ/ρcᵢ
-b = 1/1.17ρref

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source
Clapeyron.QuadraticDepartureType
QuadraticDeparture <: MultiFluidDepartureModel
+b = 1/1.17ρref

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source
Clapeyron.QuadraticDepartureType
QuadraticDeparture <: MultiFluidDepartureModel
 QuadraticDeparture(components;
 userlocations = String[],
 verbose = false)

Input parameters

  • k0: Pair Parameter (Float64) - binary interaction parameter (no units)
  • k1: Pair Parameter (Float64) - binary, T-dependent interaction parameter [K^-1]

Description

Departure that uses a quadratic mixing rule:

aᵣ = ∑xᵢxⱼaᵣᵢⱼ
-aᵣᵢⱼ = 0.5*(aᵣᵢ + aᵣⱼ)*(1 - (k₀ + k₁T))

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source
+aᵣᵢⱼ = 0.5*(aᵣᵢ + aᵣⱼ)*(1 - (k₀ + k₁T))

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source diff --git a/dev/eos/ideal/index.html b/dev/eos/ideal/index.html index d77a19fa6..e29a146d4 100644 --- a/dev/eos/ideal/index.html +++ b/dev/eos/ideal/index.html @@ -7,7 +7,7 @@ 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"])
source
Clapeyron.ReidIdealType
ReidIdeal <: IdealModel
+idealmodel = BasicIdeal(["water","carbon dioxide"])
source
Clapeyron.ReidIdealType
ReidIdeal <: IdealModel
 
 ReidIdeal(components; 
 userlocations = String[],
@@ -29,7 +29,7 @@
                         c = [1.06e-5, -0.0001108],
                         d = [-3.6e-9, -2.822e-9],
                         Mw = [18.01, 58.12])
-                        ) #e is not used
source
Clapeyron.JobackIdealType
JobackIdeal <: JobackIdealModel
+                        ) #e is not used
source
Clapeyron.JobackIdealType
JobackIdeal <: JobackIdealModel
 
 JobackIdeal(components; 
 userlocations = String[],
@@ -38,7 +38,7 @@
 bᵢ = ∑(νᵢₖbₖ) + 0.210
 cᵢ = ∑(νᵢₖcₖ) - 3.91e-4
 dᵢ = ∑(νᵢₖbₖ) + 2.06e-7
-Cpᵢ(T) = aᵢ  + bᵢT + cᵢT^2 + dᵢT^3

The 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)

References

  1. 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

NameDescription
-CH3Methyl
-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<
-FFluoride
-ClChloride
-BrBromide
-IIodide
-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
-NH2Amine
>NH (non-ring)
>NH (ring)
>N- (non-ring)
-N= (non-ring)
-N= (ring)
=NH
-CNNitrile
-NO3Nitroxide
-SH
-S- (non-ring)
-S- (ring)
source
Clapeyron.MonomerIdealType
MonomerIdeal <: MonomerIdealModel
+Cpᵢ(T) = aᵢ  + bᵢT + cᵢT^2 + dᵢT^3

The 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)

References

  1. 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

NameDescription
-CH3Methyl
-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<
-FFluoride
-ClChloride
-BrBromide
-IIodide
-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
-NH2Amine
>NH (non-ring)
>NH (ring)
>N- (non-ring)
-N= (non-ring)
-N= (ring)
=NH
-CNNitrile
-NO3Nitroxide
-SH
-S- (non-ring)
-S- (ring)
source
Clapeyron.MonomerIdealType
MonomerIdeal <: MonomerIdealModel
 
 MonomerIdeal(components; 
 userlocations = String[],
@@ -54,19 +54,19 @@
 idealmodel = MonomerIdeal(["neon","hydrogen"]; userlocations = ["path/to/my/db","mw.csv"])
 
 # Passing parameters directly
-idealmodel = MonomerIdeal(["neon","hydrogen"];userlocations = (;Mw = [20.17, 2.]))
source
Clapeyron.WalkerIdealType
WalkerIdeal <: WalkerIdealModel
+idealmodel = MonomerIdeal(["neon","hydrogen"];userlocations = (;Mw = [20.17, 2.]))
source
Clapeyron.WalkerIdealType
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 

References

  1. 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
source
Clapeyron.LJRefIdealType
LJRefIdeal <: IdealModel
+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 

References

  1. 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
source
Clapeyron.LJRefIdealType
LJRefIdeal <: IdealModel
 LJRef(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]

Description

Lennard-Jones Reference equation of state. Ideal Part. valid from 0.5 < T/Tc < 7 and pressures up to p/pc = 500.

τᵢ = 1.32ϵᵢ/T
 δᵢ = n(Nₐσᵢ^3)/0.31V
 a⁰ᵢ(δ,τ) = log(δᵢ) + 1.5log(τᵢ) - 1.515151515τᵢ + 6.262265814
 a⁰(δ,τ,z) = ∑xᵢ(a⁰ᵢ + log(xᵢ))
-

LJRefIdeal acts as a wrapper of LJRef model, you can access it with LJRef(model::LJRefIdeal).

Mutiple component warning

The original model was done with only one component in mind. to support multiple components, a VDW 1-fluid mixing rule (shown above) is implemented, but it is not tested.

References

  1. 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
source
Clapeyron.AlyLeeIdealType
AlyLeeIdeal <: AlyLeeIdealModel
+

LJRefIdeal acts as a wrapper of LJRef model, you can access it with LJRef(model::LJRefIdeal).

Mutiple component warning

The original model was done with only one component in mind. to support multiple components, a VDW 1-fluid mixing rule (shown above) is implemented, but it is not tested.

References

  1. 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
source
Clapeyron.AlyLeeIdealType
AlyLeeIdeal <: AlyLeeIdealModel
 
 AlyLeeIdeal(components; 
 userlocations = String[],
@@ -91,7 +91,7 @@
                         G = [2507.37, 483.55],
                         H = [0.0, 0.0139],
                         I = [0.0, 341.11])
-                        )

References

  1. 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
source
Clapeyron.PPDSIdealType
PPDSIdeal <: PPDSIdealModel
+                        )

References

  1. 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
source
Clapeyron.PPDSIdealType
PPDSIdeal <: PPDSIdealModel
 
 PPDSIdeal(components;
 userlocations = String[],
@@ -117,4 +117,4 @@
                         G = [2507.37, 483.55],
                         H = [0.0, 0.0139],
                         I = [0.0, 341.11])
-                        )

References

  1. Gmehling, J., Kleiber, M., Kolbe, B., & Rarey, J. (2019). Chemical thermodynamics for process simulation (2nd ed.). Berlin, Germany: Blackwell Verlag.
source
+ )

References

  1. Gmehling, J., Kleiber, M., Kolbe, B., & Rarey, J. (2019). Chemical thermodynamics for process simulation (2nd ed.). Berlin, Germany: Blackwell Verlag.
source diff --git a/dev/eos/misc/index.html b/dev/eos/misc/index.html index 93789d924..818bad3eb 100644 --- a/dev/eos/misc/index.html +++ b/dev/eos/misc/index.html @@ -6,17 +6,17 @@ shapemodel=SRK(components), shaperef = SRK(refmodel.components))

Input Models

Description

A Extended Corresponding states method.

The idea is to use a "shape model" that provides a corresponding states parameters and a "reference model" that implements a helmholtz energy function, so that:

eos(shape_model,v,T,x)/RT = eos(model_ref,v₀,T₀)/RT₀

where:

T₀ = T/f
 v₀ = v/h
-f,h = shape_factors(model::ECS,shape_ref::EoSModel,V,T,z)

shape_factors can be used to create custom Extended Corresponding state models.

References

.1 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

source
Clapeyron.shape_factorsFunction
shape_factors(model::ECS,V,T,z=SA[1.0])
+f,h = shape_factors(model::ECS,shape_ref::EoSModel,V,T,z)

shape_factors can be used to create custom Extended Corresponding state models.

References

.1 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

source
Clapeyron.shape_factorsFunction
shape_factors(model::ECS,V,T,z=SA[1.0])
 shape_factors(model::ECS,shape_ref::ABCubicModel,V,T,z=SA[1.0])
 shape_factors(model::ECS,shape_ref::EoSModel,V,T,z=SA[1.0])

Returns f and h scaling factors, used by the ECS Equation of state.

eos(shape_model,v,T,x)/RT = eos(model_ref,v₀,T₀)/RT₀

where:

T₀ = T/f
 v₀ = v/h

For cubics, a general procedure is defined in [1]:

h = b/b₀
 fh = a(T)/a₀(T₀)
 
General Shape Factors?

For general EoS, there is no existent publications on how to obtain shape factors. However, we can "map" any EoS to a cubic with:

b ≈ lb_volume(model,z)
 a ≈ RT*(b - B)
-B = second_virial_coefficient(model,T)

This is not tested extensively and it is considered an Experimental feature, subject to future changes.

References

  1. 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
source
Clapeyron.SPUNGFunction
function function SPUNG(components,
+B = second_virial_coefficient(model,T)

This is not tested extensively and it is considered an Experimental feature, subject to future changes.

References

  1. 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
source
Clapeyron.SPUNGFunction
function function SPUNG(components,
     refmodel=PropaneRef(),
     shapemodel=SRK(components),
-    shaperef = SRK(refmodel.components))

Description

SPUNG: State Research Program for Utilization of Natural Gas

ECS method. It uses SRK as the shape model and PropaneRef as the reference model.

References

  1. Wilhelmsen, Ø., Skaugen, G., Jørstad, O., & Li, H. (2012). Evaluation of SPUNG* and other equations of state for use in carbon capture and storage modelling. Energy Procedia, 23, 236–245. doi:10.1016/j.egypro.2012.06.024
source
Clapeyron.LKPType
LKP <: EmpiricHelmholtzModel
+    shaperef = SRK(refmodel.components))

Description

SPUNG: State Research Program for Utilization of Natural Gas

ECS method. It uses SRK as the shape model and PropaneRef as the reference model.

References

  1. Wilhelmsen, Ø., Skaugen, G., Jørstad, O., & Li, H. (2012). Evaluation of SPUNG* and other equations of state for use in carbon capture and storage modelling. Energy Procedia, 23, 236–245. doi:10.1016/j.egypro.2012.06.024
source
Clapeyron.LKPType
LKP <: EmpiricHelmholtzModel
 LKP(components;
     idealmodel=BasicIdeal,
     verbose=false)

Input parameters

  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • Pc: Single Parameter (Float64) - Critical Pressure [Pa]
  • Vc: Single Parameter (Float64) (optional) - Critical Volume [m^3]
  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • acentricfactor: Single Parameter (Float64) - Acentric Factor (no units)
  • k: Pair Parameter (Float64) (optional) - binary interaction parameter (no units)

Input models

  • idealmodel: Ideal Model

Description

Lee-Kesler-Plöker equation of state. corresponding states using interpolation between a simple, spherical fluid (methane, ) and a reference fluid (n-octane, ref):

αᵣ = (1 - ωᵣ)*αᵣ(δr,τ,params(∅)) + ωᵣ*αᵣ(δr,τ,params(ref))
@@ -52,7 +52,7 @@
                         Mw = [20.17, 2.],
                         acentricfactor = [-0.03,-0.21]
                         k = [0. 0.18; 0.18 0.]) #k,l can be ommited in single-component models.
-                    )

References

  1. Plöcker, U., Knapp, H., & Prausnitz, J. (1978). Calculation of high-pressure vapor-liquid equilibria from a corresponding-states correlation with emphasis on asymmetric mixtures. Industrial & Engineering Chemistry Process Design and Development, 17(3), 324–332. doi:10.1021/i260067a020
source

Sanchez–Lacombe Model

Clapeyron.SanchezLacombeType
SanchezLacombe(components;
+                    )

References

  1. Plöcker, U., Knapp, H., & Prausnitz, J. (1978). Calculation of high-pressure vapor-liquid equilibria from a corresponding-states correlation with emphasis on asymmetric mixtures. Industrial & Engineering Chemistry Process Design and Development, 17(3), 324–332. doi:10.1021/i260067a020
source

Sanchez–Lacombe Model

Clapeyron.SanchezLacombeType
SanchezLacombe(components;
 idealmodel = BasicIdeal,
 mixing = SLk0k1lMixingRule,
 userlocations = String[],
@@ -64,7 +64,7 @@
 vᵣ,εᵣ = mix_vε(model,V,T,z,model.mixing,r̄,∑zᵢ)
 ρ̃ = r̄*vᵣ/v
 T̃ = R̄*T/εᵣ
-aᵣ = r̄*(- ρ̃ /T̃ + (1/ρ̃  - 1)*log(1 - ρ̃ ) + 1)

References

  1. Neau, E. (2002). A consistent method for phase equilibrium calculation using the Sanchez–Lacombe lattice–fluid equation-of-state. Fluid Phase Equilibria, 203(1–2), 133–140. doi:10.1016/s0378-3812(02)00176-0
source
Clapeyron.mix_vεFunction
mix_vε(model::SanchezLacombeModel,V,T,z,mix::SLMixingRule,r̄ = @f(rmix),∑z = sum(z))

Function used to dispatch on the different mixing rules available for Sanchez-Lacombe.

Example:

function mix_vε(model::SanchezLacombe,V,T,z,mix::SLKRule,r̄,Σz = sum(z))
+aᵣ = r̄*(- ρ̃ /T̃ + (1/ρ̃  - 1)*log(1 - ρ̃ ) + 1)

References

  1. Neau, E. (2002). A consistent method for phase equilibrium calculation using the Sanchez–Lacombe lattice–fluid equation-of-state. Fluid Phase Equilibria, 203(1–2), 133–140. doi:10.1016/s0378-3812(02)00176-0
source
Clapeyron.mix_vεFunction
mix_vε(model::SanchezLacombeModel,V,T,z,mix::SLMixingRule,r̄ = @f(rmix),∑z = sum(z))

Function used to dispatch on the different mixing rules available for Sanchez-Lacombe.

Example:

function mix_vε(model::SanchezLacombe,V,T,z,mix::SLKRule,r̄,Σz = sum(z))
     v = model.params.vol.values
     ε = model.params.epsilon.values
     r = model.params.segment.values
@@ -73,19 +73,19 @@
     ϕ = @. r * x / r̄
     εᵣ = sum(ε[i,j]*(1-k[i,j])*ϕ[i]*ϕ[j] for i ∈ @comps for j ∈ @comps)
     vᵣ = sum(v[i,j]*ϕ[i]*ϕ[j] for i ∈ @comps for j ∈ @comps)
-    return vᵣ,εᵣ
source
Clapeyron.SLKRuleType
SLKRule(components; userlocations = String[], verbose = false)

Input parameters

  • k: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)

Constant Kᵢⱼ mixing rule for Sanchez-Lacombe:

εᵢⱼ = √εᵢεⱼ*(1-kᵢⱼ)
+    return vᵣ,εᵣ
source
Clapeyron.SLKRuleType
SLKRule(components; userlocations = String[], verbose = false)

Input parameters

  • k: Pair Parameter (Float64) (optional) - Binary Interaction Parameter (no units)

Constant Kᵢⱼ mixing rule for Sanchez-Lacombe:

εᵢⱼ = √εᵢεⱼ*(1-kᵢⱼ)
 vᵢⱼ = (vᵢ + vⱼ)/2
 ϕᵢ = rᵢ*xᵢ/r̄
 εᵣ = ΣΣϕᵢϕⱼεᵢⱼ
-vᵣ = ΣΣϕᵢϕⱼvᵢⱼ
source
Clapeyron.SLk0k1lMixingRuleType
SLKRule(components; userlocations = String[], verbose = false)

Input parameters

  • k0,k: Pair Parameter (Float64, optional) - Binary Interaction Parameter (no units)
  • k1: Pair Parameter (Float64, optional) - Binary Interaction Parameter (no units)
  • l: Pair Parameter (Float64,optional) - Binary Interaction Parameter (no units)

Neau's Consistent k₀,k₁,l mixing rule for Sanchez-Lacombe:

εᵢⱼ = √εᵢεⱼ
+vᵣ = ΣΣϕᵢϕⱼvᵢⱼ
source
Clapeyron.SLk0k1lMixingRuleType
SLKRule(components; userlocations = String[], verbose = false)

Input parameters

  • k0,k: Pair Parameter (Float64, optional) - Binary Interaction Parameter (no units)
  • k1: Pair Parameter (Float64, optional) - Binary Interaction Parameter (no units)
  • l: Pair Parameter (Float64,optional) - Binary Interaction Parameter (no units)

Neau's Consistent k₀,k₁,l mixing rule for Sanchez-Lacombe:

εᵢⱼ = √εᵢεⱼ
 vᵢⱼ = (1 - lᵢⱼ)(vᵢ + vⱼ)/2
 ϕᵢ = rᵢ*xᵢ/r̄
 εᵣ = ΣΣϕᵢϕⱼεᵢⱼ*(1 - k₀ᵢⱼ + (1 - δᵢⱼ)(Σϕₖk₁ᵢₖ + Σϕₖk₁ₖⱼ))
-vᵣ = ΣΣϕᵢϕⱼvᵢⱼ

Where δᵢⱼ is i == j ? 1 : 0

References

  1. Neau, E. (2002). A consistent method for phase equilibrium calculation using the Sanchez–Lacombe lattice–fluid equation-of-state. Fluid Phase Equilibria, 203(1–2), 133–140. doi:10.1016/s0378-3812(02)00176-0
source

Other molecular Models

Clapeyron.PeTSType
PeTSModel <: EoSModel
+vᵣ = ΣΣϕᵢϕⱼvᵢⱼ

Where δᵢⱼ is i == j ? 1 : 0

References

  1. Neau, E. (2002). A consistent method for phase equilibrium calculation using the Sanchez–Lacombe lattice–fluid equation-of-state. Fluid Phase Equilibria, 203(1–2), 133–140. doi:10.1016/s0378-3812(02)00176-0
source

Other molecular Models

Clapeyron.PeTSType
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 Paramater (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.

References

  1. 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
source
+verbose = false)

Input parameters

Model Parameters

Input models

Description

Perturbed, Truncated and Shifted (PeTS) Equation of State.

References

  1. 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
source diff --git a/dev/eos/saft/index.html b/dev/eos/saft/index.html index 66226843a..1d061f084 100644 --- a/dev/eos/saft/index.html +++ b/dev/eos/saft/index.html @@ -7,7 +7,7 @@ ideal_userlocations = String[], reference_state = nothing, verbose = false, -assoc_options = AssocOptions())

Input parameters

Model Parameters

Input models

Description

(original) Statistical Associating Fluid Theory (og-SAFT) Equation of State

References

  1. Chapman, W. G., Gubbins, K. E., Jackson, G., & Radosz, M. (1989). SAFT: Equation-of-state solution model for associating fluids. Fluid Phase Equilibria, 52, 31–38. doi:10.1016/0378-3812(89)80308-5
  2. Chapman, W. G., Gubbins, K. E., Jackson, G., & Radosz, M. (1990). New reference equation of state for associating liquids. Industrial & Engineering Chemistry Research, 29(8), 1709–1721. doi:10.1021/ie00104a021
source
Clapeyron.CKSAFTType
CKSAFTModel <: SAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

(original) Statistical Associating Fluid Theory (og-SAFT) Equation of State

References

  1. Chapman, W. G., Gubbins, K. E., Jackson, G., & Radosz, M. (1989). SAFT: Equation-of-state solution model for associating fluids. Fluid Phase Equilibria, 52, 31–38. doi:10.1016/0378-3812(89)80308-5
  2. Chapman, W. G., Gubbins, K. E., Jackson, G., & Radosz, M. (1990). New reference equation of state for associating liquids. Industrial & Engineering Chemistry Research, 29(8), 1709–1721. doi:10.1021/ie00104a021
source
Clapeyron.CKSAFTType
CKSAFTModel <: SAFTModel
 
 CKSAFT(components; 
 idealmodel = BasicIdeal,
@@ -15,7 +15,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • vol: Single Parameter (Float64) - Segment Volume [dm^3]
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • c: Single Parameter (Float64) - Dispersion T-dependent parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • c: Single Parameter (Float64) - Dispersion T-dependent parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Chen and Kreglewski SAFT (CK-SAFT)

References

  1. Huang, S. H., & Radosz, M. (1990). Equation of state for small, large, polydisperse, and associating molecules. Industrial & Engineering Chemistry Research, 29(11), 2284–2294. doi:10.1021/ie00107a014
  2. Huang, S. H., & Radosz, M. (1991). Equation of state for small, large, polydisperse, and associating molecules: extension to fluid mixtures. Industrial & Engineering Chemistry Research, 30(8), 1994–2005. doi:10.1021/ie00056a050
source
Clapeyron.sCKSAFTType
sCKSAFTModel <: CKSAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • vol: Single Parameter (Float64) - Segment Volume [dm^3]
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • c: Single Parameter (Float64) - Dispersion T-dependent parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • c: Single Parameter (Float64) - Dispersion T-dependent parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Chen and Kreglewski SAFT (CK-SAFT)

References

  1. Huang, S. H., & Radosz, M. (1990). Equation of state for small, large, polydisperse, and associating molecules. Industrial & Engineering Chemistry Research, 29(11), 2284–2294. doi:10.1021/ie00107a014
  2. Huang, S. H., & Radosz, M. (1991). Equation of state for small, large, polydisperse, and associating molecules: extension to fluid mixtures. Industrial & Engineering Chemistry Research, 30(8), 1994–2005. doi:10.1021/ie00056a050
source
Clapeyron.sCKSAFTType
sCKSAFTModel <: CKSAFTModel
 
 sCKSAFT(components; 
 idealmodel = BasicIdeal,
@@ -23,7 +23,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • vol: Single Parameter (Float64) - Segment Volume [dm^3]
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Simplified Chen and Kreglewski SAFT (sCK-SAFT)

References

  1. Huang, S. H., & Radosz, M. (1990). Equation of state for small, large, polydisperse, and associating molecules. Industrial & Engineering Chemistry Research, 29(11), 2284–2294. doi:10.1021/ie00107a014
  2. Huang, S. H., & Radosz, M. (1991). Equation of state for small, large, polydisperse, and associating molecules: extension to fluid mixtures. Industrial & Engineering Chemistry Research, 30(8), 1994–2005. doi:10.1021/ie00056a050
  3. Fu, Y.-H., & Sandler, S. I. (1995). A simplified SAFT equation of state for associating compounds and mixtures. Industrial & Engineering Chemistry Research, 34(5), 1897–1909. doi:10.1021/ie00044a042
source
Clapeyron.BACKSAFTType
BACKSAFTModel <: SAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • vol: Single Parameter (Float64) - Segment Volume [dm^3]
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Simplified Chen and Kreglewski SAFT (sCK-SAFT)

References

  1. Huang, S. H., & Radosz, M. (1990). Equation of state for small, large, polydisperse, and associating molecules. Industrial & Engineering Chemistry Research, 29(11), 2284–2294. doi:10.1021/ie00107a014
  2. Huang, S. H., & Radosz, M. (1991). Equation of state for small, large, polydisperse, and associating molecules: extension to fluid mixtures. Industrial & Engineering Chemistry Research, 30(8), 1994–2005. doi:10.1021/ie00056a050
  3. Fu, Y.-H., & Sandler, S. I. (1995). A simplified SAFT equation of state for associating compounds and mixtures. Industrial & Engineering Chemistry Research, 34(5), 1897–1909. doi:10.1021/ie00044a042
source
Clapeyron.BACKSAFTType
BACKSAFTModel <: SAFTModel
 
 BACKSAFT(components; 
 idealmodel = BasicIdeal,
@@ -31,7 +31,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • vol: Single Parameter (Float64) - Segment Volume [dm^3]
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K/mol]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • c: Single Parameter (Float64) - Adjustable parameter (no units)
  • alpha: Single Parameter (Float64) - Non-spherical deviation (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]
  • c: Single Parameter (Float64) - Adjustable parameter (no units)
  • alpha: Single Parameter (Float64) - Non-spherical deviation (no units)

Input models

  • idealmodel: Ideal Model

Description

BACKSAFT

References

  1. Mi, J.-G., Chen, J., Gao, G.-H., & Fei, W.-Y. (2002). Equation of state extended from SAFT with improved results for polar fluids across the critical point. Fluid Phase Equilibria, 201(2), 295–307. doi:10.1016/s0378-3812(02)00093-6
source
Clapeyron.PCSAFTType
PCSAFTModel <: SAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • vol: Single Parameter (Float64) - Segment Volume [dm^3]
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K/mol]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • c: Single Parameter (Float64) - Adjustable parameter (no units)
  • alpha: Single Parameter (Float64) - Non-spherical deviation (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]
  • c: Single Parameter (Float64) - Adjustable parameter (no units)
  • alpha: Single Parameter (Float64) - Non-spherical deviation (no units)

Input models

  • idealmodel: Ideal Model

Description

BACKSAFT

References

  1. Mi, J.-G., Chen, J., Gao, G.-H., & Fei, W.-Y. (2002). Equation of state extended from SAFT with improved results for polar fluids across the critical point. Fluid Phase Equilibria, 201(2), 295–307. doi:10.1016/s0378-3812(02)00093-6
source
Clapeyron.PCSAFTType
PCSAFTModel <: SAFTModel
 
 PCSAFT(components; 
 idealmodel = BasicIdeal,
@@ -39,7 +39,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain SAFT (PC-SAFT)

References

  1. Gross, J., & Sadowski, G. (2001). Perturbed-chain SAFT: An equation of state based on a perturbation theory for chain molecules. Industrial & Engineering Chemistry Research, 40(4), 1244–1260. doi:10.1021/ie0003887
  2. Gross, J., & Sadowski, G. (2002). Application of the perturbed-chain SAFT equation of state to associating systems. Industrial & Engineering Chemistry Research, 41(22), 5510–5515. doi:10.1021/ie010954d
source
Clapeyron.PCPSAFTType
PCPSAFTModel <: PCSAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain SAFT (PC-SAFT)

References

  1. Gross, J., & Sadowski, G. (2001). Perturbed-chain SAFT: An equation of state based on a perturbation theory for chain molecules. Industrial & Engineering Chemistry Research, 40(4), 1244–1260. doi:10.1021/ie0003887
  2. Gross, J., & Sadowski, G. (2002). Application of the perturbed-chain SAFT equation of state to associating systems. Industrial & Engineering Chemistry Research, 41(22), 5510–5515. doi:10.1021/ie010954d
source
Clapeyron.PCPSAFTType
PCPSAFTModel <: PCSAFTModel
 
 const PPCSAFT = PCPSAFT
 
@@ -49,7 +49,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) (optional) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain Polar SAFT (PCP-SAFT)

References

  1. Gross, J., & Vrabec, J. (2005). An equation-of-state contribution for polar components: Dipolar molecules. AIChE Journal, 52(3), 856-1282. doi:10.1002/aic.10683
source
Clapeyron.QPCPSAFTType
QPCPSAFTModel <: PCPSAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) (optional) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain Polar SAFT (PCP-SAFT)

References

  1. Gross, J., & Vrabec, J. (2005). An equation-of-state contribution for polar components: Dipolar molecules. AIChE Journal, 52(3), 856-1282. doi:10.1002/aic.10683
source
Clapeyron.QPCPSAFTType
QPCPSAFTModel <: PCPSAFTModel
 
 QPCPSAFT(components;
 idealmodel = BasicIdeal,
@@ -57,7 +57,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • quadrupole: Single Parameter (Float64) - Quadrupole moment [DA°]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • quadrupole: Single Parameter (Float64) - Quadrupole moment [DA°]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Polar Perturbed-Chain SAFT, including Quadrupolar interaction contributions (Q-PCP-SAFT)

References

  1. Gross, J. (2005). An equation-of-state contribution for polar components: Quadrupolar molecules. AIChE Journal, 51(9), 2556-2568. doi:10.1002/aic.10502
  2. Gross, J., & Vrabec, J. (2008). Vapor−Liquid Equilibria Simulation and an Equation of State Contribution for Dipole−Quadrupole Interactions. J. Phys. Chem. B, 112(1), 51-60. doi:10.1021/jp072619u
source
Clapeyron.HomogcPCPSAFTType
HomogcPCPSAFTModel <: PCPSAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • quadrupole: Single Parameter (Float64) - Quadrupole moment [DA°]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • quadrupole: Single Parameter (Float64) - Quadrupole moment [DA°]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Polar Perturbed-Chain SAFT, including Quadrupolar interaction contributions (Q-PCP-SAFT)

References

  1. Gross, J. (2005). An equation-of-state contribution for polar components: Quadrupolar molecules. AIChE Journal, 51(9), 2556-2568. doi:10.1002/aic.10502
  2. Gross, J., & Vrabec, J. (2008). Vapor−Liquid Equilibria Simulation and an Equation of State Contribution for Dipole−Quadrupole Interactions. J. Phys. Chem. B, 112(1), 51-60. doi:10.1021/jp072619u
source
Clapeyron.HomogcPCPSAFTType
HomogcPCPSAFTModel <: PCPSAFTModel
 
 HomogcPCPSAFT(components; 
 idealmodel = BasicIdeal,
@@ -65,7 +65,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • m: Single Parameter (Float64) - Number of segments (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • k: Pair Parameter (Float64) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Homosegmented Group-contribution Polar Perturbed-Chain SAFT (Homo-gc-PCP-SAFT)

References

  1. Sauer, E., Stavrou, M., Gross, J. (2014). Comparison between a Homo- and a Heterosegmented Group Contribution Approach Based on the Perturbed-Chain Polar Statistical Associating Fluid Theory Equation of State. Industrial & Engineering Chemistry Research, 53(38), 14854-14864. doi:10.1021/ie502203w
source
Clapeyron.HeterogcPCPSAFTType
gcPCPSAFTModel <: PCSAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • m: Single Parameter (Float64) - Number of segments (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • k: Pair Parameter (Float64) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Homosegmented Group-contribution Polar Perturbed-Chain SAFT (Homo-gc-PCP-SAFT)

References

  1. Sauer, E., Stavrou, M., Gross, J. (2014). Comparison between a Homo- and a Heterosegmented Group Contribution Approach Based on the Perturbed-Chain Polar Statistical Associating Fluid Theory Equation of State. Industrial & Engineering Chemistry Research, 53(38), 14854-14864. doi:10.1021/ie502203w
source
Clapeyron.HeterogcPCPSAFTType
gcPCPSAFTModel <: PCSAFTModel
 
 HeterogcPCPSAFT(components; 
 idealmodel = BasicIdeal,
@@ -73,7 +73,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • m: Single Parameter (Float64) - Number of segments (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • k: Pair Parameter (Float64) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Heterosegmented Group-contribution Polar Perturbed-Chain SAFT (Hetero-gc-PCP-SAFT)

References

  1. Gross, J., Spuhl, O., Tumakaka, F. & Sadowski, G. (2003). Modeling Copolymer Systems Using the Perturbed-Chain SAFT Equation of State. Industrial & Engineering Chemistry Research, 42, 1266-1274. doi:10.1021/ie020509y
  2. Sauer, E., Stavrou, M. & Gross, J. (2014). Comparison between a Homo- and a Heterosegmented Group Contribution Approach Based on the Perturbed-Chain Polar Statistical Associating Fluid Theory Equation of State. Industrial & Engineering Chemistry Research, 53(38), 14854–14864. doi:10.1021/ie502203w

List of available groups

NameDescription
CH3Methyl
CH2Methylene
CH
C
CH2=Terminal alkene
CH=
=C<
C#CHTerminal alkyne
cCH2_penCyclic pentane group
cCH_pen
cCH2_hexCyclic hexane group
cCH_hex
aCHAromatic group
aCH
OHHydroxyl group
NH2Amine group
source
Clapeyron.sPCSAFTType
sPCSAFT <: PCSAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • m: Single Parameter (Float64) - Number of segments (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • k: Pair Parameter (Float64) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • dipole: Single Parameter (Float64) - Dipole moment [D]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Heterosegmented Group-contribution Polar Perturbed-Chain SAFT (Hetero-gc-PCP-SAFT)

References

  1. Gross, J., Spuhl, O., Tumakaka, F. & Sadowski, G. (2003). Modeling Copolymer Systems Using the Perturbed-Chain SAFT Equation of State. Industrial & Engineering Chemistry Research, 42, 1266-1274. doi:10.1021/ie020509y
  2. Sauer, E., Stavrou, M. & Gross, J. (2014). Comparison between a Homo- and a Heterosegmented Group Contribution Approach Based on the Perturbed-Chain Polar Statistical Associating Fluid Theory Equation of State. Industrial & Engineering Chemistry Research, 53(38), 14854–14864. doi:10.1021/ie502203w

List of available groups

NameDescription
CH3Methyl
CH2Methylene
CH
C
CH2=Terminal alkene
CH=
=C<
C#CHTerminal alkyne
cCH2_penCyclic pentane group
cCH_pen
cCH2_hexCyclic hexane group
cCH_hex
aCHAromatic group
aCH
OHHydroxyl group
NH2Amine group
source
Clapeyron.sPCSAFTType
sPCSAFT <: PCSAFTModel
 
 sPCSAFT(components;
 idealmodel = BasicIdeal,
@@ -81,14 +81,14 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Simplified Perturbed-Chain SAFT (sPC-SAFT)

References

  1. von Solms, N., Michelsen, M. L., & Kontogeorgis, G. M. (2003). Computational and physical performance of a modified PC-SAFT equation of state for highly asymmetric and associating mixtures. Industrial & Engineering Chemistry Research, 42(5), 1098–1105. doi:10.1021/ie020753p
source
Clapeyron.gcsPCSAFTType
gcsPCSAFT <: PCSAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Simplified Perturbed-Chain SAFT (sPC-SAFT)

References

  1. von Solms, N., Michelsen, M. L., & Kontogeorgis, G. M. (2003). Computational and physical performance of a modified PC-SAFT equation of state for highly asymmetric and associating mixtures. Industrial & Engineering Chemistry Research, 42(5), 1098–1105. doi:10.1021/ie020753p
source
Clapeyron.gcsPCSAFTType
gcsPCSAFT <: PCSAFTModel
 gcsPCSAFT(components; 
 idealmodel = BasicIdeal,
 userlocations = String[],
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • m: 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) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Group-contribution version of Simplified Perturbed-Chain SAFT (sPC-SAFT)

References

  1. Tihic, A., Kontogeorgis, G.M., von Solms, N., Michelsen, M.L. (2008). A predictive group-contribution simplified PC-SAFT equation of state: Application to polymer systems. Industrial & Engineering Chemistry Research, 47(15), 5092-5101. doi:10.1021/ie0710768
source
Clapeyron.pharmaPCSAFTType
pharmaPCSAFTModel <: PCSAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • m: 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) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Group-contribution version of Simplified Perturbed-Chain SAFT (sPC-SAFT)

References

  1. Tihic, A., Kontogeorgis, G.M., von Solms, N., Michelsen, M.L. (2008). A predictive group-contribution simplified PC-SAFT equation of state: Application to polymer systems. Industrial & Engineering Chemistry Research, 47(15), 5092-5101. doi:10.1021/ie0710768
source
Clapeyron.pharmaPCSAFTType
pharmaPCSAFTModel <: PCSAFTModel
 
 pharmaPCSAFT(components;
 idealmodel = BasicIdeal,
@@ -96,7 +96,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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) - Constant binary Interaction Paramater (no units)
  • kT: Pair Parameter (Float64) - T-dependent inary Interaction Paramater [K^-1]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • k: Pair Parameter (Float64) (optional) - Constant binary Interaction Paramater (no units)
  • kT: Pair Parameter (Float64) - T-dependent inary Interaction Paramater [K^-1]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain SAFT (PC-SAFT), with T dependent kij and water correlation [2] for segment diameter. For using the water's sigma correlation, water08 should be selected instead of water.

References

  1. Paus, R., Ji, Y., Vahle, L., & Sadowski, G. (2015). Predicting the solubility advantage of amorphous pharmaceuticals: A novel thermodynamic approach. Molecular Pharmaceutics, 12(8), 2823–2833. doi:10.1021/mp500824d
  2. Cameretti, L. F., & Sadowski, G. (2008). Modeling of aqueous amino acid and polypeptide solutions with PC-SAFT. Genie Des Procedes [Chemical Engineering and Processing], 47(6), 1018–1025. doi:10.1016/j.cep.2007.02.034
source
Clapeyron.CPPCSAFTType
CPPCSAFTModel <: PCSAFTModel
+assoc_options = AssocOptions())

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) - Constant binary Interaction Paramater (no units)
  • kT: Pair Parameter (Float64) - T-dependent inary Interaction Paramater [K^-1]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • k: Pair Parameter (Float64) (optional) - Constant binary Interaction Paramater (no units)
  • kT: Pair Parameter (Float64) - T-dependent inary Interaction Paramater [K^-1]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain SAFT (PC-SAFT), with T dependent kij and water correlation [2] for segment diameter. For using the water's sigma correlation, water08 should be selected instead of water.

References

  1. Paus, R., Ji, Y., Vahle, L., & Sadowski, G. (2015). Predicting the solubility advantage of amorphous pharmaceuticals: A novel thermodynamic approach. Molecular Pharmaceutics, 12(8), 2823–2833. doi:10.1021/mp500824d
  2. Cameretti, L. F., & Sadowski, G. (2008). Modeling of aqueous amino acid and polypeptide solutions with PC-SAFT. Genie Des Procedes [Chemical Engineering and Processing], 47(6), 1018–1025. doi:10.1016/j.cep.2007.02.034
source
Clapeyron.CPPCSAFTType
CPPCSAFTModel <: PCSAFTModel
 
 CPPCSAFT(components; 
 idealmodel = BasicIdeal,
@@ -104,7 +104,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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]
  • delta: Single Parameter (Float64) - Critical volume displacement (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Pair Parameter (Float64) - Number of segments (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • delta: Single Parameter (Float64) - Critical volume displacement (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Critical Point-Based PC-SAFT (CP-PC-SAFT)

References

  1. Polishuk, I. (2014). Standardized critical point-based numerical solution of statistical association fluid theory parameters: The perturbed chain-statistical association fluid theory equation of state revisited. Industrial & Engineering Chemistry Research, 53(36), 14127–14141. doi:10.1021/ie502633e
source
Clapeyron.GEPCSAFTType
GEPCSAFT <: SAFTModel
+assoc_options = AssocOptions())

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]
  • delta: Single Parameter (Float64) - Critical volume displacement (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Pair Parameter (Float64) - Number of segments (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • delta: Single Parameter (Float64) - Critical volume displacement (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Critical Point-Based PC-SAFT (CP-PC-SAFT)

References

  1. Polishuk, I. (2014). Standardized critical point-based numerical solution of statistical association fluid theory parameters: The perturbed chain-statistical association fluid theory equation of state revisited. Industrial & Engineering Chemistry Research, 53(36), 14127–14141. doi:10.1021/ie502633e
source
Clapeyron.GEPCSAFTType
GEPCSAFT <: SAFTModel
 
 GEPCSAFT(components;
 idealmodel = BasicIdeal,
@@ -112,14 +112,14 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model
  • activity: Activity model

Description

Perturbed-Chain SAFT (PC-SAFT), with Gᴱ mixing rule.

References

  1. Walker, P. J. (2022). Toward advanced, predictive mixing rules in SAFT equations of state. Industrial & Engineering Chemistry Research. doi:10.1021/acs.iecr.2c03464
source
Clapeyron.ADPCSAFTType
ADPCSAFTModel <: SAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model
  • activity: Activity model

Description

Perturbed-Chain SAFT (PC-SAFT), with Gᴱ mixing rule.

References

  1. Walker, P. J. (2022). Toward advanced, predictive mixing rules in SAFT equations of state. Industrial & Engineering Chemistry Research. doi:10.1021/acs.iecr.2c03464
source
Clapeyron.ADPCSAFTType
ADPCSAFTModel <: SAFTModel
 ADPCSAFT(components; 
 idealmodel = BasicIdeal,
 userlocations = String[],
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • c1: Single Parameter (Float64)
  • c2: Single Parameter (Float64)
  • c3: Single Parameter (Float64)
  • 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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • theta_c: Association Parameter (Float64)

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • c1: Single Parameter (Float64)
  • c2: Single Parameter (Float64)
  • c3: Single Parameter (Float64)
  • 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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume
  • theta_c: Association Parameter (Float64)

Input models

  • idealmodel: Ideal Model

Description

modified Perturbed-Chain SAFT (PC-SAFT) with an association dependent hard sphere diameter.Currently only works for water.

numerically unstable

Due to its functional form, DAPT is numerically unstable. Please use big Floats for most calculations.

References

  1. Marshall, B. D. (2021). A modified perturbed chain‐statistical associating fluid theory equation of state for water which includes an association dependent hard sphere diameter. AIChE Journal. American Institute of Chemical Engineers, 67(10). doi:10.1002/aic.17342
source
Clapeyron.LJSAFTType
LJSAFTModel <: SAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • c1: Single Parameter (Float64)
  • c2: Single Parameter (Float64)
  • c3: Single Parameter (Float64)
  • 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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • theta_c: Association Parameter (Float64)

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • c1: Single Parameter (Float64)
  • c2: Single Parameter (Float64)
  • c3: Single Parameter (Float64)
  • 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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume
  • theta_c: Association Parameter (Float64)

Input models

  • idealmodel: Ideal Model

Description

modified Perturbed-Chain SAFT (PC-SAFT) with an association dependent hard sphere diameter.Currently only works for water.

numerically unstable

Due to its functional form, DAPT is numerically unstable. Please use big Floats for most calculations.

References

  1. Marshall, B. D. (2021). A modified perturbed chain‐statistical associating fluid theory equation of state for water which includes an association dependent hard sphere diameter. AIChE Journal. American Institute of Chemical Engineers, 67(10). doi:10.1002/aic.17342
source
Clapeyron.LJSAFTType
LJSAFTModel <: SAFTModel
 
 LJSAFT(components;
 idealmodel = BasicIdeal,
@@ -127,7 +127,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • b: Single Parameter (Float64) - Segment Volume [dm^3/mol]
  • T_tilde: Single Parameter (Float64) - Lennard-Jones attraction parameter [K]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater for energy(no units)
  • zeta: Pair Parameter (Float64) - Binary Interaction Paramater for volume (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • b: Pair Parameter (Float64) - Mixed segment covolume [dm^3/mol]
  • T_tilde: Pair Parameter (Float64) - Mixed Lennard-Jones attraction parameter [K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain SAFT (PC-SAFT)

References

  1. Kraska, T., & Gubbins, K. E. (1996). Phase equilibria calculations with a modified SAFT equation of state. 1. Pure alkanes, alkanols, and water. Industrial & Engineering Chemistry Research, 35(12), 4727–4737. doi:10.1021/ie9602320
source
Clapeyron.softSAFTType
softSAFTModel <: SAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • b: Single Parameter (Float64) - Segment Volume [dm^3/mol]
  • T_tilde: Single Parameter (Float64) - Lennard-Jones attraction parameter [K]
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater for energy(no units)
  • zeta: Pair Parameter (Float64) - Binary Interaction Paramater for volume (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • b: Pair Parameter (Float64) - Mixed segment covolume [dm^3/mol]
  • T_tilde: Pair Parameter (Float64) - Mixed Lennard-Jones attraction parameter [K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Perturbed-Chain SAFT (PC-SAFT)

References

  1. Kraska, T., & Gubbins, K. E. (1996). Phase equilibria calculations with a modified SAFT equation of state. 1. Pure alkanes, alkanols, and water. Industrial & Engineering Chemistry Research, 35(12), 4727–4737. doi:10.1021/ie9602320
source
Clapeyron.softSAFTType
softSAFTModel <: SAFTModel
 
 softSAFT(components; 
 idealmodel = BasicIdeal,
@@ -135,7 +135,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Soft SAFT, with Lennard-Jones function from Johnson et al. (1993)

References

  1. 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
  2. FELIPE J. BLAS and LOURDES F. VEGA. (1997). Thermodynamic behaviour of homonuclear and heteronuclear Lennard-Jones chains with association sites from simulation and theory. Molecular physics, 92(1), 135–150. doi:10.1080/002689797170707
source
Clapeyron.softSAFT2016Type
softSAFT2016Model <: softSAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Soft SAFT, with Lennard-Jones function from Johnson et al. (1993)

References

  1. 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
  2. FELIPE J. BLAS and LOURDES F. VEGA. (1997). Thermodynamic behaviour of homonuclear and heteronuclear Lennard-Jones chains with association sites from simulation and theory. Molecular physics, 92(1), 135–150. doi:10.1080/002689797170707
source
Clapeyron.softSAFT2016Type
softSAFT2016Model <: softSAFTModel
 
 softSAFT2016(components; 
 idealmodel = BasicIdeal,
@@ -143,7 +143,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Soft SAFT, with Lennard-Jones function from Thol et al. (2016)

References

  1. FELIPE J. BLAS and LOURDES F. VEGA. (1997). Thermodynamic behaviour of homonuclear and heteronuclear Lennard-Jones chains with association sites from simulation and theory. Molecular physics, 92(1), 135–150. doi:10.1080/002689797170707
  2. 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
source
Clapeyron.solidsoftSAFTType
solidsoftSAFTModel <: SAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Soft SAFT, with Lennard-Jones function from Thol et al. (2016)

References

  1. FELIPE J. BLAS and LOURDES F. VEGA. (1997). Thermodynamic behaviour of homonuclear and heteronuclear Lennard-Jones chains with association sites from simulation and theory. Molecular physics, 92(1), 135–150. doi:10.1080/002689797170707
  2. 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
source
Clapeyron.solidsoftSAFTType
solidsoftSAFTModel <: SAFTModel
 
 solidsoftSAFT(components; 
 idealmodel = BasicIdeal,
@@ -151,7 +151,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Soft SAFT equation of state for the solid phase.

References

  1. Johnson, J. K., Zollweg, J. A., & Gubbins, K. E. (1993). Modelling the solid–liquid–vapour phase behaviour ofn-alkanes in a TPT-1framework. Molecular physics, 78(3), 591–618. doi:10.1080/00268979300100411
  2. FELIPE J. BLAS and LOURDES F. VEGA. (1997). Thermodynamic behaviour of homonuclear and heteronuclear Lennard-Jones chains with association sites from simulation and theory. Molecular physics, 92(1), 135–150. doi:10.1080/002689797170707
  3. Ramírez-Carpio, V., Galindo, A., & Gil-Villegas, A. (2023). Modelling the solid–liquid–vapour phase behaviour of n -alkanes in a TPT-1 framework. Molecular Physics, 121(19–20). doi:10.1080/00268976.2023.2204150
source
Clapeyron.SAFTVRSWType
SAFTVRSWModel <: SAFTModel
+assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Soft SAFT equation of state for the solid phase.

References

  1. Johnson, J. K., Zollweg, J. A., & Gubbins, K. E. (1993). Modelling the solid–liquid–vapour phase behaviour ofn-alkanes in a TPT-1framework. Molecular physics, 78(3), 591–618. doi:10.1080/00268979300100411
  2. FELIPE J. BLAS and LOURDES F. VEGA. (1997). Thermodynamic behaviour of homonuclear and heteronuclear Lennard-Jones chains with association sites from simulation and theory. Molecular physics, 92(1), 135–150. doi:10.1080/002689797170707
  3. Ramírez-Carpio, V., Galindo, A., & Gil-Villegas, A. (2023). Modelling the solid–liquid–vapour phase behaviour of n -alkanes in a TPT-1 framework. Molecular Physics, 121(19–20). doi:10.1080/00268976.2023.2204150
source
Clapeyron.SAFTVRSWType
SAFTVRSWModel <: SAFTModel
 
 SAFTVRSW(components;
 idealmodel = BasicIdeal,
@@ -159,7 +159,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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]
  • lambda: Single Parameter (Float64) - Soft Well range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • l: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • lambda: Pair Parameter (Float64) - Mixed Soft Well range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT, Variable Range (VR) ,Square Well (SW)

References

  1. Gil-Villegas, A., Galindo, A., Whitehead, P. J., Mills, S. J., Jackson, G., & Burgess, A. N. (1997). Statistical associating fluid theory for chain molecules with attractive potentials of variable range. The Journal of chemical physics, 106(10), 4168–4186. doi:10.1063/1.473101
source
Clapeyron.SAFTVRMieType
SAFTVRMieModel <: SAFTModel
+assoc_options = AssocOptions())

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]
  • lambda: Single Parameter (Float64) - Soft Well range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • l: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • lambda: Pair Parameter (Float64) - Mixed Soft Well range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT, Variable Range (VR) ,Square Well (SW)

References

  1. Gil-Villegas, A., Galindo, A., Whitehead, P. J., Mills, S. J., Jackson, G., & Burgess, A. N. (1997). Statistical associating fluid theory for chain molecules with attractive potentials of variable range. The Journal of chemical physics, 106(10), 4168–4186. doi:10.1063/1.473101
source
Clapeyron.SAFTVRMieType
SAFTVRMieModel <: SAFTModel
 
 SAFTVRMie(components;
 idealmodel = BasicIdeal,
@@ -167,7 +167,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-VR with Mie potential

References

  1. Lafitte, T., Apostolakou, A., Avendaño, C., Galindo, A., Adjiman, C. S., Müller, E. A., & Jackson, G. (2013). Accurate statistical associating fluid theory for chain molecules formed from Mie segments. The Journal of Chemical Physics, 139(15), 154504. doi:10.1063/1.4819786
  2. Dufal, S., Lafitte, T., Haslam, A. J., Galindo, A., Clark, G. N. I., Vega, C., & Jackson, G. (2015). The A in SAFT: developing the contribution of association to the Helmholtz free energy within a Wertheim TPT1 treatment of generic Mie fluids. Molecular Physics, 113(9–10), 948–984. doi:10.1080/00268976.2015.1029027
source
Clapeyron.SAFTVRMie15Type
SAFTVRMie15Model <: SAFTVRMieModel
+assoc_options = AssocOptions())

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-VR with Mie potential

References

  1. Lafitte, T., Apostolakou, A., Avendaño, C., Galindo, A., Adjiman, C. S., Müller, E. A., & Jackson, G. (2013). Accurate statistical associating fluid theory for chain molecules formed from Mie segments. The Journal of Chemical Physics, 139(15), 154504. doi:10.1063/1.4819786
  2. Dufal, S., Lafitte, T., Haslam, A. J., Galindo, A., Clark, G. N. I., Vega, C., & Jackson, G. (2015). The A in SAFT: developing the contribution of association to the Helmholtz free energy within a Wertheim TPT1 treatment of generic Mie fluids. Molecular Physics, 113(9–10), 948–984. doi:10.1080/00268976.2015.1029027
source
Clapeyron.SAFTVRMie15Type
SAFTVRMie15Model <: SAFTVRMieModel
 
 SAFTVRMie(components;
 idealmodel = BasicIdeal,
@@ -175,7 +175,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-VR with Mie potential and the Mie association kernel

References

  1. Lafitte, T., Apostolakou, A., Avendaño, C., Galindo, A., Adjiman, C. S., Müller, E. A., & Jackson, G. (2013). Accurate statistical associating fluid theory for chain molecules formed from Mie segments. The Journal of Chemical Physics, 139(15), 154504. doi:10.1063/1.4819786
  2. Dufal, S., Lafitte, T., Haslam, A. J., Galindo, A., Clark, G. N. I., Vega, C., & Jackson, G. (2015). The A in SAFT: developing the contribution of association to the Helmholtz free energy within a Wertheim TPT1 treatment of generic Mie fluids. Molecular Physics, 113(9–10), 948–984. doi:10.1080/00268976.2015.1029027
source
Clapeyron.SAFTVRQMieType
SAFTVRQMieModel <: SAFTVRMieModel
+assoc_options = AssocOptions())

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-VR with Mie potential and the Mie association kernel

References

  1. Lafitte, T., Apostolakou, A., Avendaño, C., Galindo, A., Adjiman, C. S., Müller, E. A., & Jackson, G. (2013). Accurate statistical associating fluid theory for chain molecules formed from Mie segments. The Journal of Chemical Physics, 139(15), 154504. doi:10.1063/1.4819786
  2. Dufal, S., Lafitte, T., Haslam, A. J., Galindo, A., Clark, G. N. I., Vega, C., & Jackson, G. (2015). The A in SAFT: developing the contribution of association to the Helmholtz free energy within a Wertheim TPT1 treatment of generic Mie fluids. Molecular Physics, 113(9–10), 948–984. doi:10.1080/00268976.2015.1029027
source
Clapeyron.SAFTVRQMieType
SAFTVRQMieModel <: SAFTVRMieModel
 
 SAFTVRQMie(components;
 idealmodel = BasicIdeal,
@@ -183,7 +183,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 []
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]

Model Parameters

  • Mw: Pair Parameter (Float64) - Mixed Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]

Input models

  • idealmodel: Ideal Model

Description

Quantum-Corrected SAFT-VR Mie. In particular, it uses the second order Feynman–Hibbs corrections to the Mie Potential

References

  1. Aasen, A., Hammer, M., Ervik, Å., Müller, E. A., & Wilhelmsen, Ø. (2019). Equation of state and force fields for Feynman–Hibbs-corrected Mie fluids. I. Application to pure helium, neon, hydrogen, and deuterium. The Journal of Chemical Physics, 151(6), 064508. doi:10.1063/1.5111364
  2. Aasen, A., Hammer, M., Müller, E. A., & Wilhelmsen, Ø. (2020). Equation of state and force fields for Feynman-Hibbs-corrected Mie fluids. II. Application to mixtures of helium, neon, hydrogen, and deuterium. The Journal of Chemical Physics, 152(7), 074507. doi:10.1063/1.5136079
source
Clapeyron.SAFTVRSMieType
SAFTVRSMieModel <: SAFTModel
+assoc_options = AssocOptions())

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 []
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]

Model Parameters

  • Mw: Pair Parameter (Float64) - Mixed Molecular Weight [g/mol]
  • segment: Single Parameter (Float64) - Number of segments (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]

Input models

  • idealmodel: Ideal Model

Description

Quantum-Corrected SAFT-VR Mie. In particular, it uses the second order Feynman–Hibbs corrections to the Mie Potential

References

  1. Aasen, A., Hammer, M., Ervik, Å., Müller, E. A., & Wilhelmsen, Ø. (2019). Equation of state and force fields for Feynman–Hibbs-corrected Mie fluids. I. Application to pure helium, neon, hydrogen, and deuterium. The Journal of Chemical Physics, 151(6), 064508. doi:10.1063/1.5111364
  2. Aasen, A., Hammer, M., Müller, E. A., & Wilhelmsen, Ø. (2020). Equation of state and force fields for Feynman-Hibbs-corrected Mie fluids. II. Application to mixtures of helium, neon, hydrogen, and deuterium. The Journal of Chemical Physics, 152(7), 074507. doi:10.1063/1.5136079
source
Clapeyron.SAFTVRSMieType
SAFTVRSMieModel <: SAFTModel
 
 SAFTVRSMie(components;
 idealmodel = BasicIdeal,
@@ -191,7 +191,7 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-VR with Mie potential for the solid phase using WCA perturbation theory.

References

  1. Jalani, Y., Ramrattana, N., Walker, P.J., Riedemann, A., Galindo, A., Mater, O. K., & Müller, E. A. (2024). SAFT-VR Mie Equation of State for the Solid and Fluid Phases. (in preparation)
source
Clapeyron.SAFTgammaMieType
SAFTgammaMie <: SAFTModel

SAFTgammaMie(components; idealmodel = BasicIdeal, userlocations = String[], groupuserlocations = String[], idealuserlocations = String[], epsilonmixing = :default, referencestate = nothing, verbose = false, assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • vst: Single Parameter (Float64) - Number of segments (no units)
  • S: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Model Parameters

  • segment: Single Parameter (Float64) - Number of segments (no units)
  • shapefactor: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-γ-Mie EoS

Info

You can choose between the Hudsen-McCoubrey combining rule (√(ϵᵢ*ϵⱼ)*(σᵢ^3 * σⱼ^3)/σᵢⱼ^6) or the default rule (√(ϵᵢ*ϵⱼ*(σᵢ^3 * σⱼ^3))/σᵢⱼ^3) by passing the epsilon_mixing argument. with arguments :default or :hudsen_mccoubrey

References

  1. Papaioannou, V., Lafitte, T., Avendaño, C., Adjiman, C. S., Jackson, G., Müller, E. A., & Galindo, A. (2014). Group contribution methodology based on the statistical associating fluid theory for heteronuclear molecules formed from Mie segments. The Journal of Chemical Physics, 140(5), 054107. doi:10.1063/1.4851455
  2. Dufal, S., Papaioannou, V., Sadeqzadeh, M., Pogiatzis, T., Chremos, A., Adjiman, C. S., … Galindo, A. (2014). Prediction of thermodynamic properties and phase behavior of fluids and mixtures with the SAFT-γ Mie group-contribution equation of state. Journal of Chemical and Engineering Data, 59(10), 3272–3288. doi:10.1021/je500248h

List of available groups

NameDescription
CH3Methyl
CH2Methylene
CH
C
aCHAromatic CH
aCCH2
aCCH
CH2=Alkene group
CH=
cCH2Cyclic alkane group
COOHCarboxylic acid group
COOEster group
OHHydroxyl
CH2OHMethylene hydroxyl group
CHOH
NH2Amine group
NH
N
cNH
cN
CH=
aCCH3
aCOH
cCH
cCHNH
cCHN
aCCOaC
aCCOOH
aCNHaC
CH3CO
eOEnd ether oxygen
cOCenter ether oxygen
source
Clapeyron.structSAFTgammaMieType
structSAFTgammaMie <: SAFTgammaMieModel
+assoc_options = AssocOptions())

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

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]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-VR with Mie potential for the solid phase using WCA perturbation theory.

References

  1. Jalani, Y., Ramrattana, N., Walker, P.J., Riedemann, A., Galindo, A., Mater, O. K., & Müller, E. A. (2024). SAFT-VR Mie Equation of State for the Solid and Fluid Phases. (in preparation)
source
Clapeyron.SAFTgammaMieType
SAFTgammaMie <: SAFTModel

SAFTgammaMie(components; idealmodel = BasicIdeal, userlocations = String[], groupuserlocations = String[], idealuserlocations = String[], epsilonmixing = :default, referencestate = nothing, verbose = false, assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • vst: Single Parameter (Float64) - Number of segments (no units)
  • S: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Model Parameters

  • segment: Single Parameter (Float64) - Number of segments (no units)
  • shapefactor: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

SAFT-γ-Mie EoS

Info

You can choose between the Hudsen-McCoubrey combining rule (√(ϵᵢ*ϵⱼ)*(σᵢ^3 * σⱼ^3)/σᵢⱼ^6) or the default rule (√(ϵᵢ*ϵⱼ*(σᵢ^3 * σⱼ^3))/σᵢⱼ^3) by passing the epsilon_mixing argument. with arguments :default or :hudsen_mccoubrey

References

  1. Papaioannou, V., Lafitte, T., Avendaño, C., Adjiman, C. S., Jackson, G., Müller, E. A., & Galindo, A. (2014). Group contribution methodology based on the statistical associating fluid theory for heteronuclear molecules formed from Mie segments. The Journal of Chemical Physics, 140(5), 054107. doi:10.1063/1.4851455
  2. Dufal, S., Papaioannou, V., Sadeqzadeh, M., Pogiatzis, T., Chremos, A., Adjiman, C. S., … Galindo, A. (2014). Prediction of thermodynamic properties and phase behavior of fluids and mixtures with the SAFT-γ Mie group-contribution equation of state. Journal of Chemical and Engineering Data, 59(10), 3272–3288. doi:10.1021/je500248h

List of available groups

NameDescription
CH3Methyl
CH2Methylene
CH
C
aCHAromatic CH
aCCH2
aCCH
CH2=Alkene group
CH=
cCH2Cyclic alkane group
COOHCarboxylic acid group
COOEster group
OHHydroxyl
CH2OHMethylene hydroxyl group
CHOH
NH2Amine group
NH
N
cNH
cN
CH=
aCCH3
aCOH
cCH
cCHNH
cCHN
aCCOaC
aCCOOH
aCNHaC
CH3CO
eOEnd ether oxygen
cOCenter ether oxygen
source
Clapeyron.structSAFTgammaMieType
structSAFTgammaMie <: SAFTgammaMieModel
 
 structSAFTgammaMie(components; 
 idealmodel = BasicIdeal,
@@ -201,14 +201,14 @@
 reference_state = nothing,
 verbose = false,
 epsilon_mixing = :default,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • vst: Single Parameter (Float64) - Number of segments (no units)
  • S: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Model Parameters

  • segment: Single Parameter (Float64) - Number of segments (no units)
  • shapefactor: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

s-SAFT-γ-Mie EoS

References

  1. Shaahmadi,, F., Hurter, R.M., Burger, A.J., Cripwell, J.T. (2021). Improving the SAFT-γ Mie equation of state to account for functional group interactions in a structural (s-SAFT-γ Mie) framework: Linear and branched alkanes. The Journal of Chemical Physics, 154, 244102. doi:10.1063/5.0048315
  2. Schulze-Hulbe, A., Shaahmadi, F., Burger, A.J., Cripwell, J.T. (2022). Extending the Structural (s)-SAFT-γ Mie Equation of State to Primary Alcohols. Industrial & Engineering Chemistry Research, 61 (33), 12208-12228. doi:10.1021/acs.iecr.2c00198
source
Clapeyron.DAPTType
DAPTModel <: SAFTModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • vst: Single Parameter (Float64) - Number of segments (no units)
  • S: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Single Parameter (Float64) - Segment Diameter []
  • epsilon: Single Parameter (Float64) - Reduced dispersion energy [K]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Model Parameters

  • segment: Single Parameter (Float64) - Number of segments (no units)
  • shapefactor: Single Parameter (Float64) - Shape factor for segment (no units)
  • sigma: Pair Parameter (Float64) - Mixed segment Diameter [m]
  • lambda_a: Pair Parameter (Float64) - Atractive range parameter (no units)
  • lambda_r: Pair Parameter (Float64) - Repulsive range parameter (no units)
  • epsilon: Pair Parameter (Float64) - Mixed reduced dispersion energy[K]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

s-SAFT-γ-Mie EoS

References

  1. Shaahmadi,, F., Hurter, R.M., Burger, A.J., Cripwell, J.T. (2021). Improving the SAFT-γ Mie equation of state to account for functional group interactions in a structural (s-SAFT-γ Mie) framework: Linear and branched alkanes. The Journal of Chemical Physics, 154, 244102. doi:10.1063/5.0048315
  2. Schulze-Hulbe, A., Shaahmadi, F., Burger, A.J., Cripwell, J.T. (2022). Extending the Structural (s)-SAFT-γ Mie Equation of State to Primary Alcohols. Industrial & Engineering Chemistry Research, 61 (33), 12208-12228. doi:10.1021/acs.iecr.2c00198
source
Clapeyron.DAPTType
DAPTModel <: SAFTModel
 DAPT(components; 
 idealmodel = BasicIdeal,
 userlocations = String[],
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • lambda: Single Parameter (Float64)
  • 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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • theta_c: Association Parameter (Float64)

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • lambda: Single Parameter (Float64)
  • 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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • theta_c: Association Parameter (Float64)

Input models

  • idealmodel: Ideal Model

Description

Doubly-Associated Perturbation Theory model. Currently only works for water.

numerically unstable

Due to its functional form, DAPT is numerically unstable. Please use big Floats for most calculations.

References

  1. Marshall, B. D. (2019). A doubly associated reference perturbation theory for water. Fluid Phase Equilibria, 500(112252), 112252. doi:10.1016/j.fluid.2019.112252
source

CPA Models

Clapeyron.CPAType
CPAModel <: EoSModel
+assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • lambda: Single Parameter (Float64)
  • 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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • theta_c: Association Parameter (Float64)

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • r_c: Single Parameter (Float64)
  • lambda: Single Parameter (Float64)
  • 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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • theta_c: Association Parameter (Float64)

Input models

  • idealmodel: Ideal Model

Description

Doubly-Associated Perturbation Theory model. Currently only works for water.

numerically unstable

Due to its functional form, DAPT is numerically unstable. Please use big Floats for most calculations.

References

  1. Marshall, B. D. (2019). A doubly associated reference perturbation theory for water. Fluid Phase Equilibria, 500(112252), 112252. doi:10.1016/j.fluid.2019.112252
source

CPA Models

Clapeyron.CPAType
CPAModel <: EoSModel
 
 function CPA(components;
     radial_dist::Symbol = :CS,
@@ -226,7 +226,7 @@
     translation_userlocations = String[],
     reference_state = nothing,
     verbose = false,
-    assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • a: Single Parameter (Float64) - Atraction parameter [m^6*Pa/mol]
  • b: Single Parameter (Float64) - Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • l: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • a: Pair Parameter (Float64) - Mixed Atraction Parameter [m^6*Pa/mol]
  • b: Pair Parameter (Float64) - Mixed Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [J]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Input models

  • idealmodel: Ideal Model
  • cubicmodel: Cubic Model

Description

Cubic Plus Association (CPA) EoS. Consists in the addition of a cubic part and an association part:

a_res(model::CPA) = a_res(model::Cubic) + a_assoc(model)

The radial_dist argument can be used to choose between a Carnahan-Starling form (CS, default) or the Kontogeorgis (KG) term, more widely known as s-CPA.

References

  1. Kontogeorgis, G. M., Michelsen, M. L., Folas, G. K., Derawi, S., von Solms, N., & Stenby, E. H. (2006). Ten years with the CPA (cubic-plus-association) equation of state. Part 1. Pure compounds and self-associating systems. Industrial & Engineering Chemistry Research, 45(14), 4855–4868. doi:10.1021/ie051305v
source
Clapeyron.sCPAFunction
sCPAModel <: CPAModel
+    assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • a: Single Parameter (Float64) - Atraction parameter [m^6*Pa/mol]
  • b: Single Parameter (Float64) - Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • l: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • a: Pair Parameter (Float64) - Mixed Atraction Parameter [m^6*Pa/mol]
  • b: Pair Parameter (Float64) - Mixed Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [J]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Input models

  • idealmodel: Ideal Model
  • cubicmodel: Cubic Model

Description

Cubic Plus Association (CPA) EoS. Consists in the addition of a cubic part and an association part:

a_res(model::CPA) = a_res(model::Cubic) + a_assoc(model)

The radial_dist argument can be used to choose between a Carnahan-Starling form (CS, default) or the Kontogeorgis (KG) term, more widely known as s-CPA.

References

  1. Kontogeorgis, G. M., Michelsen, M. L., Folas, G. K., Derawi, S., von Solms, N., & Stenby, E. H. (2006). Ten years with the CPA (cubic-plus-association) equation of state. Part 1. Pure compounds and self-associating systems. Industrial & Engineering Chemistry Research, 45(14), 4855–4868. doi:10.1021/ie051305v
source
Clapeyron.sCPAFunction
sCPAModel <: CPAModel
 
 function sCPA(components;
     idealmodel = BasicIdeal,
@@ -244,7 +244,7 @@
     translation_userlocations = String[],
     reference_state = nothing,
     verbose = false,
-    assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • a: Single Parameter (Float64) - Atraction parameter [m^6*Pa/mol]
  • b: Single Parameter (Float64) - Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • a: Pair Parameter (Float64) - Mixed Atraction Parameter [m^6*Pa/mol]
  • b: Pair Parameter (Float64) - Mixed Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [J]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Input models

  • idealmodel: Ideal Model
  • cubicmodel: Cubic Model

Description

Simplified Cubic Plus Association (s-CPA) EoS. Consists in the addition of a cubic part and an association part:

a_res(model::CPA) = a_res(model::Cubic) + a_assoc(model)

The radial_dist argument can be used to choose between a Carnahan-Starling form (CS, default) or the Kontogeorgis (KG) term, more widely known as s-CPA. using sCPA(components, radial_dist =: CS) is equivalent to using the original CPA

References

  1. Kontogeorgis, G. M., Michelsen, M. L., Folas, G. K., Derawi, S., von Solms, N., & Stenby, E. H. (2006). Ten years with the CPA (cubic-plus-association) equation of state. Part 1. Pure compounds and self-associating systems. Industrial & Engineering Chemistry Research, 45(14), 4855–4868. doi:10.1021/ie051305v
source

Miscellaneous Models

Clapeyron.COFFEEType
COFFEEModel <: SAFTVRMieModel
+    assoc_options = AssocOptions())

Input parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • Tc: Single Parameter (Float64) - Critical Temperature [K]
  • a: Single Parameter (Float64) - Atraction parameter [m^6*Pa/mol]
  • b: Single Parameter (Float64) - Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • k: Pair Parameter (Float64) (optional) - Binary Interaction Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Model Parameters

  • Mw: Single Parameter (Float64) - Molecular Weight [g/mol]
  • a: Pair Parameter (Float64) - Mixed Atraction Parameter [m^6*Pa/mol]
  • b: Pair Parameter (Float64) - Mixed Covolume [m^3/mol]
  • c1: Single Parameter (Float64) - α-function constant Parameter (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [J]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

Input models

  • idealmodel: Ideal Model
  • cubicmodel: Cubic Model

Description

Simplified Cubic Plus Association (s-CPA) EoS. Consists in the addition of a cubic part and an association part:

a_res(model::CPA) = a_res(model::Cubic) + a_assoc(model)

The radial_dist argument can be used to choose between a Carnahan-Starling form (CS, default) or the Kontogeorgis (KG) term, more widely known as s-CPA. using sCPA(components, radial_dist =: CS) is equivalent to using the original CPA

References

  1. Kontogeorgis, G. M., Michelsen, M. L., Folas, G. K., Derawi, S., von Solms, N., & Stenby, E. H. (2006). Ten years with the CPA (cubic-plus-association) equation of state. Part 1. Pure compounds and self-associating systems. Industrial & Engineering Chemistry Research, 45(14), 4855–4868. doi:10.1021/ie051305v
source

Miscellaneous Models

Clapeyron.COFFEEType
COFFEEModel <: SAFTVRMieModel
 
 COFFEE(components; 
 idealmodel = BasicIdeal,
@@ -252,4 +252,4 @@
 ideal_userlocations = String[],
 reference_state = nothing,
 verbose = false,
-assoc_options = AssocOptions())

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 Paramater (no units)
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume [m^3]

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]
  • epsilon_assoc: Association Parameter (Float64) - Reduced association energy [K]
  • bondvol: Association Parameter (Float64) - Association Volume

Input models

  • idealmodel: Ideal Model

Description

Co-Oriented Fluid Functional Equation for Electrostatic interactions (COFFEE)

References

  1. Langenbach, K. (2017). Co-Oriented Fluid Functional Equation for Electrostatic interactions (COFFEE). Chemical Engineering Science, 174, 40-55 (2017). doi:10.1016/j.ces.2017.08.025
source
+assoc_options = AssocOptions())

Input parameters

Model Parameters

Input models

Description

Co-Oriented Fluid Functional Equation for Electrostatic interactions (COFFEE)

References

  1. Langenbach, K. (2017). Co-Oriented Fluid Functional Equation for Electrostatic interactions (COFFEE). Chemical Engineering Science, 174, 40-55 (2017). doi:10.1016/j.ces.2017.08.025
source diff --git a/dev/faq/index.html b/dev/faq/index.html index fb3b0c268..d62636c3d 100644 --- a/dev/faq/index.html +++ b/dev/faq/index.html @@ -45,4 +45,4 @@ function a2(model,V,T,Z,mydata = data(model,V,T,z)) _,d,_ = mydata # in this function, only d is used # definition for a2 -end +end diff --git a/dev/index.html b/dev/index.html index b0807dccb..7be9d7926 100644 --- a/dev/index.html +++ b/dev/index.html @@ -10,4 +10,4 @@ publisher={American Chemical Society}, doi={doi/10.1021/acs.iecr.2c00326}, url={https://pubs.acs.org/doi/10.1021/acs.iecr.2c00326} -}

Citing a particular equation of state model

In addition to citing this work, it is encouraged to cite the references to the underlying models used. For that, you can use Clapeyron.cite to obtain the references used in a particular model.

+}

Citing a particular equation of state model

In addition to citing this work, it is encouraged to cite the references to the underlying models used. For that, you can use Clapeyron.cite to obtain the references used in a particular model.

diff --git a/dev/installation/index.html b/dev/installation/index.html index 46d94b483..1dfee51ca 100644 --- a/dev/installation/index.html +++ b/dev/installation/index.html @@ -3,4 +3,4 @@ julia> Pkg.add("Clapeyron")

If a new version of Clapeyron.jl is released, one can update the package using:

julia> using Pkg
 
-julia> Pkg.update("Clapeyron")

In order to fully utilise Clapeyron, users may need certain features not included in the package. Here is a list of packages the developers of Clapeyron recommend using:

+julia> Pkg.update("Clapeyron")

In order to fully utilise Clapeyron, users may need certain features not included in the package. Here is a list of packages the developers of Clapeyron recommend using:

diff --git a/dev/notebook_examples/index.html b/dev/notebook_examples/index.html index 1b791dee0..d4e1b68ce 100644 --- a/dev/notebook_examples/index.html +++ b/dev/notebook_examples/index.html @@ -1,2 +1,2 @@ -Notebook Examples · Clapeyron.jl

Notebook Examples

This is a list of currently available example notebooks for Clapeyron.jl:

+Notebook Examples · Clapeyron.jl

Notebook Examples

This is a list of currently available example notebooks for Clapeyron.jl:

diff --git a/dev/properties/basic/index.html b/dev/properties/basic/index.html index 98e2f17bf..5ddb3b02d 100644 --- a/dev/properties/basic/index.html +++ b/dev/properties/basic/index.html @@ -1,5 +1,5 @@ -Basic Properties · Clapeyron.jl

Contents

Index

Primitive functions

Almost all models in Clapeyron based on Helmholtz free energy have at least one of the following functions defined:

Clapeyron.eosFunction
eos(model::EoSModel, V, T, z=SA[1.0])

Returns the total Helmholtz free energy.

Inputs:

  • model::EoSModel Thermodynamic model to evaluate
  • V Total volume, in [m³]
  • T Temperature, in [K]
  • z mole amounts, in [mol], by default is @SVector [1.0]

Outputs:

  • Total Helmholtz free energy, in [J]

by default, it calls R̄*T*∑(z)*(a_ideal(ideal_model,V,T,z) + a_res(model,V,T,z)) where ideal_model == idealmodel(model), where a_res is the reduced residual Helmholtz energy and a_ideal is the reduced ideal Helmholtz energy. You can mix and match ideal models if you provide:

  • [idealmodel](@ref)(model): extracts the ideal model from your Thermodynamic model
  • [a_res](@ref)(model,V,T,z): residual reduced Helmholtz free energy
source
Clapeyron.eos_resFunction
eos_res(model::EoSModel, V, T, z=SA[1.0])

Returns the residual Helmholtz free energy.

Inputs:

  • model::EoSModel Thermodynamic model to evaluate
  • V Total volume, in [m³]
  • T Temperature, in [K]
  • z mole amounts, in [mol], by default is @SVector [1.0]

Outputs:

  • Residual Helmholtz free energy, in [J]

by default, it calls R̄*T*∑(z)*(a_res(model,V,T,z)) where a_res is the reduced residual Helmholtz energy.

source
Clapeyron.idealmodelFunction
idealmodel(model::EoSModel)

retrieves the ideal model from the input's model. if the model is already an idealmodel, return nothing

Examples:

julia> pr = PR(["water"],idealmodel = MonomerIdeal)
+Basic Properties · Clapeyron.jl

Contents

Index

Primitive functions

Almost all models in Clapeyron based on Helmholtz free energy have at least one of the following functions defined:

Clapeyron.eosFunction
eos(model::EoSModel, V, T, z=SA[1.0])

Returns the total Helmholtz free energy.

Inputs:

  • model::EoSModel Thermodynamic model to evaluate
  • V Total volume, in [m³]
  • T Temperature, in [K]
  • z mole amounts, in [mol], by default is @SVector [1.0]

Outputs:

  • Total Helmholtz free energy, in [J]

by default, it calls R̄*T*∑(z)*(a_ideal(ideal_model,V,T,z) + a_res(model,V,T,z)) where ideal_model == idealmodel(model), where a_res is the reduced residual Helmholtz energy and a_ideal is the reduced ideal Helmholtz energy. You can mix and match ideal models if you provide:

  • [idealmodel](@ref)(model): extracts the ideal model from your Thermodynamic model
  • [a_res](@ref)(model,V,T,z): residual reduced Helmholtz free energy
source
Clapeyron.eos_resFunction
eos_res(model::EoSModel, V, T, z=SA[1.0])

Returns the residual Helmholtz free energy.

Inputs:

  • model::EoSModel Thermodynamic model to evaluate
  • V Total volume, in [m³]
  • T Temperature, in [K]
  • z mole amounts, in [mol], by default is @SVector [1.0]

Outputs:

  • Residual Helmholtz free energy, in [J]

by default, it calls R̄*T*∑(z)*(a_res(model,V,T,z)) where a_res is the reduced residual Helmholtz energy.

source
Clapeyron.idealmodelFunction
idealmodel(model::EoSModel)

retrieves the ideal model from the input's model. if the model is already an idealmodel, return nothing

Examples:

julia> pr = PR(["water"],idealmodel = MonomerIdeal)
 PR{MonomerIdeal, PRAlpha, NoTranslation, vdW1fRule} with 1 component:
  "water"
 Contains parameters: a, b, Tc, Pc, Mw
@@ -8,17 +8,17 @@
  "water"
 Contains parameters: Mw
 julia> idealmodel(ideal) == nothing
-true
source
Clapeyron.a_resFunction
a_res(model::EoSModel, V, T, z,args...)

Reduced residual Helmholtz free energy.

Inputs:

  • model::EoSModel Thermodynamic model to evaluate
  • V Total volume, in [m³]
  • T Temperature, in [K]
  • z mole amounts, in [mol], by default is @SVector [1.0]

Outputs:

  • Residual Helmholtz free energy, no units

You can define your own EoS by adding a method to a_res that accepts your custom model.

source

Automatic Differentiation functions

All bulk properties in Clapeyron are calculated via a combination of these Automatic Differentiation Primitives over eos or eos_res:

Clapeyron.∂f∂TFunction
∂f∂T(model,V,T,z=SA[1.0])

returns ∂f/∂T at constant total volume and composition, where f is the total helmholtz energy, given by eos(model,V,T,z)

source
Clapeyron.∂f∂VFunction
∂f∂V(model,V,T,z)

returns ∂f/∂V at constant temperature and composition, where f is the total helmholtz energy, given by eos(model,V,T,z), and V is the total volume

source
Clapeyron.∂fFunction
∂f(model,V,T,z)

returns zeroth order (value) and first order derivative information of the total helmholtz energy (given by eos(model,V,T,z)). the result is given in two values:

grad_f,fval = ∂2f(model,V,T,z)

where:

fval   = f(V,T) = eos(model,V,T,z)
+true
source
Clapeyron.a_resFunction
a_res(model::EoSModel, V, T, z,args...)

Reduced residual Helmholtz free energy.

Inputs:

  • model::EoSModel Thermodynamic model to evaluate
  • V Total volume, in [m³]
  • T Temperature, in [K]
  • z mole amounts, in [mol], by default is @SVector [1.0]

Outputs:

  • Residual Helmholtz free energy, no units

You can define your own EoS by adding a method to a_res that accepts your custom model.

source

Automatic Differentiation functions

All bulk properties in Clapeyron are calculated via a combination of these Automatic Differentiation Primitives over eos or eos_res:

Clapeyron.∂f∂TFunction
∂f∂T(model,V,T,z=SA[1.0])

returns ∂f/∂T at constant total volume and composition, where f is the total helmholtz energy, given by eos(model,V,T,z)

source
Clapeyron.∂f∂VFunction
∂f∂V(model,V,T,z)

returns ∂f/∂V at constant temperature and composition, where f is the total helmholtz energy, given by eos(model,V,T,z), and V is the total volume

source
Clapeyron.∂fFunction
∂f(model,V,T,z)

returns zeroth order (value) and first order derivative information of the total helmholtz energy (given by eos(model,V,T,z)). the result is given in two values:

grad_f,fval = ∂2f(model,V,T,z)

where:

fval   = f(V,T) = eos(model,V,T,z)
 
 grad_f = [ ∂f/∂V; ∂f/∂T]
-

Where V is the total volume, T is the temperature and f is the total helmholtz energy.

source
Clapeyron.p∂p∂VFunction
p∂p∂V(model,V,T,z=SA[1.0])

returns p and ∂p/∂V at constant temperature, where p is the pressure = pressure(model,V,T,z) and V is the total Volume.

source
Clapeyron.∂2fFunction
∂2f(model,V,T,z)

returns zeroth order (value), first order and second order derivative information of the total helmholtz energy (given by eos(model,V,T,z)). the result is given in three values:

hess_f,grad_f,fval = ∂2f(model,V,T,z)

where: ``` fval = f(V,T) = eos(model,V,T,z)

grad_f = [ ∂f/∂V; ∂f/∂T]

hess_f = [ ∂²f/∂V²; ∂²f/∂V∂T ∂²f/∂V∂T; ∂²f/∂V²] ```

Where V is the total volume, T is the temperature and f is the total helmholtz energy.

source
Clapeyron.∂2pFunction
∂2p(model,V,T,z)

returns zeroth order (value), first order and second order derivative information of the pressure. the result is given in three values:

hess_p,grad_p,pval = ∂2p(model,V,T,z)

where: ``` pval = p(V,T) = pressure(model,V,T,z)

grad_p = [ ∂p/∂V; ∂p/∂T]

hess_p = [ ∂²p/∂V²; ∂²p/∂V∂T ∂²p/∂V∂T; ∂²p/∂V²] ```

Where V is the total volume, T is the temperature and p is the pressure.

source
Clapeyron.f_hessFunction
f_hess(model,V,T,z)

returns the second order volume (V) and temperature (T) derivatives of the total helmholtz energy (given by eos(model,V,T,z)). the result is given in a 2x2 SMatrix, in the form:

[ ∂²f/∂V² ∂²f/∂V∂T ∂²f/∂V∂T ∂²f/∂T²]

use this instead of the ∂2f if you only need second order information. ∂2f also gives zeroth and first order derivative information, but due to a bug in the used AD, it allocates more than necessary.

source
Clapeyron.∂²³fFunction
∂²³f(model,V,T,z=SA[1.0])

returns ∂²A/∂V² and ∂³A/∂V³, in a single ForwardDiff pass. used mainly in crit_pure objective function

source

Thermodynamic Method Dispatch types

Clapeyron.ThermodynamicMethodType
ThermodynamicMethod

Abstract type for all thermodynamic methods.

normally, a thermodynamic method has the form: property(model,state..,method::ThermodynamicMethod). All methods used in this way subtype ThermodynamicMethod.

Examples

Saturation pressure:

model = PR(["water"])
+

Where V is the total volume, T is the temperature and f is the total helmholtz energy.

source
Clapeyron.p∂p∂VFunction
p∂p∂V(model,V,T,z=SA[1.0])

returns p and ∂p/∂V at constant temperature, where p is the pressure = pressure(model,V,T,z) and V is the total Volume.

source
Clapeyron.∂2fFunction
∂2f(model,V,T,z)

returns zeroth order (value), first order and second order derivative information of the total helmholtz energy (given by eos(model,V,T,z)). the result is given in three values:

hess_f,grad_f,fval = ∂2f(model,V,T,z)

where: ``` fval = f(V,T) = eos(model,V,T,z)

grad_f = [ ∂f/∂V; ∂f/∂T]

hess_f = [ ∂²f/∂V²; ∂²f/∂V∂T ∂²f/∂V∂T; ∂²f/∂V²] ```

Where V is the total volume, T is the temperature and f is the total helmholtz energy.

source
Clapeyron.∂2pFunction
∂2p(model,V,T,z)

returns zeroth order (value), first order and second order derivative information of the pressure. the result is given in three values:

hess_p,grad_p,pval = ∂2p(model,V,T,z)

where: ``` pval = p(V,T) = pressure(model,V,T,z)

grad_p = [ ∂p/∂V; ∂p/∂T]

hess_p = [ ∂²p/∂V²; ∂²p/∂V∂T ∂²p/∂V∂T; ∂²p/∂V²] ```

Where V is the total volume, T is the temperature and p is the pressure.

source
Clapeyron.f_hessFunction
f_hess(model,V,T,z)

returns the second order volume (V) and temperature (T) derivatives of the total helmholtz energy (given by eos(model,V,T,z)). the result is given in a 2x2 SMatrix, in the form:

[ ∂²f/∂V² ∂²f/∂V∂T ∂²f/∂V∂T ∂²f/∂T²]

use this instead of the ∂2f if you only need second order information. ∂2f also gives zeroth and first order derivative information, but due to a bug in the used AD, it allocates more than necessary.

source
Clapeyron.∂²³fFunction
∂²³f(model,V,T,z=SA[1.0])

returns ∂²A/∂V² and ∂³A/∂V³, in a single ForwardDiff pass. used mainly in crit_pure objective function

source

Thermodynamic Method Dispatch types

Clapeyron.ThermodynamicMethodType
ThermodynamicMethod

Abstract type for all thermodynamic methods.

normally, a thermodynamic method has the form: property(model,state..,method::ThermodynamicMethod). All methods used in this way subtype ThermodynamicMethod.

Examples

Saturation pressure:

model = PR(["water"])
 Tsat = 373.15
 saturation_pressure(model,Tsat) #using default method (chemical potential with volume base)
 saturation_pressure(model,Tsat,SuperAncSaturation()) #solve using cubic superancillary

Bubble point pressure

model = PCSAFT(["methanol","cyclohexane"])
 T = 313.15
 z = [0.5,0.5]
 bubble_pressure(model,T,z) #using default method (chemical potential equality)
-bubble_pressure(model,T,z,FugBubblePressure(y0 = = [0.6,0.4], p0 = 5e4)) #using isofugacity criteria with starting points
source
Clapeyron.SaturationMethodType
SaturationMethod <: ThermodynamicMethod

Abstract type for saturation_temperature and saturation_pressure routines. Should at least support passing the crit keyword, containing the critical point, if available.

source
Clapeyron.BubblePointMethodType
BubblePointMethod <: ThermodynamicMethod

Abstract type for bubble_pressure and bubble_temperature routines.

Should at least support passing the y0 keyword, containing an initial vapour phase, if available.

source
Clapeyron.DewPointMethodType
DewPointMethod <: ThermodynamicMethod

Abstract type for dew_pressure and dew_temperature routines.

Should at least support passing the x0 keyword, containing an initial vapour phase, if available.

source

Reference States

Clapeyron.ReferenceStateType
ReferenceState(type::Symbol = :no_set;T0 = NaN;P0 = NaN,H0 = NaN,S0 = NaN,phase = :unknown,z0 = Float64[])

Parameter used to define a reference state for enthalpy and entropy, normally stored in the ideal model. when set, it calculates a set of a0 and a1 values such as the entropy and enthalpy at a specified point are fixed.

the type argument accepts the following standalone options:

  • :no_set: it returns the current defaults stablished by the equation of state.
  • :ashrae: h = s = 0 at -40°C saturated liquid
  • :iir: h = 200.0 kJ/kg, s=1.0 kJ/kg/K at 0C saturated liquid
  • :nbp: h = s = 0 at 1 atm saturated liquid
  • :stp: h = s = 0 at 1 bar, 0°C fluid of the most stable phase
  • :stp_old: h = s = 0 at 1 atm, 0°C fluid of the most stable phase
  • :ntp: h = s = 0 at 1 atm, 20°C fluid of the most stable phase

it also accepts the following options, that require additional specifications:

  • :volume h = H0, s = S0, at T = T0, v = volume(model,P0,T0,z0,phase = phase)
  • :saturation_pressure h = H0, s = S0, at T = T0, saturated phase (specified by the phase argument)
  • :saturation_temperature h = H0, s = S0, at p = P0, saturated phase (specified by the phase argument)

If z0 is not specified, the reference state calculation will be done for each component separately.

Examples

julia> model = PCSAFT(["water","pentane"],idealmodel = ReidIdeal,reference_state = ReferenceState(:nbp))
+bubble_pressure(model,T,z,FugBubblePressure(y0 = = [0.6,0.4], p0 = 5e4)) #using isofugacity criteria with starting points
source
Clapeyron.SaturationMethodType
SaturationMethod <: ThermodynamicMethod

Abstract type for saturation_temperature and saturation_pressure routines. Should at least support passing the crit keyword, containing the critical point, if available.

source
Clapeyron.BubblePointMethodType
BubblePointMethod <: ThermodynamicMethod

Abstract type for bubble_pressure and bubble_temperature routines.

Should at least support passing the y0 keyword, containing an initial vapour phase, if available.

source
Clapeyron.DewPointMethodType
DewPointMethod <: ThermodynamicMethod

Abstract type for dew_pressure and dew_temperature routines.

Should at least support passing the x0 keyword, containing an initial vapour phase, if available.

source

Reference States

Clapeyron.ReferenceStateType
ReferenceState(type::Symbol = :no_set;T0 = NaN;P0 = NaN,H0 = NaN,S0 = NaN,phase = :unknown,z0 = Float64[])

Parameter used to define a reference state for enthalpy and entropy, normally stored in the ideal model. when set, it calculates a set of a0 and a1 values such as the entropy and enthalpy at a specified point are fixed.

the type argument accepts the following standalone options:

  • :no_set: it returns the current defaults stablished by the equation of state.
  • :ashrae: h = s = 0 at -40°C saturated liquid
  • :iir: h = 200.0 kJ/kg, s=1.0 kJ/kg/K at 0C saturated liquid
  • :nbp: h = s = 0 at 1 atm saturated liquid
  • :stp: h = s = 0 at 1 bar, 0°C fluid of the most stable phase
  • :stp_old: h = s = 0 at 1 atm, 0°C fluid of the most stable phase
  • :ntp: h = s = 0 at 1 atm, 20°C fluid of the most stable phase

it also accepts the following options, that require additional specifications:

  • :volume h = H0, s = S0, at T = T0, v = volume(model,P0,T0,z0,phase = phase)
  • :saturation_pressure h = H0, s = S0, at T = T0, saturated phase (specified by the phase argument)
  • :saturation_temperature h = H0, s = S0, at p = P0, saturated phase (specified by the phase argument)

If z0 is not specified, the reference state calculation will be done for each component separately.

Examples

julia> model = PCSAFT(["water","pentane"],idealmodel = ReidIdeal,reference_state = ReferenceState(:nbp))
 PCSAFT{ReidIdeal, Float64} with 2 components:
  "water"
  "pentane"
@@ -42,7 +42,7 @@
 -5.477897970382323e-6
 
 julia> entropy(pure[1],101325.0,T)
-5.009221069190994e-9
source
Clapeyron.reference_stateFunction
reference_state(model)::Union{ReferenceState,Nothing}

Returns the reference state of the input model, if available. Returns nothing otherwise.

Examples

julia> reference_state(PCSAFT("water"))
+5.009221069190994e-9
source
Clapeyron.reference_stateFunction
reference_state(model)::Union{ReferenceState,Nothing}

Returns the reference state of the input model, if available. Returns nothing otherwise.

Examples

julia> reference_state(PCSAFT("water"))
 false
 
 julia> has_reference_state(PCSAFT("water",idealmodel = ReidIdeal))
@@ -52,8 +52,8 @@
 ReferenceState(String[], Float64[], Float64[], NaN, NaN, Float64[], Float64[], Float64[], :unknown, :no_set)
 
 julia> reference_state(PCSAFT("water",idealmodel = MonomerIdeal, reference_state = ReferenceState(:nbp))) #has an initialized reference state
-ReferenceState(["water"], [33107.133379491206], [17.225988924236503], NaN, NaN, [0.0], [0.0], [0.0], :unknown, :nbp)
source
Clapeyron.has_reference_stateFunction
has_reference_state(model)::Bool

Checks if the input EoSModel has a reference state. Returns true/false

Examples

julia> has_reference_state(PCSAFT("water"))
+ReferenceState(["water"], [33107.133379491206], [17.225988924236503], NaN, NaN, [0.0], [0.0], [0.0], :unknown, :nbp)
source
Clapeyron.has_reference_stateFunction
has_reference_state(model)::Bool

Checks if the input EoSModel has a reference state. Returns true/false

Examples

julia> has_reference_state(PCSAFT("water"))
 false
 
 julia> has_reference_state(PCSAFT("water",idealmodel = ReidIdeal))
-true

Note that the default idealmodel (BasicIdeal) does not allow for setting reference states.

source
+true

Note that the default idealmodel (BasicIdeal) does not allow for setting reference states.

source
diff --git a/dev/properties/bulk/index.html b/dev/properties/bulk/index.html index fd6d7b4f4..e203ade43 100644 --- a/dev/properties/bulk/index.html +++ b/dev/properties/bulk/index.html @@ -1,21 +1,21 @@ -Bulk Properties · Clapeyron.jl

Contents

Index

Volume–Temperature Based Properties

Clapeyron.pressureFunction
pressure(model::EoSModel, V, T, z=SA[1.])

default units: [Pa]

Returns the pressure of the model at a given volume, temperature and composition, defined as:

p = -∂A/∂V
source
Clapeyron.second_virial_coefficientFunction
second_virial_coefficient(model::EoSModel, T, z=SA[1.])

Default units: [m^3]

Calculates the second virial coefficient B, defined as:

B = lim(ρ->0)[∂Aᵣ/∂ρ]

where Aᵣ is the residual helmholtz energy.

source
Clapeyron.pipFunction
pip(model::EoSModel,V,T,z=[1.0])

Phase identification parameter Π. as described in 1. If Π > 1, then the phase is clasified as a liquid or a liquid-like vapor, being a vapor or vapor-like liquid otherwise.

This identification parameter fails at temperatures and pressures well aboVe the critical point.

Calculated as:

Π = V*((∂²p/∂V∂T)/(∂p/∂T) - (∂²p/∂V²)/(∂p/∂V))
  1. G. Venkatarathnama, L.R. Oellrich, Identification of the phase of a fluid using partial derivatives of pressure, volume,and temperature without reference to saturation properties: Applications in phase equilibria calculations, Fluid Phase Equilibria 301 (2011) 225–233
source

Pressure–Temperature Based Bulk Properties

In general almost all bulk properties follow the pattern:

function property(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
+Bulk Properties · Clapeyron.jl

Contents

Index

Volume–Temperature Based Properties

Clapeyron.pressureFunction
pressure(model::EoSModel, V, T, z=SA[1.])

default units: [Pa]

Returns the pressure of the model at a given volume, temperature and composition, defined as:

p = -∂A/∂V
source
Clapeyron.second_virial_coefficientFunction
second_virial_coefficient(model::EoSModel, T, z=SA[1.])

Default units: [m^3]

Calculates the second virial coefficient B, defined as:

B = lim(ρ->0)[∂Aᵣ/∂ρ]

where Aᵣ is the residual helmholtz energy.

source
Clapeyron.pipFunction
pip(model::EoSModel,V,T,z=[1.0])

Phase identification parameter Π. as described in 1. If Π > 1, then the phase is clasified as a liquid or a liquid-like vapor, being a vapor or vapor-like liquid otherwise.

This identification parameter fails at temperatures and pressures well aboVe the critical point.

Calculated as:

Π = V*((∂²p/∂V∂T)/(∂p/∂T) - (∂²p/∂V²)/(∂p/∂V))
  1. G. Venkatarathnama, L.R. Oellrich, Identification of the phase of a fluid using partial derivatives of pressure, volume,and temperature without reference to saturation properties: Applications in phase equilibria calculations, Fluid Phase Equilibria 301 (2011) 225–233
source

Pressure–Temperature Based Bulk Properties

In general almost all bulk properties follow the pattern:

function property(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
     V = volume(model, p, T, z; phase, threaded, vol0)
     return VT_property(model,V,T,z)
 end

So, you can calculate the property with Volume–Temperature variables by calling VT_property(model,V,T,z). Another way to do this is by using units, provided by Unitful.jl:

using Unitful
 r = 18u"kg/m^3"
 T = 373.15"K"
 prop = helmholtz_free_energy(model,r,T,z,output = u"kJ")

Where r could be any molar or mass density, molar or mass volume, total volume or pressure. It also supports mass and mol amounts defined as units for the composition (z). If no units are provided for the composition, they will be considered moles.

Methods that require first order VT derivatives

Clapeyron.volumeFunction
volume(model::EoSModel, p, T, z=SA[1.0]; phase=:unknown, threaded=true, vol0=nothing)

Calculates the volume (m³) of the compound modelled by model at a certain pressure, temperature and moles. phase is a Symbol that determines the initial volume root to look for:

  • If phase =:unknown (Default), it will return the physically correct volume root with the least gibbs energy.
  • If phase =:liquid, it will return the volume of the phase using a liquid initial point.
  • If phase =:vapor, it will return the volume of the phase using a gas initial point.
  • If phase =:solid, it will return the volume of the phase using a solid initial point (only supported for EoS that support a solid phase)
  • If phase =:stable, it will return the physically correct volume root with the least gibbs energy, and perform a stability test on the result.

All volume calculations are checked for mechanical stability, that is: dP/dV <= 0.

The calculation of both volume roots can be calculated in serial (threaded=false) or in parallel (threaded=true).

An initial estimate of the volume vol0 can be optionally be provided.

Tip

The volume computation may fail and return NaN because the default initial point is too far from the actual volume. Providing a value for vol0 may help in these situations. Such a starting point can be found from physical knowledge, or by computing the volume using a different model for example.

Stability checks

The stability check is disabled by default. that means that the volume obtained just follows the the relation P = pressure(model,V,T,z). For single component models, this is alright, but phase splits (with different compositions that the input) can and will occur, meaning that the volume solution does not correspond to an existing phase. For unknown multicomponent mixtures, it is recommended to use a phase equilibrium procedure (like tp_flash) to obtain a list of valid compositions, and then perform a volume calculation over those compositions. You can also pass phase=:stable to perform the stability test inside the volume solver. Finally, you can perform the stability test after the volume solver:

v = volume(model,p,T,z)
-isstable(model,v,T,z)
source
Clapeyron.helmholtz_free_energyFunction
helmholtz_free_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
-helmholtz_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the helmholtz free energy, defined as:

A = eos(model,V(p),T,z)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_helmholtz_free_energy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.helmholtz_free_energy_resFunction
helmholtz_free_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
-helmholtz_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the residual helmholtz free energy, defined as:

A = eos_res(model,V(p),T,z)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_helmholtz_free_energy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.molar_densityFunction
molar_density(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [mol/m^3]

Calculates the molar density, defined as:

ρₙ = ∑nᵢ/V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_molar_density(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.mass_densityFunction
mass_density(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true)

default units: [kg/m^3]

Calculates the mass density, defined as:

ρₙ = Mr/V

Where Mr is the molecular weight of the model at the input composition.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_mass_density(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.compressibility_factorFunction
compressibility_factor(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Calculates the compressibility factor Z, defined as:

Z = p*V(p)/R*T

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.gibbs_free_energyFunction
gibbs_free_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
-gibbs_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the gibbs free energy, defined as:

G = A + p*V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_gibbs_free_energy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.gibbs_free_energy_resFunction
gibbs_free_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
-gibbs_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the residual gibbs free energy, defined as:

G = Ar - V*∂Ar/∂V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_gibbs_free_energy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.entropyFunction
entropy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates entropy, defined as:

S = -∂A/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_entropy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.entropy_resFunction
entropy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates residual entropy, defined as:

S = -∂Ares/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_entropy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.enthalpyFunction
enthalpy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the enthalpy, defined as:

H = A - T * ∂A/∂T - V * ∂A/∂V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_enthalpy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.internal_energyFunction
internal_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the internal energy, defined as:

U = A - T * ∂A/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_internal_energy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.internal_energy_resFunction
internal_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the residual internal energy, defined as:

U = Ar - T * ∂Ar/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_internal_energy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Methods that require second order VT derivatives

Clapeyron.isochoric_heat_capacityFunction
isochoric_heat_capacity(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates the isochoric heat capacity, defined as:

Cv = -T * ∂²A/∂T²

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isochoric_heat_capacity(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.isobaric_heat_capacityFunction
isobaric_heat_capacity(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates the isobaric heat capacity, defined as:

Cp = -T*(∂²A/∂T² - (∂²A/∂V∂T)^2 / ∂²A/∂V²)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isobaric_heat_capacity(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.adiabatic_indexFunction
adiabatic_index(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates the isobaric heat capacity, defined as:

γ = Cp/Cv

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_adiabatic_index(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.isothermal_compressibilityFunction
isothermal_compressibility(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [Pa^-1]

Calculates the isothermal compressibility, defined as:

κT = -(V*∂p/∂V)^-1

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isothermal_compressibility(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.isentropic_compressibilityFunction
isentropic_compressibility(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [Pa^-1]

Calculates the isentropic compressibility, defined as:

κS = (V*( ∂²A/∂V² - ∂²A/∂V∂T^2 / ∂²A/∂T² ))^-1

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isentropic_compressibility(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.speed_of_soundFunction
speed_of_sound(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [m/s]

Calculates the speed of sound, defined as:

c = V * √(∂²A/∂V² - ∂²A/∂V∂T^2 / ∂²A/∂T²)/Mr)

Where Mr is the molecular weight of the model at the input composition.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_speed_of_sound(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.isobaric_expansivityFunction
isobaric_expansivity(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [K^-1]

Calculates the isobaric expansivity, defined as:

α = -∂²A/∂V∂T / (V*∂²A/∂V²)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isobaric_expansivity(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.joule_thomson_coefficientFunction
joule_thomson_coefficient(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [K/Pa]

Calculates the joule thomson coefficient, defined as:

μⱼₜ = -(∂²A/∂V∂T - ∂²A/∂V² * ((T*∂²A/∂T² + V*∂²A/∂V∂T) / (T*∂²A/∂V∂T + V*∂²A/∂V²)))^-1

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_joule_thomson_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source

Methods that require first order composition derivatives

Clapeyron.chemical_potentialFunction
chemical_potential(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/mol]

Calculates the chemical potential, defined as:

μᵢ = ∂A/∂nᵢ

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_chemical_potential(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.chemical_potential_resFunction
chemical_potential_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/mol]

Calculates the residual chemical potential, defined as:

μresᵢ = ∂Ares/∂nᵢ

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_chemical_potential_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.fugacity_coefficientFunction
fugacity_coefficient(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Calculates the fugacity coefficient φᵢ, defined as:

log(φᵢ) = μresᵢ/RT - log(Z)

Where μresᵢ is the vector of residual chemical potentials and Z is the compressibility factor.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Activity Coefficient

Clapeyron.reference_chemical_potentialFunction
reference_chemical_potential(model::EoSModel,p,T,reference; phase=:unknown, threaded=true, vol0=nothing)

Returns a reference chemical potential. used in calculation of activity and actitivy_coefficient. there are two available references:

  • :pure: the reference potential is a pure component at specified T, p and phase
  • :aqueous: the chemical potential of the pure components at specified T, p and phase
  • :sat_pure_T: the reference potential is the pure saturated liquid phase at specified T.
  • :zero: the reference potential is equal to zero for all components (used for ActivityModel)

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.activity_coefficientFunction
activity_coefficient(model::EoSModel,p,T,z=SA[1.0];reference = :pure, phase=:unknown, threaded=true, vol0=nothing)

Calculates the activity, defined as:

log(γ*z) = (μ_mixt - μ_ref) / R̄ / T

where μ_mixt is the chemical potential of the mixture and μ_ref is the reference chemical potential for the model at p,T conditions, calculated via Clapeyron.reference_chemical_potential. Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

If the μ_ref keyword argument is not provided, the reference keyword is used to specify the reference chemical potential..

source
Clapeyron.activityFunction
activity(model::EoSModel,p,T,z=SA[1.0];reference = :pure, phase=:unknown, threaded=true, vol0=nothing)

Calculates the activity, defined as:

log(a) = (μ_mixt - μ_ref) / R̄ / T

where μ_mixt is the chemical potential of the mixture and μ_ref is the reference chemical potential for the model at p,T conditions, calculated via Clapeyron.reference_chemical_potential. Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

If the μ_ref keyword argument is not provided, the reference keyword is used to specify the reference chemical potential..

source
Clapeyron.aqueous_activityFunction
aqueous_activity(model::EoSModel,p,T,z=SA[1.0]; phase=:unknown, threaded=true, vol0=nothing)

Calculates the activity with the reference being infinite dilution in water, defined as:

log(a) = (μ_mixt - μ_inf) / R̄ / T

where μ_mixt is the chemical potential of the mixture and μ_inf is the chemical potential of the components at infinite dilution in water.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Mixing

Clapeyron.mixingFunction
mixing(model::EoSModel, p, T, z=SA[1.], property; phase=:unknown, threaded=true, vol0=nothing)

Calculates the mixing function for a specified property as:

f_mix = f(p,T,z) - ∑zᵢ*f_pureᵢ(p,T)

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Initial guess functions

These methods are considered internal, they don't support Symbolics.jl or Unitful.jl overloads.

source
Clapeyron.helmholtz_free_energyFunction
helmholtz_free_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
+helmholtz_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the helmholtz free energy, defined as:

A = eos(model,V(p),T,z)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_helmholtz_free_energy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.helmholtz_free_energy_resFunction
helmholtz_free_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
+helmholtz_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the residual helmholtz free energy, defined as:

A = eos_res(model,V(p),T,z)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_helmholtz_free_energy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.molar_densityFunction
molar_density(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [mol/m^3]

Calculates the molar density, defined as:

ρₙ = ∑nᵢ/V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_molar_density(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.mass_densityFunction
mass_density(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true)

default units: [kg/m^3]

Calculates the mass density, defined as:

ρₙ = Mr/V

Where Mr is the molecular weight of the model at the input composition.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_mass_density(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.compressibility_factorFunction
compressibility_factor(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Calculates the compressibility factor Z, defined as:

Z = p*V(p)/R*T

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.gibbs_free_energyFunction
gibbs_free_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
+gibbs_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the gibbs free energy, defined as:

G = A + p*V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_gibbs_free_energy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.gibbs_free_energy_resFunction
gibbs_free_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)
+gibbs_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the residual gibbs free energy, defined as:

G = Ar - V*∂Ar/∂V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_gibbs_free_energy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.entropyFunction
entropy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates entropy, defined as:

S = -∂A/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_entropy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.entropy_resFunction
entropy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates residual entropy, defined as:

S = -∂Ares/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_entropy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.enthalpyFunction
enthalpy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the enthalpy, defined as:

H = A - T * ∂A/∂T - V * ∂A/∂V

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_enthalpy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.internal_energyFunction
internal_energy(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the internal energy, defined as:

U = A - T * ∂A/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_internal_energy(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.internal_energy_resFunction
internal_energy_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J]

Calculates the residual internal energy, defined as:

U = Ar - T * ∂Ar/∂T

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_internal_energy_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Methods that require second order VT derivatives

Clapeyron.isochoric_heat_capacityFunction
isochoric_heat_capacity(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates the isochoric heat capacity, defined as:

Cv = -T * ∂²A/∂T²

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isochoric_heat_capacity(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.isobaric_heat_capacityFunction
isobaric_heat_capacity(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates the isobaric heat capacity, defined as:

Cp = -T*(∂²A/∂T² - (∂²A/∂V∂T)^2 / ∂²A/∂V²)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isobaric_heat_capacity(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.adiabatic_indexFunction
adiabatic_index(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/K]

Calculates the isobaric heat capacity, defined as:

γ = Cp/Cv

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_adiabatic_index(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.isothermal_compressibilityFunction
isothermal_compressibility(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [Pa^-1]

Calculates the isothermal compressibility, defined as:

κT = -(V*∂p/∂V)^-1

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isothermal_compressibility(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.isentropic_compressibilityFunction
isentropic_compressibility(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [Pa^-1]

Calculates the isentropic compressibility, defined as:

κS = (V*( ∂²A/∂V² - ∂²A/∂V∂T^2 / ∂²A/∂T² ))^-1

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isentropic_compressibility(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.speed_of_soundFunction
speed_of_sound(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [m/s]

Calculates the speed of sound, defined as:

c = V * √(∂²A/∂V² - ∂²A/∂V∂T^2 / ∂²A/∂T²)/Mr)

Where Mr is the molecular weight of the model at the input composition.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_speed_of_sound(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source
Clapeyron.isobaric_expansivityFunction
isobaric_expansivity(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [K^-1]

Calculates the isobaric expansivity, defined as:

α = -∂²A/∂V∂T / (V*∂²A/∂V²)

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_isobaric_expansivity(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.joule_thomson_coefficientFunction
joule_thomson_coefficient(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

default units: [K/Pa]

Calculates the joule thomson coefficient, defined as:

μⱼₜ = -(∂²A/∂V∂T - ∂²A/∂V² * ((T*∂²A/∂T² + V*∂²A/∂V∂T) / (T*∂²A/∂V∂T + V*∂²A/∂V²)))^-1

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_joule_thomson_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

Accurate ideal model required

This property requires at least second order ideal model temperature derivatives. If you are computing these properties, consider using a different ideal model than the BasicIdeal default (e.g. EoS(["species"];idealmodel = ReidIdeal)).

source

Methods that require first order composition derivatives

Clapeyron.chemical_potentialFunction
chemical_potential(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/mol]

Calculates the chemical potential, defined as:

μᵢ = ∂A/∂nᵢ

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_chemical_potential(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.chemical_potential_resFunction
chemical_potential_res(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Default units: [J/mol]

Calculates the residual chemical potential, defined as:

μresᵢ = ∂Ares/∂nᵢ

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_chemical_potential_res(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.fugacity_coefficientFunction
fugacity_coefficient(model::EoSModel, p, T, z=SA[1.]; phase=:unknown, threaded=true, vol0=nothing)

Calculates the fugacity coefficient φᵢ, defined as:

log(φᵢ) = μresᵢ/RT - log(Z)

Where μresᵢ is the vector of residual chemical potentials and Z is the compressibility factor.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Activity Coefficient

Clapeyron.reference_chemical_potentialFunction
reference_chemical_potential(model::EoSModel,p,T,reference; phase=:unknown, threaded=true, vol0=nothing)

Returns a reference chemical potential. used in calculation of activity and actitivy_coefficient. there are two available references:

  • :pure: the reference potential is a pure component at specified T, p and phase
  • :aqueous: the chemical potential of the pure components at specified T, p and phase
  • :sat_pure_T: the reference potential is the pure saturated liquid phase at specified T.
  • :zero: the reference potential is equal to zero for all components (used for ActivityModel)

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source
Clapeyron.activity_coefficientFunction
activity_coefficient(model::EoSModel,p,T,z=SA[1.0];reference = :pure, phase=:unknown, threaded=true, vol0=nothing)

Calculates the activity, defined as:

log(γ*z) = (μ_mixt - μ_ref) / R̄ / T

where μ_mixt is the chemical potential of the mixture and μ_ref is the reference chemical potential for the model at p,T conditions, calculated via Clapeyron.reference_chemical_potential. Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

If the μ_ref keyword argument is not provided, the reference keyword is used to specify the reference chemical potential..

source
Clapeyron.activityFunction
activity(model::EoSModel,p,T,z=SA[1.0];reference = :pure, phase=:unknown, threaded=true, vol0=nothing)

Calculates the activity, defined as:

log(a) = (μ_mixt - μ_ref) / R̄ / T

where μ_mixt is the chemical potential of the mixture and μ_ref is the reference chemical potential for the model at p,T conditions, calculated via Clapeyron.reference_chemical_potential. Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

If the μ_ref keyword argument is not provided, the reference keyword is used to specify the reference chemical potential..

source
Clapeyron.aqueous_activityFunction
aqueous_activity(model::EoSModel,p,T,z=SA[1.0]; phase=:unknown, threaded=true, vol0=nothing)

Calculates the activity with the reference being infinite dilution in water, defined as:

log(a) = (μ_mixt - μ_inf) / R̄ / T

where μ_mixt is the chemical potential of the mixture and μ_inf is the chemical potential of the components at infinite dilution in water.

Internally, it calls Clapeyron.volume to obtain V and calculates the property via VT_fugacity_coefficient(model,V,T,z).

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Mixing

Clapeyron.mixingFunction
mixing(model::EoSModel, p, T, z=SA[1.], property; phase=:unknown, threaded=true, vol0=nothing)

Calculates the mixing function for a specified property as:

f_mix = f(p,T,z) - ∑zᵢ*f_pureᵢ(p,T)

The keywords phase, threaded and vol0 are passed to the Clapeyron.volume solver.

source

Initial guess functions

These methods are considered internal, they don't support Symbolics.jl or Unitful.jl overloads.

Clapeyron.lb_volumeFunction
lb_volume(model::EoSModel)
 lb_volume(model::EoSModel,z)
-lb_volume(model::EoSModel,T,z)

Returns the lower bound volume. It has different meanings depending on the Equation of State, but symbolizes the minimum allowable volume at a certain composition:

  • SAFT EoS: the packing volume
  • Cubic EoS, covolume (b) parameter

On empiric equations of state, the value is chosen to match the volume of the conditions at maximum pressure and minimum temperature , but the equation itself normally can be evaluated at lower volumes. On SAFT and Cubic EoS, volumes lower than lb_volume will likely error. The lower bound volume is used for guesses of liquid volumes at a certain pressure, saturated liquid volumes and critical volumes.

In most cases, the lower bound volume is independent of temperature. Some notable exceptions are the Quantum-Corrected Peng-Robinson cubic (QCPR) and Cubic-plus-Chain (CPC) models. For those, it is better to define the three-argument variant lb_volume(model,T,z)

source
Clapeyron.T_scaleFunction
T_scale(model::EoSModel,z)

Represents a temperature scaling factor.

On any EoS based on Critical parameters (Cubic or Empiric EoS), the temperature scaling factor is chosen to be the critical temperature. On SAFT or other molecular EoS, the temperature scaling factor is chosen to be a function of the potential depth ϵ. Used as scaling factors in saturation_pressure and as input for solving crit_pure

source
Clapeyron.p_scaleFunction
p_scale(model::EoSModel,z)

Represents a pressure scaling factor.

On any EoS based on Critical parameters (Cubic or Empiric EoS), the pressure scaling factor is chosen to be a function of the critical pressure. On SAFT or other molecular EoS, the pressure scaling factor is chosen to a function of ∑(zᵢϵᵢ(σᵢᵢ)³) Used as scaling factors in saturation_pressure and as input for solving crit_pure.

By default, it can be defined as a function of Clapeyron.lb_volume and Clapeyron.T_scale

source
Clapeyron.x0_volumeFunction
x0_volume(model,p,T,z; phase = :unknown)

Returns an initial guess of the volume at a pressure, temperature, composition and suggested phase. If the suggested phase is :unknown or :liquid, calls x0_volume_liquid. If the suggested phase is :gas, calls x0_volume_gas. If the suggested phase is solid, calls x0_volume_solid. Returns NaN otherwise

source
Clapeyron.x0_volume_solidFunction
x0_volume_solid(model,T,z)
-x0_volume_solid(model,p,T,z)

Returns an initial guess to the solid volume, dependent on temperature and composition. needs to be defined for EoS that support solid phase. by default returns NaN. can be overrided if the EoS defines is_solid(::EoSModel) = true

source
Clapeyron.x0_volume_liquidFunction
x0_volume_liquid(model,T,z)
-x0_volume_liquid(model,p,T,z)

Returns an initial guess to the liquid volume, dependent on temperature and composition. by default is 1.25 times lb_volume.

source
Clapeyron.volume_virialFunction
volume_virial(model::EoSModel,p,T,z=SA[1.0])
-volume_virial(B::Real,p,T,z=SA[1.0])

Calculates an aproximation to the gas volume at specified pressure, volume and composition, by aproximating:

Z(v) ≈ 1 + B(T)/v

where Z is the compressibility factor and B is the second virial coefficient. If B>0, (over the inversion temperature) returns NaN. If the solution to the problem is complex (Z = 1 + B/v implies solving a quadratic polynomial), returns -2*B. If you pass an EoSModel as the first argument, B will be calculated from the EoS at the input T. You can provide your own second virial coefficient instead of a model.

source
Clapeyron.x0_sat_pureFunction
x0_sat_pure(model::EoSModel,T)
-x0_sat_pure(model,T,crit)

Returns a 2-tuple corresponding to (Vₗ,Vᵥ), where Vₗ and Vᵥ are the liquid and vapor initial guesses. Used in saturation_pressure methods that require initial volume guesses. It can be overloaded to provide more accurate estimates if necessary. If an EoS model provides a fast method for crit_pure, overloading has_fast_crit_pure will provide x0_sat_pure with additional information to improve its accuracy.

source
Clapeyron.x0_psatFunction
x0_psat(model::EoSModel, T,crit = nothing)

Initial point for saturation pressure, given the temperature and V,T critical coordinates. On moderate pressures it will use a Zero Pressure initialization. On pressures near the critical point it will switch to spinodal finding. Used in saturation_pressure methods that require initial pressure guesses. if the initial temperature is over the critical point, it returns NaN. It can be overloaded to provide more accurate estimates if necessary.

source
Clapeyron.antoine_coefFunction
antoine_coef(model)

should return a 3-Tuple containing reduced Antoine Coefficients. The Coefficients follow the correlation:

lnp̄ = log(p / p_scale(model))
+lb_volume(model::EoSModel,T,z)

Returns the lower bound volume. It has different meanings depending on the Equation of State, but symbolizes the minimum allowable volume at a certain composition:

  • SAFT EoS: the packing volume
  • Cubic EoS, covolume (b) parameter

On empiric equations of state, the value is chosen to match the volume of the conditions at maximum pressure and minimum temperature , but the equation itself normally can be evaluated at lower volumes. On SAFT and Cubic EoS, volumes lower than lb_volume will likely error. The lower bound volume is used for guesses of liquid volumes at a certain pressure, saturated liquid volumes and critical volumes.

In most cases, the lower bound volume is independent of temperature. Some notable exceptions are the Quantum-Corrected Peng-Robinson cubic (QCPR) and Cubic-plus-Chain (CPC) models. For those, it is better to define the three-argument variant lb_volume(model,T,z)

source
Clapeyron.T_scaleFunction
T_scale(model::EoSModel,z)

Represents a temperature scaling factor.

On any EoS based on Critical parameters (Cubic or Empiric EoS), the temperature scaling factor is chosen to be the critical temperature. On SAFT or other molecular EoS, the temperature scaling factor is chosen to be a function of the potential depth ϵ. Used as scaling factors in saturation_pressure and as input for solving crit_pure

source
Clapeyron.p_scaleFunction
p_scale(model::EoSModel,z)

Represents a pressure scaling factor.

On any EoS based on Critical parameters (Cubic or Empiric EoS), the pressure scaling factor is chosen to be a function of the critical pressure. On SAFT or other molecular EoS, the pressure scaling factor is chosen to a function of ∑(zᵢϵᵢ(σᵢᵢ)³) Used as scaling factors in saturation_pressure and as input for solving crit_pure.

By default, it can be defined as a function of Clapeyron.lb_volume and Clapeyron.T_scale

source
Clapeyron.x0_volumeFunction
x0_volume(model,p,T,z; phase = :unknown)

Returns an initial guess of the volume at a pressure, temperature, composition and suggested phase. If the suggested phase is :unknown or :liquid, calls x0_volume_liquid. If the suggested phase is :gas, calls x0_volume_gas. If the suggested phase is solid, calls x0_volume_solid. Returns NaN otherwise

source
Clapeyron.x0_volume_solidFunction
x0_volume_solid(model,T,z)
+x0_volume_solid(model,p,T,z)

Returns an initial guess to the solid volume, dependent on temperature and composition. needs to be defined for EoS that support solid phase. by default returns NaN. can be overrided if the EoS defines is_solid(::EoSModel) = true

source
Clapeyron.x0_volume_liquidFunction
x0_volume_liquid(model,T,z)
+x0_volume_liquid(model,p,T,z)

Returns an initial guess to the liquid volume, dependent on temperature and composition. by default is 1.25 times lb_volume.

source
Clapeyron.volume_virialFunction
volume_virial(model::EoSModel,p,T,z=SA[1.0])
+volume_virial(B::Real,p,T,z=SA[1.0])

Calculates an aproximation to the gas volume at specified pressure, volume and composition, by aproximating:

Z(v) ≈ 1 + B(T)/v

where Z is the compressibility factor and B is the second virial coefficient. If B>0, (over the inversion temperature) returns NaN. If the solution to the problem is complex (Z = 1 + B/v implies solving a quadratic polynomial), returns -2*B. If you pass an EoSModel as the first argument, B will be calculated from the EoS at the input T. You can provide your own second virial coefficient instead of a model.

source
Clapeyron.x0_sat_pureFunction
x0_sat_pure(model::EoSModel,T)
+x0_sat_pure(model,T,crit)

Returns a 2-tuple corresponding to (Vₗ,Vᵥ), where Vₗ and Vᵥ are the liquid and vapor initial guesses. Used in saturation_pressure methods that require initial volume guesses. It can be overloaded to provide more accurate estimates if necessary. If an EoS model provides a fast method for crit_pure, overloading has_fast_crit_pure will provide x0_sat_pure with additional information to improve its accuracy.

source
Clapeyron.x0_psatFunction
x0_psat(model::EoSModel, T,crit = nothing)

Initial point for saturation pressure, given the temperature and V,T critical coordinates. On moderate pressures it will use a Zero Pressure initialization. On pressures near the critical point it will switch to spinodal finding. Used in saturation_pressure methods that require initial pressure guesses. if the initial temperature is over the critical point, it returns NaN. It can be overloaded to provide more accurate estimates if necessary.

source
Clapeyron.antoine_coefFunction
antoine_coef(model)

should return a 3-Tuple containing reduced Antoine Coefficients. The Coefficients follow the correlation:

lnp̄ = log(p / p_scale(model))
 T̃ = T/T_scale(model)
-lnp̄ = A - B/(T̄ + C))

By default returns nothing. This is to use alternative methods in case Antoine coefficients aren't available. Used mainly in single and multicomponent temperature calculations.

source
Clapeyron.x0_crit_pureFunction
x0_crit_pure(model::EoSModel)

Returns a 2-tuple corresponding to (k,log10(Vc0)), where k is Tc0/T_scale(model,z)

source
+lnp̄ = A - B/(T̄ + C))

By default returns nothing. This is to use alternative methods in case Antoine coefficients aren't available. Used mainly in single and multicomponent temperature calculations.

source
Clapeyron.x0_crit_pureFunction
x0_crit_pure(model::EoSModel)

Returns a 2-tuple corresponding to (k,log10(Vc0)), where k is Tc0/T_scale(model,z)

source
diff --git a/dev/properties/electrolytes/index.html b/dev/properties/electrolytes/index.html index 9fa11cd73..60c653bcd 100644 --- a/dev/properties/electrolytes/index.html +++ b/dev/properties/electrolytes/index.html @@ -7,14 +7,14 @@ T = 298.15 m = [1.0] -γ± = mean_ionic_activity_coefficient(model,salts,p,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source
Clapeyron.mean_ionic_activity_coefficient_satFunction
mean_ionic_activity_coefficient_sat(model::ESElectrolyteModel,salts,T,m,zsolvent=[1.])

Calculate the mean ionic activity coefficient of selection of salts at the saturation point at a certain temperature and molality. These are defined as:

γ± = φ±/φ±₀ * ∑zsolv/∑z

Example:

model = ePCSAFT(["water"],["sodium","chloride"])
+γ± = mean_ionic_activity_coefficient(model,salts,p,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source
Clapeyron.mean_ionic_activity_coefficient_satFunction
mean_ionic_activity_coefficient_sat(model::ESElectrolyteModel,salts,T,m,zsolvent=[1.])

Calculate the mean ionic activity coefficient of selection of salts at the saturation point at a certain temperature and molality. These are defined as:

γ± = φ±/φ±₀ * ∑zsolv/∑z

Example:

model = ePCSAFT(["water"],["sodium","chloride"])
 
 salts = [("sodium chloride",("sodium"=>1,"chloride"=>1))]
 
 T = 298.15
 m = [1.0]
 
-γ± = mean_ionic_activity_coefficient_sat(model,salts,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source
Clapeyron.osmotic_coefficientFunction
osmotic_coefficient(model::ESElectrolyteModel,salts,p,T,m,zsolvent=[1.])

Calculate the osmotic coefficient of selection of solvents at a given pressure, temperature and molality. These are defined as:

ϕ = -1/(∑νi*mi*Mw)*log(asolv)

Example:

model = ePCSAFT(["water"],["sodium","chloride"])
+γ± = mean_ionic_activity_coefficient_sat(model,salts,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source
Clapeyron.osmotic_coefficientFunction
osmotic_coefficient(model::ESElectrolyteModel,salts,p,T,m,zsolvent=[1.])

Calculate the osmotic coefficient of selection of solvents at a given pressure, temperature and molality. These are defined as:

ϕ = -1/(∑νi*mi*Mw)*log(asolv)

Example:

model = ePCSAFT(["water"],["sodium","chloride"])
 
 salts = [("sodium chloride",("sodium"=>1,"chloride"=>1))]
 
@@ -22,11 +22,11 @@
 T = 298.15
 m = [1.0]
 
-ϕ = osmotic_coefficient(model,salts,p,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source
Clapeyron.osmotic_coefficient_satFunction
osmotic_coefficient_sat(model::ESElectrolyteModel,salts,T,m,zsolvent=[1.])

Calculate the osmotic coefficient of selection of solvents at the saturation point at a certain temperature and molality. These are defined as:

ϕ = -1/(∑νi*mi*Mw)*log(asolv)

Example:

model = ePCSAFT(["water"],["sodium","chloride"])
+ϕ = osmotic_coefficient(model,salts,p,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source
Clapeyron.osmotic_coefficient_satFunction
osmotic_coefficient_sat(model::ESElectrolyteModel,salts,T,m,zsolvent=[1.])

Calculate the osmotic coefficient of selection of solvents at the saturation point at a certain temperature and molality. These are defined as:

ϕ = -1/(∑νi*mi*Mw)*log(asolv)

Example:

model = ePCSAFT(["water"],["sodium","chloride"])
 
 salts = [("sodium chloride",("sodium"=>1,"chloride"=>1))]
 
 T = 298.15
 m = [1.0]
 
-ϕ = osmotic_coefficient(model,salts,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source

Helper functions

Clapeyron.molality_to_compositionFunction
molality_to_composition(model::ElectrolyteModel,salts,m,zsolv=[1.])

Convert molality (mol/kg) to composition for a given model, salts, molality, and solvent composition.

source
+ϕ = osmotic_coefficient(model,salts,T,m)

If multiple solvents are present, the composition of the solvent can be specified with the zsolvent keyword argument.

source

Helper functions

Clapeyron.molality_to_compositionFunction
molality_to_composition(model::ElectrolyteModel,salts,m,zsolv=[1.])

Convert molality (mol/kg) to composition for a given model, salts, molality, and solvent composition.

source
diff --git a/dev/properties/multi/index.html b/dev/properties/multi/index.html index f0e406d6b..0b08c1f06 100644 --- a/dev/properties/multi/index.html +++ b/dev/properties/multi/index.html @@ -1,14 +1,14 @@ -Multiphase Properties · Clapeyron.jl

Contents

Index

Multi component properties

Clapeyron.bubble_pressureFunction
bubble_pressure(model::EoSModel, T, x, method = ChemPotBubblePressure())

Calculates the bubble pressure and properties at a given temperature. Returns a tuple, containing:

  • Bubble Pressure [Pa]
  • liquid volume at Bubble Point []
  • vapour volume at Bubble Point []
  • Gas composition at Bubble Point

By default, uses equality of chemical potentials, via ChemPotBubblePressure

source
Clapeyron.bubble_temperatureFunction
bubble_temperature(model::EoSModel, p, x,method::BubblePointMethod = ChemPotBubbleTemperature())

Calculates the bubble temperature and properties at a given pressure. Returns a tuple, containing:

  • Bubble Temperature [K]
  • liquid volume at Bubble Point []
  • vapour volume at Bubble Point []
  • Gas composition at Bubble Point

By default, uses equality of chemical potentials, via ChemPotBubbleTemperature

source
Clapeyron.dew_pressureFunction
dew_pressure(model::EoSModel, T, y,method = ChemPotDewPressure())

Calculates the dew pressure and properties at a given temperature. Returns a tuple, containing:

  • Dew Pressure [Pa]
  • liquid volume at Dew Point []
  • vapour volume at Dew Point []
  • Liquid composition at Dew Point

By default, uses equality of chemical potentials, via ChemPotDewPressure

source
Clapeyron.dew_temperatureFunction
dew_temperature(model::EoSModel, p, y, method = ChemPotDewTemperature())

calculates the dew temperature and properties at a given pressure. Returns a tuple, containing:

  • Dew Temperature [K]
  • liquid volume at Dew Point []
  • vapour volume at Dew Point []
  • Liquid composition at Dew Point

By default, uses equality of chemical potentials, via ChemPotDewTemperature

source
Clapeyron.azeotrope_pressureFunction
azeotrope_pressure(model::EoSModel, T; v0 = x0_azeotrope_pressure(model,T))

calculates the azeotrope pressure and properties at a given temperature. Returns a tuple, containing:

  • Azeotrope Pressure [Pa]
  • liquid volume at Azeotrope Point []
  • vapour volume at Azeotrope Point []
  • Azeotrope composition
source
Clapeyron.azeotrope_temperatureFunction
azeotrope_temperature(model::EoSModel, T; v0 = x0_bubble_pressure(model,T,[0.5,0.5]))

Calculates the azeotrope temperature and properties at a given pressure. Returns a tuple, containing:

  • Azeotrope Temperature [K]
  • liquid volume at Azeotrope Point []
  • vapour volume at Azeotrope Point []
  • Azeotrope composition
source
Clapeyron.LLE_pressureFunction
LLE_pressure(model::EoSModel, T, x; v0 = x0_LLE_pressure(model,T,x))

calculates the Liquid-Liquid equilibrium pressure and properties at a given temperature.

Returns a tuple, containing:

  • LLE Pressure [Pa]
  • liquid volume of composition x₁ = x at LLE Point []
  • liquid volume of composition x₂ at LLE Point []
  • Liquid composition x₂
source
Clapeyron.LLE_temperatureFunction
LLE_temperature(model::EoSModel, p, x; T0 = x0_LLE_temperature(model,p,x))

calculates the Liquid-Liquid equilibrium temperature and properties at a given pressure.

Returns a tuple, containing:

  • LLE Pressure [Pa]
  • liquid volume of composition x₁ = x at LLE Point []
  • liquid volume of composition x₂ at LLE Point []
  • Liquid composition x₂
source
Clapeyron.VLLE_pressureFunction
VLLE_pressure(model::EoSModel, T; v0 = x0_LLE_pressure(model,T))

calculates the Vapor-Liquid-Liquid equilibrium pressure and properties of a binary mixture at a given temperature.

Returns a tuple, containing:

  • VLLE Pressure [Pa]
  • Liquid volume of composition x₁ at VLLE Point []
  • Liquid volume of composition x₂ at VLLE Point []
  • Vapour volume of composition y at VLLE Point []
  • Liquid composition x₁
  • Liquid composition x₂
  • Liquid composition y
source
Clapeyron.VLLE_temperatureFunction
VLLE_temperature(model::EoSModel, p; T0 = x0_LLE_temperature(model,p))

calculates the Vapor-Liquid-Liquid equilibrium temperature and properties of a binary mixture at a given temperature.

Returns a tuple, containing:

  • VLLE temperature [K]
  • Liquid volume of composition x₁ at VLLE Point []
  • Liquid volume of composition x₂ at VLLE Point []
  • Vapour volume of composition y at VLLE Point []
  • Liquid composition x₁
  • Liquid composition x₂
  • Liquid composition y
source
Clapeyron.crit_mixFunction
crit_mix(model::EoSModel,z;v0=x=x0_crit_mix(model,z))

Returns the critical mixture point at a ginven composition.

Returns a tuple, containing:

  • Critical Mixture Temperature [K]
  • Critical Mixture Pressure [Pa]
  • Critical Mixture Volume [m³]
source
Clapeyron.UCEP_mixFunction
UCEP_mix(model::EoSModel;v0=x0_UCEP_mix(model))

Calculates the Upper Critical End Point of a binary mixture.

returns:

  • UCEP Temperature [K]
  • UCEP Pressure [Pa]
  • liquid volume at UCEP Point []
  • vapour volume at UCEP Point []
  • liquid molar composition at UCEP Point
  • vapour molar composition at UCEP Point
source
Clapeyron.UCST_mixFunction
UCST_mix(model::EoSModel,T;v0=x0_UCST_mix(model,T))

Calculates the Upper critical solution point of a mixture at a given Temperature.

returns:

  • UCST Pressure [Pa]
  • volume at UCST Point []
  • molar composition at UCST Point
source
Clapeyron.gibbs_solvationFunction
gibbs_solvation(model::EoSModel, T; threaded=true, vol0=(nothing,nothing))

Calculates the solvation free energy as:

g_solv = -R̄*T*log(K)

where the first component is the solvent and second is the solute.

source
Clapeyron.cross_second_virialFunction
cross_second_virial(model,T,z)

Default units: [m^3]

Calculates the second cross virial coefficient (B₁₂) of a binary mixture, using the definition:

B̄ = x₁^2*B₁₁ + 2x₁x₂B₁₂ + x₂^2*B₂₂
-B₁₂ = (B̄ - x₁^2*B₁₁ - x₂^2*B₂₂)/2x₁x₂
Composition-dependent property

The second cross virial coefficient calculated from a equation of state can present a dependency on composition [1], but normally, experiments for obtaining the second virial coefficient are made by mixing the same volume of two gases. you can calculate B12 in this way by using (Clapeyron.equivolcrosssecond_virial)[@ref]

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source
Clapeyron.equivol_cross_second_virialFunction
equivol_cross_second_virial(model::EoSModel,T,p_exp = 200000.0)

calculates the second cross virial coefficient, by simulating the mixing of equal volumes of pure gas, at T,P conditions. The equal volume of each pure gas sets an specific molar amount for each component. Details of the experiment can be found at [1].

Example

model = SAFTVRQMie(["helium","neon"])
+Multiphase Properties · Clapeyron.jl

Contents

Index

Multi component properties

Clapeyron.bubble_pressureFunction
bubble_pressure(model::EoSModel, T, x, method = ChemPotBubblePressure())

Calculates the bubble pressure and properties at a given temperature. Returns a tuple, containing:

  • Bubble Pressure [Pa]
  • liquid volume at Bubble Point []
  • vapour volume at Bubble Point []
  • Gas composition at Bubble Point

By default, uses equality of chemical potentials, via ChemPotBubblePressure

source
Clapeyron.bubble_temperatureFunction
bubble_temperature(model::EoSModel, p, x,method::BubblePointMethod = ChemPotBubbleTemperature())

Calculates the bubble temperature and properties at a given pressure. Returns a tuple, containing:

  • Bubble Temperature [K]
  • liquid volume at Bubble Point []
  • vapour volume at Bubble Point []
  • Gas composition at Bubble Point

By default, uses equality of chemical potentials, via ChemPotBubbleTemperature

source
Clapeyron.dew_pressureFunction
dew_pressure(model::EoSModel, T, y,method = ChemPotDewPressure())

Calculates the dew pressure and properties at a given temperature. Returns a tuple, containing:

  • Dew Pressure [Pa]
  • liquid volume at Dew Point []
  • vapour volume at Dew Point []
  • Liquid composition at Dew Point

By default, uses equality of chemical potentials, via ChemPotDewPressure

source
Clapeyron.dew_temperatureFunction
dew_temperature(model::EoSModel, p, y, method = ChemPotDewTemperature())

calculates the dew temperature and properties at a given pressure. Returns a tuple, containing:

  • Dew Temperature [K]
  • liquid volume at Dew Point []
  • vapour volume at Dew Point []
  • Liquid composition at Dew Point

By default, uses equality of chemical potentials, via ChemPotDewTemperature

source
Clapeyron.azeotrope_pressureFunction
azeotrope_pressure(model::EoSModel, T; v0 = x0_azeotrope_pressure(model,T))

calculates the azeotrope pressure and properties at a given temperature. Returns a tuple, containing:

  • Azeotrope Pressure [Pa]
  • liquid volume at Azeotrope Point []
  • vapour volume at Azeotrope Point []
  • Azeotrope composition
source
Clapeyron.azeotrope_temperatureFunction
azeotrope_temperature(model::EoSModel, T; v0 = x0_bubble_pressure(model,T,[0.5,0.5]))

Calculates the azeotrope temperature and properties at a given pressure. Returns a tuple, containing:

  • Azeotrope Temperature [K]
  • liquid volume at Azeotrope Point []
  • vapour volume at Azeotrope Point []
  • Azeotrope composition
source
Clapeyron.LLE_pressureFunction
LLE_pressure(model::EoSModel, T, x; v0 = x0_LLE_pressure(model,T,x))

calculates the Liquid-Liquid equilibrium pressure and properties at a given temperature.

Returns a tuple, containing:

  • LLE Pressure [Pa]
  • liquid volume of composition x₁ = x at LLE Point []
  • liquid volume of composition x₂ at LLE Point []
  • Liquid composition x₂
source
Clapeyron.LLE_temperatureFunction
LLE_temperature(model::EoSModel, p, x; T0 = x0_LLE_temperature(model,p,x))

calculates the Liquid-Liquid equilibrium temperature and properties at a given pressure.

Returns a tuple, containing:

  • LLE Pressure [Pa]
  • liquid volume of composition x₁ = x at LLE Point []
  • liquid volume of composition x₂ at LLE Point []
  • Liquid composition x₂
source
Clapeyron.VLLE_pressureFunction
VLLE_pressure(model::EoSModel, T; v0 = x0_LLE_pressure(model,T))

calculates the Vapor-Liquid-Liquid equilibrium pressure and properties of a binary mixture at a given temperature.

Returns a tuple, containing:

  • VLLE Pressure [Pa]
  • Liquid volume of composition x₁ at VLLE Point []
  • Liquid volume of composition x₂ at VLLE Point []
  • Vapour volume of composition y at VLLE Point []
  • Liquid composition x₁
  • Liquid composition x₂
  • Liquid composition y
source
Clapeyron.VLLE_temperatureFunction
VLLE_temperature(model::EoSModel, p; T0 = x0_LLE_temperature(model,p))

calculates the Vapor-Liquid-Liquid equilibrium temperature and properties of a binary mixture at a given temperature.

Returns a tuple, containing:

  • VLLE temperature [K]
  • Liquid volume of composition x₁ at VLLE Point []
  • Liquid volume of composition x₂ at VLLE Point []
  • Vapour volume of composition y at VLLE Point []
  • Liquid composition x₁
  • Liquid composition x₂
  • Liquid composition y
source
Clapeyron.crit_mixFunction
crit_mix(model::EoSModel,z;v0=x=x0_crit_mix(model,z))

Returns the critical mixture point at a ginven composition.

Returns a tuple, containing:

  • Critical Mixture Temperature [K]
  • Critical Mixture Pressure [Pa]
  • Critical Mixture Volume [m³]
source
Clapeyron.UCEP_mixFunction
UCEP_mix(model::EoSModel;v0=x0_UCEP_mix(model))

Calculates the Upper Critical End Point of a binary mixture.

returns:

  • UCEP Temperature [K]
  • UCEP Pressure [Pa]
  • liquid volume at UCEP Point []
  • vapour volume at UCEP Point []
  • liquid molar composition at UCEP Point
  • vapour molar composition at UCEP Point
source
Clapeyron.UCST_mixFunction
UCST_mix(model::EoSModel,T;v0=x0_UCST_mix(model,T))

Calculates the Upper critical solution point of a mixture at a given Temperature.

returns:

  • UCST Pressure [Pa]
  • volume at UCST Point []
  • molar composition at UCST Point
source
Clapeyron.gibbs_solvationFunction
gibbs_solvation(model::EoSModel, T; threaded=true, vol0=(nothing,nothing))

Calculates the solvation free energy as:

g_solv = -R̄*T*log(K)

where the first component is the solvent and second is the solute.

source
Clapeyron.cross_second_virialFunction
cross_second_virial(model,T,z)

Default units: [m^3]

Calculates the second cross virial coefficient (B₁₂) of a binary mixture, using the definition:

B̄ = x₁^2*B₁₁ + 2x₁x₂B₁₂ + x₂^2*B₂₂
+B₁₂ = (B̄ - x₁^2*B₁₁ - x₂^2*B₂₂)/2x₁x₂
Composition-dependent property

The second cross virial coefficient calculated from a equation of state can present a dependency on composition [1], but normally, experiments for obtaining the second virial coefficient are made by mixing the same volume of two gases. you can calculate B12 in this way by using (Clapeyron.equivolcrosssecond_virial)[@ref]

References

  1. Jäger, A., Breitkopf, C., & Richter, M. (2021). The representation of cross second virial coefficients by multifluid mixture models and other equations of state. Industrial & Engineering Chemistry Research, 60(25), 9286–9295. doi:10.1021/acs.iecr.1c01186
source
Clapeyron.equivol_cross_second_virialFunction
equivol_cross_second_virial(model::EoSModel,T,p_exp = 200000.0)

calculates the second cross virial coefficient, by simulating the mixing of equal volumes of pure gas, at T,P conditions. The equal volume of each pure gas sets an specific molar amount for each component. Details of the experiment can be found at [1].

Example

model = SAFTVRQMie(["helium","neon"])
 B12 = equivol_cross_second_virial(model,)
-

References

  1. Brewer, J., & Vaughn, G. W. (1969). Measurement and correlation of some interaction second virial coefficients from − 125° to 50°C. I. The Journal of Chemical Physics, 50(7), 2960–2968. doi:10.1063/1.1671491
source
Clapeyron.sle_solubilityFunction
sle_solubility(model::CompositeModel, p, T, z; solute)

Calculates the solubility of each component within a solution of the other components, at a given temperature and composition. Returns a matrix containing the composition of the SLE phase boundary for each component. If solute is specified, returns only the solubility of the specified component.

Can only function when solid and fluid models are specified within a CompositeModel.

source
sle_solubility(model::CompositeModel, p, T, z; solute)

Calculates the solubility of each component within a solution of the other components, at a given temperature and composition. Returns a matrix containing the composition of the SLE phase boundary for each component. If solute is specified, returns only the solubility of the specified component.

Can only function when solid and fluid models are specified within a CompositeModel.

source
Clapeyron.slle_solubilityFunction
slle_solubility(model::CompositeModel, p, T)

Calculates the phase boundary for solid-liquid-liquid equilibriumm of a ternary mixture, at a given temperature and pressure. Returns a matrix containing the composition of the two liquids phases.

Can only function when solid and liquid models are specified within a CompositeModel and when the third component is the solute.

source
Clapeyron.eutectic_pointFunction
eutectic_point(model::CompositeModel, p)

Calculates the eutectic point of a binary mixture (at a given pressure). Returns a tuple containing the eutectic temperature and the composition at the eutectic point.

Can only function when solid and liquid models are specified within a CompositeModel.

source

Bubble/Dew methods

Clapeyron.ChemPotBubblePressureType
ChemPotBubblePressure(kwargs...)

Function to compute bubble_pressure via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • y0 = nothing: optional, initial guess for the vapor phase composition
  • p0 = nothing: optional, initial guess for the bubble pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • nonvolatiles = nothing: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.FugBubblePressureType
FugBubblePressure(kwargs...)

Function to compute bubble_pressure via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the pressure. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • y0 = nothing: optional, initial guess for the vapor phase composition
  • p0 = nothing: optional, initial guess for the bubble pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the pressure using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_p = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • nonvolatiles = nothing: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.ActivityBubblePressureType
ActivityBubblePressure(kwargs...)

Function to compute bubble_pressure using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • y0 = nothing: optional, initial guess for the vapor phase composition
  • p0 = nothing: optional, initial guess for the bubble pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source
Clapeyron.ChemPotBubbleTemperatureType
ChemPotBubbleTemperature(kwargs...)

Function to compute bubble_temperature via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • y = nothing: optional, initial guess for the vapor phase composition.
  • T0 = nothing: optional, initial guess for the bubble temperature [K].
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • nonvolatiles = nothing: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.FugBubbleTemperatureType
FugBubbleTemperature(kwargs...)

Method to compute bubble_temperature via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the temperature. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • y = nothing: optional, initial guess for the vapor phase composition.
  • T0 = nothing: optional, initial guess for the bubble temperature [K].
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the temperature using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_T = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • nonvolatiles: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.ActivityBubbleTemperatureType
ActivityBubbleTemperature(kwargs...)

Function to compute bubble_temperature using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • y0 = nothing: optional, initial guess for the vapor phase composition
  • T0 = nothing: optional, initial guess for the bubble temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source
Clapeyron.ChemPotDewPressureType
ChemPotDewPressure(kwargs...)

Function to compute dew_pressure via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • p0 = nothing: optional, initial guess for the dew pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.FugDewPressureType
FugDewPressure(kwargs...)

Method to compute dew_pressure via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the pressure. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • p0 = nothing: optional, initial guess for the dew pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the pressure using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_p = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.ActivityDewPressureType
ActivityDewPressure(kwargs...)

Function to compute dew_pressure using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • x0 = nothing: optional, initial guess for the liquid phase composition
  • p0 = nothing: optional, initial guess for the dew pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source
Clapeyron.ChemPotDewTemperatureType
ChemPotDewTemperature(kwargs...)

Function to compute dew_temperature via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • T0 =nothing: optional, initial guess for the dew temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.FugDewTemperatureType
FugDewTemperature(kwargs...)

Method to compute dew_temperature via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the temperature. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • T0 = nothing: optional, initial guess for the dew temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the temperature using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_T = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.ActivityDewTemperatureType
ActivityDewTemperature(kwargs...)

Function to compute dew_temperature using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • x0 = nothing: optional, initial guess for the liquid phase composition
  • T0 = nothing: optional, initial guess for the dew temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source

Consistency and Stability

Clapeyron.gibbs_duhemFunction
gibbs_duhem(model,V,T,z=[1.0])

performs a Gibbs-Duhem check on the input conditions:

∑zᵢμᵢ - G ≈ 0

Where G is the total gibbs energy. it can help diagnose if a user-defined eos is consistent.

return |∑zᵢμᵢ - G|, ∑zᵢμᵢ and G at the specified conditions.

source
Clapeyron.isstableFunction
isstable(model,p,T,z)::Bool

Performs stability tests for a (p,T,z) pair, and warn if any tests fail. returns true/false.

Checks, in order of complexity:

  • mechanical stability: isothermal compressibility is not negative.
  • diffusive stability: all eigenvalues of ∂²A/∂n² are positive.
  • chemical stability: there isn't any other combinations of compositions at p(V,T),T that are more stable than the input composition.

For checking (V,T,z) pairs, use Clapeyron.VT_isstable(model,V,T,z) instead.

source
Clapeyron.VT_mechanical_stabilityFunction
VT_mechanical_stability(model,V,T,z = SA[1.0])::Bool

Performs a mechanical stability for a (V,T,z) pair, returns true/false. Checks if isothermal compressibility is not negative.

Note

This function does not have a p,T counterpart, because if we calculate the volume via volume(model,p,T,z), it will be, by definition, a mechanically stable phase.

source
Clapeyron.VT_diffusive_stabilityFunction
VT_diffusive_stability(model,V,T,z)::Bool

Performs a diffusive stability for a (V,T,z) pair, returns true/false. Checks if all eigenvalues of ∂²A/∂n² are positive. Returns false if the eos calculation failed. this normally occurs when evaluating on densities lower than the maximum density (given by Clapeyron.lb_volume(model,T,z))

source
Clapeyron.tpdFunction
tpd(model,p,T,z;break_first = false,lle = false,tol_trivial = 1e-5, di = nothing)

Calculates the Tangent plane distance function (tpd). It returns:

  • a vector with trial phase compositions where tpd < 0
  • a vector with the tpd values
  • a vector with symbols indicating the phase of the input composition
  • a vector with symbols indicating the phase of the trial composition

It iterates over each two-phase combination, starting from pure trial compositions, it does succesive substitution, then Gibbs optimization.

If the vectors are empty, then the procedure couldn't find a negative tpd. That is an indication that the phase is (almost) surely stable.

source
Clapeyron.spinodal_pressureFunction
spinodal_pressure(model::EoSModel, T, x; v0, phase)

Calculates the spinodal pressure and volume for a given temperature and composition. Returns a tuple, containing:

  • spinodal pressure [Pa]
  • spinodal volume []

Calculates either the liquid or the vapor spinodal point depending on the given starting volume v0 or the phase. The keyword phase is ignored if v0 is given.

source
Clapeyron.spinodal_temperatureFunction
spinodal_temperature(model::EoSModel, p, x; T0, v0, phase)

Calculates the spinodal pressure and volume for a given pressure and composition. Returns a tuple, containing:

  • spinodal temperature [K]
  • spinodal volume []

Calculates either the liquid or the vapor spinodal point depending on the given starting temperature T0 and volume v0 or the phase. The keyword phase is ignored if T0 or v0 is given.

source

TP Flash

Clapeyron.tp_flashFunction
tp_flash(model, p, T, n, method::TPFlashMethod = DETPFlash())

Routine to solve non-reactive multicomponent flash problem. The default method uses Global Optimization. see DETPFlash

Inputs:

  • T, Temperature
  • p, Pressure
  • n, vector of number of moles of each species

Outputs - Tuple containing:

  • xᵢⱼ, Array of mole fractions of species j in phase i
  • nᵢⱼ, Array of mole numbers of species j in phase i, [mol]
  • G, Gibbs Free Energy of Equilibrium Mixture [J]
source
Clapeyron.DETPFlashType
DETPFlash(; numphases = 2,
+

References

  1. Brewer, J., & Vaughn, G. W. (1969). Measurement and correlation of some interaction second virial coefficients from − 125° to 50°C. I. The Journal of Chemical Physics, 50(7), 2960–2968. doi:10.1063/1.1671491
source
Clapeyron.sle_solubilityFunction
sle_solubility(model::CompositeModel, p, T, z; solute)

Calculates the solubility of each component within a solution of the other components, at a given temperature and composition. Returns a matrix containing the composition of the SLE phase boundary for each component. If solute is specified, returns only the solubility of the specified component.

Can only function when solid and fluid models are specified within a CompositeModel.

source
sle_solubility(model::CompositeModel, p, T, z; solute)

Calculates the solubility of each component within a solution of the other components, at a given temperature and composition. Returns a matrix containing the composition of the SLE phase boundary for each component. If solute is specified, returns only the solubility of the specified component.

Can only function when solid and fluid models are specified within a CompositeModel.

source
Clapeyron.slle_solubilityFunction
slle_solubility(model::CompositeModel, p, T)

Calculates the phase boundary for solid-liquid-liquid equilibriumm of a ternary mixture, at a given temperature and pressure. Returns a matrix containing the composition of the two liquids phases.

Can only function when solid and liquid models are specified within a CompositeModel and when the third component is the solute.

source
Clapeyron.eutectic_pointFunction
eutectic_point(model::CompositeModel, p)

Calculates the eutectic point of a binary mixture (at a given pressure). Returns a tuple containing the eutectic temperature and the composition at the eutectic point.

Can only function when solid and liquid models are specified within a CompositeModel.

source

Bubble/Dew methods

Clapeyron.ChemPotBubblePressureType
ChemPotBubblePressure(kwargs...)

Function to compute bubble_pressure via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • y0 = nothing: optional, initial guess for the vapor phase composition
  • p0 = nothing: optional, initial guess for the bubble pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • nonvolatiles = nothing: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.FugBubblePressureType
FugBubblePressure(kwargs...)

Function to compute bubble_pressure via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the pressure. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • y0 = nothing: optional, initial guess for the vapor phase composition
  • p0 = nothing: optional, initial guess for the bubble pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the pressure using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_p = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • nonvolatiles = nothing: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.ActivityBubblePressureType
ActivityBubblePressure(kwargs...)

Function to compute bubble_pressure using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • y0 = nothing: optional, initial guess for the vapor phase composition
  • p0 = nothing: optional, initial guess for the bubble pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source
Clapeyron.ChemPotBubbleTemperatureType
ChemPotBubbleTemperature(kwargs...)

Function to compute bubble_temperature via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • y = nothing: optional, initial guess for the vapor phase composition.
  • T0 = nothing: optional, initial guess for the bubble temperature [K].
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • nonvolatiles = nothing: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.FugBubbleTemperatureType
FugBubbleTemperature(kwargs...)

Method to compute bubble_temperature via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the temperature. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • y = nothing: optional, initial guess for the vapor phase composition.
  • T0 = nothing: optional, initial guess for the bubble temperature [K].
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the temperature using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_T = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • nonvolatiles: optional, Vector of strings containing non volatile compounds. those will be set to zero on the vapour phase.
source
Clapeyron.ActivityBubbleTemperatureType
ActivityBubbleTemperature(kwargs...)

Function to compute bubble_temperature using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • y0 = nothing: optional, initial guess for the vapor phase composition
  • T0 = nothing: optional, initial guess for the bubble temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source
Clapeyron.ChemPotDewPressureType
ChemPotDewPressure(kwargs...)

Function to compute dew_pressure via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • p0 = nothing: optional, initial guess for the dew pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.FugDewPressureType
FugDewPressure(kwargs...)

Method to compute dew_pressure via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the pressure. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • p0 = nothing: optional, initial guess for the dew pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the pressure using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_p = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.ActivityDewPressureType
ActivityDewPressure(kwargs...)

Function to compute dew_pressure using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • x0 = nothing: optional, initial guess for the liquid phase composition
  • p0 = nothing: optional, initial guess for the dew pressure [Pa]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source
Clapeyron.ChemPotDewTemperatureType
ChemPotDewTemperature(kwargs...)

Function to compute dew_temperature via chemical potentials. It directly solves the equality of chemical potentials system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • T0 =nothing: optional, initial guess for the dew temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • max_iters = 1000: optional, maximum number of iterations
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.FugDewTemperatureType
FugDewTemperature(kwargs...)

Method to compute dew_temperature via fugacity coefficients. First it uses successive substitution to update the phase composition and a outer newtown loop to update the temperature. If no convergence is reached after itmax_newton iterations, the system is solved using a multidimensional non-linear system of equations.

Inputs:

  • x0 = nothing: optional, initial guess for the liquid phase composition
  • T0 = nothing: optional, initial guess for the dew temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • itmax_newton = 10: optional, number of iterations to update the temperature using newton's method
  • itmax_ss = 5: optional, number of iterations to update the liquid phase composition using successive substitution
  • tol_x = 1e-8: optional, tolerance to stop successive substitution cycle
  • tol_T = 1e-8: optional, tolerance to stop newton cycle
  • tol_of = 1e-8: optional, tolerance to check if the objective function is zero.
  • noncondensables = nothing: optional, Vector of strings containing non condensable compounds. those will be set to zero on the liquid phase.
source
Clapeyron.ActivityDewTemperatureType
ActivityDewTemperature(kwargs...)

Function to compute dew_temperature using Activity Coefficients. On activity coefficient models it solves the problem via succesive substitucion. On helmholtz-based models, it uses the Chapman approximation for activity coefficients.

Inputs:

  • gas_fug = true: if the solver uses gas fugacity coefficients. on ActivityModel is set by default to false
  • poynting = true: if the solver use the poynting correction on the liquid fugacity coefficients. on ActivityModel is set by default to false
  • x0 = nothing: optional, initial guess for the liquid phase composition
  • T0 = nothing: optional, initial guess for the dew temperature [K]
  • vol0 = nothing: optional, initial guesses for the liquid and vapor phase volumes
  • atol = 1e-8: optional, absolute tolerance of the non linear system of equations
  • rtol = 1e-12: optional, relative tolerance of the non linear system of equations
  • itmax_ss = 40: optional, maximum number of sucesive substitution iterations
source

Consistency and Stability

Clapeyron.gibbs_duhemFunction
gibbs_duhem(model,V,T,z=[1.0])

performs a Gibbs-Duhem check on the input conditions:

∑zᵢμᵢ - G ≈ 0

Where G is the total gibbs energy. it can help diagnose if a user-defined eos is consistent.

return |∑zᵢμᵢ - G|, ∑zᵢμᵢ and G at the specified conditions.

source
Clapeyron.isstableFunction
isstable(model,p,T,z)::Bool

Performs stability tests for a (p,T,z) pair, and warn if any tests fail. returns true/false.

Checks, in order of complexity:

  • mechanical stability: isothermal compressibility is not negative.
  • diffusive stability: all eigenvalues of ∂²A/∂n² are positive.
  • chemical stability: there isn't any other combinations of compositions at p(V,T),T that are more stable than the input composition.

For checking (V,T,z) pairs, use Clapeyron.VT_isstable(model,V,T,z) instead.

source
Clapeyron.VT_mechanical_stabilityFunction
VT_mechanical_stability(model,V,T,z = SA[1.0])::Bool

Performs a mechanical stability for a (V,T,z) pair, returns true/false. Checks if isothermal compressibility is not negative.

Note

This function does not have a p,T counterpart, because if we calculate the volume via volume(model,p,T,z), it will be, by definition, a mechanically stable phase.

source
Clapeyron.VT_diffusive_stabilityFunction
VT_diffusive_stability(model,V,T,z)::Bool

Performs a diffusive stability for a (V,T,z) pair, returns true/false. Checks if all eigenvalues of ∂²A/∂n² are positive. Returns false if the eos calculation failed. this normally occurs when evaluating on densities lower than the maximum density (given by Clapeyron.lb_volume(model,T,z))

source
Clapeyron.tpdFunction
tpd(model,p,T,z;break_first = false,lle = false,tol_trivial = 1e-5, di = nothing)

Calculates the Tangent plane distance function (tpd). It returns:

  • a vector with trial phase compositions where tpd < 0
  • a vector with the tpd values
  • a vector with symbols indicating the phase of the input composition
  • a vector with symbols indicating the phase of the trial composition

It iterates over each two-phase combination, starting from pure trial compositions, it does succesive substitution, then Gibbs optimization.

If the vectors are empty, then the procedure couldn't find a negative tpd. That is an indication that the phase is (almost) surely stable.

source
Clapeyron.spinodal_pressureFunction
spinodal_pressure(model::EoSModel, T, x; v0, phase)

Calculates the spinodal pressure and volume for a given temperature and composition. Returns a tuple, containing:

  • spinodal pressure [Pa]
  • spinodal volume []

Calculates either the liquid or the vapor spinodal point depending on the given starting volume v0 or the phase. The keyword phase is ignored if v0 is given.

source
Clapeyron.spinodal_temperatureFunction
spinodal_temperature(model::EoSModel, p, x; T0, v0, phase)

Calculates the spinodal pressure and volume for a given pressure and composition. Returns a tuple, containing:

  • spinodal temperature [K]
  • spinodal volume []

Calculates either the liquid or the vapor spinodal point depending on the given starting temperature T0 and volume v0 or the phase. The keyword phase is ignored if T0 or v0 is given.

source

TP Flash

Clapeyron.tp_flashFunction
tp_flash(model, p, T, n, method::TPFlashMethod = DETPFlash())

Routine to solve non-reactive multicomponent flash problem. The default method uses Global Optimization. see DETPFlash

Inputs:

  • T, Temperature
  • p, Pressure
  • n, vector of number of moles of each species

Outputs - Tuple containing:

  • xᵢⱼ, Array of mole fractions of species j in phase i
  • nᵢⱼ, Array of mole numbers of species j in phase i, [mol]
  • G, Gibbs Free Energy of Equilibrium Mixture [J]
source
Clapeyron.DETPFlashType
DETPFlash(; numphases = 2,
 max_steps = 1e4*(numphases-1),
 population_size =20,
 time_limit = Inf,
 verbose = false,
 logspace = false,
-equilibrium = :auto)

Method to solve non-reactive multicomponent flash problem by finding global minimum of Gibbs Free Energy via Differential Evolution.

User must assume a number of phases, numphases. If true number of phases is smaller than numphases, model should predict either (a) identical composition in two or more phases, or (b) one phase with negligible total number of moles. If true number of phases is larger than numphases, a thermodynamically unstable solution will be predicted.

The optimizer will stop at max_steps evaluations or at time_limit seconds

The equilibrium keyword allows to restrict the search of phases to just liquid-liquid equilibria (equilibrium = :lle). the default searches for liquid and gas phases.

source
Clapeyron.RRTPFlashType
RRTPFlash{T}(;kwargs...)

Method to solve non-reactive multicomponent flash problem by Rachford-Rice equation.

Only two phases are supported. if K0 is nothing, it will be calculated via the Wilson correlation.

Keyword Arguments:

  • equilibrium: :vle for liquid vapor equilibria, :lle for liquid liquid equilibria, :unknown if not specified
  • K0: initial guess for the constants K
  • x0: initial guess for the composition of phase x
  • y0: initial guess for the composition of phase y
  • vol0: initial guesses for phase x and phase y volumes
  • K_tol: tolerance to stop the calculation
  • ss_iters: number of Successive Substitution iterations to perform
  • nacc: accelerate successive substitution method every nacc steps. Should be a integer bigger than 3. Set to 0 for no acceleration.
  • second_order: wheter to solve the gibbs energy minimization using the analytical hessian or not
  • noncondensables: arrays with names (strings) of components non allowed on the liquid phase. In the case of LLE equilibria, corresponds to the x phase
  • nonvolatiles: arrays with names (strings) of components non allowed on the vapour phase. In the case of LLE equilibria, corresponds to the y phase
  • flash_result::FlashResult: can be provided instead of x0,y0 and vol0 for initial guesses
source
Clapeyron.MichelsenTPFlashType
MichelsenTPFlash{T}(;kwargs...)

Method to solve non-reactive multicomponent flash problem by Michelsen's method.

Only two phases are supported. if K0 is nothing, it will be calculated via the Wilson correlation.

Keyword Arguments:

  • equilibrium: :vle for liquid vapor equilibria, :lle for liquid liquid equilibria, :unknown if not specified
  • K0: initial guess for the constants K
  • x0: initial guess for the composition of phase x
  • y0: initial guess for the composition of phase y
  • vol0: initial guesses for phase x and phase y volumes
  • K_tol: tolerance to stop the calculation
  • ss_iters: number of Successive Substitution iterations to perform
  • nacc: accelerate successive substitution method every nacc steps. Should be a integer bigger than 3. Set to 0 for no acceleration.
  • second_order: wheter to solve the gibbs energy minimization using the analytical hessian or not
  • noncondensables: arrays with names (strings) of components non allowed on the liquid phase. In the case of LLE equilibria, corresponds to the x phase
  • nonvolatiles: arrays with names (strings) of components non allowed on the vapour phase. In the case of LLE equilibria, corresponds to the y phase
  • flash_result::FlashResult: can be provided instead of x0,y0 and vol0 for initial guesses
source
Clapeyron.MultiPhaseTPFlashType
MultiPhaseTPFlash(;kwargs...)

Method to solve non-reactive multiphase (np phases), multicomponent (nc components) flash problem.

The flash algorithm uses successive stability tests to find new phases [1], and then tries to solve the system via rachford-rice and succesive substitution for nc * np * ss_iters iterations.

If the Rachford-Rice SS fails to converge, it proceeds to solve the system via gibbs minimization in VT-space using lnK-β-ρ as variables [3].

The algorithm finishes when SS or the gibbs minimization converges and all resulting phases are stable.

If the result of the phase equilibria is not stable, then it proceeds to add/remove phases again, for a maximum of phase_iters iterations.

Keyword Arguments:

  • K0 (optional), initial guess for the constants K
  • x0 (optional), initial guess for the composition of phase x
  • y0 (optional), initial guess for the composition of phase y
  • n0 (optional), initial guess for all compositions. it can be a matrix or a vector of vectors.
  • K_tol = sqrt(eps(Float64)), tolerance to stop the calculation (norm(lnK,1) < K_tol)
  • ss_iters = 4, number of Successive Substitution iterations to perform
  • nacc = 3, accelerate successive substitution method every nacc steps. Should be a integer bigger than 3. Set to 0 for no acceleration.
  • second_order = true, whether to solve the gibbs energy minimization using the analytical hessian or not. If set to false, the gibbs minimization will be done using L-BFGS.
  • full_tpd = false, whether to start with a simple K-split or using an intensive TPD search first.
  • max_phases = typemax(Int), the algorithm stops if there are more than min(max_phases,nc) phases
  • phase_iters = 20, the maximum number of solve-add/remove-phase iterations

References

  1. Thermopack - Thermodynamic equilibrium algorithms reimplemented in a new framework. (2020, September 08). https://github.com/thermotools/thermopack. Retrieved May 4, 2024, from https://github.com/thermotools/thermopack/blob/main/docs/memo/flash/flash.pdf
  2. Okuno, R., Johns, R. T. T., & Sepehrnoori, K. (2010). A new algorithm for Rachford-Rice for multiphase compositional simulation. SPE Journal, 15(02), 313–325. doi:10.2118/117752-pa
  3. Adhithya, T. B., & Venkatarathnam, G. (2021). New pressure and density based methods for isothermal-isobaric flash calculations. Fluid Phase Equilibria, 537(112980), 112980. doi:10.1016/j.fluid.2021.112980
source
Clapeyron.MCFlashJLType

MCFlashJL(; method = MultiComponentFlash.SSIFlash(), storage = nothing, V = NaN, K = nothing, kwargs.... )

Uses MultiComponentFlash.jl two-phase flash solver. allows passing storage to minimize allocations. That storage can be created by calling MultiComponentFlash.flash_storage(model,p,T,z,method::MCFlashJL)

Note

This method requires MultiComponentFlash to be loaded in the current session (using MultiComponentFlash) and julia >= v1.9

source
Clapeyron.numphasesFunction
numphases(method::FlashMethod)

Return the number of phases supported by a flash method. By default it is set to 2. If the method allows it, you can set the number of phases by doing method(;numphases = n).

source
Clapeyron.supports_reductionFunction
supports_reduction(method::FlashMethod)::Bool

Checks if a Flash method supports index reduction (the ability to prune model components with compositions lower than a threshold). All current Clapeyron.jl methods support index reduction, but some methods that alllow passing a cache could have problems.

source

General Flash

Clapeyron.FlashResult
+equilibrium = :auto)

Method to solve non-reactive multicomponent flash problem by finding global minimum of Gibbs Free Energy via Differential Evolution.

User must assume a number of phases, numphases. If true number of phases is smaller than numphases, model should predict either (a) identical composition in two or more phases, or (b) one phase with negligible total number of moles. If true number of phases is larger than numphases, a thermodynamically unstable solution will be predicted.

The optimizer will stop at max_steps evaluations or at time_limit seconds

The equilibrium keyword allows to restrict the search of phases to just liquid-liquid equilibria (equilibrium = :lle). the default searches for liquid and gas phases.

source
Clapeyron.RRTPFlashType
RRTPFlash{T}(;kwargs...)

Method to solve non-reactive multicomponent flash problem by Rachford-Rice equation.

Only two phases are supported. if K0 is nothing, it will be calculated via the Wilson correlation.

Keyword Arguments:

  • equilibrium: :vle for liquid vapor equilibria, :lle for liquid liquid equilibria, :unknown if not specified
  • K0: initial guess for the constants K
  • x0: initial guess for the composition of phase x
  • y0: initial guess for the composition of phase y
  • vol0: initial guesses for phase x and phase y volumes
  • K_tol: tolerance to stop the calculation
  • ss_iters: number of Successive Substitution iterations to perform
  • nacc: accelerate successive substitution method every nacc steps. Should be a integer bigger than 3. Set to 0 for no acceleration.
  • second_order: wheter to solve the gibbs energy minimization using the analytical hessian or not
  • noncondensables: arrays with names (strings) of components non allowed on the liquid phase. In the case of LLE equilibria, corresponds to the x phase
  • nonvolatiles: arrays with names (strings) of components non allowed on the vapour phase. In the case of LLE equilibria, corresponds to the y phase
  • flash_result::FlashResult: can be provided instead of x0,y0 and vol0 for initial guesses
source
Clapeyron.MichelsenTPFlashType
MichelsenTPFlash{T}(;kwargs...)

Method to solve non-reactive multicomponent flash problem by Michelsen's method.

Only two phases are supported. if K0 is nothing, it will be calculated via the Wilson correlation.

Keyword Arguments:

  • equilibrium: :vle for liquid vapor equilibria, :lle for liquid liquid equilibria, :unknown if not specified
  • K0: initial guess for the constants K
  • x0: initial guess for the composition of phase x
  • y0: initial guess for the composition of phase y
  • vol0: initial guesses for phase x and phase y volumes
  • K_tol: tolerance to stop the calculation
  • ss_iters: number of Successive Substitution iterations to perform
  • nacc: accelerate successive substitution method every nacc steps. Should be a integer bigger than 3. Set to 0 for no acceleration.
  • second_order: wheter to solve the gibbs energy minimization using the analytical hessian or not
  • noncondensables: arrays with names (strings) of components non allowed on the liquid phase. In the case of LLE equilibria, corresponds to the x phase
  • nonvolatiles: arrays with names (strings) of components non allowed on the vapour phase. In the case of LLE equilibria, corresponds to the y phase
  • flash_result::FlashResult: can be provided instead of x0,y0 and vol0 for initial guesses
source
Clapeyron.MultiPhaseTPFlashType
MultiPhaseTPFlash(;kwargs...)

Method to solve non-reactive multiphase (np phases), multicomponent (nc components) flash problem.

The flash algorithm uses successive stability tests to find new phases [1], and then tries to solve the system via rachford-rice and succesive substitution for nc * np * ss_iters iterations.

If the Rachford-Rice SS fails to converge, it proceeds to solve the system via gibbs minimization in VT-space using lnK-β-ρ as variables [3].

The algorithm finishes when SS or the gibbs minimization converges and all resulting phases are stable.

If the result of the phase equilibria is not stable, then it proceeds to add/remove phases again, for a maximum of phase_iters iterations.

Keyword Arguments:

  • K0 (optional), initial guess for the constants K
  • x0 (optional), initial guess for the composition of phase x
  • y0 (optional), initial guess for the composition of phase y
  • n0 (optional), initial guess for all compositions. it can be a matrix or a vector of vectors.
  • K_tol = sqrt(eps(Float64)), tolerance to stop the calculation (norm(lnK,1) < K_tol)
  • ss_iters = 4, number of Successive Substitution iterations to perform
  • nacc = 3, accelerate successive substitution method every nacc steps. Should be a integer bigger than 3. Set to 0 for no acceleration.
  • second_order = true, whether to solve the gibbs energy minimization using the analytical hessian or not. If set to false, the gibbs minimization will be done using L-BFGS.
  • full_tpd = false, whether to start with a simple K-split or using an intensive TPD search first.
  • max_phases = typemax(Int), the algorithm stops if there are more than min(max_phases,nc) phases
  • phase_iters = 20, the maximum number of solve-add/remove-phase iterations

References

  1. Thermopack - Thermodynamic equilibrium algorithms reimplemented in a new framework. (2020, September 08). https://github.com/thermotools/thermopack. Retrieved May 4, 2024, from https://github.com/thermotools/thermopack/blob/main/docs/memo/flash/flash.pdf
  2. Okuno, R., Johns, R. T. T., & Sepehrnoori, K. (2010). A new algorithm for Rachford-Rice for multiphase compositional simulation. SPE Journal, 15(02), 313–325. doi:10.2118/117752-pa
  3. Adhithya, T. B., & Venkatarathnam, G. (2021). New pressure and density based methods for isothermal-isobaric flash calculations. Fluid Phase Equilibria, 537(112980), 112980. doi:10.1016/j.fluid.2021.112980
source
Clapeyron.MCFlashJLType

MCFlashJL(; method = MultiComponentFlash.SSIFlash(), storage = nothing, V = NaN, K = nothing, kwargs.... )

Uses MultiComponentFlash.jl two-phase flash solver. allows passing storage to minimize allocations. That storage can be created by calling MultiComponentFlash.flash_storage(model,p,T,z,method::MCFlashJL)

Note

This method requires MultiComponentFlash to be loaded in the current session (using MultiComponentFlash) and julia >= v1.9

source
Clapeyron.numphasesFunction
numphases(method::FlashMethod)

Return the number of phases supported by a flash method. By default it is set to 2. If the method allows it, you can set the number of phases by doing method(;numphases = n).

source
Clapeyron.supports_reductionFunction
supports_reduction(method::FlashMethod)::Bool

Checks if a Flash method supports index reduction (the ability to prune model components with compositions lower than a threshold). All current Clapeyron.jl methods support index reduction, but some methods that alllow passing a cache could have problems.

source

General Flash

Clapeyron.FlashResult
 Clapeyron.FlashData
 Clapeyron.FlashSpecifications
 Clapeyron.xy_flash
@@ -18,4 +18,4 @@
 Clapeyron.qt_flash
 Clapeyron.qp_flash
 Clapeyron.ts_flash
-Clapeyron.vt_flash
+Clapeyron.vt_flash diff --git a/dev/properties/single/index.html b/dev/properties/single/index.html index 54b62f008..4860fdf7f 100644 --- a/dev/properties/single/index.html +++ b/dev/properties/single/index.html @@ -13,7 +13,7 @@ (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
Clapeyron.saturation_temperatureFunction
saturation_temperature(model::EoSModel, p, kwargs...)
+(96099.38979351871, 2.2674781912892933e-5, 0.03201681565699547)
source
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 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:
@@ -24,7 +24,7 @@
 (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, in J

source
Missing docstring.

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

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 pressure. You can pass a tuple of initial values for the volumes (vs0,vl0).

returns:

  • Melting Pressure [Pa]
  • melting solid volume at specified temperature []
  • melting liquid volume at specified temperature []
source
Clapeyron.melting_temperatureFunction
pm,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 []
  • melting liquid volume at specified pressure []
source
Clapeyron.sublimation_pressureFunction
psub,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 []
  • Sublimation vapour volume at specified temperature []
source
Clapeyron.sublimation_temperatureFunction
pm,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 []
  • sublimation vapour volume at specified pressure []
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 []
  • liquid volume at Triple Point []
  • vapour volume at Triple Point []
source

Saturation methods

Clapeyron.ChemPotVSaturationType
ChemPotVSaturation <: SaturationMethod
+(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, in J

source
Missing docstring.

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

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 pressure. You can pass a tuple of initial values for the volumes (vs0,vl0).

returns:

  • Melting Pressure [Pa]
  • melting solid volume at specified temperature []
  • melting liquid volume at specified temperature []
source
Clapeyron.melting_temperatureFunction
pm,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 []
  • melting liquid volume at specified pressure []
source
Clapeyron.sublimation_pressureFunction
psub,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 []
  • Sublimation vapour volume at specified temperature []
source
Clapeyron.sublimation_temperatureFunction
pm,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 []
  • sublimation vapour volume at specified pressure []
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 []
  • liquid volume at Triple Point []
  • vapour volume at Triple Point []
source

Saturation methods

Clapeyron.ChemPotVSaturationType
ChemPotVSaturation <: SaturationMethod
 ChemPotVSaturation(V0)
 ChemPotVSaturation(;vl = nothing,
                     vv = nothing,
@@ -33,21 +33,21 @@
                     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.

source
Clapeyron.ChemPotDensitySaturationType
ChemPotDensitySaturation <: SaturationMethod
+                    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.

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
+                        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
+    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,
@@ -56,4 +56,4 @@
                     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
+ 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 diff --git a/dev/theory/background/index.html b/dev/theory/background/index.html index b1b29c2d7..7abab94ff 100644 --- a/dev/theory/background/index.html +++ b/dev/theory/background/index.html @@ -1,2 +1,2 @@ -- · Clapeyron.jl

Models

Here, we give a high-level description of equations of state and the models provided by Clapeyron.

Equations of state

An equation of state is a functional form, $f$ (say), that allows us to obtain a thermodynamic property, $F$, at given conditions $\boldsymbol{\Omega}$:

$F = f(\boldsymbol{\Omega};\boldsymbol{\Xi})$.

There are many ways one can develop an equation of state, however, these must respect the constraints on the number of properties we can specify, as required by the Gibbs Phase Rule:

$\mathrm{DoF} = N_\mathrm{species} - N_\mathrm{phase} + 2$

Here, $\mathrm{DoF}$ means "Degrees of Freedom"; this is the number of so-called intensive state properties (or, in other words, those that are independent of system size) that we can specify. As we can see, the largest number of degrees of freedom we can have is $N_\mathrm{species}+1$; system size itself is not included so, in practice, this represents one more variable that we can specify, giving $N_\mathrm{species}+2$. Thus, taking the simple case of a single species, we can specify at most three conditions in our system. For a traditional equation of state, we specify volume, $V$, temperature, $T$, and the size of the system – for example the number of particles, $N$, or moles, $n$; the equation of state then returns the pressure, $p$. Many modern equations of state are derived using what is known as the canonical ensemble (more information can be found in Statistical Mechanics textbooks) and, accordingly, the three variable chosen are again usually $T$, $V$ and $N$; the output of these equations is usually the Helmholtz free energy, $A$.

Many equations of state are based on an underlying molecular model. Consequently, it is also typical for an equation of state to require parameters, $\boldsymbol{\Xi}$, to model certain species. The nature of these parameters depends on the equation of state.

Ideal gas equation of state

One equation of state that most engineers and scientists should be very familiar with is the ideal gas equation, commonly expressed as:

$pV = Nk_\mathrm{B}T$

where $p$ is the pressure, $N$ is the total number of particles and $k_\mathrm{B}$ is the Boltzmann constant. Ideal gas molecules are "invisible" to each other; there is zero interaction between ideal gas molecules (this is, in essence, the ideal gas model), so you can think of them as being infinitely small. This equation was first written down (although in slightly different form) in 1834 by Émile Clapeyron (in whose honour Clapeyron is named). Most (if not all) subsequent equations of state are descended from Clapeyron's equation, which is surprisingly appropriate for a wide variety of species in the gas phase at high enough temperature and low enough pressure.

Unfortunately, if we wish to determine other thermodynamic properties this equation is a little inconvenient. It would be much easier if it was expressed in the form of the free energy, from which other properties can then be evaluated using standard thermodynamic relationships. Accordingly, we could first integrate the above equation with respect to volume to determine the Helmholtz free energy:

$A_\mathrm{ideal} =- \int p\,dV =- Nk_\mathrm{B}T\ln{V}+c(T,N)$

This is still a little inconvenient, however, since we have to deal with a tricky constant of integration. Fortunately, we can instead derive $A_\mathrm{ideal}$ from statistical mechanics (using just a few well-known results from quantum mechanics). Following this route, we obtain (for a pure component (i.e., a single species))

$\frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T} = \ln{(\rho\Lambda^3)}-1$,

where $\rho = N/V$ is the number density, and $\Lambda$ is the thermal de Broglie wavelength, which introduces the kinetic contributions to the free energy (strictly speaking, with this notation only translations are included). We can generalise this as a sum over species $i$ for a multi-component mixture:

$\frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T} = \left(\sum_ix_i\ln{(\rho_i\Lambda_i^3)}\right)-1$,

where $x_i$ is the molar composition, and the subscript denote that the variable so decorated relates to species $i$. This equation represents the MonomerIdeal form in Clapeyron. For the purposes of vapour–liquid equilibrium properties, one can even ignore $\Lambda_i$ (since it cancels out in solving the phase equilibrium); we therefore use this as the default BasicIdeal model.

The kinetic energy of polyatomic species includes contributions from vibrational and rotational modes of motion, as well as translational; we must also account for these in the ideal free energy. The statistical–mechanical derivation of the ideal free energy becomes a little more complicated but can still be done, resulting in the following expression:

$\frac{A_{\mathrm{ideal}}}{Nk_{\mathrm{B}}T}=\sum_{i}x_{i}\bigg[\ln\left(\rho_{i}\Lambda_{i}^{3}\right)-\frac{N_{\mathrm{rot},i}}{2} \ln \frac{T}{\theta_{\mathrm{rot},i}}+\sum^{N_{\mathrm{vib},i}}_{\mathrm{v}}g_{i,\mathrm{v}}\left[\frac{\theta_{\mathrm{vib},i,\mathrm{v}}}{2T}+\ln\left(1-\exp{-(\theta_{\mathrm{vib},i,\mathrm{v}}/T)}\right)\right]-1\bigg]$.

Here $N_{\mathrm{rot},i}$, $\theta_{\mathrm{rot},i}$ and $N_{\mathrm{vib},i}$ are the number of rotations, the number of vibrations and the rotational temperature of a species $i$, respectively; $g_{i,\mathrm{v}}$ and $\theta_{\mathrm{vib},i,\mathrm{v}}$ represent the degeneracy and vibrational temperature of a vibrational mode $\mathrm{v}$ of species $i$. The WalkerIdeal model provides the necessary parameters to use such an equation. However, the morecommonly used approach is through the use of correlations of the ideal isobaric heat capacity, $C_{p,i}^0$, such as the ReidIdeal, WilhoitIdeal and AlyLeeIdeal models. From the ideal isobaric heat capacity, it is possible to determine the ideal Helmholtz free energy using the following equation:

$\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]$

Note that the reference states, $\rho_0$, $H_{0,i}$ and $S_{0,i}$, can typically be neglected as these will not impact or contribute to most thermodynamic properties of interest.

Cubic equations of state

This is the mostpopular class of equations of state. The progenitor of these is the van der Waals (vdW) equation of state, published in 1873, which can be written as:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2a}{V^2}$

where $a$ and $b$ are the model parameters. Although the vdW equation was phenomenological in origin, it, too, can be derived from statistical thermodynamics. Strictly speaking, $b$ accounts for the space taken up by the molecules themselves (it corresponds to the excluded volume per molecule) and $a$ quantifies the magnitude of attraction between species. As a result, the first term is often thought of as accounting for the repulsive interactions between molecules, while the second accounts for attractive interactions. In principle, therefore, one could obtain values of $a$ and $b$ for a particular species from (for example) spectroscopic information. However, since $a$ and $b$ can be related to the critical temperature and pressure of the vdW fluid, to relate the equation of state to a particular species, it is conventional to use the critical temperature and pressure of the species to obtain working values of the parameters.

Unfortunately, although its simple functional form makes calculations quite straightforward, the vdW equation is inadequate for quantitative modelling, particularly for volumetric properties, and is most useful only for providing a qualitative description of the thermodynamic properties of the fluid. As a result, many other engineering cubic equations have been developed, retaining (as far as possible) the simple mathematical form of van der Waals' equation. The first noteworthy one of these is the Redlich–Kwong (RK) equation:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2a}{\sqrt{T}V(V+Nb)}$

There is no physical justification for the change in the second term; its origin is entirely empirical. The authors made the modification so that the equation would provide better gas phase fugacities. This equation was subsequently improved upon by Soave, resulting in the SRK equation of state:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2\alpha(T;\omega)}{V(V+Nb)}$

The $\alpha$ function requires an additional parameter, the acentric factor (or acentricity), which is effectively a measure of the location of the saturation pressure when $T/T_\mathrm{c}=0.7$, where $T_\mathrm{c}$ is the critical temperature. The idea behind this is, if you can capture both the critical point and another point along the vapour–pressure curve, you will improve the accuracy of your equation of state. This is indeed what happened. Although Soave described his equation as a "modified Redlich–Kwong equation", in truth it is more than this. The introduction of the $\alpha$ function represents a giant step forwards; the inclusion of a similar $\alpha$ function is probably the key feature in the equation of Peng and Robinson, who introduced their equation of state (PR) to provide improved liquid-phase volumetric properties. In addition to the inclusion of an $\alpha$ function, Peng and Robinson further revised the attractive term:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2\alpha(T;\omega)}{V^2+2NbV+b^2N^2}$

The SRK and PR equations of state are comparable in performance, although the latter generally provides liquid densities with a greater degree of accuracy, while the former usually provides better fugacities. However, when it comes to modelling complex species such as polymers (macromolecules), or associating species, both equations struggle to perform well. This is unsurprising, since the underlying molecular model remains, in essence, a "van der Waalsian sphere" – in other words,a hard spherical core surrounded by a region of attraction. A more sophisticated molecular model is required to account well for the increased molecular complexities of these species.

Before moving on from cubic equations of state we note that, within Clapeyron, the cubic plus association (CPA) equation of state is supported. A CPA equation is the amalgamation of a cubic equation (usually SRK, as in Clapeyron, or PR) with the association term from the SAFT equation, which we will meet later. Strictly speaking, it is neither a cubic nor a SAFT equation of state but, rather, occupies a middle ground between these two classes of equation.

Something that may be apparent in all these equations is the fact that these are all functions that return the pressure and, thus, must be integrated to obtain the Helmholtz free energy. Like the ideal gas equation, there will be missing temperature and compositional dependencies which need to be included.

Mixtures with cubic equations of state

One may wonder how to model mixtures using such equations. This can be achieved using mixing rules, in conjunction with combining rules. Although there are many variants, one of the more popular mixing rules is the van der Waals one-fluid mixing rule: the mixture is treated as a hypothetical pure fluid, characterised by parameters $\bar{a}$ and $\bar{b}$ that are given by

$\bar{a}=\sum_i\sum_jx_ix_ja_{ij}$

$\bar{b}=\sum_i\sum_jx_ix_jb_{ij}$

When $i=j$, $a$ and $b$ are just the normal van der Waals parameters for the pure. However, when $i\neq j$, these parameter characterise the unlike interactions between $i$ and $j$. We typically need to use combining rules (not to be confused with mixing rules) to determine the unlike parameters. Examples of these include:

$b_{ij}=\frac{b_i+b_j}{2}$

$a_{ij} = (1-k_{ij})\sqrt{a_ia_j}$

where $k_{ij}$ can be set to 0 but, using either more advanced combining rules or regression to experimental data, can be tuned to improve the effectiveness of the combining rule. Further details on this will be given for the SAFT models.

More complicated mixing rules (such as the Wong–Sandler mixing rule) are available and implemented in Clapeyron.

SAFT equations of state

In comparison to the cubic equations of state, equations based on the Statistical Associating Fluid Theory (SAFT) are based on a more theoretical approach, although still can be considered as descendants of van der Waals' equation. As mentioned earlier, the van der Waals equation can be derived from statistical mechanics, whereby the Helmholtz free energy of the van der Waals fluid is obtained as

$\frac{A}{Nk_\mathrm{B}T} = \frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{HS}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{1}}{(Nk_\mathrm{B}T)^2}$;

here the ideal and hard-sphere (HS) terms combine to give the repulsive term (of the pressure form of the equation) whilst the $A_1$ term results in the attractive term. We can see from this that, using the van der Waals equation, species are effectively modelled as hard spheres with dispersive interactions (we sometimes call these London dispersion interactions). The latter two terms can be merged into what is referred to as the monomer or segment term.

Whilst, as already noted, this is clearly a step up from the ideal gas, most species can't be modelled effectively as single spheres; they may be highly non-spherical in shape (as is usually the case with large molecules), or they may experience interactions that are more complex than simple dispersion. A classic example of the latter is water; although the water molecule is small and (at first glance) may appear simple, the behaviour of water is very strongly influenced by hydrogen bonding interactions.

Using Wertheim's TPT1 theory of association, it is possible to model molecules as chains of spheres; the shape of the model molecule can thereby be tailored to represent that of the real molecule far better than a single sphere. Wertheim's TPT1 theory can also be used to account for intermolecular association interactions (such as dipole–dipole interactions, or hydrogen bonding), which are strongly directional. These are described using associations sites that are located on one or more of the spherical segments comprising the chain molecule. This results in the addition of two extra contributions to the Helmholtz free energy (note that the HS and dispersive terms have been merged into a monomer term):

$\frac{A}{Nk_\mathrm{B}T} = \frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{mono.}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{chain}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{assoc.}}{Nk_\mathrm{B}T}$

The chain term accounts for the formation of chains of spherical segments and is generally expressed as

$\frac{A_\mathrm{chain}}{Nk_\mathrm{B}T}=-\sum_ix_i(m_i-1)\ln{g_{ii}(d_{ii})}$,

where $g_{ii}(r_{ii})$ is the pair distribution function for species $i$ (which carries information about the structure of the fluid; it expresses how likely it is that a segment of species $i$ is present at a distance $r_{ii}$ from another segment of species $i$). Many SAFT equations differ in how this pair distribution function is expressed. We note here the introduction of the Barker–Henderson hard-sphere diameter, $d_{ii}$ which is given (dropping the subscripts for clarity) by

$d = \int_0^\sigma (1-\exp{-\beta\phi(r)})dr$;

here $\phi(r)$ is our effective pair potential and $\beta=1/(k_\mathrm{B}T)$. This effectively gives a temperature dependence to the size of our segment and accounts for our segment becoming softer as temperature rises.

The association term accounts for the highly directional associative interactions (for example, hydrogen bonding). For most SAFT equations of state, it is expressed as:

$\frac{A_\mathrm{assoc.}}{Nk_\mathrm{B}T}=\sum_ix_i\left(\sum_a\left(\ln{X_{i,a}}-\frac{X_{i,a}}{2}\right)+\frac{M_i}{2}\right)$

where $X_{i,a}$ is the fraction of association sites $a$ on species $i$ not bonded to another and $M_i$ is the number of association sites on species $i$. $X_{i,a}$ can be obtained by solving the following system of equations:

$X_{i,a} = (1+\rho\sum_jx_j\sum_bX_{j,b}\Delta_{ij,ab})^{-1}$

An important aspect of the association term is that the above system of equations typically needs to be solved iteratively; this greatly increases the computational cost of the SAFT equations when modelling associating species (compared to modelling non-associating species, for example, or to using cubic equations of state). $\Delta_{ij,ab}$ is the association strength between site $a$ on species $i$ with site $b$ on species $j$; this is also an aspect where SAFT equations usually differ but can all be written generally as

$\Delta_{ij,ab} = F_{ij,ab}K_{ij,ab}I_{ij,ab}$

where $F_{ij,ab}$ is Mayer's function, given by

$F = \exp{-\beta\epsilon^\mathrm{assoc.}}-1$,

where $\epsilon^\mathrm{assoc.}$ is the potential depth of the association interaction. $K$ and $I$ differ between equations but, generally, these represent the length scale of the interaction and the likelihood that the sites are correctly orientated such that they overlap, respectively.

Surprisingly, the monomer term is one of the aspects that most distinguishes the different SAFT equations; no two variants use the same equation. However, in general, the monomer term is composed of more than one term:

$\frac{A_\mathrm{mono.}}{Nk_\mathrm{B}T}=\frac{A_\mathrm{HS}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{1}}{(Nk_\mathrm{B}T)^2}+\frac{A_\mathrm{2}}{(Nk_\mathrm{B}T)^3}+\frac{A_\mathrm{3}}{(Nk_\mathrm{B}T)^4}+...$

This expression is known as a Barker–Henderson perturbative expansion. These terms generally account for the dispersive interactions between segments; the $n^\mathrm{th}$ order term account for interactions between $n$ segments. In most SAFT equations, this expansion is truncated at just the second-order term.

Parameters

Although different SAFT equations use different parameters, most share a common set. These include the parameters that characterise the dispersive interactions (which are usually modelled as pair potentials): the potential depth $\epsilon$ (usually expressed as $\epsilon / k_{\mathrm{B}}$, in Kelvin) and the segment size $\sigma$ (in Angstrom). We point out here that this potential (and its parameters) is not a bare pair potential, which accounts only for the interactions of two species (in vacuum); it is an effective pair potential, which accounts for the effects of other species being around the interacting pair, in some cases quantum effects and, if associative interactions are not modelled separately, account for non-dispersive interactions.

As species can now be modelled as chains of segments, the number of segments, $m$, also becomes a parameter. One thing to point out about this parameter is that it need not be an integer (despite what its name suggests); non-integer values of $m$ can usually be interpreted as segments merging within the chain.

In the case of associating species, SAFT equations usually require a parameter for the potential well depth of the association, $\epsilon^\mathrm{assoc.}$ (analogously to $\epsilon$, this is usually expressed as $\epsilon^\mathrm{assoc.} / k_{\mathrm{B}}$, in Kelvin) and a parameter characterising the length scale of the interaction (either a bonding volume, $\kappa^\mathrm{assoc.}$, usually expressed in Å$^3$, or a length, $r_c^\mathrm{assoc.}$, either in meters or dimensionless (reduced by the segment size)). In the case of the dispersive and associative interaction parameters, there will also be the equivalent parameters characterising unlike interactions between species in a mixture (which can also be obtained from combining rules).

Unfortunately, due to the complex function form of SAFT equations, it is impossible to directly relate these parameters to critical properties, as is done with the engineering cubics. Instead, these parameters are typically obtained by regression using experimental data (typically pure component saturation pressure and saturated liquid density data).

We will next go through each of the variants of the SAFT equation available in Clapeyron and what makes these unique.

Original SAFT

Derived by Chapman et al. (1990), this is the first variant of the SAFT equation of state. This equation can be seen as a `proof of concept' as not many parameters are available (none for mixtures). Nevertheless, a noteworthy feature of this equation is the use of a semi-empirical equation to obtain the hard-sphere diameter that depends on the number of segments of a species (in no other SAFT variant is this done). The hard-sphere pair distribution is used in the chain term; this has a much simpler analytical form than what is chosen for use in some other SAFT equations. The association strength, $\Delta$ is evaluated in a unique way as well:

$\Delta_{ij,ab}=d_{ij}^3g_{ij}^\mathrm{HS}F_{ij,ab}\kappa_{ij,ab}$

where $\kappa_{ij,ab}$ is dimensionless. Unfortunately, the implementation of ogSAFT in Clapeyron cannot yet replicate the figures from the original paper. The reason for this is that the monomer / segment term presented in the paper is not the one used to generate the results. The actual term used is developed by Twu et al. (1980) and we are currently attempting to implement this within Clapeyron but it is not clear, as of yet, how it was implemented within the original equation.

CK‑SAFT

If the SAFT equation derived by Chapman et al. was the prototype, the variant developed by Huang and Radosz (1990) was the first usable SAFT equation, with over 100 pure component parameters and many unlike parameters available. Many of the computationally intensive parts of ogSAFT are simplified in CKSAFT; a simpler equation is used to obtain the hard-sphere diameter, and the monomer term provided within the paper is the correct one. The chain term is identical in the two equations. Similarly, the association strength only has a minor change:

$\Delta_{ij,ab}=\sigma_{ij}^3g_{ij}^\mathrm{HS}F_{ij,ab}\kappa_{ij,ab}$;

this slightly reduces the computational cost. However, the most noteworthy simplification came with the association term. As mentioned earlier, the association fraction needs to be solved for iteratively. However, Huang and Radosz proposed approximations of the association fraction that could be used to solve for the association term explicitly, greatly reducing the computational intensity of these calculations. Our current association solver returns analytic solutions for some simple cases (two sites interacting with each other or one self-interacting site). We also point out that Huang and Radosz introduced the concept of association schemes, which helps classify species based on how they interaction through association.

SAFT‑VR SW

Gil-Villegas et al. (1997) developed a new class of SAFT equations known as SAFT variable range. Here, more emphasis was placed on the potentials used to characterise dispersion interactions, and a new parameter was introduced through the potential shape. Whilst many versions of SAFT‑VR are proposed, each using different underlying potentials, the one that was chosen as the default was SAFT‑VR square-well (SW) with the additional "potential shape parameter" $\lambda$ (characterising the width of the potential well). Within this framework, novel expressions for the monomer and chain terms were proposed, both being based on the SW potential. The association term remained largely unchanged, with the association strength having the most noteworthy modification:

$\Delta_{ij,ab}=g_{ij}^\mathrm{SW}F_{ij,ab}\kappa_{ij,ab}$.

Here, $\kappa_{ij,ab}$ now carries units of volume. Not many parameters are available for this equation of state, primarily being used to model alkanes and perfluoroalkanes. However, compared to most other SAFT variants, SAFT–VR SW has possibly seen the most extensions, having a group-contribution alternative (SAFT–$\gamma$ SW), electrolyte (SAFT–VRE SW) and crossover theory (SAFT‑VRX SW).

soft‑SAFT

Developed by Blas and Vega (2001), whereas the SAFT equations discussed up until now had been based on a hard-sphere reference from which to build the equation of state, in soft‑SAFT a Lennard-Jones reference is used instead. Because of this, compared to all other SAFT equations, soft‑SAFT relies heavily on correlations obtained from molecular dynamics simulations to obtain the monomer term, pair distribution function and association strength. Like SAFT‑VR SW, soft‑SAFT does not have an extensive database of parameters, but has been extended multiple times (crossover theory being the more noteworthy extension).

PC‑SAFT

Possibly the most popular variant of the SAFT equation, Perturbed-Chain (not polymer-chain) SAFT was developed by Gross and Sadowski (2001) and, like soft‑SAFT, a different reference state is chosen, as compared with previous SAFT equations. This time, we start from the hard-chain (HC), not the hard-sphere, expressing the SAFT equation as:

$\frac{A}{Nk_\mathrm{B}T} = \frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{HC}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{disp.}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{assoc.}}{Nk_\mathrm{B}T}$

This isn't as significant a change as one might initially think as, effectively, the hard-sphere and chain terms (which uses a hard-sphere pair distribution function like CK‑SAFT) are combined into the hard-chain term. The dispersion term is then simply another correlation, only this time depending on the number of segments as well. It carries many similarities with CK‑SAFT, using the same expression for the hard-sphere diameter, pair distribution function and association term.

The primary reasons behind PC‑SAFT's popularity are threefold. For one, the code for PC‑SAFT is available open-source. Secondly, there is an abundance of parameters available (over 250), including unlike parameters. Finally, many variants of the PC‑SAFT equation have been developed. These include:

  • Polar PC‑SAFT (PPC‑SAFT)
  • PC‑Polar SAFT (PCP‑SAFT); yes, these are distinct equations
  • Electrolyte PC‑SAFT (ePC‑SAFT)
  • Electrolyte PPC‑SAFT (ePPC‑SAFT)
  • Polyelectrolyte ePC‑SAFT (epPC‑SAFT)
  • Critical-point based PC‑SAFT (CP‑PC‑SAFT)
  • Critical-point based PPC‑SAFT (CP‑PPC‑SAFT)
  • Group-contribution PC‑SAFT (GC‑PC‑SAFT)
  • Group-contribution PPC‑SAFT (GC‑PPC‑SAFT)

We will aim to provide some of these variants at a later date.

sPC‑SAFT

Known as the simplified PC‑SAFT equation (developed by Von Solms et al. (2003)). Here, the only modifications are to the hard-chain and association terms where, instead of using the generalised expressions for the hard-sphere term and hard-sphere pair distribution function, by averaging the hard-sphere diameter (effectively treating mixtures as being made up of identically sized segments), the pure component versions of these properties are used instead. The benefit of this is that pure component parameters determined for PC‑SAFT can still be used here, and only the unlike parameters need to be modified.

Similar to PC‑SAFT, variants of the sPC‑SAFT equation also exist, although nowhere near as extensive. Most notably, a significant group-contribution method is available.

SAFT‑VR Mie

One of the most novel SAFT equations of state, derived by Lafitte et al. (2013), this equation is effectively an extension of the SAFT‑VR framework developed by Gil-Villegas et al. (1997), with further improvements. First of these is extending the Barker–Henderson perturbative expansion to third order instead of second order:

$\frac{A_\mathrm{mono.}}{Nk_\mathrm{B}T}=\frac{A_\mathrm{HS}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{1}}{(Nk_\mathrm{B}T)^2}+\frac{A_\mathrm{2}}{(Nk_\mathrm{B}T)^3}+\frac{A_\mathrm{3}}{(Nk_\mathrm{B}T)^4}$

We do point out that, whilst the first two terms are developed following the SAFT‑VR framework, the third-order term is more akin to a correlation regressed using molecular dynamics simulation data for Mie fluids. This third-order term resulted in significant improvements in the modelling of properties near the critical point (without using cross-over theory). The chain term also received further improvements as a result. This is also the only SAFT equation in which the hard-sphere diameter is evaluated analytically, although numerical approximations are needed (we note that the original SAFT‑VR Mie equation used 10-point Gauss–Legendre quadrature, whilst the newer version uses 5-point Gauss–Laguerre quadrature). The Clapeyron.jl implementation of the hard-sphere diameter uses a mixed approach, using 10-point Gauss–Laguerre quadrature for low reduced temperatures (T/ε) and a 10-point Gauss–Legendre integration with a cutoff radius for high temperatures.

However, three different versions of the association strength have been developed:

  • Hard-sphere kernel:

    $\Delta_{ij,ab}=\sigma_{ij}^3g_{ij}^\mathrm{HS}F_{ij,ab}K_{ij,ab}$

  • Lennard-Jones kernel:

    $\Delta_{ij,ab}=F_{ij,ab}K_{ij,ab}I_{ij,ab}(\epsilon_{ij},\sigma_{ij})$

  • Mie kernel:

    $\Delta_{ij,ab}=F_{ij,ab}K_{ij,ab}I_{ij,ab}(\epsilon_{ij},\sigma_{ij},\lambda_{ij})$

Unfortunately, it seems that there have been inconsistencies between which of these kernels is used in different publications. In the current 'default' SAFT‑VR Mie equation the Lennard-Jones kernel is used; as such, this is the one used in Clapeyron. The Mie kernel is available with the SAFTVRMie15 equation of state.

As a Mie potential is characterised by two shape parameters, $\lambda_\mathrm{a}$ (characterising the attractive part) and $\lambda_\mathrm{r}$ (characterising the repulsive part), both of these have become parameters for each species (although $\lambda_\mathrm{a}$ is usually set to 6). As we have different association terms, we also have different sets of parameters where the only difference is the length scale. In the Lennard-Jones and Mie kernels, $K_{ij,ab}$ is the 'bonding volume', whereas, in the hard-sphere kernel, it is a 'bonding length', $r_{ij,ab}^c$.

The SAFT‑VR Mie does not have a significantly large repository of parameters (compensated by its group-contribution variant) and has only been extended to electrolytes (SAFT‑VRE Mie and eSAFT‑VR Mie).

SAFT‑VRQ Mie

A very recent extension of the SAFT‑VR Mie equation is the SAFT‑VRQ Mie equation developed by Aasen et al. (2019) in which the underlying Mie potential is modified using a Feynman–Hibbs potential, which means that a single species is represented by a sum of three Mie potentials. This method attempts to classically account for quantum effects present in small species such as helium, hydrogen and neon. Unfortunately, this equation is limited to just the monomer term and, even then, it is very computationally intensive.

SAFT‑$\gamma$ Mie

The group-contribution version of SAFT‑VR Mie, developed by Papaioannou et al. (2014), the SAFT‑$\gamma$ Mie equation rests on the same general framework as SAFT‑VR Mie, although, as it is a group-contribution method, we are able to model heterogeneous chains (in SAFT equations discussed previously, all segments in a chain were the same size). The group‑contribution methodology is based on that developed by Lymperiadis et al. (2008). An interesting aesthetic change is with the number of segments where this is now separated into the shape factor, $S$, and the number of segments $v^*$. The latter must now be an integer and the former is a direct measure of how 'fused' the segments are. Approximately 60 groups are currently available for this equation. A noteworthy advantage of using groups is that unlike parameters between groups can be estimated from pure component data; these can then be readily extended to mixtures without further regression.

This equation has also been extended to electrolytes through SAFT‑$\gamma$E Mie.

Methods

The problem

The aim of this document is to outline all of the various tools used to obtain the relevant properties from a SAFT-type equation of state. In short, SAFT equations of state provide the Helmholtz free energy of a system at a given composition $\mathbf{z}$, volume $V$ and temperature $T$:

$A=A(\mathbf{z},V,T)$

Taking derivatives of this function (within the Clapeyron module, this is done using automatic differentiation) can give us a wide range of properties which are given in the appendix. However, it is more common that we are interested in the state of a system at certain conditions ($\mathbf{z}_0$, $p_0$ , $T_0$). The answer to this can be determined from the following, deceptively simple, minimisation of the Gibbs free energy:

$\min G(\mathbf{z}_0,p_0,T_0)$

In the case of SAFT-type equations of state, this can be expressed as:

$\min A(\mathbf{z}_0,V,T_0)+p_0V$

What isn't obvious in this formulation of the problem is how to identify the variables that are to be optimised. Re-expressing this problem in greater detail:

$\min \sum_{i=1}^{n_\mathrm{phase}}\phi_i(A(\mathbf{z}_i,V_i,T_0)+p_0V_i)$

$\mathrm{s.t.} \left(\sum_{i=1}^{n_\mathrm{phases}}\phi_iz_{j,i}\right)-z_{j,0}=0\quad\forall j \in [1,n_\mathrm{species}]$

where the subscript $i$ denotes properties related to a phase $i$, and $\phi_i$ is the molar fraction of phase $i$. One can already see the difficulties behind solving such a problem as we do not often know beforehand how many phases there may be at the conditions ($\mathbf{z}_0$, $p_0$ , $T_0$) and thus, we won't know which variables to optimise. In addition, we will want the global minimum and, particularly in systems with many components, there may be many local minima that we will need to eliminate.

Nevertheless, if we know certain things about the system beforehand, we can reduce the problem to one that is easier to solve.

Volume solvers

Let us make one simplifying assumption: we know that the system exists in a single phase. This greatly simplifies the problem to:

$\min_V A(\mathbf{z}_0,V,T_0)+p_0V$

where, as there is no phase split, the only variable we need to optimise is the volume. We can see that this is equivalent to solving for the volume at which the pressure predicted by the equation of state equals $p_0$:

$\min_V A(\mathbf{z}_0,V,T_0)+p_0V\rightarrow\frac{\partial }{\partial V}(A(\mathbf{z}_0,V,T_0)+p_0V)=\frac{\partial A}{\partial V}(\mathbf{z}_0,V,T_0)+p_0=-p(\mathbf{z}_0,V,T_0)+p_0=0$

Effectively, we can reword this as a root-finding problem. One slight issue with this is that there is often more than one root (there can actually be up to five, even in SAFT-type equations). The true root will be the one that minimises the Gibbs free energy; thus we must first find the candidate phases and determine their Gibbs free energy before reporting the volume.

For the cubics, this problem is quite straightforward given that (as the name suggests) all these equations can be rearranged as a cubic equation in $V$:

$p_0=\frac{RT_0}{V-b}-\frac{a}{(V-c_1)(V-c_2)}\rightarrow a_0+a_1V+a_2V^2+a_3V^3=0$.

Thus, it is very easy to solve for all the roots in a cubic using analytical expressions. However, for other equations of state, we must use non-linear root-finding algorithms. In order to avoid the unstable phases, we try to use initial guesses close to what will be the 'true' phases:

  1. Vapour: Since we can use automatic differentiation to obtain the virial coefficient for any model, we can actually obtain an initial guess extremely close to the final solution using

    $\frac{p_0}{RT_0} = \frac{n_0}{V}+\frac{n_0}{V^2}B(T)\rightarrow V_0=\frac{RT_0}{p_0}\frac{-1+\sqrt{1+4p_0B(T_0)/(RT_0)}}{2}$.

  2. Liquid: The best we can do here is to obtain the volume corresponding to a large packing fraction (we typically pick 0.6 to 0.8):

    $V_0 = \frac{N_\mathrm{A}\pi}{6\times 0.8}m\sigma^3$.

    We are still looking for ways to improve this but the volume function is quite reliable as of now.

One other issue to consider when solving this problem is that, within the liquid phase, the gradients are very large; this can be difficult for algorithms to handle (even when providing the exact derivatives through automatic differentiation). We try to reduce magnitude of these derivatives by solving for the logarithm of the volume instead.

+- · Clapeyron.jl

Models

Here, we give a high-level description of equations of state and the models provided by Clapeyron.

Equations of state

An equation of state is a functional form, $f$ (say), that allows us to obtain a thermodynamic property, $F$, at given conditions $\boldsymbol{\Omega}$:

$F = f(\boldsymbol{\Omega};\boldsymbol{\Xi})$.

There are many ways one can develop an equation of state, however, these must respect the constraints on the number of properties we can specify, as required by the Gibbs Phase Rule:

$\mathrm{DoF} = N_\mathrm{species} - N_\mathrm{phase} + 2$

Here, $\mathrm{DoF}$ means "Degrees of Freedom"; this is the number of so-called intensive state properties (or, in other words, those that are independent of system size) that we can specify. As we can see, the largest number of degrees of freedom we can have is $N_\mathrm{species}+1$; system size itself is not included so, in practice, this represents one more variable that we can specify, giving $N_\mathrm{species}+2$. Thus, taking the simple case of a single species, we can specify at most three conditions in our system. For a traditional equation of state, we specify volume, $V$, temperature, $T$, and the size of the system – for example the number of particles, $N$, or moles, $n$; the equation of state then returns the pressure, $p$. Many modern equations of state are derived using what is known as the canonical ensemble (more information can be found in Statistical Mechanics textbooks) and, accordingly, the three variable chosen are again usually $T$, $V$ and $N$; the output of these equations is usually the Helmholtz free energy, $A$.

Many equations of state are based on an underlying molecular model. Consequently, it is also typical for an equation of state to require parameters, $\boldsymbol{\Xi}$, to model certain species. The nature of these parameters depends on the equation of state.

Ideal gas equation of state

One equation of state that most engineers and scientists should be very familiar with is the ideal gas equation, commonly expressed as:

$pV = Nk_\mathrm{B}T$

where $p$ is the pressure, $N$ is the total number of particles and $k_\mathrm{B}$ is the Boltzmann constant. Ideal gas molecules are "invisible" to each other; there is zero interaction between ideal gas molecules (this is, in essence, the ideal gas model), so you can think of them as being infinitely small. This equation was first written down (although in slightly different form) in 1834 by Émile Clapeyron (in whose honour Clapeyron is named). Most (if not all) subsequent equations of state are descended from Clapeyron's equation, which is surprisingly appropriate for a wide variety of species in the gas phase at high enough temperature and low enough pressure.

Unfortunately, if we wish to determine other thermodynamic properties this equation is a little inconvenient. It would be much easier if it was expressed in the form of the free energy, from which other properties can then be evaluated using standard thermodynamic relationships. Accordingly, we could first integrate the above equation with respect to volume to determine the Helmholtz free energy:

$A_\mathrm{ideal} =- \int p\,dV =- Nk_\mathrm{B}T\ln{V}+c(T,N)$

This is still a little inconvenient, however, since we have to deal with a tricky constant of integration. Fortunately, we can instead derive $A_\mathrm{ideal}$ from statistical mechanics (using just a few well-known results from quantum mechanics). Following this route, we obtain (for a pure component (i.e., a single species))

$\frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T} = \ln{(\rho\Lambda^3)}-1$,

where $\rho = N/V$ is the number density, and $\Lambda$ is the thermal de Broglie wavelength, which introduces the kinetic contributions to the free energy (strictly speaking, with this notation only translations are included). We can generalise this as a sum over species $i$ for a multi-component mixture:

$\frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T} = \left(\sum_ix_i\ln{(\rho_i\Lambda_i^3)}\right)-1$,

where $x_i$ is the molar composition, and the subscript denote that the variable so decorated relates to species $i$. This equation represents the MonomerIdeal form in Clapeyron. For the purposes of vapour–liquid equilibrium properties, one can even ignore $\Lambda_i$ (since it cancels out in solving the phase equilibrium); we therefore use this as the default BasicIdeal model.

The kinetic energy of polyatomic species includes contributions from vibrational and rotational modes of motion, as well as translational; we must also account for these in the ideal free energy. The statistical–mechanical derivation of the ideal free energy becomes a little more complicated but can still be done, resulting in the following expression:

$\frac{A_{\mathrm{ideal}}}{Nk_{\mathrm{B}}T}=\sum_{i}x_{i}\bigg[\ln\left(\rho_{i}\Lambda_{i}^{3}\right)-\frac{N_{\mathrm{rot},i}}{2} \ln \frac{T}{\theta_{\mathrm{rot},i}}+\sum^{N_{\mathrm{vib},i}}_{\mathrm{v}}g_{i,\mathrm{v}}\left[\frac{\theta_{\mathrm{vib},i,\mathrm{v}}}{2T}+\ln\left(1-\exp{-(\theta_{\mathrm{vib},i,\mathrm{v}}/T)}\right)\right]-1\bigg]$.

Here $N_{\mathrm{rot},i}$, $\theta_{\mathrm{rot},i}$ and $N_{\mathrm{vib},i}$ are the number of rotations, the number of vibrations and the rotational temperature of a species $i$, respectively; $g_{i,\mathrm{v}}$ and $\theta_{\mathrm{vib},i,\mathrm{v}}$ represent the degeneracy and vibrational temperature of a vibrational mode $\mathrm{v}$ of species $i$. The WalkerIdeal model provides the necessary parameters to use such an equation. However, the morecommonly used approach is through the use of correlations of the ideal isobaric heat capacity, $C_{p,i}^0$, such as the ReidIdeal, WilhoitIdeal and AlyLeeIdeal models. From the ideal isobaric heat capacity, it is possible to determine the ideal Helmholtz free energy using the following equation:

$\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]$

Note that the reference states, $\rho_0$, $H_{0,i}$ and $S_{0,i}$, can typically be neglected as these will not impact or contribute to most thermodynamic properties of interest.

Cubic equations of state

This is the mostpopular class of equations of state. The progenitor of these is the van der Waals (vdW) equation of state, published in 1873, which can be written as:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2a}{V^2}$

where $a$ and $b$ are the model parameters. Although the vdW equation was phenomenological in origin, it, too, can be derived from statistical thermodynamics. Strictly speaking, $b$ accounts for the space taken up by the molecules themselves (it corresponds to the excluded volume per molecule) and $a$ quantifies the magnitude of attraction between species. As a result, the first term is often thought of as accounting for the repulsive interactions between molecules, while the second accounts for attractive interactions. In principle, therefore, one could obtain values of $a$ and $b$ for a particular species from (for example) spectroscopic information. However, since $a$ and $b$ can be related to the critical temperature and pressure of the vdW fluid, to relate the equation of state to a particular species, it is conventional to use the critical temperature and pressure of the species to obtain working values of the parameters.

Unfortunately, although its simple functional form makes calculations quite straightforward, the vdW equation is inadequate for quantitative modelling, particularly for volumetric properties, and is most useful only for providing a qualitative description of the thermodynamic properties of the fluid. As a result, many other engineering cubic equations have been developed, retaining (as far as possible) the simple mathematical form of van der Waals' equation. The first noteworthy one of these is the Redlich–Kwong (RK) equation:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2a}{\sqrt{T}V(V+Nb)}$

There is no physical justification for the change in the second term; its origin is entirely empirical. The authors made the modification so that the equation would provide better gas phase fugacities. This equation was subsequently improved upon by Soave, resulting in the SRK equation of state:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2\alpha(T;\omega)}{V(V+Nb)}$

The $\alpha$ function requires an additional parameter, the acentric factor (or acentricity), which is effectively a measure of the location of the saturation pressure when $T/T_\mathrm{c}=0.7$, where $T_\mathrm{c}$ is the critical temperature. The idea behind this is, if you can capture both the critical point and another point along the vapour–pressure curve, you will improve the accuracy of your equation of state. This is indeed what happened. Although Soave described his equation as a "modified Redlich–Kwong equation", in truth it is more than this. The introduction of the $\alpha$ function represents a giant step forwards; the inclusion of a similar $\alpha$ function is probably the key feature in the equation of Peng and Robinson, who introduced their equation of state (PR) to provide improved liquid-phase volumetric properties. In addition to the inclusion of an $\alpha$ function, Peng and Robinson further revised the attractive term:

$p = \frac{Nk_\mathrm{B}T}{V-Nb}-\frac{N^2\alpha(T;\omega)}{V^2+2NbV+b^2N^2}$

The SRK and PR equations of state are comparable in performance, although the latter generally provides liquid densities with a greater degree of accuracy, while the former usually provides better fugacities. However, when it comes to modelling complex species such as polymers (macromolecules), or associating species, both equations struggle to perform well. This is unsurprising, since the underlying molecular model remains, in essence, a "van der Waalsian sphere" – in other words,a hard spherical core surrounded by a region of attraction. A more sophisticated molecular model is required to account well for the increased molecular complexities of these species.

Before moving on from cubic equations of state we note that, within Clapeyron, the cubic plus association (CPA) equation of state is supported. A CPA equation is the amalgamation of a cubic equation (usually SRK, as in Clapeyron, or PR) with the association term from the SAFT equation, which we will meet later. Strictly speaking, it is neither a cubic nor a SAFT equation of state but, rather, occupies a middle ground between these two classes of equation.

Something that may be apparent in all these equations is the fact that these are all functions that return the pressure and, thus, must be integrated to obtain the Helmholtz free energy. Like the ideal gas equation, there will be missing temperature and compositional dependencies which need to be included.

Mixtures with cubic equations of state

One may wonder how to model mixtures using such equations. This can be achieved using mixing rules, in conjunction with combining rules. Although there are many variants, one of the more popular mixing rules is the van der Waals one-fluid mixing rule: the mixture is treated as a hypothetical pure fluid, characterised by parameters $\bar{a}$ and $\bar{b}$ that are given by

$\bar{a}=\sum_i\sum_jx_ix_ja_{ij}$

$\bar{b}=\sum_i\sum_jx_ix_jb_{ij}$

When $i=j$, $a$ and $b$ are just the normal van der Waals parameters for the pure. However, when $i\neq j$, these parameter characterise the unlike interactions between $i$ and $j$. We typically need to use combining rules (not to be confused with mixing rules) to determine the unlike parameters. Examples of these include:

$b_{ij}=\frac{b_i+b_j}{2}$

$a_{ij} = (1-k_{ij})\sqrt{a_ia_j}$

where $k_{ij}$ can be set to 0 but, using either more advanced combining rules or regression to experimental data, can be tuned to improve the effectiveness of the combining rule. Further details on this will be given for the SAFT models.

More complicated mixing rules (such as the Wong–Sandler mixing rule) are available and implemented in Clapeyron.

SAFT equations of state

In comparison to the cubic equations of state, equations based on the Statistical Associating Fluid Theory (SAFT) are based on a more theoretical approach, although still can be considered as descendants of van der Waals' equation. As mentioned earlier, the van der Waals equation can be derived from statistical mechanics, whereby the Helmholtz free energy of the van der Waals fluid is obtained as

$\frac{A}{Nk_\mathrm{B}T} = \frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{HS}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{1}}{(Nk_\mathrm{B}T)^2}$;

here the ideal and hard-sphere (HS) terms combine to give the repulsive term (of the pressure form of the equation) whilst the $A_1$ term results in the attractive term. We can see from this that, using the van der Waals equation, species are effectively modelled as hard spheres with dispersive interactions (we sometimes call these London dispersion interactions). The latter two terms can be merged into what is referred to as the monomer or segment term.

Whilst, as already noted, this is clearly a step up from the ideal gas, most species can't be modelled effectively as single spheres; they may be highly non-spherical in shape (as is usually the case with large molecules), or they may experience interactions that are more complex than simple dispersion. A classic example of the latter is water; although the water molecule is small and (at first glance) may appear simple, the behaviour of water is very strongly influenced by hydrogen bonding interactions.

Using Wertheim's TPT1 theory of association, it is possible to model molecules as chains of spheres; the shape of the model molecule can thereby be tailored to represent that of the real molecule far better than a single sphere. Wertheim's TPT1 theory can also be used to account for intermolecular association interactions (such as dipole–dipole interactions, or hydrogen bonding), which are strongly directional. These are described using associations sites that are located on one or more of the spherical segments comprising the chain molecule. This results in the addition of two extra contributions to the Helmholtz free energy (note that the HS and dispersive terms have been merged into a monomer term):

$\frac{A}{Nk_\mathrm{B}T} = \frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{mono.}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{chain}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{assoc.}}{Nk_\mathrm{B}T}$

The chain term accounts for the formation of chains of spherical segments and is generally expressed as

$\frac{A_\mathrm{chain}}{Nk_\mathrm{B}T}=-\sum_ix_i(m_i-1)\ln{g_{ii}(d_{ii})}$,

where $g_{ii}(r_{ii})$ is the pair distribution function for species $i$ (which carries information about the structure of the fluid; it expresses how likely it is that a segment of species $i$ is present at a distance $r_{ii}$ from another segment of species $i$). Many SAFT equations differ in how this pair distribution function is expressed. We note here the introduction of the Barker–Henderson hard-sphere diameter, $d_{ii}$ which is given (dropping the subscripts for clarity) by

$d = \int_0^\sigma (1-\exp{-\beta\phi(r)})dr$;

here $\phi(r)$ is our effective pair potential and $\beta=1/(k_\mathrm{B}T)$. This effectively gives a temperature dependence to the size of our segment and accounts for our segment becoming softer as temperature rises.

The association term accounts for the highly directional associative interactions (for example, hydrogen bonding). For most SAFT equations of state, it is expressed as:

$\frac{A_\mathrm{assoc.}}{Nk_\mathrm{B}T}=\sum_ix_i\left(\sum_a\left(\ln{X_{i,a}}-\frac{X_{i,a}}{2}\right)+\frac{M_i}{2}\right)$

where $X_{i,a}$ is the fraction of association sites $a$ on species $i$ not bonded to another and $M_i$ is the number of association sites on species $i$. $X_{i,a}$ can be obtained by solving the following system of equations:

$X_{i,a} = (1+\rho\sum_jx_j\sum_bX_{j,b}\Delta_{ij,ab})^{-1}$

An important aspect of the association term is that the above system of equations typically needs to be solved iteratively; this greatly increases the computational cost of the SAFT equations when modelling associating species (compared to modelling non-associating species, for example, or to using cubic equations of state). $\Delta_{ij,ab}$ is the association strength between site $a$ on species $i$ with site $b$ on species $j$; this is also an aspect where SAFT equations usually differ but can all be written generally as

$\Delta_{ij,ab} = F_{ij,ab}K_{ij,ab}I_{ij,ab}$

where $F_{ij,ab}$ is Mayer's function, given by

$F = \exp{-\beta\epsilon^\mathrm{assoc.}}-1$,

where $\epsilon^\mathrm{assoc.}$ is the potential depth of the association interaction. $K$ and $I$ differ between equations but, generally, these represent the length scale of the interaction and the likelihood that the sites are correctly orientated such that they overlap, respectively.

Surprisingly, the monomer term is one of the aspects that most distinguishes the different SAFT equations; no two variants use the same equation. However, in general, the monomer term is composed of more than one term:

$\frac{A_\mathrm{mono.}}{Nk_\mathrm{B}T}=\frac{A_\mathrm{HS}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{1}}{(Nk_\mathrm{B}T)^2}+\frac{A_\mathrm{2}}{(Nk_\mathrm{B}T)^3}+\frac{A_\mathrm{3}}{(Nk_\mathrm{B}T)^4}+...$

This expression is known as a Barker–Henderson perturbative expansion. These terms generally account for the dispersive interactions between segments; the $n^\mathrm{th}$ order term account for interactions between $n$ segments. In most SAFT equations, this expansion is truncated at just the second-order term.

Parameters

Although different SAFT equations use different parameters, most share a common set. These include the parameters that characterise the dispersive interactions (which are usually modelled as pair potentials): the potential depth $\epsilon$ (usually expressed as $\epsilon / k_{\mathrm{B}}$, in Kelvin) and the segment size $\sigma$ (in Angstrom). We point out here that this potential (and its parameters) is not a bare pair potential, which accounts only for the interactions of two species (in vacuum); it is an effective pair potential, which accounts for the effects of other species being around the interacting pair, in some cases quantum effects and, if associative interactions are not modelled separately, account for non-dispersive interactions.

As species can now be modelled as chains of segments, the number of segments, $m$, also becomes a parameter. One thing to point out about this parameter is that it need not be an integer (despite what its name suggests); non-integer values of $m$ can usually be interpreted as segments merging within the chain.

In the case of associating species, SAFT equations usually require a parameter for the potential well depth of the association, $\epsilon^\mathrm{assoc.}$ (analogously to $\epsilon$, this is usually expressed as $\epsilon^\mathrm{assoc.} / k_{\mathrm{B}}$, in Kelvin) and a parameter characterising the length scale of the interaction (either a bonding volume, $\kappa^\mathrm{assoc.}$, usually expressed in Å$^3$, or a length, $r_c^\mathrm{assoc.}$, either in meters or dimensionless (reduced by the segment size)). In the case of the dispersive and associative interaction parameters, there will also be the equivalent parameters characterising unlike interactions between species in a mixture (which can also be obtained from combining rules).

Unfortunately, due to the complex function form of SAFT equations, it is impossible to directly relate these parameters to critical properties, as is done with the engineering cubics. Instead, these parameters are typically obtained by regression using experimental data (typically pure component saturation pressure and saturated liquid density data).

We will next go through each of the variants of the SAFT equation available in Clapeyron and what makes these unique.

Original SAFT

Derived by Chapman et al. (1990), this is the first variant of the SAFT equation of state. This equation can be seen as a `proof of concept' as not many parameters are available (none for mixtures). Nevertheless, a noteworthy feature of this equation is the use of a semi-empirical equation to obtain the hard-sphere diameter that depends on the number of segments of a species (in no other SAFT variant is this done). The hard-sphere pair distribution is used in the chain term; this has a much simpler analytical form than what is chosen for use in some other SAFT equations. The association strength, $\Delta$ is evaluated in a unique way as well:

$\Delta_{ij,ab}=d_{ij}^3g_{ij}^\mathrm{HS}F_{ij,ab}\kappa_{ij,ab}$

where $\kappa_{ij,ab}$ is dimensionless. Unfortunately, the implementation of ogSAFT in Clapeyron cannot yet replicate the figures from the original paper. The reason for this is that the monomer / segment term presented in the paper is not the one used to generate the results. The actual term used is developed by Twu et al. (1980) and we are currently attempting to implement this within Clapeyron but it is not clear, as of yet, how it was implemented within the original equation.

CK‑SAFT

If the SAFT equation derived by Chapman et al. was the prototype, the variant developed by Huang and Radosz (1990) was the first usable SAFT equation, with over 100 pure component parameters and many unlike parameters available. Many of the computationally intensive parts of ogSAFT are simplified in CKSAFT; a simpler equation is used to obtain the hard-sphere diameter, and the monomer term provided within the paper is the correct one. The chain term is identical in the two equations. Similarly, the association strength only has a minor change:

$\Delta_{ij,ab}=\sigma_{ij}^3g_{ij}^\mathrm{HS}F_{ij,ab}\kappa_{ij,ab}$;

this slightly reduces the computational cost. However, the most noteworthy simplification came with the association term. As mentioned earlier, the association fraction needs to be solved for iteratively. However, Huang and Radosz proposed approximations of the association fraction that could be used to solve for the association term explicitly, greatly reducing the computational intensity of these calculations. Our current association solver returns analytic solutions for some simple cases (two sites interacting with each other or one self-interacting site). We also point out that Huang and Radosz introduced the concept of association schemes, which helps classify species based on how they interaction through association.

SAFT‑VR SW

Gil-Villegas et al. (1997) developed a new class of SAFT equations known as SAFT variable range. Here, more emphasis was placed on the potentials used to characterise dispersion interactions, and a new parameter was introduced through the potential shape. Whilst many versions of SAFT‑VR are proposed, each using different underlying potentials, the one that was chosen as the default was SAFT‑VR square-well (SW) with the additional "potential shape parameter" $\lambda$ (characterising the width of the potential well). Within this framework, novel expressions for the monomer and chain terms were proposed, both being based on the SW potential. The association term remained largely unchanged, with the association strength having the most noteworthy modification:

$\Delta_{ij,ab}=g_{ij}^\mathrm{SW}F_{ij,ab}\kappa_{ij,ab}$.

Here, $\kappa_{ij,ab}$ now carries units of volume. Not many parameters are available for this equation of state, primarily being used to model alkanes and perfluoroalkanes. However, compared to most other SAFT variants, SAFT–VR SW has possibly seen the most extensions, having a group-contribution alternative (SAFT–$\gamma$ SW), electrolyte (SAFT–VRE SW) and crossover theory (SAFT‑VRX SW).

soft‑SAFT

Developed by Blas and Vega (2001), whereas the SAFT equations discussed up until now had been based on a hard-sphere reference from which to build the equation of state, in soft‑SAFT a Lennard-Jones reference is used instead. Because of this, compared to all other SAFT equations, soft‑SAFT relies heavily on correlations obtained from molecular dynamics simulations to obtain the monomer term, pair distribution function and association strength. Like SAFT‑VR SW, soft‑SAFT does not have an extensive database of parameters, but has been extended multiple times (crossover theory being the more noteworthy extension).

PC‑SAFT

Possibly the most popular variant of the SAFT equation, Perturbed-Chain (not polymer-chain) SAFT was developed by Gross and Sadowski (2001) and, like soft‑SAFT, a different reference state is chosen, as compared with previous SAFT equations. This time, we start from the hard-chain (HC), not the hard-sphere, expressing the SAFT equation as:

$\frac{A}{Nk_\mathrm{B}T} = \frac{A_\mathrm{ideal}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{HC}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{disp.}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{assoc.}}{Nk_\mathrm{B}T}$

This isn't as significant a change as one might initially think as, effectively, the hard-sphere and chain terms (which uses a hard-sphere pair distribution function like CK‑SAFT) are combined into the hard-chain term. The dispersion term is then simply another correlation, only this time depending on the number of segments as well. It carries many similarities with CK‑SAFT, using the same expression for the hard-sphere diameter, pair distribution function and association term.

The primary reasons behind PC‑SAFT's popularity are threefold. For one, the code for PC‑SAFT is available open-source. Secondly, there is an abundance of parameters available (over 250), including unlike parameters. Finally, many variants of the PC‑SAFT equation have been developed. These include:

  • Polar PC‑SAFT (PPC‑SAFT)
  • PC‑Polar SAFT (PCP‑SAFT); yes, these are distinct equations
  • Electrolyte PC‑SAFT (ePC‑SAFT)
  • Electrolyte PPC‑SAFT (ePPC‑SAFT)
  • Polyelectrolyte ePC‑SAFT (epPC‑SAFT)
  • Critical-point based PC‑SAFT (CP‑PC‑SAFT)
  • Critical-point based PPC‑SAFT (CP‑PPC‑SAFT)
  • Group-contribution PC‑SAFT (GC‑PC‑SAFT)
  • Group-contribution PPC‑SAFT (GC‑PPC‑SAFT)

We will aim to provide some of these variants at a later date.

sPC‑SAFT

Known as the simplified PC‑SAFT equation (developed by Von Solms et al. (2003)). Here, the only modifications are to the hard-chain and association terms where, instead of using the generalised expressions for the hard-sphere term and hard-sphere pair distribution function, by averaging the hard-sphere diameter (effectively treating mixtures as being made up of identically sized segments), the pure component versions of these properties are used instead. The benefit of this is that pure component parameters determined for PC‑SAFT can still be used here, and only the unlike parameters need to be modified.

Similar to PC‑SAFT, variants of the sPC‑SAFT equation also exist, although nowhere near as extensive. Most notably, a significant group-contribution method is available.

SAFT‑VR Mie

One of the most novel SAFT equations of state, derived by Lafitte et al. (2013), this equation is effectively an extension of the SAFT‑VR framework developed by Gil-Villegas et al. (1997), with further improvements. First of these is extending the Barker–Henderson perturbative expansion to third order instead of second order:

$\frac{A_\mathrm{mono.}}{Nk_\mathrm{B}T}=\frac{A_\mathrm{HS}}{Nk_\mathrm{B}T}+\frac{A_\mathrm{1}}{(Nk_\mathrm{B}T)^2}+\frac{A_\mathrm{2}}{(Nk_\mathrm{B}T)^3}+\frac{A_\mathrm{3}}{(Nk_\mathrm{B}T)^4}$

We do point out that, whilst the first two terms are developed following the SAFT‑VR framework, the third-order term is more akin to a correlation regressed using molecular dynamics simulation data for Mie fluids. This third-order term resulted in significant improvements in the modelling of properties near the critical point (without using cross-over theory). The chain term also received further improvements as a result. This is also the only SAFT equation in which the hard-sphere diameter is evaluated analytically, although numerical approximations are needed (we note that the original SAFT‑VR Mie equation used 10-point Gauss–Legendre quadrature, whilst the newer version uses 5-point Gauss–Laguerre quadrature). The Clapeyron.jl implementation of the hard-sphere diameter uses a mixed approach, using 10-point Gauss–Laguerre quadrature for low reduced temperatures (T/ε) and a 10-point Gauss–Legendre integration with a cutoff radius for high temperatures.

However, three different versions of the association strength have been developed:

  • Hard-sphere kernel:

    $\Delta_{ij,ab}=\sigma_{ij}^3g_{ij}^\mathrm{HS}F_{ij,ab}K_{ij,ab}$

  • Lennard-Jones kernel:

    $\Delta_{ij,ab}=F_{ij,ab}K_{ij,ab}I_{ij,ab}(\epsilon_{ij},\sigma_{ij})$

  • Mie kernel:

    $\Delta_{ij,ab}=F_{ij,ab}K_{ij,ab}I_{ij,ab}(\epsilon_{ij},\sigma_{ij},\lambda_{ij})$

Unfortunately, it seems that there have been inconsistencies between which of these kernels is used in different publications. In the current 'default' SAFT‑VR Mie equation the Lennard-Jones kernel is used; as such, this is the one used in Clapeyron. The Mie kernel is available with the SAFTVRMie15 equation of state.

As a Mie potential is characterised by two shape parameters, $\lambda_\mathrm{a}$ (characterising the attractive part) and $\lambda_\mathrm{r}$ (characterising the repulsive part), both of these have become parameters for each species (although $\lambda_\mathrm{a}$ is usually set to 6). As we have different association terms, we also have different sets of parameters where the only difference is the length scale. In the Lennard-Jones and Mie kernels, $K_{ij,ab}$ is the 'bonding volume', whereas, in the hard-sphere kernel, it is a 'bonding length', $r_{ij,ab}^c$.

The SAFT‑VR Mie does not have a significantly large repository of parameters (compensated by its group-contribution variant) and has only been extended to electrolytes (SAFT‑VRE Mie and eSAFT‑VR Mie).

SAFT‑VRQ Mie

A very recent extension of the SAFT‑VR Mie equation is the SAFT‑VRQ Mie equation developed by Aasen et al. (2019) in which the underlying Mie potential is modified using a Feynman–Hibbs potential, which means that a single species is represented by a sum of three Mie potentials. This method attempts to classically account for quantum effects present in small species such as helium, hydrogen and neon. Unfortunately, this equation is limited to just the monomer term and, even then, it is very computationally intensive.

SAFT‑$\gamma$ Mie

The group-contribution version of SAFT‑VR Mie, developed by Papaioannou et al. (2014), the SAFT‑$\gamma$ Mie equation rests on the same general framework as SAFT‑VR Mie, although, as it is a group-contribution method, we are able to model heterogeneous chains (in SAFT equations discussed previously, all segments in a chain were the same size). The group‑contribution methodology is based on that developed by Lymperiadis et al. (2008). An interesting aesthetic change is with the number of segments where this is now separated into the shape factor, $S$, and the number of segments $v^*$. The latter must now be an integer and the former is a direct measure of how 'fused' the segments are. Approximately 60 groups are currently available for this equation. A noteworthy advantage of using groups is that unlike parameters between groups can be estimated from pure component data; these can then be readily extended to mixtures without further regression.

This equation has also been extended to electrolytes through SAFT‑$\gamma$E Mie.

Methods

The problem

The aim of this document is to outline all of the various tools used to obtain the relevant properties from a SAFT-type equation of state. In short, SAFT equations of state provide the Helmholtz free energy of a system at a given composition $\mathbf{z}$, volume $V$ and temperature $T$:

$A=A(\mathbf{z},V,T)$

Taking derivatives of this function (within the Clapeyron module, this is done using automatic differentiation) can give us a wide range of properties which are given in the appendix. However, it is more common that we are interested in the state of a system at certain conditions ($\mathbf{z}_0$, $p_0$ , $T_0$). The answer to this can be determined from the following, deceptively simple, minimisation of the Gibbs free energy:

$\min G(\mathbf{z}_0,p_0,T_0)$

In the case of SAFT-type equations of state, this can be expressed as:

$\min A(\mathbf{z}_0,V,T_0)+p_0V$

What isn't obvious in this formulation of the problem is how to identify the variables that are to be optimised. Re-expressing this problem in greater detail:

$\min \sum_{i=1}^{n_\mathrm{phase}}\phi_i(A(\mathbf{z}_i,V_i,T_0)+p_0V_i)$

$\mathrm{s.t.} \left(\sum_{i=1}^{n_\mathrm{phases}}\phi_iz_{j,i}\right)-z_{j,0}=0\quad\forall j \in [1,n_\mathrm{species}]$

where the subscript $i$ denotes properties related to a phase $i$, and $\phi_i$ is the molar fraction of phase $i$. One can already see the difficulties behind solving such a problem as we do not often know beforehand how many phases there may be at the conditions ($\mathbf{z}_0$, $p_0$ , $T_0$) and thus, we won't know which variables to optimise. In addition, we will want the global minimum and, particularly in systems with many components, there may be many local minima that we will need to eliminate.

Nevertheless, if we know certain things about the system beforehand, we can reduce the problem to one that is easier to solve.

Volume solvers

Let us make one simplifying assumption: we know that the system exists in a single phase. This greatly simplifies the problem to:

$\min_V A(\mathbf{z}_0,V,T_0)+p_0V$

where, as there is no phase split, the only variable we need to optimise is the volume. We can see that this is equivalent to solving for the volume at which the pressure predicted by the equation of state equals $p_0$:

$\min_V A(\mathbf{z}_0,V,T_0)+p_0V\rightarrow\frac{\partial }{\partial V}(A(\mathbf{z}_0,V,T_0)+p_0V)=\frac{\partial A}{\partial V}(\mathbf{z}_0,V,T_0)+p_0=-p(\mathbf{z}_0,V,T_0)+p_0=0$

Effectively, we can reword this as a root-finding problem. One slight issue with this is that there is often more than one root (there can actually be up to five, even in SAFT-type equations). The true root will be the one that minimises the Gibbs free energy; thus we must first find the candidate phases and determine their Gibbs free energy before reporting the volume.

For the cubics, this problem is quite straightforward given that (as the name suggests) all these equations can be rearranged as a cubic equation in $V$:

$p_0=\frac{RT_0}{V-b}-\frac{a}{(V-c_1)(V-c_2)}\rightarrow a_0+a_1V+a_2V^2+a_3V^3=0$.

Thus, it is very easy to solve for all the roots in a cubic using analytical expressions. However, for other equations of state, we must use non-linear root-finding algorithms. In order to avoid the unstable phases, we try to use initial guesses close to what will be the 'true' phases:

  1. Vapour: Since we can use automatic differentiation to obtain the virial coefficient for any model, we can actually obtain an initial guess extremely close to the final solution using

    $\frac{p_0}{RT_0} = \frac{n_0}{V}+\frac{n_0}{V^2}B(T)\rightarrow V_0=\frac{RT_0}{p_0}\frac{-1+\sqrt{1+4p_0B(T_0)/(RT_0)}}{2}$.

  2. Liquid: The best we can do here is to obtain the volume corresponding to a large packing fraction (we typically pick 0.6 to 0.8):

    $V_0 = \frac{N_\mathrm{A}\pi}{6\times 0.8}m\sigma^3$.

    We are still looking for ways to improve this but the volume function is quite reliable as of now.

One other issue to consider when solving this problem is that, within the liquid phase, the gradients are very large; this can be difficult for algorithms to handle (even when providing the exact derivatives through automatic differentiation). We try to reduce magnitude of these derivatives by solving for the logarithm of the volume instead.

diff --git a/dev/to-do_list/index.html b/dev/to-do_list/index.html index 5835dd1ee..8574fb5ae 100644 --- a/dev/to-do_list/index.html +++ b/dev/to-do_list/index.html @@ -1,2 +1,2 @@ -To-do list · Clapeyron.jl

Clapeyron to-do list

Clapeyron is developed entirely by three recently graduated chemical engineers in our free time; none of us are experts in writing algorithms but we decided to build this package due to our experience with commercial thermodynamic modelling tools. We will continue developing Clapeyron in our free time but we welcome any contributions you might be willing to make!

The current plans of Clapeyron are:

  • Support more group-contribution (GC) models like SAFT‑$\gamma$ SW and GC versions of PC‑SAFT and CK‑SAFT.
  • Support for more ideal terms (NASA, Wilhoit, etc.).
  • Support for flash calculations, first using Rachford–Rice, and eventually HELD and RAND.
  • Support extensions of the SAFT model (e.g. electrolyte methods and dipole terms).
  • Make our code the fastest available. Julia makes this easy.
+To-do list · Clapeyron.jl

Clapeyron to-do list

Clapeyron is developed entirely by three recently graduated chemical engineers in our free time; none of us are experts in writing algorithms but we decided to build this package due to our experience with commercial thermodynamic modelling tools. We will continue developing Clapeyron in our free time but we welcome any contributions you might be willing to make!

The current plans of Clapeyron are:

  • Support more group-contribution (GC) models like SAFT‑$\gamma$ SW and GC versions of PC‑SAFT and CK‑SAFT.
  • Support for more ideal terms (NASA, Wilhoit, etc.).
  • Support for flash calculations, first using Rachford–Rice, and eventually HELD and RAND.
  • Support extensions of the SAFT model (e.g. electrolyte methods and dipole terms).
  • Make our code the fastest available. Julia makes this easy.
diff --git a/dev/tutorials/basics_model_construction/index.html b/dev/tutorials/basics_model_construction/index.html index b10310b7a..70330fab9 100644 --- a/dev/tutorials/basics_model_construction/index.html +++ b/dev/tutorials/basics_model_construction/index.html @@ -188,4 +188,4 @@ Contains parameters: segment, shapefactor, lambda_a, lambda_r, sigma, epsilon, epsilon_assoc, bondvol

Note how we must now provide the number of times each group is bonded with one another. The only other equation of state which requires this is gcPCPSAFT.

Automatic Group Contribution Identification

The process of group identification can get quite tedious, specially when dealing with larger species. One way to generate group contribution fragmentations is by using the SMILES specification to parse the chemical structure of a particular species, and subdivide said structure into a particular set of groups.

We recommend using GCIdentifier.jl as a tool to generate group contribution fragmentations from SMILES strings. For example we can generate an UNIFAC model of ibuprofen and water in the following way:

julia> _,groups_ibuprofen = get_groups_from_smiles("CC(Cc1ccc(cc1)C(C(=O)O)C)C", UNIFACGroups)
 ("CC(Cc1ccc(cc1)C(C(=O)O)C)C", ["COOH" => 1, "CH3" => 3, "CH" => 1, "ACH" => 4, "ACCH2" => 1, "ACCH" => 1])
 
-julia> model = UNIFAC(["water" => ["H2O" => 1],"ibuprofen" => groups_ibuprofen])

For more information about

+julia> model = UNIFAC(["water" => ["H2O" => 1],"ibuprofen" => groups_ibuprofen])

For more information about

diff --git a/dev/tutorials/binary_phase_diagrams/index.html b/dev/tutorials/binary_phase_diagrams/index.html index 573b916c7..d2d42fc15 100644 --- a/dev/tutorials/binary_phase_diagrams/index.html +++ b/dev/tutorials/binary_phase_diagrams/index.html @@ -264,4 +264,4 @@ for i in 1:N p6[i], vla, vva, x_a = azeotrope_pressure(model, T6[i]; v0 = v0) v0 = x_a -end

And with this, we can complete the phase diagram: cyhex_meoh_pT_full Note that there is no formal definition for where the azeotrope meets the critical curve. Thus the end point must be determined ahead of time.

Type-III mixture

The type-III mixture we will be considering is methane+heptane using GERG-2008:

julia> model = GERG2008(["heptane","methane"])

Type-III mixtures are unique as the critical curve is broken into two. If one starts from the less volatile component, we find that the curve does not reconnect with the critical point of the more volatile component: me_hept_pT_1 Eventually, this curve becomes the UCST curve. However, there is a critical curve originating from the more volatile component However, this time, it terminates at the UCEP. We can repeat the same steps as above to obtain the UCEP: me_hept_pT Especially in cases with very different volatilities, it will be very difficult to see the separation between the VLLE, critical and saturation curve as shown above. However, if one zooms in, we can see the three independent curves: me_hept_pT_zoom

Type-IV/V mixture

The final class of binary mixture we'll consider is type-IV/V. In these mixtures, we have more than one UCEP. Once again, the critical curve is broken up into two. However, this time, both of them reconnect on a UCEP. The only difference between type-IV and type-V is that the former has an additional UCEP due to the presence of a UCST curve. As we have already shown how to trace this curve in type-II mixtures, we'll focus on type-V mixtures. In this case, we'll be looking at a mixture of methane and hexane:

julia> model = PR(["hexane","methane"])

Examining the critical curve originating from the less-volatile component: me_hex_pT_1 As we can see, the critical curve overshoots the critical point of the more volatile component. This critical curve will terminate at the first UCEP. The critical curve originating from the more volatile component will terminate at a second UCEP. Connecting the two UCEPs will be the VLLE curve. We have described all the tools needed to trace these curves in earlier section. The result should look like: me_hex_pT_full Zooming in to the UCEPs, we see that, much like the previous example, the VLLE curve is very close to the saturation curve of the less-volatile component: me_hex_pT_zoom

+end

And with this, we can complete the phase diagram: cyhex_meoh_pT_full Note that there is no formal definition for where the azeotrope meets the critical curve. Thus the end point must be determined ahead of time.

Type-III mixture

The type-III mixture we will be considering is methane+heptane using GERG-2008:

julia> model = GERG2008(["heptane","methane"])

Type-III mixtures are unique as the critical curve is broken into two. If one starts from the less volatile component, we find that the curve does not reconnect with the critical point of the more volatile component: me_hept_pT_1 Eventually, this curve becomes the UCST curve. However, there is a critical curve originating from the more volatile component However, this time, it terminates at the UCEP. We can repeat the same steps as above to obtain the UCEP: me_hept_pT Especially in cases with very different volatilities, it will be very difficult to see the separation between the VLLE, critical and saturation curve as shown above. However, if one zooms in, we can see the three independent curves: me_hept_pT_zoom

Type-IV/V mixture

The final class of binary mixture we'll consider is type-IV/V. In these mixtures, we have more than one UCEP. Once again, the critical curve is broken up into two. However, this time, both of them reconnect on a UCEP. The only difference between type-IV and type-V is that the former has an additional UCEP due to the presence of a UCST curve. As we have already shown how to trace this curve in type-II mixtures, we'll focus on type-V mixtures. In this case, we'll be looking at a mixture of methane and hexane:

julia> model = PR(["hexane","methane"])

Examining the critical curve originating from the less-volatile component: me_hex_pT_1 As we can see, the critical curve overshoots the critical point of the more volatile component. This critical curve will terminate at the first UCEP. The critical curve originating from the more volatile component will terminate at a second UCEP. Connecting the two UCEPs will be the VLLE curve. We have described all the tools needed to trace these curves in earlier section. The result should look like: me_hex_pT_full Zooming in to the UCEPs, we see that, much like the previous example, the VLLE curve is very close to the saturation curve of the less-volatile component: me_hex_pT_zoom

diff --git a/dev/tutorials/bulk_properties/index.html b/dev/tutorials/bulk_properties/index.html index c0c92d7fd..b266c0118 100644 --- a/dev/tutorials/bulk_properties/index.html +++ b/dev/tutorials/bulk_properties/index.html @@ -20,4 +20,4 @@ Contains parameters: Mw, segment, sigma, epsilon, epsilon_assoc, bondvol julia> volume(model,1e5,298.15,[0.5,0.5]) -0.0240608293527103

Everything that was true in the case of pure water will also hold here. However, there is one limitation: by default, Clapeyron does not check whether or not the mixture is stable at a given set of conditions. In the case of water and carbon dioxide at these conditions, we would expect a phase split between a vapour and liquid. As such, there technically no single-phase volume at these conditions. To determine the composition of each phase at these conditions, one would need to use a flash algorithm. The difference between these results in shown below: water_co2_vol

+0.0240608293527103

Everything that was true in the case of pure water will also hold here. However, there is one limitation: by default, Clapeyron does not check whether or not the mixture is stable at a given set of conditions. In the case of water and carbon dioxide at these conditions, we would expect a phase split between a vapour and liquid. As such, there technically no single-phase volume at these conditions. To determine the composition of each phase at these conditions, one would need to use a flash algorithm. The difference between these results in shown below: water_co2_vol

diff --git a/dev/tutorials/extensions_coolprop/index.html b/dev/tutorials/extensions_coolprop/index.html index c5323f811..317b33bd1 100644 --- a/dev/tutorials/extensions_coolprop/index.html +++ b/dev/tutorials/extensions_coolprop/index.html @@ -17,4 +17,4 @@ 1510.6174611314268

For ideal properties, the SingleFluidIdeal and EmpiricIdeal models are available. Those models can be combined with another residual model:

# reference equations of state, ideal part
 id = MultiFluidIdeal(["r134a","carbon dioxide"])
 # PCSAFT for the mixture model
-model = PCSAFT(["r134a","carbon dioxide"],idealmodel = id)
+model = PCSAFT(["r134a","carbon dioxide"],idealmodel = id) diff --git a/dev/tutorials/mixing_functions/index.html b/dev/tutorials/mixing_functions/index.html index ae95d1add..ace20042b 100644 --- a/dev/tutorials/mixing_functions/index.html +++ b/dev/tutorials/mixing_functions/index.html @@ -7,4 +7,4 @@ julia> mixing(model, 1e5, 298.15, [0.5,0.5], volume) -6.762389732537035e-7

The above should hold true for all other bulk properties as well. The results are visualised below: VE_etoh_water

Furthermore, another similar property users might be interested is excess functions, which are slightly different than mixing functions:

$\Delta Z_\text{excess} = \Delta Z_\text{mixing}-\Delta Z_\text{mixing, id.}$

where we are now interested in deviations of mixing functions from ideal mixing functions. This is only really relevant in the case of excess Gibbs free energies or excess entropies as, for most other properties, the excess function is identical to the mixing function. The process to obtain these functions is identical to the mixing function mentioned previously where we now have an excess(model, p, T, n, property) function, as demonstrated below for the excess Gibbs free energy (also in the case of water and ethanol):

julia> excess(model, 1e5, 298.15, [0.5,0.5], gibbs_free_energy)
-1100.6568199629164

This is also visualised below: gE_etoh_water

Optional Arguments

Any optional arguments which can be passed to the bulk property functions can also be passed to the mixing and excess functions. See the documentations relating to bulk properties for more details.

+1100.6568199629164

This is also visualised below: gE_etoh_water

Optional Arguments

Any optional arguments which can be passed to the bulk property functions can also be passed to the mixing and excess functions. See the documentations relating to bulk properties for more details.

diff --git a/dev/tutorials/pure_saturation_curves/index.html b/dev/tutorials/pure_saturation_curves/index.html index 065c48dac..96fe1f41b 100644 --- a/dev/tutorials/pure_saturation_curves/index.html +++ b/dev/tutorials/pure_saturation_curves/index.html @@ -68,4 +68,4 @@ hV[i] = Clapeyron.VT_enthalpy(model,vv[i],T[i],[1.]) cpL[i] = Clapeyron.VT_isobaric_heat_capacity(model,vl[i],T[i],[1.]) cpV[i] = Clapeyron.VT_isobaric_heat_capacity(model,vv[i],T[i],[1.]) -end

The resulting plots are shown below:

hvap_water

As well as the saturated isobaric heat capacities:

cpsat_water

+end

The resulting plots are shown below:

hvap_water

As well as the saturated isobaric heat capacities:

cpsat_water

diff --git a/dev/tutorials/sle_phase_diagrams/index.html b/dev/tutorials/sle_phase_diagrams/index.html index d18e092a7..07fd6b3a4 100644 --- a/dev/tutorials/sle_phase_diagrams/index.html +++ b/dev/tutorials/sle_phase_diagrams/index.html @@ -1,2 +1,2 @@ -SLE Phase Diagrams · Clapeyron.jl
+SLE Phase Diagrams · Clapeyron.jl
diff --git a/dev/tutorials/ternary_phase_diagrams/index.html b/dev/tutorials/ternary_phase_diagrams/index.html index 1574cb796..12e420abe 100644 --- a/dev/tutorials/ternary_phase_diagrams/index.html +++ b/dev/tutorials/ternary_phase_diagrams/index.html @@ -6,4 +6,4 @@ julia> z0 = [0.5,0.5,1e-10]; julia> (x,n,G) = tp_flash(model,p,T,z0,MichelsenTPFlash(equilibrium=:lle)) -([0.9941813349915325 0.005818664997300019 1.1167552809179326e-11; 0.009492840315784318 0.9905071594960436 1.8817198921812175e-10], [0.49523586949546133 0.0028984768852708584 5.5629416193349775e-12; 0.004764130510680909 0.49710152310858685 9.443705837956089e-11], -6.933551486428005)

The difficulty with tracing the LLE region here is that we would ideally like to follow the Plait

Vapour–Liquid–Liquid Equilibrium

+([0.9941813349915325 0.005818664997300019 1.1167552809179326e-11; 0.009492840315784318 0.9905071594960436 1.8817198921812175e-10], [0.49523586949546133 0.0028984768852708584 5.5629416193349775e-12; 0.004764130510680909 0.49710152310858685 9.443705837956089e-11], -6.933551486428005)

The difficulty with tracing the LLE region here is that we would ideally like to follow the Plait

Vapour–Liquid–Liquid Equilibrium

diff --git a/dev/tutorials/tp_flash/index.html b/dev/tutorials/tp_flash/index.html index 54940e8fb..f9b2e40f4 100644 --- a/dev/tutorials/tp_flash/index.html +++ b/dev/tutorials/tp_flash/index.html @@ -1,2 +1,2 @@ -Tp Flash algorithms · Clapeyron.jl
+Tp Flash algorithms · Clapeyron.jl
diff --git a/dev/tutorials/user_defined_parameters/index.html b/dev/tutorials/user_defined_parameters/index.html index e3e51cf6f..03356566e 100644 --- a/dev/tutorials/user_defined_parameters/index.html +++ b/dev/tutorials/user_defined_parameters/index.html @@ -35,4 +35,4 @@ bondvol = Dict((("water","e"),("water","H")) => 1.0169e-28, (("methanol","e"),("methanol","H")) => 1.0657e-28, (("methanol","e"),("water","H")) => 1.0411e-28, - (("water","e"),("methanol","H")) => 1.0411e-28)))

As we can see, with certain equations of state, this method of specifying parameters can become unwieldy. This is why we recommend using CSVs instead. Also note that, if you only specify pure component parameters for a parameter that should include pair parameters (such as sigma above), combining rules will be used to obtain the remaining parameters. If you specify all of the pair parameters, they will be used instead (in the case of epsilon). For the cubic equation of state earlier, we specified k, which will be used to obtain the unlike a parameters. Further, if we had not specified the cross-association parameters between methanol and water, unless we specified otherwise in AssocOptions, these interactions would not be included.

+ (("water","e"),("methanol","H")) => 1.0411e-28)))

As we can see, with certain equations of state, this method of specifying parameters can become unwieldy. This is why we recommend using CSVs instead. Also note that, if you only specify pure component parameters for a parameter that should include pair parameters (such as sigma above), combining rules will be used to obtain the remaining parameters. If you specify all of the pair parameters, they will be used instead (in the case of epsilon). For the cubic equation of state earlier, we specified k, which will be used to obtain the unlike a parameters. Further, if we had not specified the cross-association parameters between methanol and water, unless we specified otherwise in AssocOptions, these interactions would not be included.

diff --git a/dev/user_guide/basic_usage/index.html b/dev/user_guide/basic_usage/index.html index c8702a494..3b45b40de 100644 --- a/dev/user_guide/basic_usage/index.html +++ b/dev/user_guide/basic_usage/index.html @@ -45,4 +45,4 @@ import Unitful: bar, °C, mol, kg, l model_unit = PCSAFT(["methanol","water"]) Cp2 = isobaric_heat_capacity(model_unit, 5bar, 25°C, [0.5kg, 0.5kg]) # isobaric heat capacity of 1 mol of mixture, at a pressure of 5 bar -Cp2 = isobaric_heat_capacity(model_unit, 1.0l/kg, 25°C, [0.4kg, 0.6kg]) # isobaric heat capacity of 1 kg of mixture, at a volume of 1 L/kg

Note that if you do not wish to import specific units, you may also just use a Unitful string, pressure = 20u"psi". This is only supported for bulk properties.

+Cp2 = isobaric_heat_capacity(model_unit, 1.0l/kg, 25°C, [0.4kg, 0.6kg]) # isobaric heat capacity of 1 kg of mixture, at a volume of 1 L/kg

Note that if you do not wish to import specific units, you may also just use a Unitful string, pressure = 20u"psi". This is only supported for bulk properties.

diff --git a/dev/user_guide/custom_dtb/index.html b/dev/user_guide/custom_dtb/index.html index 297b32b1a..03997b2ea 100644 --- a/dev/user_guide/custom_dtb/index.html +++ b/dev/user_guide/custom_dtb/index.html @@ -11,4 +11,4 @@ """ model = PR(["water"],user_locations = [csv_data]) -model.params.Mw[1] # 19.0 +model.params.Mw[1] # 19.0 diff --git a/dev/user_guide/custom_methods/index.html b/dev/user_guide/custom_methods/index.html index 0c635c7e9..1475683a0 100644 --- a/dev/user_guide/custom_methods/index.html +++ b/dev/user_guide/custom_methods/index.html @@ -49,4 +49,4 @@ α₀] .* sum(z) g = (gibbs_free_energy(model,p,T,x)*(1-α₀)+gibbs_free_energy(model,p,T,y)*α₀)/R̄/T return X,n,g -end

I have a better method...

If your custom methods end up being more efficient than ours or you develop one that we do not currently support, please do start a pull request and we will gladly add it to the package!

+end

I have a better method...

If your custom methods end up being more efficient than ours or you develop one that we do not currently support, please do start a pull request and we will gladly add it to the package!

diff --git a/dev/user_guide/custom_model/index.html b/dev/user_guide/custom_model/index.html index 2fa1c2153..4bb411c45 100644 --- a/dev/user_guide/custom_model/index.html +++ b/dev/user_guide/custom_model/index.html @@ -171,4 +171,4 @@ function a_hs(model::sPCSAFTModel, V, T, z) η = @f(ζ,3) return (4η-3η^2)/(1-η)^2 -end

The rest works exactly as it would with the PCSAFT example.

+end

The rest works exactly as it would with the PCSAFT example.