Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Multicomponent Freundlich LDF isotherm. #259

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

ronald-jaepel
Copy link
Collaborator

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

I've rebased the branch onto master.

Status and ToDos:

  • Add Flux and Jacobian Implementation
  • Add tests
  • Complete tests
  • Add documentation

The Freundlich isotherm works in all tests configurations I threw at it (both components c_p > 1, cp == 0 and cp < 0).

@ronald-jaepel
Copy link
Collaborator Author

ronald-jaepel commented Aug 2, 2024

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

A multi-component extension to the classical Freundlich adsorption model.
A linear driving force approach is applied to obtain a kinetic form.

$$$ \begin{aligned} \frac{\mathrm{d} q_i}{\mathrm{d} t} &= k_{\text{ldf},i} \left(q_i^* - q_i \right) & i = 0, \dots, N_{\text{comp}} - 1 \\ q_i^* &= k_{f,i} c_{p,i} \left( \sum_j a_{ij} c_{p,j} + \tau \right)^{1 / n_i - 1}. \end{aligned} $$$

Here, $\tau &gt; 0$ is a small constant that ensures numerical stability.
In a rapid-equilibrium setting with a diagonal matrix (i.e., $a_{ii} = 1$ and $a_{ij} = 0$ for $j \neq i$), the traditional Freundlich isotherm is recovered.

For more information on model parameters required to define in CADET file format, see :ref:multi_component_ldf_freundlich_config.

Multi Component Linear Driving Force Freundlich
===============================================

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


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

``MCLDFFRL_KLDF``
   Rate constants in linear driving force approach

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

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

``MCLDFFRL_KF``
   Proportionality constants

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

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

``MCLDFFRL_EXP``
   Freundlich exponent

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

``MCLDFFRL_A``
   Component influences in row-major ordering

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

===================  =========================  ==================================
**Type:** double     **Range:** :math:`\ge 0`   **Length:** :math:`\text{NCOMP}^2`
===================  =========================  ================================== 

``MCLDFFRL_TAU``
   Small constant that ensures numerical stability

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

@ronald-jaepel
Copy link
Collaborator Author

I got some comments from collaborators, so this PR will need work before it can be merged. I can take care of it after my return but I'll also forward you the email. Can't do much more from my phone atm.

@ronald-jaepel ronald-jaepel removed this from the v5.0.0 "CADET-Core" milestone Sep 6, 2024
@ronald-jaepel ronald-jaepel force-pushed the feature/add_mc_freundlich_isotherm branch from aeb3281 to 3dea786 Compare October 24, 2024 16:00
Also adapt parameter units based on feedback by Benedikt Aumeier.
@ronald-jaepel
Copy link
Collaborator Author

The typos have been fixed and this is imo ready for review.

@jbreue16
Copy link
Contributor

jbreue16 commented Jan 14, 2025

Reviewing this, it just came to my attention that many binding tests are actually not part of the CI, right? e.g. the one defined here in this PR..
But this is an issue on its own (just opened #356 ), the changes you made look good to me, tests run, I think this can be squashed and merged.

@jbreue16 jbreue16 merged commit 05c443a into master Jan 14, 2025
4 checks passed
@jbreue16 jbreue16 deleted the feature/add_mc_freundlich_isotherm branch January 14, 2025 14:42
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants