From d37700c9d79a2e7f3b48612559c2db7b471962c0 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 22 Sep 2024 21:59:39 +0000 Subject: [PATCH] build based on 0073a2d --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/reference/index.html | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 7069588..8b3d0a5 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-16T14:14:10","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-22T21:59:36","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 6ec8157..f9fcf39 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 3d17850..9bf6225 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