pytanksim.classes.fluidsorbentclasses

Contains classes related to the fluids and sorbents to be simulated.

More specifically, contains the StoredFluid, SorbentMaterial, ModelIsotherm, and its derivatives.

Classes

StoredFluid

A class to calculate the properties of the fluid being stored.

ModelIsotherm

A base class for model isotherm objects.

DAModel

A class for the Dubinin-Astakhov model for adsorption in micropores.

MDAModel

A class for the Modified Dubinin-Astakhov model for adsorption.

SorbentMaterial

Class containing the properties of a sorbent material.

Module Contents

class pytanksim.classes.fluidsorbentclasses.StoredFluid(fluid_name: str, EOS: str = 'HEOS', mole_fractions: List = None)

A class to calculate the properties of the fluid being stored.

fluid_name

The name of the fluid being stored which corresponds to fluid names in the package CoolProp.

Type:

str

EOS

The name of the equation of state to be used for the calculations of fluid properties by the package CoolProp.

Type:

str

backend

The CoolProp backend used for calculation of fluid properties at various conditions.

Type:

CoolProp.AbstractState

Initialize a StoredFluid object.

Parameters:
  • fluid_name (str, optional) – Name of the fluid. Valid fluid names that work with CoolProp can be found here: http://www.coolprop.org/fluid_properties/PurePseudoPure.html

  • EOS (str, optional) – Name of the equation of state to be used for calculations. Default is the Helmholtz Equation of State (HEOS).

  • mole_fraction (List) – List of mole fractions of components in a mixture.

Returns:

A class to calculate the properties of the fluid being stored.

Return type:

StoredFluid

fluid_property_dict(p: float, T: float) Dict[str, float]

Generate a dictionary of fluid properties using CoolProp.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K)

Returns:

Dictionary containing several fluid properties needed for various calculations in pytanksim. “hf” is the enthalpy (J/mol). “drho_dp” is the first partial derivative of density (mol/m^3) w.r.t. pressure (Pa). “drho_dT” is the first partial derivative of density (mol/m^3) w.r.t. temperature (K). “rhof” is density (mol/m^3). “dh_dp” is the first partial derivative of enthalpy (J/mol) w.r.t. pressure (Pa). “dh_dT” is the first partial derivative of enthalpy (J/mol) w.r.t. temperature (K). “uf” is the internal energy (J/mol). “du_dp” is the first partial derivative of internal energy (J/mol) w.r.t. pressure (Pa). “du_dT” is the first partial derivative of internal energy (J/mol) w.r.t. temperature (K). “MW” is molar mass (kg/mol).

Return type:

Dict[str, float]

saturation_property_dict(T: float, Q: int = 0) Dict[str, float]

Generate a dictionary of fluid properties at saturation.

Parameters:
  • T (float) – Temperature in K.

  • Q (float) – Vapor quality of the fluid being stored.

Returns:

A dictionary containing the fluid properties at saturation at a given temperature. “psat” is the saturation vapor pressure (Pa). “dps_dT” is the first derivative of the saturation vapor pressure (Pa) w.r.t. temperature (K). “hf” is the enthalpy (J/mol). “drho_dp” is the first partial derivative of density (mol/m^3) w.r.t. pressure (Pa). “drho_dT” is the first partial derivative of density (mol/m^3) w.r.t. temperature (K). “rhof” is density (mol/m^3). “dh_dp” is the first partial derivative of enthalpy (J/mol) w.r.t. pressure (Pa). “dh_dT” is the first partial derivative of enthalpy (J/mol) w.r.t. temperature (K). “uf” is the internal energy (J/mol). “du_dp” is the first partial derivative of internal energy (J/mol) w.r.t. pressure (Pa). “du_dT” is the first partial derivative of internal energy (J/mol) w.r.t. temperature (K). “MW” is molar mass (kg/mol).

Return type:

Dict[str, float]

determine_phase(p: float, T: float) str

Determine the phase of the fluid being stored.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

Returns:

String that could either be “Supercritical”, “Gas”, “Liquid”, or “Saturated” depending on the bulk fluid phase.

Return type:

str

class pytanksim.classes.fluidsorbentclasses.ModelIsotherm

A base class for model isotherm objects.

Contains methods to calculate various thermodynamic properties of the adsorbed phase.

pressure_from_absolute_adsorption(n_abs: float, T: float, p_max_guess: float = 35000000.0) float

Calculate a pressure value corresponding to an adsorbed amount.

Parameters:
  • n_abs (float) – Amount adsorbed (mol/kg).

  • T (float) – Temperature (K).

  • p_max_guess (float, optional) – Maximum pressure (Pa) for the optimization. The default is 20E6. If the value provided is larger than the maximum that can be handled by the CoolProp backend, it will take the maximum that can be handled by the CoolProp backend.

Returns:

Pressure (Pa) corresponding to the specified adsorbed amount and temperature value.

Return type:

float

isosteric_enthalpy(p: float, T: float, q: float = 1) float

Calculate isosteric adsorbed enthalpy (J/mol).

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

Isosteric enthalpy of adsorption (J/mol).

Return type:

float

isosteric_internal_energy(p: float, T: float, q: float = 1) float

Calculate the isosteric internal energy of the adsorbed phase.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

Isosteric internal energy of the adsorbed phase (J/mol).

Return type:

float

_derivfunc(func: Callable, var: int, point: float, qinit: float, stepsize: float) float

Calculate the first partial derivative.

It automatically decides the direction of the derivative so that the evaluations are done for fluids at the same phases. Otherwise, there will be discontinuities in the fluid properties at different phases which causes the resulting derivative values to be invalid.

_derivfunc_second(func: Callable, point: float, qinit: float, stepsize: float) float

Calculate the second partial derivative.

It automatically decides the direction of the derivative so that the evaluations are done for fluids at the same phases. Otherwise, there will be discontinuities in the fluid properties at different phases which causes the resulting derivative values to be invalid.

isosteric_energy_temperature_deriv(p: float, T: float, q: float = 1, stepsize: float = 0.001) float

Calculate first derivative of isosteric internal energy w.r.t. T.

This function calculates the first partial derivative of the isosteric internal energy of the adsorbed phase (J/mol) w.r.t. temperature (K).

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

  • stepsize (float, optional) – Stepsize for numerical derivative. The default is 1E-3.

Returns:

The first partial derivative of the isosteric internal energy of the adsorbed phase (J/mol) w.r.t. temperature (K).

Return type:

float

differential_energy(p: float, T: float, q: float = 1) float

Calculate the differential energy of adsorption (J/mol).

The calculation is based on Myers & Monson [1]_.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

The differential energy of adsorption (J/mol).

Return type:

float

Notes

differential_heat(p: float, T: float, q: float = 1) float

Calculate the differential heat of adsorption (J/mol).

The calculation is based on Myers & Monson [1]_.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

The differential heat of adsorption (J/mol).

Return type:

float

Notes

internal_energy_adsorbed(p: float, T: float, q: float = 1) float

Calculate the molar integral internal energy of adsorption (J/mol).

The calculation is based on Myers & Monson [1]_.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

The differential energy of adsorption (J/mol).

Return type:

float

Notes

areal_immersion_energy(T: float) float

Calculate the areal energy of immersion (J/m^2).

The calculation is based on the one written in Rouquerol et al. [1]_.

Parameters:

T (float) – Temperature (K).

Returns:

Areal energy of immersion (J/m^2)

Return type:

float

class pytanksim.classes.fluidsorbentclasses.DAModel(sorbent: str, stored_fluid: StoredFluid, w0: float, f0: float, eps: float, m: float = 2, k: float = 2, rhoa: float = None, va: float = None, va_mode: str = 'Constant', rhoa_mode: str = 'Constant', f0_mode: str = 'Dubinin')

Bases: ModelIsotherm

A class for the Dubinin-Astakhov model for adsorption in micropores.

sorbent

Name of sorbent material.

Type:

str

stored_fluid

Object containing properties of the adsorbate.

Type:

StoredFluid

w0

The volume of the adsorbed phase at saturation (m^3/kg).

Type:

float

f0

The fugacity at adsorption saturation (Pa).

Type:

float

eps

Characteristic energy of adsorption (J/mol).

Type:

float

m

The empirical heterogeneity parameter for the Dubinin-Astakhov model. The default is 2.

Type:

float, optional

k

The empirical heterogeneity parameter for Dubinin’s approximation of the saturation fugacity above critical temperatures. The default is 2.

Type:

float, optional

rhoa

The density of the adsorbed phase (mol/m^3). The default is None. If None, the value will be taken as the liquid density at 1 bar.

Type:

float, optional

va

The volume of the adsorbed phase (m^3/kg). The default is None. If None and va_mode is “Constant”, the va_mode will be switched to “Excess” and the va will be assumed to be 0.

Type:

float, optional

va_mode

Determines how the adsorbed phase volume is calculated. “Excess” assumes that the adsorbed phase volume is 0, so the model calculates excess adsorption instead of absolute adsorption. “Constant” assumes a constant adsorbed phase volume. “Vary” will assume that the adsorbed phase volume varies according to the pore filling mechanism posited by the Dubinin-Astakhov equation. The default is “Constant”, but if the parameter va is not specified it will switch to “Excess”.

Type:

str, optional

rhoa_mode

Determines how the adsorbed phase density is calculated. “Ozawa” uses Ozawa’s approximation to calculate the adsorbed phase density. “Constant” assumes a constant adsorbed phase volume. The default is “Constant”.

Type:

str, optional

f0_mode

Determines how the fugacity at saturation is calculated. “Dubinin” uses Dubinin’s approximation. “Constant” assumes a constant value for the fugacity at saturation. The default is “Dubinin”.

Type:

str, optional

Initialize the DAModel class.

Parameters:
  • sorbent (str) – Name of sorbent material.

  • stored_fluid (StoredFluid) – Object containing properties of the adsorbate.

  • w0 (float) – The volume of the adsorbed phase at saturation (m^3/kg).

  • f0 (float) – The fugacity at adsorption saturation (Pa).

  • eps (float) – Characteristic energy of adsorption (J/mol).

  • m (float, optional) – The empirical heterogeneity parameter for the Dubinin-Astakhov model. The default is 2.

  • k (float, optional) – The empirical heterogeneity parameter for Dubinin’s approximation of the saturation fugacity above critical temperatures. The default is 2.

  • va (float, optional) – The volume of the adsorbed phase (m^3/kg). The default is None.

  • rhoa (float, optional) – The density of the adsorbed phase (mol/m^3). The default is None. If None, the value will be taken as the liquid density at 1 bar.

  • va_mode (str, optional) – Determines how the adsorbed phase volume is calculated. “Excess” assumes that the adsorbed phase volume is 0, so the model calculates excess adsorption instead of absolute adsorption. “Constant” assumes a constant adsorbed phase volume. “Vary” will assume that the adsorbed phase volume varies according to the pore filling mechanism posited by the Dubinin-Astakhov equation. The default is “Constant”, but if the parameter va is not specified it will switch to “Excess”.

  • rhoa_mode (str, optional) – Determines how the adsorbed phase density is calculated. “Ozawa” uses Ozawa’s approximation to calculate the adsorbed phase density. “Constant” assumes a constant adsorbed phase volume. The default is “Constant”.

  • f0_mode (str, optional) – Determines how the fugacity at saturation is calculated. “Dubinin” uses Dubinin’s approximation. “Constant” assumes a constant value for the fugacity at saturation. The default is “Dubinin”.

Returns:

A DAModel object which can calculate excess and absolute adsorption at various conditions as well as the thermophysical properties of the adsorbed phase.

Return type:

DAModel

f0_calc(T: float) float

Calculate the fugacity at saturation (Pa) at a given temperature.

Parameters:

T (float) – Temperature (K).

Returns:

Fugacity at saturation (Pa).

Return type:

float

rhoa_calc(T: float) float

Calculate the density of the adsorbed phase at a given temperature.

Parameters:

T (float) – Temperature (K).

Returns:

The density of the adsorbed phase (mol/m^3).

Return type:

float

v_ads(p: float, T: float) float

Calculate the volume of the adsorbed phase (m^3/kg).

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

Returns:

Volume of the adsorbed phase (m^3/kg).

Return type:

float

n_absolute(p: float, T: float) float

Calculate the absolute adsorbed amount at a given condition.

Parameters:
  • p (float) – Pressure(Pa).

  • T (float) – Temperature(K).

Returns:

Absolute adsorbed amount (mol/kg).

Return type:

float

n_excess(p: float, T: float, q: float = 1) float

Calculate the excess adsorbed amount at a given condition.

Parameters:
  • p (float) – Pressure (Pa)

  • T (float) – Temperature (K)

  • q (float, optional) – The vapor quality of the bulk adsorbate. Can vary between 0 and 1. The default is 1.

Returns:

Excess adsorbed amount (mol/kg).

Return type:

float

differential_energy(p, T, q)

Calculate the differential energy of adsorption (J/mol).

The calculation is based on Myers & Monson [1]_.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

The differential energy of adsorption (J/mol).

Return type:

float

Notes

internal_energy_adsorbed(p: float, T: float, q: float = 1) float

Calculate the molar integral internal energy of adsorption (J/mol).

The calculation is based on Myers & Monson [1]_.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

The differential energy of adsorption (J/mol).

Return type:

float

Notes

classmethod from_ExcessIsotherms(ExcessIsotherms: List[pytanksim.classes.excessisothermclass.ExcessIsotherm], stored_fluid: StoredFluid = None, sorbent: str = None, w0guess: float = 0.001, f0guess: float = 1470000000.0, epsguess: float = 3000, vaguess: float = 0.001, rhoaguess: float = None, mguess: float = 2.0, kguess: float = 2.0, rhoa_mode: str = 'Fit', f0_mode: str = 'Fit', m_mode: str = 'Fit', k_mode: str = 'Fit', va_mode: str = 'Excess', pore_volume: float = 0.003, verbose: bool = True) DAModel

Fit the DA model to a list of ExcessIsotherm data.

Parameters:
  • ExcessIsotherms (List[ExcessIsotherm]) – A list containing ExcessIsotherm objects which contain measurement data at various temperatures.

  • stored_fluid (StoredFluid, optional) – Object for calculating the properties of the adsorbate. The default is None. If None, the StoredFluid object inside of one of the ExcessIsotherm objects passed will be used.

  • sorbent (str, optional) – Name of sorbent material. The default is None. If None, name will be taken from one of the ExcessIsotherm objects passed.

  • w0guess (float, optional) – The initial guess for the adsorbed phase volume at saturation (m^3/kg). The default is 0.001.

  • f0guess (float, optional) – The initial guess for the fugacity at saturation (Pa). The default is 1470E6.

  • epsguess (float, optional) – The initial guess for the characteristic energy of adsorption (J/mol). The default is 3000.

  • vaguess (float, optional) – The initial guess for the volume of the adsorbed phase (m^3/kg). The default is 0.001.

  • rhoaguess (float, optional) – The initial guess for the adsorbed phase density (mol/m^3). The default is None. If None, it will be taken as the liquid density at 1 bar.

  • mguess (float, optional) – The initial guess for the heterogeneity parameter of the Dubinin-Astakhov equation. The default is 2.0.

  • kguess (float, optional) – The initial guess for the heterogeneity parameter of Dubinin’s approximation method for saturation fugacity. The default is 2.0.

  • rhoa_mode (str, optional) – Determines how the density of the adsorbed phase (rhoa) is calculated. If “Fit”, rhoa is a constant to be fitted statistically. If “Ozawa”, Ozawa’s approximation is used to calculate rhoa and rhoa is not a fitting parameter. If “Constant”, the user supplied value for rhoaguess is taken as the density. The default is “Fit”.

  • f0_mode (str, optional) – Determines how the fugacity at saturation (f0) is calculated. If “Fit” then f0 is a constant to be statistically fitted to the data. If “Dubinin” then Dubinin’s approximation is used. If “Constant” then the user supplied value for f0guess is used. The default is “Fit”.

  • m_mode (str, optional) – Determines whether the heterogeneity parameter of the Dubinin- Astakhov equation is taken as a user-supplied constant (if “Constant”) or a fitted parameter (if “Fit”). The default is “Fit”.

  • k_mode (str, optional) – Determines whether the heterogeneity parameter of Dubinin’s approximation for the fugacity above the critical temperature is taken as a user-supplied constant value (if “Constant”) or as a statistically fitted parameter (if “Fit”). The default is “Fit”.

  • va_mode (str, optional) – Determines how the volume of the adsorbed phase is calculated. If “Fit”, the value is a statistically fitted constant. If “Constant”, the value is the user defined value vaguess. If “Vary”, the value varies w.r.t. pressure according to the micropore filling mechanism posited by the Dubinin-Astakhov model. The default is “Excess”.

  • pore_volume (float, optional) – The experimentally measured pore volume of the sorbent material (m^3/kg). It serves as the maximum possible physical value for the parameters w0 and va. The default is 0.003.

  • verbose (bool, optional) – Determines whether or not the complete fitting quality report is logged for the user. The default is True.

Returns:

A DAModel object which can calculate excess and absolute adsorption at various conditions as well as the thermophysical properties of the adsorbed phase.

Return type:

DAModel

class pytanksim.classes.fluidsorbentclasses.MDAModel(sorbent: str, stored_fluid: StoredFluid, nmax: float, f0: float, alpha: float, beta: float, va: float, m: float = 2, k: float = 2, va_mode: str = 'Constant', f0_mode: str = 'Constant')

Bases: ModelIsotherm

A class for the Modified Dubinin-Astakhov model for adsorption.

A key modification compared to the DA model is the use of the enthalpic and entropic factors to calculate the adsorption energy as a function of temperature instead of treating it as a constant.

Initialize the MDAModel class.

Parameters:
  • sorbent (str) – Name of the sorbent material.

  • stored_fluid (StoredFluid) – Object to calculate the thermophysical properties of the adsorbate.

  • nmax (float) – Maximum adsorbed amount (mol/kg) at saturation.

  • f0 (float) – Fugacity at saturation (Pa).

  • alpha (float) – The empirical enthalpic factor for determining the characteristic energy of adsorption.

  • beta (float) – The empirical entropic factor for determining the characteristic energy of adsorption.

  • va (float) – The volume of the adsorbed phase (m^3/kg).

  • m (float, optional) – The empirical heterogeneity parameter for the Dubinin-Astakhov model. The default is 2.

  • k (float, optional) – The empirical heterogeneity parameter for Dubinin’s approximation of the saturation fugacity above critical temperatures. The default is 2.

  • va_mode (str, optional) – Determines how the adsorbed phase density is calculated. “Ozawa” uses Ozawa’s approximation to calculate the adsorbed phase density. “Constant” assumes a constant adsorbed phase volume. The default is “Constant”.

  • f0_mode (str, optional) – Determines how the fugacity at saturation is calculated. “Dubinin” uses Dubinin’s approximation. “Constant” assumes a constant value for the fugacity at saturation. The default is “Constant”.

Returns:

An MDAModel object. It can calculate the excess and absolute adsorbed amounts at various pressures and temperatures, and it can provide thermophysical properties of the adsorbed phase.

Return type:

MDAModel

n_absolute(p: float, T: float) float

Calculate the absolute adsorbed amount at given conditions.

Parameters:
  • p (float) – Pressure (Pa)

  • T (float) – Temperature (K)

Returns:

Absolute adsorbed amount (mol/kg).

Return type:

float

v_ads(p: float, T: float) float

Calculate the adsorbed phase volume at the given condtions.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

Returns:

Adsorbed phase volume (m^3/kg)

Return type:

float

n_excess(p: float, T: float, q: float = 1) float

Calculate the excess adsorbed amount at the given conditions.

Parameters:
  • p (float) – Pressure (Pa)

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 and 1. The default is 1.

Returns:

Excess adsorbed amount (mol/kg).

Return type:

float

internal_energy_adsorbed(p: float, T: float, q: float = 1) float

Calculate the molar integral internal energy of adsorption (J/mol).

The calculation is based on Myers & Monson [1]_.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

The molar integral energy of adsorption (J/mol).

Return type:

float

Notes

differential_energy(p, T, q=1)

Calculate the differential energy of adsorption (J/mol).

The calculation is based on Myers & Monson [1]_.

Parameters:
  • p (float) – Pressure (Pa).

  • T (float) – Temperature (K).

  • q (float, optional) – Vapor quality of the bulk fluid. Can vary between 0 to 1. The default is 1.

Returns:

The differential energy of adsorption (J/mol).

Return type:

float

Notes

classmethod from_ExcessIsotherms(ExcessIsotherms: List[pytanksim.classes.excessisothermclass.ExcessIsotherm], stored_fluid: StoredFluid = None, sorbent: str = None, nmaxguess: float = 71.6, f0guess: float = 1470000000.0, alphaguess: float = 3080, betaguess: float = 18.9, vaguess: float = 0.00143, mguess: float = 2.0, kguess: float = 2.0, va_mode: str = 'Fit', f0_mode: str = 'Fit', m_mode: str = 'Fit', k_mode: str = 'Fit', beta_mode: str = 'Fit', pore_volume: float = 0.003, verbose: bool = True) MDAModel

Fit the MDA model from a list of excess adsorption data.

Parameters:
  • ExcessIsotherms (List[ExcessIsotherm]) – A list of ExcessIsotherm objects which contain measurement data at various temperatures.

  • stored_fluid (StoredFluid, optional) – Object for calculating the properties of the adsorbate. The default is None. If None, the StoredFluid object inside of one of the ExcessIsotherm objects passed will be used.

  • sorbent (str, optional) – Name of sorbent material. The default is None. If None, name will be taken from one of the ExcessIsotherm objects passed.

  • nmaxguess (float, optional) – The initial guess for the maximum adsorbed amount (mol/kg). The default is 71.6.

  • f0guess (float, optional) – The initial guess for the fugacity at saturation (Pa). The default is 1470E6.

  • alphaguess (float, optional) – The initial guess for the enthalpy factor determining the characteristic energy of adsorption. The default is 3080.

  • betaguess (float, optional) – The initial guess for the entropy factor determining the characteristic energy of adsorption. The default is 18.9.

  • vaguess (float, optional) – Initial guess for the adsorbed phase volume (m^3/kg). The default is 0.00143.

  • mguess (float, optional) – The initial guess for the heterogeneity parameter of the Dubinin-Astakhov equation. The default is 2.0.

  • kguess (float, optional) – The initial guess for the heterogeneity parameter of Dubinin’s approximation method for saturation fugacity. The default is 2.0.

  • va_mode (str, optional) – Determines how the volume of the adsorbed phase (va) is calculated. If “Fit”, va is a constant to be fitted statistically. If “Ozawa”, Ozawa’s approximation is used to calculate va and va is not a fitting parameter. If “Constant”, the user supplied value for vaguess is taken as the volume. The default is “Fit”.

  • f0_mode (str, optional) – Determines how the fugacity at saturation (f0) is calculated. If “Fit” then f0 is a constant to be statistically fitted to the data. If “Dubinin” then Dubinin’s approximation is used. If “Constant” then the user supplied value for f0guess is used. The default is “Fit”.

  • m_mode (str, optional) – Determines whether the heterogeneity parameter of the Dubinin- Astakhov equation is taken as a user-supplied constant (if “Constant”) or a fitted parameter (if “Fit”). The default is “Fit”.

  • k_mode (str, optional) – Determines whether the heterogeneity parameter of Dubinin’s approximation for the fugacity above the critical temperature is taken as a user-supplied constant value (if “Constant”) or as a statistically fitted parameter (if “Fit”). The default is “Fit”.

  • beta_mode (str, optional) – Determines whether the entropic factor determining the characteristic energy of adsorption is taken as a user-supplied constant (if “Constant”) or as a fitted parameter (if “Fit”). The default is “Fit”.

  • pore_volume (float, optional) – The experimentally measured pore volume of the sorbent material (m^3/kg). It serves as the maximum possible physical value for the parameters w0 and va. The default is 0.003.

  • verbose (bool, optional) – Determines whether or not the complete fitting quality report is logged for the user. The default is True.

Returns:

An MDAModel object. It can calculate the excess and absolute adsorbed amounts at various pressures and temperatures, and it can provide thermophysical properties of the adsorbed phase.

Return type:

MDAModel

class pytanksim.classes.fluidsorbentclasses.SorbentMaterial(skeletal_density: float, bulk_density: float, specific_surface_area: float, model_isotherm: ModelIsotherm, mass: float = 0, molar_mass: float = 0.01201, Debye_temperature: float = 1500, heat_capacity_function: Callable[[float], float] = None)

Class containing the properties of a sorbent material.

mass

Mass of sorbent (kg).

Type:

float

skeletal_density

Skeletal density of the sorbent (kg/m^3).

Type:

float

bulk_density

Tapped/compacted bulk density of the sorbent (kg/m^3).

Type:

float

specific_surface_area

Specific surface area of the sorbent (m^2/g).

Type:

float

model_isotherm

Model of fluid adsorption on the sorbent.

Type:

ModelIsotherm

molar_mass

Molar mass of the sorbent material in kg/mol. The default is 12.01E-3 which corresponds to carbon materials.

Type:

float, optional

Debye_temperature

The Debye temperature (K) determining the specific heat of the sorbent at various temperatures. The default is 1500, the value for carbon.

Type:

float, optional

heat_capacity_function

A function which takes in the temperature (K) of the sorbent and returns its specific heat capacity (J/(kg K)). If specified, this function will override the Debye model for specific heat calculation. The default is None.

Type:

Callable[[float], float], optional

Initialize the SorbentMaterial class.

Parameters:
  • skeletal_density (float) – Skeletal density of the sorbent (kg/m^3).

  • bulk_density (float) – Tapped/compacted bulk density of the sorbent (kg/m^3).

  • specific_surface_area (float) – Specific surface area of the sorbent (m^2/g).

  • model_isotherm (ModelIsotherm) – Model of fluid adsorption on the sorbent.

  • mass (float, optional) – Mass of sorbent (kg). The default is None.

  • molar_mass (float, optional) – Molar mass of the sorbent material. The default is 12.01E-3 which corresponds to carbon materials.

  • Debye_temperature (float, optional) – The Debye temperature determining the specific heat of the sorbent at various temperatures. The default is 1500, the value for carbon.

  • heat_capacity_function (Callable, optional) – A function which takes in the temperature (K) of the sorbent and returns its specific heat capacity (J/(kg K)). If specified, this function will override the Debye model for specific heat calculation. The default is None.

Returns:

Class containing the properties of a sorbent material.

Return type:

SorbentMaterial