Open
Conversation
9 tasks
RemDelaporteMathurin
requested changes
Nov 4, 2025
Collaborator
RemDelaporteMathurin
left a comment
There was a problem hiding this comment.
First pass on the Concentration part.
… into chirag-bcs
RemDelaporteMathurin
requested changes
Feb 23, 2026
|
|
||
| +++ | ||
|
|
||
| ## Understanding math behind concentration and flux boundary conditions |
Collaborator
There was a problem hiding this comment.
Since this applies to all BCs (H transport and heat transfer) should this live in an introduction section?
Comment on lines
217
to
280
| ## Recombination and dissociation | ||
|
|
||
| Hydrogen recombination or dissociation can be modeled with `SurfaceReactionBC`, e.g.: | ||
|
|
||
| $$ | ||
| \mathrm{H + H} \quad \overset{K_r}{\underset{K_d}{\rightleftharpoons}} \quad \mathrm{H_2} | ||
| $$ | ||
|
|
||
| ### Mathematical formulation | ||
|
|
||
| Let: | ||
| - $c_H$ be the surface concentration of atomic hydrogen | ||
| - $P_{H_2}$ the partial pressure of molecular hydrogen | ||
|
|
||
| The net reaction rate is: | ||
|
|
||
| $$ | ||
| K = K_r \, c_H^2 - K_d \, P_{H_2} | ||
| $$ | ||
|
|
||
| The corresponding flux of atomic hydrogen is: | ||
|
|
||
| $$ | ||
| \mathbf{J}_H \cdot \mathbf{n} = - 2 K | ||
| $$ | ||
|
|
||
| #### Weak form contribution | ||
|
|
||
| The weak form contribution of recombination flux is: | ||
|
|
||
| $$ | ||
| \int_{\Gamma_s} \mathbf{J}_H \cdot \mathbf{n} \, v \, d\Gamma = | ||
| - \int_{\Gamma_s} 2 K \, v \, d\Gamma | ||
| $$ | ||
|
|
||
| +++ | ||
|
|
||
| --- | ||
|
|
||
| +++ | ||
|
|
||
| ### Modeling recombination and dissociation | ||
|
|
||
| Recombination and dissociation can also be modeled using `SurfaceReactionBC`, where the forward and backward rates of this reaction correspond to recombination and dissociation, respectively. | ||
|
|
||
| To model the reaction: | ||
|
|
||
| $$ \mathrm{H} + \mathrm{H} \rightleftharpoons \mathrm{H_2}$$ | ||
|
|
||
| where $ \text{Species A} = \text{Species B} = \text{H} $, assign your `reactants` list accordingly: | ||
|
|
||
| ```{code-cell} ipython3 | ||
| H = F.Species("H") | ||
|
|
||
| my_recombination_bc = F.SurfaceReactionBC( | ||
| reactant=[A, A], | ||
| gas_pressure=1e5, | ||
| k_r0=1, | ||
| E_kr=0.1, | ||
| k_d0=1e-5, | ||
| E_kd=0.1, | ||
| subdomain=boundary, | ||
| ) | ||
| ``` |
Collaborator
There was a problem hiding this comment.
All of this is redundant with the previous section
Collaborator
Author
There was a problem hiding this comment.
moved recombination and dissociation discussion to under "surface reactions" , I think it may be a helpful snippet for users that are skimming through and looking for that specifically
| figure = plotter.screenshot("concentration.png") | ||
| ``` | ||
|
|
||
| The results without isotopic exchange show virtually no diffusion for a given inlet concentration, indicating that isotopic exchange helps enchance diffusion! |
Collaborator
There was a problem hiding this comment.
I see the exact same concentration fields
Collaborator
Author
There was a problem hiding this comment.
fixed by using the same colorbar range
…, removed weak formulation discussions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boundary conditions chapter: