Skip to content

Commit

Permalink
Add Multicomponent Sips isotherm.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleweke-bayer authored and ronald-jaepel committed Aug 2, 2024
1 parent e4c3373 commit 43f9a60
Show file tree
Hide file tree
Showing 7 changed files with 418 additions and 2 deletions.
84 changes: 84 additions & 0 deletions doc/interface/binding/multi_component_sips.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
.. _multi_component_sips_config:

Multi Component Sips
~~~~~~~~~~~~~~~~~~~~

**Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = MULTI_COMPONENT_SIPS**


``IS_KINETIC``
Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
quasi-stationary. If a single value is given, the mode is set for all
bound states. Otherwise, the adsorption mode is set for each bound
state separately.

=================== ========================= =========================================
**Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
=================== ========================= =========================================

``SIPS_KA``
Adsorption rate constants

**Unit:** :math:`s^{-1}`

=================== ========================= =========================================
**Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
=================== ========================= =========================================

``SIPS_KD``
Desorption rate constants

**Unit:** :math:`mol~m_{SP}^{-3}~s^{-1}`

=================== ========================= ==================================
**Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
=================== ========================= ==================================

``SIPS_QMAX``
Maximum adsorption capacities

**Unit:** :math:`mol~m_{SP}^{-3}`

=================== ========================= ==================================
**Type:** double **Range:** :math:`\gt 0` **Length:** NCOMP
=================== ========================= ==================================

``SIPS_EXP``
Freundlich-type exponent

=================== ========================= ==================================
**Type:** double **Range:** :math:`\gt 0` **Length:** NCOMP
=================== ========================= ==================================

``SIPS_REFC0``
Reference liquid phase concentration (optional, defaults to
:math:`1.0`)


**Unit:** :math:`mol~m_{MP}^{-3}`

=================== ========================= =========================================
**Type:** double **Range:** :math:`\gt 0` **Length:** 1
=================== ========================= =========================================

``SIPS_REFQ``
Reference solid phase concentration (optional, defaults to
:math:`1.0`)


**Unit:** :math:`mol~m_{SP}^{-3}`

=================== ========================= =========================================
**Type:** double **Range:** :math:`\gt 0` **Length:** 1
=================== ========================= =========================================

``SIPS_LINEAR_THRESHOLD``
Threshold for linearization. Originally, the liquid phase concentration
enters the adsorption rate via a power term. Below this threshold, a
quadratic approximation is used instead. This ensures numerical stability.

**Unit:** :math:`mol~m_{MP}^{-3}`

=================== ========================= =========================================
**Type:** double **Range:** :math:`\gt 0` **Length:** 1
=================== ========================= =========================================
5 changes: 5 additions & 0 deletions doc/modelling/binding/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ The models also differ in whether a mobile phase modifier (e.g., salt) is suppor
- x
- ✓
- x
* - :ref:`multi_component_sips_model`
- ✓
- ×
- ✓
- ×


.. toctree::
Expand Down
15 changes: 15 additions & 0 deletions doc/modelling/binding/multi_component_sips.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. _multi_component_sips_model:

Multi Component Sips
~~~~~~~~~~~~~~~~~~~~~~~~

The Sips binding model is a combination of the :ref:`Freundlich<freundlich_ldf_model>` and the :ref:`Langmuir adsorption model<multi_component_langmuir_model>`.

.. math::
\begin{aligned}
\frac{\mathrm{d} q_i}{\mathrm{d} t} = k_{a,i}\: \left( \frac{c_{p,i}}{ c_{\text{ref}} }\right)^{n_i}\: q_{\text{max},i} \left( 1 - \sum_{j=0}^{N_{\text{comp}} - 1} \frac{q_j}{q_{\text{max},j}} \right) - k_{d,i} \left( \frac{q_i}{q_{\text{ref}}} \right) && i = 0, \dots, N_{\text{comp}} - 1.
\end{aligned}
For more information on model parameters required to define in CADET file format, see :ref:`multi_component_sips_config`.
2 changes: 2 additions & 0 deletions src/libcadet/BindingModelFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace cadet
void registerBiLangmuirLDFModel(std::unordered_map<std::string, std::function<model::IBindingModel* ()>>& bindings);
void registerHICWaterOnHydrophobicSurfacesModel(std::unordered_map<std::string, std::function<model::IBindingModel*()>>& bindings);
void registerHICConstantWaterActivityModel(std::unordered_map<std::string, std::function<model::IBindingModel*()>>& bindings);
void registerSipsModel(std::unordered_map<std::string, std::function<model::IBindingModel*()>>& bindings);
}
}

Expand Down Expand Up @@ -75,6 +76,7 @@ namespace cadet
model::binding::registerBiLangmuirLDFModel(_bindingModels);
model::binding::registerHICWaterOnHydrophobicSurfacesModel(_bindingModels);
model::binding::registerHICConstantWaterActivityModel(_bindingModels);
model::binding::registerSipsModel(_bindingModels);
registerModel<model::SimplifiedMultiStateStericMassActionBinding>();
}

Expand Down
5 changes: 3 additions & 2 deletions src/libcadet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ set(LIBCADET_BINDINGMODEL_SOURCES
${CMAKE_SOURCE_DIR}/src/libcadet/model/binding/BiLangmuirLDFBinding.cpp
${CMAKE_SOURCE_DIR}/src/libcadet/model/binding/HICWaterOnHydrophobicSurfacesBinding.cpp
${CMAKE_SOURCE_DIR}/src/libcadet/model/binding/HICConstantWaterActivityBinding.cpp
${CMAKE_SOURCE_DIR}/src/libcadet/model/binding/SipsBinding.cpp
)

# LIBCADET_REACTIONMODEL_SOURCES holds all source files of reaction models
Expand Down Expand Up @@ -273,15 +274,15 @@ if (LAPACK_FOUND)
add_library(libcadet_static STATIC $<TARGET_OBJECTS:libcadet_object>)
set_target_properties(libcadet_static PROPERTIES OUTPUT_NAME cadet_static)
target_link_libraries(libcadet_static PUBLIC CADET::CompileOptions CADET::LibOptions PRIVATE CADET::AD libcadet_nonlinalg_static SUNDIALS::sundials_idas ${SUNDIALS_NVEC_TARGET} ${TBB_TARGET} ${EIGEN_TARGET})

# ---------------------------------------------------
# Build the shared library
# ---------------------------------------------------

add_library(libcadet_shared SHARED $<TARGET_OBJECTS:libcadet_object>)
set_target_properties(libcadet_shared PROPERTIES OUTPUT_NAME cadet)
target_link_libraries (libcadet_shared PUBLIC CADET::CompileOptions CADET::LibOptions PRIVATE CADET::AD libcadet_nonlinalg_static SUNDIALS::sundials_idas ${SUNDIALS_NVEC_TARGET} ${TBB_TARGET} ${EIGEN_TARGET})

list(APPEND LIBCADET_TARGETS libcadet_nonlinalg_static libcadet_object libcadet_static libcadet_shared)

unset(LIB_LAPACK_DEFINE)
Expand Down
Loading

0 comments on commit 43f9a60

Please sign in to comment.