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 Sips isotherm. #260

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Add Multicomponent Sips isotherm. #260

merged 2 commits into from
Jan 15, 2025

Conversation

ronald-jaepel
Copy link
Collaborator

@ronald-jaepel ronald-jaepel commented Aug 2, 2024

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

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

Status and ToDos:

  • Add Flux and Jacobian Implementation
  • modify to follow CADET standard of 1/n for exponent in Freundlich isotherms.
  • ensure stability at c_p == 0, either:
  • Add tests
  • Complete tests
  • Add documentation

Reference is Sips, R.: On the structure of a catalyst surface. J. Chem. Phys. 16, 490–495 (1948)

@ronald-jaepel
Copy link
Collaborator Author

ronald-jaepel commented Aug 2, 2024

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

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

@ronald-jaepel ronald-jaepel linked an issue Jan 15, 2025 that may be closed by this pull request
@jbreue16
Copy link
Contributor

wait a minute why is the CI failing when ive only updated the copyright.. ive seen this before ..

@ronald-jaepel
Copy link
Collaborator Author

ronald-jaepel commented Jan 15, 2025

That's unrelated. It's because of my error with the commit I've accidentally made to master, that is now #358

edit: No, nevermind, it's not. But it also happens on that other PR.

edit2: Yes, it might be, because the line in the log that throws the error is the one I changed. Will report back with more detail.

edit3: Yes, it was unrelated due to the changes in #358 . After re-running the CI it now completes fine.

@ronald-jaepel ronald-jaepel force-pushed the feature/sips_isotherms branch from 241f97f to 8ea9b92 Compare January 15, 2025 14:39
@jbreue16
Copy link
Contributor

I think we should keep a separate commit for changes in the freundlich isotherm and squash the rest into another commit?

@ronald-jaepel
Copy link
Collaborator Author

I'll keep the commit by Sam as-is to retain authorship, squash all Sips made by me into one and all Freundlich by me into one.

@jbreue16
Copy link
Contributor

You can also squash them all into Sams, then add yourself as co author by adding the following to the commit description:
Co-authored-by: Ronald Jäpel

@ronald-jaepel ronald-jaepel force-pushed the feature/sips_isotherms branch from 8ea9b92 to 86d5c42 Compare January 15, 2025 15:10
sleweke-bayer and others added 2 commits January 15, 2025 16:13
Based on changes made by [email protected]
Convert Sips to standard for Freundlich isotherms in CADET, which is ^(1/n) instead of ^n
Improve stability by extending linearization range into negative numbers
Update documentation
Update units in documentation
Extend tests

Co-authored-by: Ronald Jäpel <[email protected]>
Extend linearization range into negative numbers to improve stability
Extend tests
Update documentation
@ronald-jaepel ronald-jaepel force-pushed the feature/sips_isotherms branch from 86d5c42 to 53ca6ab Compare January 15, 2025 15:13
@ronald-jaepel
Copy link
Collaborator Author

Is squashed. Ready to merge

@jbreue16 jbreue16 merged commit 2040e7b into master Jan 15, 2025
4 checks passed
@jbreue16 jbreue16 deleted the feature/sips_isotherms branch January 15, 2025 16:24
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 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.

Freundlich LDF differes between documentation and implementation.
4 participants