From e66f9c81f00aa3d780ee98466270f7ad0a40f182 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 11 Dec 2024 09:45:08 +0000 Subject: [PATCH] build based on 3188e7d --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/models/models/index.html | 24 +- dev/reference/index.html | 2 +- dev/tutorials/background/index.html | 2 +- .../{711f8643.svg => ca6827e9.svg} | 68 +- .../{f1b53b42.svg => e16a9543.svg} | 110 +-- .../{d1f5a2f2.svg => eaeade3c.svg} | 76 +- dev/tutorials/getting_started/index.html | 8 +- .../{c715bc5b.svg => 2341c94e.svg} | 116 +-- .../{b0381945.svg => 52ac4e75.svg} | 124 +-- .../{15effbcb.svg => b4ee2593.svg} | 112 +-- dev/tutorials/isosteric_heat/index.html | 6 +- .../tutorial/{8ff70f46.svg => 2120ea7a.svg} | 712 ++++++++--------- .../tutorial/{d66d3c04.svg => 27b052db.svg} | 728 +++++++++--------- dev/tutorials/tutorial/774ae719.svg | 194 +++++ dev/tutorials/tutorial/7a647cb0.svg | 193 ----- .../tutorial/{c87e4fa5.svg => aafe9497.svg} | 720 ++++++++--------- .../tutorial/{782f8ced.svg => eba066f3.svg} | 112 +-- dev/tutorials/tutorial/index.html | 34 +- 20 files changed, 1673 insertions(+), 1672 deletions(-) rename dev/tutorials/getting_started/{711f8643.svg => ca6827e9.svg} (85%) rename dev/tutorials/getting_started/{f1b53b42.svg => e16a9543.svg} (85%) rename dev/tutorials/getting_started/{d1f5a2f2.svg => eaeade3c.svg} (84%) rename dev/tutorials/isosteric_heat/{c715bc5b.svg => 2341c94e.svg} (99%) rename dev/tutorials/isosteric_heat/{b0381945.svg => 52ac4e75.svg} (99%) rename dev/tutorials/isosteric_heat/{15effbcb.svg => b4ee2593.svg} (99%) rename dev/tutorials/tutorial/{8ff70f46.svg => 2120ea7a.svg} (78%) rename dev/tutorials/tutorial/{d66d3c04.svg => 27b052db.svg} (81%) create mode 100644 dev/tutorials/tutorial/774ae719.svg delete mode 100644 dev/tutorials/tutorial/7a647cb0.svg rename dev/tutorials/tutorial/{c87e4fa5.svg => aafe9497.svg} (79%) rename dev/tutorials/tutorial/{782f8ced.svg => eba066f3.svg} (82%) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index b3ed3c4..3e18031 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-05T10:20:21","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-11T09:45:02","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index ac75260..c02ea3b 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · Langmuir.jl

Langmuir.jl

Langmuir.jl is a Julia library designed to model adsorption equilibria for both single and multi-component systems.

For single-component adsorption, the library offers a wide range of isotherms, from simple one-parameter models like Henry's law to more complex two- and three-parameter models such as the Langmuir (Single and MultiSite), Freundlich, Temkin, Redlich-Peterson, Toth, and Sips isotherms. These models include temperature-dependent parameters, which are essential for estimating the isosteric heat of adsorption from pressure-loading data sets at varying temperatures. For a complete list of available models, refer to the list of supported models supported_models.

For multicomponent systems, Langmuir.jl employs the Ideal Adsorption Solution Theory (IAST) to predict the loading of different components, given their bulk pressure, temperature and individual isotherms. This approach allows for predictive modeling of multicomponent adsorption.

A complete workflow for using Langmuir.jl typically includes the following steps:

  • Data Preparation: Load your dataset, which should include adsorption loading, pressure, temperature, and heat data.

  • Isotherm Fitting: Fit the appropriate isotherm model to your data using a global optimization method to ensure accurate parameter estimation.

  • Multicomponent Loading Estimation: Use Ideal Adsorption Solution Theory (IAST) to predict the loading of each component in a multicomponent system based on bulk pressure and temperature.

  • Isosteric Heat Calculation: Estimate the isosteric heat of adsorption for single or multicomponent systems using the library's built-in functions, which account for temperature dependencies in the isotherm parameters.

Authors

+Home · Langmuir.jl

Langmuir.jl

Langmuir.jl is a Julia library designed to model adsorption equilibria for both single and multi-component systems.

For single-component adsorption, the library offers a wide range of isotherms, from simple one-parameter models like Henry's law to more complex two- and three-parameter models such as the Langmuir (Single and MultiSite), Freundlich, Temkin, Redlich-Peterson, Toth, and Sips isotherms. These models include temperature-dependent parameters, which are essential for estimating the isosteric heat of adsorption from pressure-loading data sets at varying temperatures. For a complete list of available models, refer to the list of supported models supported_models.

For multicomponent systems, Langmuir.jl employs the Ideal Adsorption Solution Theory (IAST) to predict the loading of different components, given their bulk pressure, temperature and individual isotherms. This approach allows for predictive modeling of multicomponent adsorption.

A complete workflow for using Langmuir.jl typically includes the following steps:

  • Data Preparation: Load your dataset, which should include adsorption loading, pressure, temperature, and heat data.

  • Isotherm Fitting: Fit the appropriate isotherm model to your data using a global optimization method to ensure accurate parameter estimation.

  • Multicomponent Loading Estimation: Use Ideal Adsorption Solution Theory (IAST) to predict the loading of each component in a multicomponent system based on bulk pressure and temperature.

  • Isosteric Heat Calculation: Estimate the isosteric heat of adsorption for single or multicomponent systems using the library's built-in functions, which account for temperature dependencies in the isotherm parameters.

Authors

diff --git a/dev/models/models/index.html b/dev/models/models/index.html index b31e74d..98ae2c7 100644 --- a/dev/models/models/index.html +++ b/dev/models/models/index.html @@ -1,26 +1,26 @@ Supported models · Langmuir.jl

Supported Isotherms

Here you can find the list of supported isotherm models.

No-parameter Isotherm Models

Langmuir.ZeroIsothermType
`ZeroIsotherm()`
 
-ZeroIsotherm <: IsothermModel

ZeroIsotherm represents an isotherm that has no adsorption. it can be used to define carrier gases.

Description

A zero isotherm is defined by:

n = 0

where:

  • n is the loading of the adsorbate on the adsorbent
source

One-parameter Isotherm Models

Langmuir.HenryType
`Henry(Kh, E)`
+ZeroIsotherm <: IsothermModel

ZeroIsotherm represents an isotherm that has no adsorption. it can be used to define carrier gases.

Description

A zero isotherm is defined by:

n = 0

where:

  • n is the loading of the adsorbate on the adsorbent
source

One-parameter Isotherm Models

Langmuir.HenryType
`Henry(Kh, E)`
 
-Henry <: IsothermModel

Inputs

  • Kh::T: Affinity parameter, or Henry’s constant at T → ∞ [mol/kg/Pa]
  • E::T: Adsorption energy, [J/mol]

Description

The Henry isotherm model describes the adsorption of gases on solid surfaces at low pressures, where the amount of adsorbate adsorbed is directly proportional to the pressure of the gas. This model is typically valid in the low-pressure limit of adsorption, where the adsorption sites are far from saturation and the interactions between adsorbed molecules are negligible.

The adsorption behavior follows Henry's law:

n = K * p

The energy parameter E is related to Henry's constant Kh by the equation:

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

Where:

  • R is the universal gas constant, [J/mol/K],
  • T is the temperature, [K].
source

Three-parameter Isotherm Models

Langmuir.LangmuirS1Type
`LangmuirS1(M, K₀, E)`
+Henry <: IsothermModel

Inputs

  • Kh::T: Affinity parameter, or Henry’s constant at T → ∞ [mol/kg/Pa]
  • E::T: Adsorption energy, [J/mol]

Description

The Henry isotherm model describes the adsorption of gases on solid surfaces at low pressures, where the amount of adsorbate adsorbed is directly proportional to the pressure of the gas. This model is typically valid in the low-pressure limit of adsorption, where the adsorption sites are far from saturation and the interactions between adsorbed molecules are negligible.

The adsorption behavior follows Henry's law:

n = K * p

The energy parameter E is related to Henry's constant Kh by the equation:

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

Where:

  • R is the universal gas constant, [J/mol/K],
  • T is the temperature, [K].
source

Three-parameter Isotherm Models

Langmuir.LangmuirS1Type
`LangmuirS1(M, K₀, E)`
 
-LangmuirS1 <: IsothermModel

LangmuirS1(M, K₀, E) represents the single site Langmuir isotherm model.

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [1/Pa]
  • E::T: Adsorption energy, [J/mol]

Description

The LangmuirS1 equation is given by:

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

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

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

where:

  • R is the gas constant,
  • T is the temperature.
source

Four or more parameter Isotherm Models

Langmuir.FreundlichType
`Freundlich(K₀, f₀, β, E)`
+LangmuirS1 <: IsothermModel

LangmuirS1(M, K₀, E) represents the single site Langmuir isotherm model.

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [1/Pa]
  • E::T: Adsorption energy, [J/mol]

Description

The LangmuirS1 equation is given by:

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

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

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

where:

  • R is the gas constant,
  • T is the temperature.
source

Four or more parameter Isotherm Models

Langmuir.FreundlichType
`Freundlich(K₀, f₀, β, E)`
 
- Freundlich <: IsothermModel

Inputs

  • K₀::T: Affinity parameter at T → ∞, [1/Pa]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient [K]
  • E::T: Adsorption energy, [J/mol]

Description

The Freundlich isotherm is given by:

n = K_f × pᶠ

The affinity parameter K_f is a temperature dependent and can be linked to adsorption energy E by:

K_f = K₀ × exp(-E / (RT))

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

Where:

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

Inputs

  • K₀::T: Affinity parameter at T → ∞, [1/Pa]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient [K]
  • E::T: Adsorption energy, [J/mol]

Description

The Freundlich isotherm is given by:

n = K_f × pᶠ

The affinity parameter K_f is a temperature dependent and can be linked to adsorption energy E by:

K_f = K₀ × exp(-E / (RT))

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

Where:

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

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa]¹/ᶠ
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

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 = K₀ × exp(-E / (R * T))

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

where:

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

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa]¹/ᶠ
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

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 = K₀ × exp(-E / (R * T))

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

where:

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

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa⁻¹]
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

Toth isotherm model:

n = MKP/(1 + (K*P)ᶠ)¹/ᶠ

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

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

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

where:

  • R is the gas constant,
  • T is the temperature.
source
Langmuir.UnilanType
`Unilan(M, K₀, E, f₀, β)`
+Toth <: IsothermModel

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa⁻¹]
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

Toth isotherm model:

n = MKP/(1 + (K*P)ᶠ)¹/ᶠ

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

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

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

where:

  • R is the gas constant,
  • T is the temperature.
source
Langmuir.UnilanType
`Unilan(M, K₀, E, f₀, β)`
 
-Unilan <: IsothermModel

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa⁻⁻¹]`
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

The UNILAN equation is given by:

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

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

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

The surface heterogeneity parameter f is also temperature-dependent and can be expressed as:

f = f₀ - β / T

where:

  • R is the gas constant,
  • T is the temperature.
source
Langmuir.QuadraticType
`Quadratic(K₀a, K₀b, M, Ea, Eb)`
+Unilan <: IsothermModel

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa⁻⁻¹]`
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

The UNILAN equation is given by:

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

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

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

The surface heterogeneity parameter f is also temperature-dependent and can be expressed as:

f = f₀ - β / T

where:

  • R is the gas constant,
  • T is the temperature.
source
Langmuir.QuadraticType
`Quadratic(K₀a, K₀b, M, Ea, Eb)`
 
-Quadratic <: IsothermModel

Inputs

  • K₀a::T: Affinity parameter A at T → ∞, [1/Pa]
  • K₀b::T: Affinity parameter B at T → ∞, [1/Pa^2]
  • M::T: Saturation loading, [mol/kg]
  • Ea::T: Adsorption energy A, [J/mol]
  • Eb::T: Adsorption energy B, [J/mol]

Description

The Quadratic isotherm model is given by:

n = M × (Ka + 2Kb × p) × p / (1 + p × (Ka + Kb × p))

The model assumes that the affinity parameters Ka and Kb are temperature-dependent and follow the relation:

Ka = K₀a * exp(-Ea / (RT))

Kb = K₀b * exp(-Eb / (RT))

Where:

  • Ka and Kb are the affinity parameters at temperature T,
  • R is the gas constant,
  • T is the absolute temperature.
source
Langmuir.BrunauerEmmettTellerType
`BrunauerEmmettTeller(K₀a, K₀b, M, E)`
+Quadratic <: IsothermModel

Inputs

  • K₀a::T: Affinity parameter A at T → ∞, [1/Pa]
  • K₀b::T: Affinity parameter B at T → ∞, [1/Pa^2]
  • M::T: Saturation loading, [mol/kg]
  • Ea::T: Adsorption energy A, [J/mol]
  • Eb::T: Adsorption energy B, [J/mol]

Description

The Quadratic isotherm model is given by:

n = M × (Ka + 2Kb × p) × p / (1 + p × (Ka + Kb × p))

The model assumes that the affinity parameters Ka and Kb are temperature-dependent and follow the relation:

Ka = K₀a * exp(-Ea / (RT))

Kb = K₀b * exp(-Eb / (RT))

Where:

  • Ka and Kb are the affinity parameters at temperature T,
  • R is the gas constant,
  • T is the absolute temperature.
source
Langmuir.BrunauerEmmettTellerType
`BrunauerEmmettTeller(K₀a, K₀b, M, E)`
 
-BrunauerEmmettTeller <: IsothermModel

The Brunauer-Emmett-Teller (BET) isotherm model describes multilayer adsorption on a homogeneous surface. It is widely used to characterize adsorption behavior in mesoporous materials.

Inputs

  • K₀a::T: Affinity parameter A at T → ∞, [1/Pa]
  • K₀b::T: Affinity parameter A at T → ∞, [1/Pa]
  • M::T: Saturation loading, [mol/kg]
  • E::T: Adsorption energy, [J/mol]

Description

The BET equation is given by:

n = M × K₀a × p / (1 - K₀b × p) × (1 + (K₀a - K₀b) × p)

Temperature dependence:

The affinity parameters K₀a and K₀b depend on temperature and are given by the following expressions:

K₀a = K₀a × exp(-E / (RT))

K₀b = K₀b × exp(-E / (RT))

Where:

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

The Brunauer-Emmett-Teller (BET) isotherm model describes multilayer adsorption on a homogeneous surface. It is widely used to characterize adsorption behavior in mesoporous materials.

Inputs

  • K₀a::T: Affinity parameter A at T → ∞, [1/Pa]
  • K₀b::T: Affinity parameter A at T → ∞, [1/Pa]
  • M::T: Saturation loading, [mol/kg]
  • E::T: Adsorption energy, [J/mol]

Description

The BET equation is given by:

n = M × K₀a × p / (1 - K₀b × p) × (1 + (K₀a - K₀b) × p)

Temperature dependence:

The affinity parameters K₀a and K₀b depend on temperature and are given by the following expressions:

K₀a = K₀a × exp(-E / (RT))

K₀b = K₀b × exp(-E / (RT))

Where:

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

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa⁻¹]
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

The Sips equation is given by:

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

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

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

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

where:

  • R is the gas constant,
  • T is the temperature.
source
Langmuir.LangmuirFreundlichType
`LangmuirFreundlich(M, K₀, E, f₀, β)`
+Sips <: IsothermModel

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [Pa⁻¹]
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

The Sips equation is given by:

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

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

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

The exponent f is also temperature dependent and can be expressed as:

f = f₀ - β/T

where:

  • R is the gas constant,
  • T is the temperature.
source
Langmuir.LangmuirFreundlichType
`LangmuirFreundlich(M, K₀, E, f₀, β)`
 
-LangmuirFreundlich <: IsothermModel

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [1/Pa]
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

The Langmuir-Freundlich form of the isotherm is:

n = M × K × pᶠ /(1 + K × pᶠ)

Where:

  • n is the loading of the adsorbate on the adsorbent,

Temperature dependence:

The affinity parameter K is temperature-dependent and can be expressed as:

K = K₀ × exp(-E / (RT))

The surface heterogeneity parameter f is also temperature-dependent and can be expressed as:

f = f₀ - β / T

Where:

  • R is the gas constant,
  • T is the absolute temperature.
source
Langmuir.MultiSiteType
MultiSite(isotherms::Vararg{IsothermModel}...)

given a list of isotherms, create a multisite isotherm model.

model1 = LangmuirS1(3.0,1.0,0.0)
+LangmuirFreundlich <: IsothermModel

Inputs

  • M::T: Saturation loading, [mol/kg]
  • K₀::T: Affinity parameter at T → ∞, [1/Pa]
  • E::T: Adsorption energy, [J/mol]
  • f₀::T: Surface heterogeneity parameter at T → ∞, [-]
  • β::T: Surface heterogeneity coefficient, [K]

Description

The Langmuir-Freundlich form of the isotherm is:

n = M × K × pᶠ /(1 + K × pᶠ)

Where:

  • n is the loading of the adsorbate on the adsorbent,

Temperature dependence:

The affinity parameter K is temperature-dependent and can be expressed as:

K = K₀ × exp(-E / (RT))

The surface heterogeneity parameter f is also temperature-dependent and can be expressed as:

f = f₀ - β / T

Where:

  • R is the gas constant,
  • T is the absolute temperature.
source
Langmuir.MultiSiteType
MultiSite(isotherms::Vararg{IsothermModel}...)

given a list of isotherms, create a multisite isotherm model.

model1 = LangmuirS1(3.0,1.0,0.0)
 model2 = LangmuirS1(3.0,0.9,3000.0)
-double_site_LangmuirS1 = MultiSite(model1,model2) #create a multisite model with two LangmuirS1 isotherms
source
Langmuir.ThermodynamicLangmuirType
ThermodynamicLangmuir(M, K₀, E, Bᵢᵩ)

The ThermodynamicLangmuir struct represents a thermodynamic Langmuir model with activity coefficients calculated using an aNRTL-like approach.

Parameters

  • M: Saturation loading [mol/kg]
  • K₀: Affinity parameter at high temperature [1/Pa]
  • E: Adsorption energy [J/mol]
  • Bᵢᵩ: Interaction energy parameter between adsorbate species i and vacant sites [J/mol]

Description

The Langmuir equation is given by:

nᵢ = (M * K * P) / (γᵢ/γᵩ + K * P)

where nᵢ is the adsorbed amount of species i, K is calculated as:

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

where:

  • R is the gas constant
  • T is the temperature

The activity coefficients γᵢ and γᵩ are determined using the Gibbs excess free energy, gᴱ/RT, which is calculated based on the surface fractions (θᵢ, θᵩ) and interaction parameters derived from Bᵢᵩ. This free energy value is used in the activity_coefficient function to compute the activity coefficients of the adsorbate and phantom molecules.

source
+double_site_LangmuirS1 = MultiSite(model1,model2) #create a multisite model with two LangmuirS1 isothermssource
Langmuir.ThermodynamicLangmuirType
ThermodynamicLangmuir(M, K₀, E, Bᵢᵩ)

The ThermodynamicLangmuir struct represents a thermodynamic Langmuir model with activity coefficients calculated using an aNRTL-like approach.

Parameters

  • M: Saturation loading [mol/kg]
  • K₀: Affinity parameter at high temperature [1/Pa]
  • E: Adsorption energy [J/mol]
  • Bᵢᵩ: Interaction energy parameter between adsorbate species i and vacant sites [J/mol]

Description

The Langmuir equation is given by:

nᵢ = (M * K * P) / (γᵢ/γᵩ + K * P)

where nᵢ is the adsorbed amount of species i, K is calculated as:

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

where:

  • R is the gas constant
  • T is the temperature

The activity coefficients γᵢ and γᵩ are determined using the Gibbs excess free energy, gᴱ/RT, which is calculated based on the surface fractions (θᵢ, θᵩ) and interaction parameters derived from Bᵢᵩ. This free energy value is used in the activity_coefficient function to compute the activity coefficients of the adsorbate and phantom molecules.

source
diff --git a/dev/reference/index.html b/dev/reference/index.html index 60ad220..fc9737e 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,2 +1,2 @@ -Reference · Langmuir.jl

Reference

Contents

Index

Langmuir.isosteric_heatFunction
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
Langmuir.pressureFunction

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
Langmuir.saturated_loadingFunction
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
Langmuir.loadingFunction
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
Langmuir.henry_coefficientFunction
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
Langmuir.sp_resFunction
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
+Reference · Langmuir.jl

Reference

Contents

Index

Langmuir.isosteric_heatFunction
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
Langmuir.pressureFunction

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
Langmuir.saturated_loadingFunction
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
Langmuir.loadingFunction
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
Langmuir.henry_coefficientFunction
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
Langmuir.sp_resFunction
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
diff --git a/dev/tutorials/background/index.html b/dev/tutorials/background/index.html index a1525e9..1921550 100644 --- a/dev/tutorials/background/index.html +++ b/dev/tutorials/background/index.html @@ -1,2 +1,2 @@ -Background · Langmuir.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 multicomponent 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 \cdot (V_g - V_a) \cdot \left( \frac{\partial N_i / \partial T \mid P_i}{\partial N_i / \partial P \mid 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\]

where

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

for $i = 1,...,N_c$

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

Combining the two above equations, the following nonlinear solve is set:

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

+Background · Langmuir.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 multicomponent 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 \cdot (V_g - V_a) \cdot \left( \frac{\partial N_i / \partial T \mid P_i}{\partial N_i / \partial P \mid 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\]

where

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

for $i = 1,...,N_c$

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

Combining the two above equations, the following nonlinear solve is set:

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

diff --git a/dev/tutorials/getting_started/711f8643.svg b/dev/tutorials/getting_started/ca6827e9.svg similarity index 85% rename from dev/tutorials/getting_started/711f8643.svg rename to dev/tutorials/getting_started/ca6827e9.svg index f4e23b7..00e13f0 100644 --- a/dev/tutorials/getting_started/711f8643.svg +++ b/dev/tutorials/getting_started/ca6827e9.svg @@ -1,48 +1,48 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/f1b53b42.svg b/dev/tutorials/getting_started/e16a9543.svg similarity index 85% rename from dev/tutorials/getting_started/f1b53b42.svg rename to dev/tutorials/getting_started/e16a9543.svg index 5f83218..d3e90a9 100644 --- a/dev/tutorials/getting_started/f1b53b42.svg +++ b/dev/tutorials/getting_started/e16a9543.svg @@ -1,69 +1,69 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/d1f5a2f2.svg b/dev/tutorials/getting_started/eaeade3c.svg similarity index 84% rename from dev/tutorials/getting_started/d1f5a2f2.svg rename to dev/tutorials/getting_started/eaeade3c.svg index f2c1f6a..1d5589a 100644 --- a/dev/tutorials/getting_started/d1f5a2f2.svg +++ b/dev/tutorials/getting_started/eaeade3c.svg @@ -1,52 +1,52 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/index.html b/dev/tutorials/getting_started/index.html index 286158d..748933e 100644 --- a/dev/tutorials/getting_started/index.html +++ b/dev/tutorials/getting_started/index.html @@ -10,13 +10,13 @@ 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 Langmuir.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 Langmuir.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 Langmuir: 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 Langmuir: Rgas
 ΔH = map(P -> isosteric_heat(isotherm, P, 300.), 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., $M_1 = M_2 = ... = M_{N_c}$. The extended langmuir has the form $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 verification of IAST for that condition.

using Langmuir
+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., $M_1 = M_2 = ... = M_{N_c}$. The extended langmuir has the form $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 verification of IAST for that condition.

using Langmuir
 import Langmuir: Rgas
 isotherm_1 = LangmuirS1(1.913, 6.82e-10, -21_976.40)
 isotherm_2 = LangmuirS1(1.913, 1.801e-9, -16_925.01)
@@ -34,4 +34,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 diff --git a/dev/tutorials/isosteric_heat/c715bc5b.svg b/dev/tutorials/isosteric_heat/2341c94e.svg similarity index 99% rename from dev/tutorials/isosteric_heat/c715bc5b.svg rename to dev/tutorials/isosteric_heat/2341c94e.svg index e41df88..8e68ee6 100644 --- a/dev/tutorials/isosteric_heat/c715bc5b.svg +++ b/dev/tutorials/isosteric_heat/2341c94e.svg @@ -1,72 +1,72 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/isosteric_heat/b0381945.svg b/dev/tutorials/isosteric_heat/52ac4e75.svg similarity index 99% rename from dev/tutorials/isosteric_heat/b0381945.svg rename to dev/tutorials/isosteric_heat/52ac4e75.svg index 42cf7d5..7a0aa2a 100644 --- a/dev/tutorials/isosteric_heat/b0381945.svg +++ b/dev/tutorials/isosteric_heat/52ac4e75.svg @@ -1,76 +1,76 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/isosteric_heat/15effbcb.svg b/dev/tutorials/isosteric_heat/b4ee2593.svg similarity index 99% rename from dev/tutorials/isosteric_heat/15effbcb.svg rename to dev/tutorials/isosteric_heat/b4ee2593.svg index f1cfcea..7fef0a2 100644 --- a/dev/tutorials/isosteric_heat/15effbcb.svg +++ b/dev/tutorials/isosteric_heat/b4ee2593.svg @@ -1,70 +1,70 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/isosteric_heat/index.html b/dev/tutorials/isosteric_heat/index.html index 80530f5..302d965 100644 --- a/dev/tutorials/isosteric_heat/index.html +++ b/dev/tutorials/isosteric_heat/index.html @@ -27,7 +27,7 @@ ΔH_analytical = Q_st1(toth, loading_350_t, 350.0) -plot!(loading_350_t/toth.M, ΔH_analytical, label = "Analytical - 350 K", color = :slateblue2)Example block output

It can be noticed that the isosteric heat for the Toth isotherm blows for high surface coverages.

Multi-site Langmuir can also account for surface heterogeneity. Below you can see the behavior of the isosteric heat as a function of the surface coverage.

dualsite = MultiSite(LangmuirS1(2.337, 6.6e-11, 8.3144*-5340.87),
+plot!(loading_350_t/toth.M, ΔH_analytical, label = "Analytical - 350 K", color = :slateblue2)
Example block output

It can be noticed that the isosteric heat for the Toth isotherm blows for high surface coverages.

Multi-site Langmuir can also account for surface heterogeneity. Below you can see the behavior of the isosteric heat as a function of the surface coverage.

dualsite = MultiSite(LangmuirS1(2.337, 6.6e-11, 8.3144*-5340.87),
  LangmuirS1(3.490, 3.4e-11, 8.3144*-4273.13))
 p_range = 1e-5:10.0:10*101325.0 |> collect
 loading_270 = loading_at_T(dualsite, p_range, 270.0)
@@ -35,7 +35,7 @@
 ΔH_270 = map(p -> isosteric_heat(dualsite, p, 270.0), p_range)
 ΔH_350 = map(p -> isosteric_heat(dualsite, p, 350.0), p_range)
 plot(loading_270/(2.337 + 3.490), ΔH_270, framestyle=:box, title = "Dualsite Langmuir", xlabel = "covered fraction", ylabel = "ΔH (J/mol)", label = "270 K")
-plot!(loading_350/(2.337 + 3.490), ΔH_350, framestyle=:box, label = "350 K")
Example block output

It can bee seen that the isosteric heat presents an s-shape varying from more energetic to less energetic sites.

Some literature points that these behaviors are non-physical and potentially problematic when trying to model thermal effects in adsorption.

To overcome it, the adsorption Nonrandom Two-Liquid (aNRTL) activity coefficient model into an activity-based formulation for Langmuir isotherm, Chang et al. 2020 proposed a thermodynamic Langmuir (tL) which seems to have superior properties for predicting the isosteric heat compared to Toth and Multisite Langmuir.

The equation for the loading $n_i$ in terms of $\gamma_i$ and $\gamma_\phi$ is:

\[n_i = \frac{M K_i P}{\frac{\gamma_i}{\gamma_\phi} + K_i P}\]

where $K_i$ is also a function of temperature $K_i = K_i^\circ\exp{\frac{-E}{RT}}$, and the activity coefficients $\gamma_i$ and $\gamma_\phi$ are given by:

\[\gamma_i = \exp\left(\frac{d \frac{g^E}{RT}}{d \theta_i}\right)\]

\[\gamma_\phi = \exp\left(\frac{d \frac{g^E}{RT}}{d \theta_{\phi}}\right)\]

The Gibbs excess free energy term, $\frac{g^E}{RT}$, is expressed as:

\[\frac{g^E}{RT} = \frac{\theta_i \theta_\phi \tau_{i\phi} (G_{i\phi} - 1)}{\theta_i G_{i\phi} + \theta_\phi}\]

where, $B_{i\phi}$ is a model parameter, $\tau_{i\phi} = B_{i\phi} / T$, $G_{i\phi} = \exp(-0.3 \cdot \tau_{i\phi})$.

Here, $\theta_i$ and $\theta_\phi$ are the coverage terms for the adsorbed species and adsorption sites, respectively ($\theta_i + \theta_{\phi} = 1$), and $T$ is the temperature.

Below you can see how to iniatilize the thermodynamic langmuir model in Langmuir.jl and use it to predict the loading and isosteric heat.

tlang = ThermodynamicLangmuir(5.890, 6.1e-11, -4599.86*8.3144, -762.51)
+plot!(loading_350/(2.337 + 3.490), ΔH_350, framestyle=:box, label = "350 K")
Example block output

It can bee seen that the isosteric heat presents an s-shape varying from more energetic to less energetic sites.

Some literature points that these behaviors are non-physical and potentially problematic when trying to model thermal effects in adsorption.

To overcome it, the adsorption Nonrandom Two-Liquid (aNRTL) activity coefficient model into an activity-based formulation for Langmuir isotherm, Chang et al. 2020 proposed a thermodynamic Langmuir (tL) which seems to have superior properties for predicting the isosteric heat compared to Toth and Multisite Langmuir.

The equation for the loading $n_i$ in terms of $\gamma_i$ and $\gamma_\phi$ is:

\[n_i = \frac{M K_i P}{\frac{\gamma_i}{\gamma_\phi} + K_i P}\]

where $K_i$ is also a function of temperature $K_i = K_i^\circ\exp{\frac{-E}{RT}}$, and the activity coefficients $\gamma_i$ and $\gamma_\phi$ are given by:

\[\gamma_i = \exp\left(\frac{d \frac{g^E}{RT}}{d \theta_i}\right)\]

\[\gamma_\phi = \exp\left(\frac{d \frac{g^E}{RT}}{d \theta_{\phi}}\right)\]

The Gibbs excess free energy term, $\frac{g^E}{RT}$, is expressed as:

\[\frac{g^E}{RT} = \frac{\theta_i \theta_\phi \tau_{i\phi} (G_{i\phi} - 1)}{\theta_i G_{i\phi} + \theta_\phi}\]

where, $B_{i\phi}$ is a model parameter, $\tau_{i\phi} = B_{i\phi} / T$, $G_{i\phi} = \exp(-0.3 \cdot \tau_{i\phi})$.

Here, $\theta_i$ and $\theta_\phi$ are the coverage terms for the adsorbed species and adsorption sites, respectively ($\theta_i + \theta_{\phi} = 1$), and $T$ is the temperature.

Below you can see how to iniatilize the thermodynamic langmuir model in Langmuir.jl and use it to predict the loading and isosteric heat.

tlang = ThermodynamicLangmuir(5.890, 6.1e-11, -4599.86*8.3144, -762.51)
 p_range = 1e-5:10.0:10*101325.0 |> collect
 loading_270 = loading_at_T(tlang, p_range, 270.0)
 loading_350 = loading_at_T(tlang, p_range, 350.0)
@@ -43,4 +43,4 @@
 ΔH_350 = map(p -> isosteric_heat(tlang, p, 350.0), p_range)
 plot(loading_270/tlang.M, ΔH_270, framestyle=:box, xlabel = "covered fraction", ylabel = "ΔH (J/mol)", title = "tLangmuir", label = "270 K")
 plot!(loading_350/tlang.M, ΔH_350, framestyle=:box, label = "350 K")
-plot!([minimum(loading_270), maximum(loading_270)]./tlang.M,  [-4599.86*8.3144, -4599.86*8.3144], label = "Langmuir")
Example block output

It is evident that the thermodynamic Langmuir model exhibits behavior that is notably different from both the Toth and multisite Langmuir models. As highlighted in existing literature, the thermodynamic Langmuir model offers more accurate estimates of isosteric heat while maintaining high predictive accuracy for equilibrium loading. It can also be use to predict binary adsorption.

Analytical expressions for the isosteric heat can become quite extensive. In fact, there is an entire manuscript dedicated to deriving such expressions for a number of isotherms.

In Langmuir.jl, we leverage automatic differentiation to get accurate estimates of the required derivatives for the isosteric heat without requiring such extensive derivations.

+plot!([minimum(loading_270), maximum(loading_270)]./tlang.M, [-4599.86*8.3144, -4599.86*8.3144], label = "Langmuir")Example block output

It is evident that the thermodynamic Langmuir model exhibits behavior that is notably different from both the Toth and multisite Langmuir models. As highlighted in existing literature, the thermodynamic Langmuir model offers more accurate estimates of isosteric heat while maintaining high predictive accuracy for equilibrium loading. It can also be use to predict binary adsorption.

Analytical expressions for the isosteric heat can become quite extensive. In fact, there is an entire manuscript dedicated to deriving such expressions for a number of isotherms.

In Langmuir.jl, we leverage automatic differentiation to get accurate estimates of the required derivatives for the isosteric heat without requiring such extensive derivations.

diff --git a/dev/tutorials/tutorial/8ff70f46.svg b/dev/tutorials/tutorial/2120ea7a.svg similarity index 78% rename from dev/tutorials/tutorial/8ff70f46.svg rename to dev/tutorials/tutorial/2120ea7a.svg index 1222f7f..482d66e 100644 --- a/dev/tutorials/tutorial/8ff70f46.svg +++ b/dev/tutorials/tutorial/2120ea7a.svg @@ -1,370 +1,370 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/tutorial/d66d3c04.svg b/dev/tutorials/tutorial/27b052db.svg similarity index 81% rename from dev/tutorials/tutorial/d66d3c04.svg rename to dev/tutorials/tutorial/27b052db.svg index d5f7fd3..b63c678 100644 --- a/dev/tutorials/tutorial/d66d3c04.svg +++ b/dev/tutorials/tutorial/27b052db.svg @@ -1,378 +1,378 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/tutorial/774ae719.svg b/dev/tutorials/tutorial/774ae719.svg new file mode 100644 index 0000000..2378e1d --- /dev/null +++ b/dev/tutorials/tutorial/774ae719.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/tutorial/7a647cb0.svg b/dev/tutorials/tutorial/7a647cb0.svg deleted file mode 100644 index add3398..0000000 --- a/dev/tutorials/tutorial/7a647cb0.svg +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/tutorials/tutorial/c87e4fa5.svg b/dev/tutorials/tutorial/aafe9497.svg similarity index 79% rename from dev/tutorials/tutorial/c87e4fa5.svg rename to dev/tutorials/tutorial/aafe9497.svg index 0fbc676..bca8354 100644 --- a/dev/tutorials/tutorial/c87e4fa5.svg +++ b/dev/tutorials/tutorial/aafe9497.svg @@ -1,374 +1,374 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/tutorial/782f8ced.svg b/dev/tutorials/tutorial/eba066f3.svg similarity index 82% rename from dev/tutorials/tutorial/782f8ced.svg rename to dev/tutorials/tutorial/eba066f3.svg index c1d8606..8a0f44a 100644 --- a/dev/tutorials/tutorial/782f8ced.svg +++ b/dev/tutorials/tutorial/eba066f3.svg @@ -1,70 +1,70 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/tutorial/index.html b/dev/tutorials/tutorial/index.html index b62d69e..50135b6 100644 --- a/dev/tutorials/tutorial/index.html +++ b/dev/tutorials/tutorial/index.html @@ -23,7 +23,7 @@ scatter!(lp_ethylene[1][2], lp_ethylene[1][1], label = "T = 283.00 K (Ethylene)", color = :mediumspringgreen, markershape = :square, m = (3, :white, stroke(1, :springgreen2))) scatter!(lp_ethylene[3][2], lp_ethylene[3][1], label = "T = 323.00 K (Ethylene)", -markershape = :square, m = (3, :white, stroke(1, :springgreen2)))Example block output

Following the reference manuscript, the quadratic isotherm is the chosen model for fitting the data. In this tutorial, the same strategy is used.

import Langmuir: x0_guess_fit, to_vec
+markershape = :square, m = (3, :white, stroke(1, :springgreen2)))
Example block output

Following the reference manuscript, the quadratic isotherm is the chosen model for fitting the data. In this tutorial, the same strategy is used.

import Langmuir: x0_guess_fit, to_vec
 #Fitting ethane
 x0_ethane = to_vec(x0_guess_fit(Quadratic, d_ethane))
 lb_ethane = (1e-25, 1e-25, 1e-4, -80_000.0, -80_000.0)
@@ -38,24 +38,24 @@
 0.00 secs, 0 evals, 0 steps
 DE modify state:
 
-Optimization stopped after 43623 steps and 0.28 seconds
+Optimization stopped after 64608 steps and 0.41 seconds
 Termination reason: Too many steps (101) without any function evaluations (probably search has converged)
-Steps per second = 157586.73
-Function evals per second = 138202.22
+Steps per second = 157579.72
+Function evals per second = 150694.39
 Improvements/step = Inf
-Total function evaluations = 38257
+Total function evaluations = 61785
 
 
 Best candidate found: [-15.1983, -42.9896, 1.29228, 8.83902, 10.7746]
 
 Fitness: 0.007827085
 
-Fitting loss for ethane is 0.007827084749448465
-Quadratic{Float64}(2.508748543874687e-7, 2.137337872920013e-19, 3.6410796318971985, -6898.206820368051, -47789.59987662439)
#Plotting ethane fitting
+Fitting loss for ethane is 0.007827084749448472
+Quadratic{Float64}(2.5087484082871486e-7, 2.137337809237948e-19, 3.64107963157901, -6898.2069522905, -47789.59995087956)
#Plotting ethane fitting
 loading1_ethane = loading_at_T(ethane_isotherm, lp_ethane[1][2], Ts_ethane[1])
 loading3_ethane = loading_at_T(ethane_isotherm, lp_ethane[3][2], Ts_ethane[3])
 plot!(sort(lp_ethane[1][2]), sort(loading1_ethane), color = :slateblue2, label = "Quadratic - 283.0 K")
-plot!(sort(lp_ethane[2][2]), sort(loading3_ethane), color = :slateblue2, label = "Quadratic - 323.0 K")
Example block output
#Fitting Ethylene
+plot!(sort(lp_ethane[2][2]), sort(loading3_ethane), color = :slateblue2, label = "Quadratic - 323.0 K")
Example block output
#Fitting Ethylene
 x0_ethylene = to_vec(x0_guess_fit(Quadratic, d_ethylene))
 lb_ethylene = (1e-25, 1e-25, 1e-4, -80_000.0, -80_000.0)
 ub_ethylene = (1e-1, 1e-1, 100., -500.0, -500.0)
@@ -66,24 +66,24 @@
 0.00 secs, 0 evals, 0 steps
 DE modify state:
 
-Optimization stopped after 65242 steps and 0.37 seconds
+Optimization stopped after 51522 steps and 0.27 seconds
 Termination reason: Too many steps (101) without any function evaluations (probably search has converged)
-Steps per second = 175204.65
-Function evals per second = 167416.82
+Steps per second = 189494.31
+Function evals per second = 182311.31
 Improvements/step = Inf
-Total function evaluations = 62342
+Total function evaluations = 49569
 
 
 Best candidate found: [-17.4655, -41.785, 1.34342, 9.37504, 10.6383]
 
 Fitness: 0.001567210
 
-Fitting loss for ethane is 0.0015672104793771086
-Quadratic{Float64}(2.5992273102377577e-8, 7.128313893591831e-19, 3.8321392364261095, -11790.38376551473, -41702.74719828883)
#Plotting ethylene isotherms
+Fitting loss for ethane is 0.001567210479377113
+Quadratic{Float64}(2.5992273623899577e-8, 7.128314017179977e-19, 3.8321392399818173, -11790.383725173959, -41702.74714149012)
#Plotting ethylene isotherms
 loading1_ethylene = loading_at_T(ethylene_isotherm, lp_ethylene[1][2], Ts_ethylene[1])
 loading3_ethylene = loading_at_T(ethylene_isotherm, lp_ethylene[1][2], Ts_ethylene[3])
 plot!(sort(lp_ethylene[1][2]), sort(loading1_ethylene), color = :springgreen2, label = "Quadratic - 283.0 K")
-plot!(sort(lp_ethylene[1][2]), sort(loading3_ethylene), color = :springgreen2, label = "Quadratic - 323.0 K")
Example block output

From the fitting results, the isotherm parameters closely match those reported in the reference manuscript. For example, the parameter $M$ was estimated at 3.68 in the manuscript, while it is 3.64 in this analysis. However, the energy parameters exhibit a greater discrepancy. Without calorimetric data, it's challenging to determine the accuracy of these values, as parameter identifiability is limited when relying solely on loading data.

#Ethane isosteric heat
+plot!(sort(lp_ethylene[1][2]), sort(loading3_ethylene), color = :springgreen2, label = "Quadratic - 323.0 K")
Example block output

From the fitting results, the isotherm parameters closely match those reported in the reference manuscript. For example, the parameter $M$ was estimated at 3.68 in the manuscript, while it is 3.64 in this analysis. However, the energy parameters exhibit a greater discrepancy. Without calorimetric data, it's challenging to determine the accuracy of these values, as parameter identifiability is limited when relying solely on loading data.

#Ethane isosteric heat
 P_C₂_283K = sort(lp_ethane[1][2][2:end])
 l_C₂_283K = sort(loading1_ethane[2:end])
 ΔH_C₂_283K = map(p -> isosteric_heat(ethane_isotherm, p, 283.0), P_C₂_283K)
@@ -94,7 +94,7 @@
 ΔH_C₂₌_283K = map(p -> isosteric_heat(ethylene_isotherm, p, 283.0), P_C₂₌_283K)
 
 scatter(l_C₂_283K, ΔH_C₂_283K, xlabel = "Loading (mol/kg)", ylabel = "Isosteric Heat (J/mol)", m = (4, :white, stroke(1, :lightslateblue)), markershape = :circle, label = "Ethane - 283.0 K", size = (600, 300))
-scatter!(l_C₂₌_283K, ΔH_C₂₌_283K, xlabel = "Loading (mol/kg)", ylabel = "Isosteric Heat (J/mol)", markershape = :square, m = (3, :white, stroke(1, :springgreen2)), label = "Ethylene - 283.0 K")
Example block output

The plot shows the isosteric heat of adsorption for ethane and ethylene at 283.0 K as a function of loading. Ethane exhibits a steeper decline in adsorption heat, suggesting stronger initial interactions that weaken significantly as loading increases, whereas ethylene's decline is more gradual, indicating a slower reduction in adsorption strength.

Lastly, the final analysis will utilize IAST to make predictions on the binary adsorption of ethane and ethylene.

y_C₂ = range(0.0, 1.00, 51) |> collect
+scatter!(l_C₂₌_283K, ΔH_C₂₌_283K, xlabel = "Loading (mol/kg)", ylabel = "Isosteric Heat (J/mol)", markershape = :square, m = (3, :white, stroke(1, :springgreen2)), label = "Ethylene - 283.0 K")
Example block output

The plot shows the isosteric heat of adsorption for ethane and ethylene at 283.0 K as a function of loading. Ethane exhibits a steeper decline in adsorption heat, suggesting stronger initial interactions that weaken significantly as loading increases, whereas ethylene's decline is more gradual, indicating a slower reduction in adsorption strength.

Lastly, the final analysis will utilize IAST to make predictions on the binary adsorption of ethane and ethylene.

y_C₂ = range(0.0, 1.00, 51) |> collect
 success_y_C₂ = []
 x_C₂ = []
 x_C₂₌ = []
@@ -120,4 +120,4 @@
 end
 
 plot(success_y_C₂, x_C₂, xlabel = "x", ylabel = "y", label = "ethane", framestyle=:box, size = (600, 300))
-plot!(1.0 .- success_y_C₂, x_C₂₌, label = "ethylene")
Example block output

Here you can see the x-y plot for both components.

+plot!(1.0 .- success_y_C₂, x_C₂₌, label = "ethylene")Example block output

Here you can see the x-y plot for both components.