diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 8fd478f..2cfa124 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-30T14:07:55","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-30T20:32:54","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index a2d227a..bb2201a 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · AdsorbedSolutionTheory.jl
+Home · AdsorbedSolutionTheory.jl
diff --git a/dev/reference/index.html b/dev/reference/index.html index 12e57aa..7cc89ff 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,19 +1,19 @@ Reference · AdsorbedSolutionTheory.jl

Reference

Contents

Index

AdsorbedSolutionTheory.LangmuirType
`Langmuir(M, K₀, E)`
 
-Langmuir <: IsothermModel

Langmuir(M, K₀, E) represents the Langmuir isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]

Description

The Langmuir equation is given by:

n = (M * K₀ * p) / (1 + K₀ * p)

where:

  • n is the loading of the adsorbate on the adsorbent,
  • M is the maximum loading capacity of the adsorbent,
  • K₀ is the equilibrium constant at zero coverage,
  • p is the pressure of the gas.

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.RedlichPetersonType
`RedlichPeterson(M, K₀, E, f)`
+Langmuir <: IsothermModel

Langmuir(M, K₀, E) represents the Langmuir isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]

Description

The Langmuir equation is given by:

n = (M * K₀ * p) / (1 + K₀ * p)

where:

  • n is the loading of the adsorbate on the adsorbent,
  • M is the maximum loading capacity of the adsorbent,
  • K₀ is the equilibrium constant at zero coverage,
  • p is the pressure of the gas.

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.RedlichPetersonType
`RedlichPeterson(M, K₀, E, f)`
 
-RedlichPeterson <: IsothermModel

RedlichPeterson(M, K₀, E, f) represents the Redlich-Peterson isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]
  • f::T: parameter characterising the heterogeneity of the system (no units)

Description

The RedlichPeterson equation is given by:

n = M * p / (1 + (K₀ * p)^f)

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.SipsType
`Sips(M, K₀, E, f)`
+RedlichPeterson <: IsothermModel

RedlichPeterson(M, K₀, E, f) represents the Redlich-Peterson isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]
  • f::T: parameter characterising the heterogeneity of the system (no units)

Description

The RedlichPeterson equation is given by:

n = M * p / (1 + (K₀ * p)^f)

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.SipsType
`Sips(M, K₀, E, f)`
 
-Sips <: IsothermModel

Sips(M, K₀, E, f) represents the Sips isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]
  • f::T: parameter characterising the heterogeneity of the system (no units)

Description

The Sips equation is given by:

n = M * (K₀ * p)^f / (1 + (K₀ * p)^f)

where:

  • n is the loading of the adsorbate on the adsorbent,
  • M is the maximum loading capacity of the adsorbent,
  • K₀ is the equilibrium constant at zero coverage,
  • p is the pressure of the gas.

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.TothType
Toth <: IsothermModel
+Sips <: IsothermModel

Sips(M, K₀, E, f) represents the Sips isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]
  • f::T: parameter characterising the heterogeneity of the system (no units)

Description

The Sips equation is given by:

n = M * (K₀ * p)^f / (1 + (K₀ * p)^f)

where:

  • n is the loading of the adsorbate on the adsorbent,
  • M is the maximum loading capacity of the adsorbent,
  • K₀ is the equilibrium constant at zero coverage,
  • p is the pressure of the gas.

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.TothType
Toth <: IsothermModel
 
-Toth(M, K₀, E, f₀, β)

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage,[1/Pa]`
  • E::T: adsorption energy, [J/mol]
  • f₀::T: Empirical parameter, -
  • β::T: Empirical parameter, K

Description

Toth isotherm model:

K = K₀exp(-E/(RT)) f = f₀ + β/T nᵢ = MKP/(1 + (KP)ᶠ)¹/ᶠ

source
AdsorbedSolutionTheory.UnilanType
`Unilan(M, K₀, E)`
+Toth(M, K₀, E, f₀, β)

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage,[1/Pa]`
  • E::T: adsorption energy, [J/mol]
  • f₀::T: Empirical parameter, -
  • β::T: Empirical parameter, K

Description

Toth isotherm model:

K = K₀exp(-E/(RT)) f = f₀ + β/T nᵢ = MKP/(1 + (KP)ᶠ)¹/ᶠ

source
AdsorbedSolutionTheory.UnilanType
`Unilan(M, K₀, E)`
 
-Unilan <: IsothermModel

Unilan(M, K₀, E, f) represents the Unilan (UNIform distribution LANgmuir) isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]
  • f::T: heterogeneity of the adsorbent (no units)

Description

The UNILAN equation is given by:

n = M * log((1 + K₀* exp(f) * p)/(1 + K₀ * exp(-f) * p)) / (2 * f)

where:

  • n is the loading of the adsorbate on the adsorbent,
  • M is the maximum loading capacity of the adsorbent,
  • K₀ is the equilibrium constant at zero coverage,
  • p is the pressure of the gas.
  • f is the heterogeneity of the adsorbent. at the limit f -> 0, the langmuir isotherm is recovered.

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.f∂fMethod
f∂f(f,x)

returns f and ∂f/∂x evaluated in x, using ForwardDiff.jl, DiffResults.jl and StaticArrays.jl to calculate everything in one pass.

source
AdsorbedSolutionTheory.f∂f∂2fMethod
f∂f∂2f(f,x)

returns f,∂f/∂x,and ∂²f/∂²x and evaluated in x, using ForwardDiff.jl, DiffResults.jl and StaticArrays.jl to calculate everything in one pass.

source
AdsorbedSolutionTheory.henry_coefficientMethod
henry_coefficient(model::IsothermModel, T) -> H

Calculate the Henry's coefficient for a single component system using the specified isotherm model and temperature T.

Arguments

  • model::IsothermModel: An instance of IsothermModel, representing the isotherm model to be used for the calculation.
  • T: The temperature at which the Henry's coefficient is to be calculated.

Returns

  • H: The Henry's coefficient in the default units of [mol/kg].

Description

This function returns the Henry's coefficient, which is a measure of the initial slope of the adsorption isotherm at low pressures. It is defined as the derivative of the loading q with respect to pressure p at p = 0:

H = (∂q/∂p) at p = 0 at a given T.

source
AdsorbedSolutionTheory.iastFunction
iast(models,p,T,y,method = FastIAS(),gas_model = nothing;x0 = nothing,maxiters = 100,reltol = 1e-12, abstol = 1e-10)

TODO: docs

returns qtot,x,convergencesymbol (:success, or :maxiters_exceeded)

source
AdsorbedSolutionTheory.isosteric_heatMethod
isosteric_heat(model::IsothermModel, Vᵍ, p, T; Vᵃ = zero(eltype(model))) -> Qₛₜ

Calculate the isosteric heat of adsorption for a given isotherm model.

Arguments

  • model::IsothermModel: The isotherm model used to describe the adsorption process.
  • Vᵍ: The molar volume of the gas phase.
  • Vᵃ: The molar volume of the adsorbed phase (typically Vᵃ << Vᵍ; default is zero).
  • p: Pressure at which the isosteric heat is evaluated.
  • T: Temperature at which the isosteric heat is evaluated.

Returns

  • Qₛₜ: The estimated isosteric heat of adsorption.

Description

The function estimates the isosteric heat of adsorption Qₛₜ for a single component using its isotherm and the Clausius-Clapeyron equation:

Qₛₜ = -T * (Vᵍ - Vᵃ) * (∂n/∂T)ₚ / (∂n/∂p)ₜ

where:

  • n is the loading,
  • Vᵍ is the molar volume of the gas phase,
  • Vᵃ is the molar volume of the adsorbed phase,
  • T is the temperature,
  • p is the pressure.

This equation is derived based on the Clausius-Clapeyron relation, which relates the temperature dependence of the loading to the isosteric heat.

References:

  1. Pan, H., Ritter, J. A., & Balbuena, P. B. (1998). Examination of the approximations used in determining the isosteric heat of adsorption from the Clausius−Clapeyron equation. Langmuir: The ACS Journal of Surfaces and Colloids, 14(21), 6323–6327. doi:10.1021/la9803373
source
AdsorbedSolutionTheory.isotherm_lower_boundMethod
isotherm_lower_bound(model::IsothermModel)
+Unilan <: IsothermModel

Unilan(M, K₀, E, f) represents the Unilan (UNIform distribution LANgmuir) isotherm model, which describes the adsorption of a gas on a solid surface.

Inputs

  • M::T: maximum loading capacity of the adsorbent, [mol/kg]
  • K₀::T: equilibrium constant at zero coverage, [1/Pa]
  • E::T: adsorption energy, [J/mol]
  • f::T: heterogeneity of the adsorbent (no units)

Description

The UNILAN equation is given by:

n = M * log((1 + K₀* exp(f) * p)/(1 + K₀ * exp(-f) * p)) / (2 * f)

where:

  • n is the loading of the adsorbate on the adsorbent,
  • M is the maximum loading capacity of the adsorbent,
  • K₀ is the equilibrium constant at zero coverage,
  • p is the pressure of the gas.
  • f is the heterogeneity of the adsorbent. at the limit f -> 0, the langmuir isotherm is recovered.

The adsorption energy E is related to the equilibrium constant K₀ by the equation:

K₀ = exp(-E / (R * T))

where:

  • R is the gas constant,
  • T is the temperature.
source
AdsorbedSolutionTheory.f∂fMethod
f∂f(f,x)

returns f and ∂f/∂x evaluated in x, using ForwardDiff.jl, DiffResults.jl and StaticArrays.jl to calculate everything in one pass.

source
AdsorbedSolutionTheory.f∂f∂2fMethod
f∂f∂2f(f,x)

returns f,∂f/∂x,and ∂²f/∂²x and evaluated in x, using ForwardDiff.jl, DiffResults.jl and StaticArrays.jl to calculate everything in one pass.

source
AdsorbedSolutionTheory.henry_coefficientMethod
henry_coefficient(model::IsothermModel, T) -> H

Calculate the Henry's coefficient for a single component system using the specified isotherm model and temperature T.

Arguments

  • model::IsothermModel: An instance of IsothermModel, representing the isotherm model to be used for the calculation.
  • T: The temperature at which the Henry's coefficient is to be calculated.

Returns

  • H: The Henry's coefficient in the default units of [mol/kg].

Description

This function returns the Henry's coefficient, which is a measure of the initial slope of the adsorption isotherm at low pressures. It is defined as the derivative of the loading q with respect to pressure p at p = 0:

H = (∂q/∂p) at p = 0 at a given T.

source
AdsorbedSolutionTheory.iastFunction
iast(models,p,T,y,method = FastIAS(),gas_model = nothing;x0 = nothing,maxiters = 100,reltol = 1e-12, abstol = 1e-10)

TODO: docs

returns qtot,x,convergencesymbol (:success, or :maxiters_exceeded)

source
AdsorbedSolutionTheory.isosteric_heatMethod
isosteric_heat(model::IsothermModel, Vᵍ, p, T; Vᵃ = zero(eltype(model))) -> Qₛₜ

Calculate the isosteric heat of adsorption for a given isotherm model.

Arguments

  • model::IsothermModel: The isotherm model used to describe the adsorption process.
  • Vᵍ: The molar volume of the gas phase.
  • Vᵃ: The molar volume of the adsorbed phase (typically Vᵃ << Vᵍ; default is zero).
  • p: Pressure at which the isosteric heat is evaluated.
  • T: Temperature at which the isosteric heat is evaluated.

Returns

  • Qₛₜ: The estimated isosteric heat of adsorption.

Description

The function estimates the isosteric heat of adsorption Qₛₜ for a single component using its isotherm and the Clausius-Clapeyron equation:

Qₛₜ = -T * (Vᵍ - Vᵃ) * (∂n/∂T)ₚ / (∂n/∂p)ₜ

where:

  • n is the loading,
  • Vᵍ is the molar volume of the gas phase,
  • Vᵃ is the molar volume of the adsorbed phase,
  • T is the temperature,
  • p is the pressure.

This equation is derived based on the Clausius-Clapeyron relation, which relates the temperature dependence of the loading to the isosteric heat.

References:

  1. Pan, H., Ritter, J. A., & Balbuena, P. B. (1998). Examination of the approximations used in determining the isosteric heat of adsorption from the Clausius−Clapeyron equation. Langmuir: The ACS Journal of Surfaces and Colloids, 14(21), 6323–6327. doi:10.1021/la9803373
source
AdsorbedSolutionTheory.isotherm_lower_boundMethod
isotherm_lower_bound(model::IsothermModel)
 isotherm_lower_bound(T,model::IsothermModel)
-isotherm_lower_bound(T,::Type{M}) where M <:IsothermModel

Returns the lower bound for the parameters of the isotherm model model of type M. with number type T, as a Ntuple{model_length(M),T}. The default assumes that all parameters are nonnegative.

source
AdsorbedSolutionTheory.isotherm_upper_boundMethod
isotherm_upper_bound(model::IsothermModel)
+isotherm_lower_bound(T,::Type{M}) where M <:IsothermModel

Returns the lower bound for the parameters of the isotherm model model of type M. with number type T, as a Ntuple{model_length(M),T}. The default assumes that all parameters are nonnegative.

source
AdsorbedSolutionTheory.isotherm_upper_boundMethod
isotherm_upper_bound(model::IsothermModel)
 isotherm_upper_bound(T,model::IsothermModel)
-isotherm_upper_bound(T,::Type{M}) where M <:IsothermModel

Returns the upper bound for the parameters of the isotherm model model of type M. with number type T, as a Ntuple{model_length(M),T}. The default assumes no upper bound for the parameters.

source
AdsorbedSolutionTheory.loadingMethod
loading(model::IsothermModel, p, T) -> q

Calculate the loading q based on the provided isotherm model, pressure p, and temperature T.

Arguments

  • model::IsothermModel: An instance of IsothermModel, representing the isotherm model to be used for the calculation.
  • p: The pressure at which the loading is to be calculated.
  • T: The temperature at which the loading is to be calculated.

Returns

  • q: The calculated loading based on the isotherm model, pressure, and temperature.

Description

This function computes the loading q based on the given isotherm model, pressure p, and temperature T.

source
AdsorbedSolutionTheory.nlsolveFunction
function nlsolve(f!,x0,method=TrustRegion(Newton(), Dogleg()), options=NEqOptions(),chunk = ForwardDiff.Chunk{2}())

Given a function f!(result,x) that returns a system of equations, nlsolve(f!,x0) returns a NLSolvers.ConvergenceInfo struct that contains the results of the non-linear solving procedure.

Uses NLSolvers.jl as backend, the jacobian is calculated with ForwardDiff.jl, with the specified chunk size

To obtain the underlying solution vector, use x_sol

To see available solvers and options, check NLSolvers.jl

source
AdsorbedSolutionTheory.pressureMethod

pressure(model::IsothermModel, x, T, f; approx = :exact)

given an isotherm::IsothermModel and x = f(model,p,T), find p such that f(model,p,T) = x. There are two options for f and x:

  • when f is sp_res, then x = sp_res(model, p, T)
  • when f is loading, then x = loading(model, p, T)

By default, it performs a root-finding over the isotherm. but custom implementations can be done by overloading pressure_impl(model::MyModel,x,T,f::typeof(f),approx) The approx::Symbol argument indicates if the procedure is exact or approximate. by default a henry coefficient aproximation is used when approx =:henry is used.

source
AdsorbedSolutionTheory.saturated_loadingMethod
saturated_loading(model::IsothermModel, T)

Returns the loading of of an adsorption isotherm when the pressure tends to infinity. by default it is evaluated at 1/√eps(eltype(model)) (6.7108864e7 for Float64 inputs.).

Inputs

  • model::IsothermModel: the isotherm model
  • T: temperature.
source
AdsorbedSolutionTheory.sp_resMethod
sp_res(model::IsothermModel, p, T) -> Π

Calculate the reduced spreading pressure for a given isotherm model at a specific pressure p and temperature T.

Arguments

  • model::IsothermModel: An instance of IsothermModel, representing the isotherm model used for the calculation.
  • p: The pressure at which the reduced spreading pressure is to be calculated.
  • T: The temperature at which the reduced spreading pressure is to be calculated.

Returns

  • Π: The reduced spreading pressure

Description

The reduced spreading pressure is a key quantity in Ideal Adsorbed Solution Theory (IAST), used to describe the adsorption behavior of mixtures. This function calculates the reduced spreading pressure Π by integrating the isotherm equation over the pressure range from 0 to p.

The reduced spreading pressure is often calculated numerically as:

Π = ∫ (q(p') / p') dp' from 0 to p

where:

  • q(p') is the loading at pressure p'.
source
AdsorbedSolutionTheory.x_solMethod
x_sol(res::NLSolvers.ConvergenceInfo)

Returns the scalar or vector x that solves the system of equations or is the minimizer of an optimization procedure.

source
AdsorbedSolutionTheory.@MultiSiteMacro
@MultiSite(isotherms)

Utility macro to build MultiSite types.

Example:

julia> v1 = @MultiSite{Langmuir,Langmuir} #abstract eltype
+isotherm_upper_bound(T,::Type{M}) where M <:IsothermModel

Returns the upper bound for the parameters of the isotherm model model of type M. with number type T, as a Ntuple{model_length(M),T}. The default assumes no upper bound for the parameters.

source
AdsorbedSolutionTheory.loadingMethod
loading(model::IsothermModel, p, T) -> q

Calculate the loading q based on the provided isotherm model, pressure p, and temperature T.

Arguments

  • model::IsothermModel: An instance of IsothermModel, representing the isotherm model to be used for the calculation.
  • p: The pressure at which the loading is to be calculated.
  • T: The temperature at which the loading is to be calculated.

Returns

  • q: The calculated loading based on the isotherm model, pressure, and temperature.

Description

This function computes the loading q based on the given isotherm model, pressure p, and temperature T.

source
AdsorbedSolutionTheory.nlsolveFunction
function nlsolve(f!,x0,method=TrustRegion(Newton(), Dogleg()), options=NEqOptions(),chunk = ForwardDiff.Chunk{2}())

Given a function f!(result,x) that returns a system of equations, nlsolve(f!,x0) returns a NLSolvers.ConvergenceInfo struct that contains the results of the non-linear solving procedure.

Uses NLSolvers.jl as backend, the jacobian is calculated with ForwardDiff.jl, with the specified chunk size

To obtain the underlying solution vector, use x_sol

To see available solvers and options, check NLSolvers.jl

source
AdsorbedSolutionTheory.pressureMethod

pressure(model::IsothermModel, x, T, f; approx = :exact)

given an isotherm::IsothermModel and x = f(model,p,T), find p such that f(model,p,T) = x. There are two options for f and x:

  • when f is sp_res, then x = sp_res(model, p, T)
  • when f is loading, then x = loading(model, p, T)

By default, it performs a root-finding over the isotherm. but custom implementations can be done by overloading pressure_impl(model::MyModel,x,T,f::typeof(f),approx) The approx::Symbol argument indicates if the procedure is exact or approximate. by default a henry coefficient aproximation is used when approx =:henry is used.

source
AdsorbedSolutionTheory.saturated_loadingMethod
saturated_loading(model::IsothermModel, T)

Returns the loading of of an adsorption isotherm when the pressure tends to infinity. by default it is evaluated at 1/√eps(eltype(model)) (6.7108864e7 for Float64 inputs.).

Inputs

  • model::IsothermModel: the isotherm model
  • T: temperature.
source
AdsorbedSolutionTheory.sp_resMethod
sp_res(model::IsothermModel, p, T) -> Π

Calculate the reduced spreading pressure for a given isotherm model at a specific pressure p and temperature T.

Arguments

  • model::IsothermModel: An instance of IsothermModel, representing the isotherm model used for the calculation.
  • p: The pressure at which the reduced spreading pressure is to be calculated.
  • T: The temperature at which the reduced spreading pressure is to be calculated.

Returns

  • Π: The reduced spreading pressure

Description

The reduced spreading pressure is a key quantity in Ideal Adsorbed Solution Theory (IAST), used to describe the adsorption behavior of mixtures. This function calculates the reduced spreading pressure Π by integrating the isotherm equation over the pressure range from 0 to p.

The reduced spreading pressure is often calculated numerically as:

Π = ∫ (q(p') / p') dp' from 0 to p

where:

  • q(p') is the loading at pressure p'.
source
AdsorbedSolutionTheory.x_solMethod
x_sol(res::NLSolvers.ConvergenceInfo)

Returns the scalar or vector x that solves the system of equations or is the minimizer of an optimization procedure.

source
AdsorbedSolutionTheory.@MultiSiteMacro
@MultiSite(isotherms)

Utility macro to build MultiSite types.

Example:

julia> v1 = @MultiSite{Langmuir,Langmuir} #abstract eltype
 MultiSite{T, Tuple{Langmuir{T}, Langmuir{T}}} where T
 
 julia> AdsorbedSolutionTheory.from_vec(v,[1,2,0,3,4,0])
@@ -23,7 +23,7 @@
 MultiSite{Float64, Tuple{Langmuir{Float64}, Langmuir{Float64}}}
 
 julia> AdsorbedSolutionTheory.from_vec(v2,[1,2,0,3,4,0])
-MultiSite{Float64, Tuple{Langmuir{Float64}, Langmuir{Float64}}}((Langmuir{Float64}(1.0, 2.0, 0.0), Langmuir{Float64}(3.0, 4.0, 0.0)))
source
AdsorbedSolutionTheory.@with_metadataMacro
@with_metadata(struct_expr)

macro that allows to define an isotherm model with additional metadata, about parameter bounds and descriptions of parameters:

Usage:

AdsorbedSolutionTheory.@with_metadata struct MyIsotherm{T} <: IsothermModel{T}
+MultiSite{Float64, Tuple{Langmuir{Float64}, Langmuir{Float64}}}((Langmuir{Float64}(1.0, 2.0, 0.0), Langmuir{Float64}(3.0, 4.0, 0.0)))
source
AdsorbedSolutionTheory.@with_metadataMacro
@with_metadata(struct_expr)

macro that allows to define an isotherm model with additional metadata, about parameter bounds and descriptions of parameters:

Usage:

AdsorbedSolutionTheory.@with_metadata struct MyIsotherm{T} <: IsothermModel{T}
     A::T,(0,1),"field A" #bounds and description provided
     B::T #nothing provided
     C::T,(1,10) #only bounds provided
@@ -32,4 +32,4 @@
 
 from_vec(MyIsotherm,(1,2,3,4)) #ok
 from_vec(MyIsotherm,(-1,2,3,4)) #ArgumentError: MyIsotherm: value for the field `A` (field A) is out of the parameter bounds: (0.0 <= -1 <= 1.0) == false
-from_vec(MyIsotherm,(1,2,-3,4)) #ArgumentError: MyIsotherm: value for the field `C` is out of the parameter bounds: (1.0 <= -3 <= 10.0) == false
source
+from_vec(MyIsotherm,(1,2,-3,4)) #ArgumentError: MyIsotherm: value for the field `C` is out of the parameter bounds: (1.0 <= -3 <= 10.0) == falsesource diff --git a/dev/tutorials/background/index.html b/dev/tutorials/background/index.html index 34900a7..86286ba 100644 --- a/dev/tutorials/background/index.html +++ b/dev/tutorials/background/index.html @@ -1,2 +1,2 @@ -Background · AdsorbedSolutionTheory.jl

Models in adsorption equilibrium

Adsorption is a surface phenomenon where atoms, ions, or molecules from a gas, liquid, or dissolved solid adhere to the surface of another material. This process leads to the formation of a thin film of the adsorbed substance, known as the adsorbate, on the surface of the material it adheres to, called the adsorbent.

In thermodynamics, adsorption models play a similar role to equations of state in fluid systems, describing the equilibrium properties of adsorption processes. These models are crucial for understanding and predicting the thermodynamics of adsorption in both single and multiphase systems.

Single-component adsorption

Over the last decade, three fundamental approaches have led to the development of a wide range of adsorption isotherm models, including well-known ones such as Langmuir, Freundlich, Dubinin-Radushkevich, Temkin, Toth, and many others.

The first approach focuses on kinetics, where adsorption and desorption rates are equal, establishing adsorption equilibrium as a dynamic process. The second approach is rooted in thermodynamics, offering a basis for deriving various forms of adsorption isotherm models. The third approach emphasizes the generation of characteristic curves to describe adsorption behavior.

Isosteric heat of adsorption

The heat of adsorption is a critical design parameter in adsorptive gas separation units. During adsorption, heat is released as adsorbate molecules transition to a lower energy state on the surface of the adsorbent compared to their higher energy state in the bulk gas phase. This exothermic process significantly impacts both the efficiency and operational conditions of adsorption systems. For a single component, the isosteric heat is given by:

\[Q_{st} = -T*(V_g - V_a)*\left( \frac{dP_i}{dT} \right)\rvert_{(N_i,A)}\]

where $Q_st$ is the isosteric heat of the component being adsorbed, $T$ is the temperature, $V_g$ is the molar volume of the component in gas phase, $V_a$ is the molar volume of the component in adsorbed phase, $N_i$ is the amount of component adsorbed of the component

When the isotherm is of the form $N_i = f(T, P_i)$, one can write:

\[Q_{st, i} = -T*(V_g - V_a)*\left( \frac{\frac{\partial N_i}{\partial T}\rvert_P}{\frac{\partial N_i}{\partial P}\rvert_T} \right)\]

Multi component adsorption

The basic equations of the IAST are the analogue of Raoult's law in vapour–liquid equilibrium:

\[Py_i = P_i^0(\pi)x_i\]

(1)

where

\[\pi = \pi_i = \int_{0}^{P_i^0} \frac{N_i^0(P)}{P}dP\]

for $i = 1,...,N_c$ (2)

\[\sum_i^{N_c} x_i = 1\]

(3)

Combining (1) and (3), the following nonlinear solve is set to:

\[f(\pi) = 1 - \sum_1^{N_c}\frac{Py_i}{P_i^0\left(\pi\right)}\]

= 0 (4)

+Background · AdsorbedSolutionTheory.jl

Models in adsorption equilibrium

Adsorption is a surface phenomenon where atoms, ions, or molecules from a gas, liquid, or dissolved solid adhere to the surface of another material. This process leads to the formation of a thin film of the adsorbed substance, known as the adsorbate, on the surface of the material it adheres to, called the adsorbent.

In thermodynamics, adsorption models play a similar role to equations of state in fluid systems, describing the equilibrium properties of adsorption processes. These models are crucial for understanding and predicting the thermodynamics of adsorption in both single and multiphase systems.

Single-component adsorption

Over the last decade, three fundamental approaches have led to the development of a wide range of adsorption isotherm models, including well-known ones such as Langmuir, Freundlich, Dubinin-Radushkevich, Temkin, Toth, and many others.

The first approach focuses on kinetics, where adsorption and desorption rates are equal, establishing adsorption equilibrium as a dynamic process. The second approach is rooted in thermodynamics, offering a basis for deriving various forms of adsorption isotherm models. The third approach emphasizes the generation of characteristic curves to describe adsorption behavior.

Isosteric heat of adsorption

The heat of adsorption is a critical design parameter in adsorptive gas separation units. During adsorption, heat is released as adsorbate molecules transition to a lower energy state on the surface of the adsorbent compared to their higher energy state in the bulk gas phase. This exothermic process significantly impacts both the efficiency and operational conditions of adsorption systems. For a single component, the isosteric heat is given by:

\[Q_{st} = -T*(V_g - V_a)*\left( \frac{dP_i}{dT} \right)\rvert_{(N_i,A)}\]

where $Q_st$ is the isosteric heat of the component being adsorbed, $T$ is the temperature, $V_g$ is the molar volume of the component in gas phase, $V_a$ is the molar volume of the component in adsorbed phase, $N_i$ is the amount of component adsorbed of the component

When the isotherm is of the form $N_i = f(T, P_i)$, one can write:

\[Q_{st, i} = -T*(V_g - V_a)*\left( \frac{\frac{\partial N_i}{\partial T}\rvert_P}{\frac{\partial N_i}{\partial P}\rvert_T} \right)\]

Multi component adsorption

The basic equations of the IAST are the analogue of Raoult's law in vapour–liquid equilibrium:

\[Py_i = P_i^0(\pi)x_i\]

(1)

where

\[\pi = \pi_i = \int_{0}^{P_i^0} \frac{N_i^0(P)}{P}dP\]

for $i = 1,...,N_c$ (2)

\[\sum_i^{N_c} x_i = 1\]

(3)

Combining (1) and (3), the following nonlinear solve is set to:

\[f(\pi) = 1 - \sum_1^{N_c}\frac{Py_i}{P_i^0\left(\pi\right)}\]

= 0 (4)

diff --git a/dev/tutorials/getting_started/f25b54e6.svg b/dev/tutorials/getting_started/30771ded.svg similarity index 85% rename from dev/tutorials/getting_started/f25b54e6.svg rename to dev/tutorials/getting_started/30771ded.svg index 089f152..d7c1d01 100644 --- a/dev/tutorials/getting_started/f25b54e6.svg +++ b/dev/tutorials/getting_started/30771ded.svg @@ -1,69 +1,69 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/1fa2376e.svg b/dev/tutorials/getting_started/8a4ceebe.svg similarity index 85% rename from dev/tutorials/getting_started/1fa2376e.svg rename to dev/tutorials/getting_started/8a4ceebe.svg index 2525047..a5f70cb 100644 --- a/dev/tutorials/getting_started/1fa2376e.svg +++ b/dev/tutorials/getting_started/8a4ceebe.svg @@ -1,48 +1,48 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/9a8ebb82.svg b/dev/tutorials/getting_started/dee5efea.svg similarity index 84% rename from dev/tutorials/getting_started/9a8ebb82.svg rename to dev/tutorials/getting_started/dee5efea.svg index b8ae814..434e13c 100644 --- a/dev/tutorials/getting_started/9a8ebb82.svg +++ b/dev/tutorials/getting_started/dee5efea.svg @@ -1,52 +1,52 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/index.html b/dev/tutorials/getting_started/index.html index c8adb4a..aac265d 100644 --- a/dev/tutorials/getting_started/index.html +++ b/dev/tutorials/getting_started/index.html @@ -10,14 +10,14 @@ plot(P, l_at_300, size = (500, 250), label = "300K") plot!(P, l_at_350, label = "350K") xlabel!("P (Pa)") -ylabel!("l (mol/kg)")Example block output

You can also estimate other properties from the isotherm such as the henry coefficient at a given temperature by calling henry_coefficient(model::IsothermModel, T). The henry coefficient should correspond to the slope of the isotherm when $P \rightarrow 0.0$. In AdsorbedSolutionTheory.jl, this is obtained using automatic differentiation and introduces no numerical error in the estimate. You can see in the example below how to visualize the tangent line built from the henry coefficient at $300K$.

P_ = P[1:3]
+ylabel!("l (mol/kg)")
Example block output

You can also estimate other properties from the isotherm such as the henry coefficient at a given temperature by calling henry_coefficient(model::IsothermModel, T). The henry coefficient should correspond to the slope of the isotherm when $P \rightarrow 0.0$. In AdsorbedSolutionTheory.jl, this is obtained using automatic differentiation and introduces no numerical error in the estimate. You can see in the example below how to visualize the tangent line built from the henry coefficient at $300K$.

P_ = P[1:3]
 plot(P_, l_at_300[1:3], size = (500, 250), label = "300K")
 H = henry_coefficient(isotherm, 300.0)
-plot!(P_, H*P_, label = "Tangent line")
Example block output

To finish this section for single component adsorption, one can also estimate the isosteric heat of adsorption by calling isosteric_heat(model, Vg, p, T) where Vg is the molar volume of the gas phase, p the pressure in Pascal and T the temperature in Kelvin. For the Langmuir model, the isosteric heat should be constant and equal to the energy parameter E. You can plot the isosteric heat either as a function of the pressure or loading.

Below it is assumed that the ideal gas law is a good approximation to describe the molar volume of the gas phase.

import AdsorbedSolutionTheory: Rgas
+plot!(P_, H*P_, label = "Tangent line")
Example block output

To finish this section for single component adsorption, one can also estimate the isosteric heat of adsorption by calling isosteric_heat(model, Vg, p, T) where Vg is the molar volume of the gas phase, p the pressure in Pascal and T the temperature in Kelvin. For the Langmuir model, the isosteric heat should be constant and equal to the energy parameter E. You can plot the isosteric heat either as a function of the pressure or loading.

Below it is assumed that the ideal gas law is a good approximation to describe the molar volume of the gas phase.

import AdsorbedSolutionTheory: Rgas
 Vg = Rgas(isotherm)*300.0./P[2:end]
 ΔH = map(Vg_P -> isosteric_heat(isotherm, first(Vg_P), last(Vg_P), 300.), zip(Vg, P[2:end])) |> x -> round.(x, digits = 7)
 scatter(l_at_300[2:end], ΔH, size = (500, 250),  ylabel = "Isosteric heat (J/mol)", xlabel = "loading (mol/kg)", label = "Estimated isosteric heat with AD")
-plot!([first(l_at_300), last(l_at_300)], [-E, -E], label = "Expected value")
Example block output

Estimating properties in multicomponent adsorption.

When it comes to estimating properties in multicomponent adsorption, the Ideal Adsorption Solution Theory (IAST) has been proven accurate for a number of systems. It allows one to estimate multicomponent adsorption behavior from single component isotherms.

When formulated, estimating the loading with IAST becomes a nonlinear solve problem which can be solved in different ways. Here, we support the Nested Loop and FastIAS methods. To know more about the two and which one to choose, refer to this paper: 10.1002/aic.14684.

It can be shown analytically that IAST estimation of multicomponent loading is the same as the extendend Langmuir method when the parameter $M_i$ (saturation loading) are the same for all components, i.e., $n_i = \frac{M_i \times K_{i,0} \exp{\frac{\Delta H}{RT}}}{1 + \sum_i K_i \times P_i}$. Below you can see a numerical example of it.

using AdsorbedSolutionTheory
+plot!([first(l_at_300), last(l_at_300)], [-E, -E], label = "Expected value")
Example block output

Estimating properties in multicomponent adsorption.

When it comes to estimating properties in multicomponent adsorption, the Ideal Adsorption Solution Theory (IAST) has been proven accurate for a number of systems. It allows one to estimate multicomponent adsorption behavior from single component isotherms.

When formulated, estimating the loading with IAST becomes a nonlinear solve problem which can be solved in different ways. Here, we support the Nested Loop and FastIAS methods. To know more about the two and which one to choose, refer to this paper: 10.1002/aic.14684.

It can be shown analytically that IAST estimation of multicomponent loading is the same as the extendend Langmuir method when the parameter $M_i$ (saturation loading) are the same for all components, i.e., $n_i = \frac{M_i \times K_{i,0} \exp{\frac{\Delta H}{RT}}}{1 + \sum_i K_i \times P_i}$. Below you can see a numerical example of it.

using AdsorbedSolutionTheory
 import AdsorbedSolutionTheory: Rgas
 isotherm_1 = Langmuir(1.913, 6.82e-10, -21_976.40)
 isotherm_2 = Langmuir(1.913, 1.801e-9, -16_925.01)
@@ -35,4 +35,4 @@
 
 println("IAST estimated loading for component 1 is: ", round(loading_1, digits = 4))
 println("Extende langmuir estimated loading for component 1 is: ", round(loading_1_expected, digits = 4))
IAST estimated loading for component 1 is: 0.3377
-Extende langmuir estimated loading for component 1 is: 0.3377
+Extende langmuir estimated loading for component 1 is: 0.3377