Skip to content

Comments

BCs#134

Open
ck768 wants to merge 20 commits intofestim2from
chirag-bcs
Open

BCs#134
ck768 wants to merge 20 commits intofestim2from
chirag-bcs

Conversation

@ck768
Copy link
Collaborator

@ck768 ck768 commented Oct 22, 2025

Boundary conditions chapter:

  • flux
  • concentration
  • surface reactions
  • temperature

@ck768 ck768 linked an issue Oct 22, 2025 that may be closed by this pull request
9 tasks
@ck768 ck768 marked this pull request as ready for review October 28, 2025 18:46
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass on the Concentration part.

@ck768 ck768 marked this pull request as draft January 9, 2026 15:20
@ck768 ck768 marked this pull request as ready for review February 13, 2026 21:55

+++

## Understanding math behind concentration and flux boundary conditions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
)
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this is redundant with the previous section

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the exact same concentration fields

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed by using the same colorbar range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Boundary conditions

2 participants