cadet / CADET-Core

A modular, fast, and accurate simulation framework for (bio)chemical processes
Other
54 stars 26 forks source link

Add Multicomponent Sips isotherm. #260

Open ronald-jaepel opened 1 month ago

ronald-jaepel commented 1 month ago

This PR continues work by @sleweke to add the multicomponent Sips isotherm to CADET-Core.

I've rebased the branch onto master and added two minor changes to documentation and tests.

Status and ToDos:

Currently, the tests fail if any cp == 0.

ronald-jaepel commented 1 month ago

For reference, here's the current state of the documentation:

$$$ \begin{aligned} \frac{\mathrm{d} qi}{\mathrm{d} t} = k{a,i} \left( \frac{c{p,i}}{ c{\text{ref}} }\right)^{ni} q{\text{max},i} \left( 1 - \sum{j=0}^{N{\text{comp}} - 1} \frac{qj}{q{\text{max},j}} \right) - k_{d,i} \left( \frac{qi}{q{\text{ref}}} \right) && i = 0, \dots, N_{\text{comp}} - 1. \end{aligned} $$$

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
===================  =========================  =========================================