Skip to content

Commit 0cdfa20

Browse files
committed
New docu for reactions
1 parent 9db4bfa commit 0cdfa20

File tree

7 files changed

+364
-162
lines changed

7 files changed

+364
-162
lines changed

doc/interface/reaction/index.rst

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,65 @@
33
Reaction models
44
===============
55

6+
This section describes the configuration of reaction models for different phases in CADET unit operations.
7+
8+
The corresponding group that contains the reaction models for each phase reads:
9+
10+
- For bulk phase: ``/input/model/unit_XXX/reaction_bulk``
11+
- For solid phase: ``/input/model/unit_XXX/reaction_solid``
12+
- For particle phase: ``/input/model/unit_XXX/reaction_particle_YYY``
13+
- For cross phase: ``/input/model/unit_XXX/reaction_cross_phase_YYY``
14+
15+
Where ``XXX`` denotes the index of the unit operation and ``YYY`` denotes the index of the particle type.
16+
17+
Configuration Steps
18+
-------------------
19+
20+
Before defining the reaction model parameters, it is necessary to specify how many reaction models are used in each phase.
21+
22+
1. **Set the number of reactions**: This is done by setting ``/NREACT`` to the number of reaction models used in the phase.
23+
24+
For example:
25+
26+
- ``/input/model/unit_000/reaction_bulk/NREACT = 2`` indicates that 2 reaction models are used in the bulk phase
27+
- ``/input/model/unit_000/reaction_solid/NREACT = 1`` indicates that 1 reaction model is used in the solid phase
28+
29+
2. **Define reaction model parameters**: After setting ``NREACT``, the parameters for each individual reaction model are specified.
30+
31+
The group that contains the parameters of each reaction model reads:
32+
``/input/model/unit_XXX/reaction_phase/reaction_model_ZZZ``.
33+
34+
Where ``XXX`` denotes the index of the unit operation, ``phase`` is either ``bulk``, ``solid``, ``particle_YYY``,
35+
or ``cross_phase_YYY``, and ``ZZZ`` denotes the index of the reaction model (starting from ``000``).
36+
37+
**Example**: If ``NREACT = 2`` for the bulk phase, then the parameters would be found in:
38+
39+
- ``/input/model/unit_000/reaction_bulk/reaction_model_000`` (first reaction model)
40+
- ``/input/model/unit_000/reaction_bulk/reaction_model_001`` (second reaction model)
41+
42+
The reaction model parameters are specified in the following sections:
43+
44+
**Single-Phase Reaction Models** (for bulk, solid, and particle phases):
45+
646
.. toctree::
747
:maxdepth: 2
848

949
mass_action_law
1050
michaelis_menten_kinetics
1151

52+
**Cross-Phase Reaction Models** (only for cross-phase reactions):
53+
54+
.. toctree::
55+
:maxdepth: 2
56+
57+
mass_action_law_cross_phase
58+
59+
.. note::
60+
Cross-phase reaction models can **only** be used in the cross-phase configuration (``reaction_cross_phase_YYY``).
61+
They cannot be used in bulk, solid, or particle phase configurations.
62+
For reactions within a single phase, use the standard reaction models listed above.
63+
64+
1265
Externally dependent reaction models
1366
------------------------------------
1467

@@ -30,17 +83,3 @@ However, if only one index is passed in ``EXTFUN``, this external source is used
3083

3184
Note that parameter sensitivities with respect to column radius, column length, particle core radius, and particle radius may be wrong when using externally dependent reaction models.
3285
This is caused by not taking into account the derivative of the external profile with respect to column position.
33-
34-
35-
.. _multiple-particle-types_reactions:
36-
37-
Multiple particle types
38-
-----------------------
39-
40-
The group that contains the parameters of a reaction model in unit operation with index ``XXX`` reads ``/input/model/unit_XXX/reaction_particle``.
41-
This is valid for models with a single particle type.
42-
If a model has multiple particle types, it may have a different reaction model in each type.
43-
The parameters are then placed in the group ``/input/model/unit_XXX/reaction_particle_YYY`` instead, where ``YYY`` denotes the index of the particle type.
44-
45-
Note that, in any case, ``/input/model/unit_XXX/reaction_particle_000`` contains the parameters of the first (and possibly sole) particle type.
46-
This group also takes precedence over a possibly existing ``/input/model/unit_XXX/adsorption_particle`` group.

doc/interface/reaction/mass_action_law.rst

Lines changed: 8 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -3,157 +3,45 @@
33
Mass Action Law
44
~~~~~~~~~~~~~~~
55

6-
**Group /input/model/unit_XXX/reaction - REACTION_MODEL = MASS_ACTION_LAW**
6+
**Group /input/model/unit_XXX/reaction_phase/reaction_model_YYY - REACTION_MODEL = MASS_ACTION_LAW**
77

88
For information on model equations, refer to :ref:`mass_action_law_model`.
99

10-
``MAL_KFWD_BULK``
10+
``MAL_KFWD``
1111

1212
Forward rate constants for bulk volume reactions (available for external functions)
1313

1414
================ ========================= ===================================
1515
**Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NREACT}`
1616
================ ========================= ===================================
1717

18-
``MAL_KBWD_BULK``
18+
``MAL_KBWD``
1919

2020
Backward rate constants for bulk volume reactions (available for external functions)
2121

2222
================ ========================= ===================================
2323
**Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NREACT}`
2424
================ ========================= ===================================
25-
26-
``MAL_KFWD_LIQUID``
2725

28-
Forward rate constants for particle liquid phase reactions (available for external functions)
29-
30-
================ ========================= ===================================
31-
**Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NREACT}`
32-
================ ========================= ===================================
33-
34-
``MAL_KBWD_LIQUID``
35-
36-
Backward rate constants for particle liquid phase reactions (available for external functions)
37-
38-
================ ========================= ===================================
39-
**Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NREACT}`
40-
================ ========================= ===================================
41-
42-
``MAL_KFWD_SOLID``
43-
44-
Forward rate constants for particle solid phase reactions (available for external functions)
45-
46-
================ ========================= ===================================
47-
**Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NREACT}`
48-
================ ========================= ===================================
49-
50-
``MAL_KBWD_SOLID``
51-
52-
Backward rate constants for particle solid phase reactions (available for external functions)
53-
54-
================ ========================= ===================================
55-
**Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NREACT}`
56-
================ ========================= ===================================
57-
58-
``MAL_STOICHIOMETRY_BULK``
26+
``MAL_STOICHIOMETRY``
5927

6028
Stoichiometric matrix of bulk volume reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage
6129

6230
================ ========================================================
6331
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`
6432
================ ========================================================
65-
66-
``MAL_EXPONENTS_BULK_FWD``
6733

68-
Forward exponent matrix of bulk volume reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_BULK}` by default)
69-
70-
================ ========================================================
71-
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`
72-
================ ========================================================
73-
74-
``MAL_EXPONENTS_BULK_BWD``
34+
``MAL_EXPONENTS_FWD``
7535

76-
Backward exponent matrix of bulk volume reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_BULK}` by default)
77-
78-
================ ========================================================
79-
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`
80-
================ ========================================================
81-
82-
``MAL_STOICHIOMETRY_LIQUID``
83-
84-
Stoichiometric matrix of particle liquid phase reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage
85-
86-
================ ========================================================
87-
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`
88-
================ ========================================================
89-
90-
``MAL_EXPONENTS_LIQUID_FWD``
91-
92-
Forward exponent matrix of particle liquid phase reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_LIQUID}` by default)
93-
94-
================ ========================================================
95-
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`
96-
================ ========================================================
97-
98-
``MAL_EXPONENTS_LIQUID_BWD``
99-
100-
Backward exponent matrix of particle liquid phase reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_LIQUID}` by default)
36+
Forward exponent matrix of bulk volume reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_BULK}` by default)
10137

10238
================ ========================================================
10339
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`
10440
================ ========================================================
105-
106-
``MAL_EXPONENTS_LIQUID_FWD_MODSOLID``
107-
108-
Forward solid phase modifier exponent matrix of particle liquid phase reactions as :math:`\texttt{NTOTALBND} \times \texttt{NREACT}` matrix in row-major storage (optional, defaults to all 0)
109-
110-
================ ============================================================
111-
**Type:** double **Length:** :math:`\texttt{NTOTALBND} \cdot \texttt{NREACT}`
112-
================ ============================================================
113-
114-
``MAL_EXPONENTS_LIQUID_BWD_MODSOLID``
11541

116-
Backward solid phase modifier exponent matrix of particle liquid phase reactions as :math:`\texttt{NTOTALBND} \times \texttt{NREACT}` matrix in row-major storage (optional, defaults to all 0)
117-
118-
================ ============================================================
119-
**Type:** double **Length:** :math:`\texttt{NTOTALBND} \cdot \texttt{NREACT}`
120-
================ ============================================================
121-
122-
``MAL_STOICHIOMETRY_SOLID``
123-
124-
Stoichiometric matrix of particle solid phase reactions as :math:`\texttt{NTOTALBND} \times \texttt{NREACT}` matrix in row-major storage
125-
126-
================ ============================================================
127-
**Type:** double **Length:** :math:`\texttt{NTOTALBND} \cdot \texttt{NREACT}`
128-
================ ============================================================
129-
130-
``MAL_EXPONENTS_SOLID_FWD``
131-
132-
Forward exponent matrix of particle solid phase reactions as :math:`\texttt{NTOTALBND} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_SOLID}` by default)
133-
134-
================ ============================================================
135-
**Type:** double **Length:** :math:`\texttt{NTOTALBND} \cdot \texttt{NREACT}`
136-
================ ============================================================
137-
138-
``MAL_EXPONENTS_SOLID_BWD``
139-
140-
Backward exponent matrix of particle solid phase reactions as :math:`\texttt{NTOTALBND} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_SOLID}` by default)
141-
142-
================ ============================================================
143-
**Type:** double **Length:** :math:`\texttt{NTOTALBND} \cdot \texttt{NREACT}`
144-
================ ============================================================
145-
146-
``MAL_EXPONENTS_SOLID_FWD_MODLIQUID``
42+
``MAL_EXPONENTS_BWD``
14743

148-
Forward liquid phase modifier exponent matrix of particle solid phase reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, defaults to all 0)
149-
150-
================ ========================================================
151-
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`
152-
================ ========================================================
153-
154-
``MAL_EXPONENTS_SOLID_BWD_MODLIQUID``
155-
156-
Backward liquid phase modifier exponent matrix of particle solid phase reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, defaults to all 0)
44+
Backward exponent matrix of bulk volume reactions as :math:`\texttt{NCOMP} \times \texttt{NREACT}` matrix in row-major storage (optional, calculated from :math:`\texttt{MAL_STOICHIOMETRY_BULK}` by default)
15745

15846
================ ========================================================
15947
**Type:** double **Length:** :math:`\texttt{NCOMP} \cdot \texttt{NREACT}`

0 commit comments

Comments
 (0)