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

Merging Casey's Thesis Work #265

Open
wants to merge 80 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
06d3a9d
Add FieldSolverMaterial and tests
cticenhour Jun 1, 2021
a0d53e2
Convert kernels to solver material
cticenhour Jun 2, 2021
f2339ab
Convert materials to solver material, and remove extraneous potential…
cticenhour Jun 2, 2021
75c2c33
Convert bcs to solver material
cticenhour Jun 2, 2021
7450f3e
Convert auxkernels to solver material
cticenhour Jun 2, 2021
ec48303
Convert postprocessors to solver material
cticenhour Jun 2, 2021
7189f2e
Convert dgkernels to solver material
cticenhour Jun 2, 2021
2322d19
Convert interfacekernels to solver material
cticenhour Jun 2, 2021
29a03fc
Fixup tests that do not use DriftDiffusionAction
cticenhour Jun 2, 2021
efb898f
Enable electromagnetics module
cticenhour Jun 15, 2021
b4b86d8
Re-gold ES field test
cticenhour Apr 20, 2023
0233c10
Fixup more non-DriftDiffusionAction inputs after rebase
cticenhour Apr 20, 2023
cd57bcf
Convert DriftDiffusionAction and associated inputs
cticenhour Apr 20, 2023
398a56f
Fixup tutorial inputs with new syntax
cticenhour Apr 21, 2023
ca8b63f
Convert tutorial tests to exodiff
cticenhour Apr 21, 2023
5944fc0
Clean-up unused parameters
cticenhour Apr 21, 2023
79b16cb
Fixup compiler warning
cticenhour Apr 27, 2023
868f397
Fixed minor error for 'AddPeriodicControllers'.
csdechant Jun 8, 2021
2185c5c
Adding option for a 'thermal conductivity' version for the mean energ…
csdechant Jun 8, 2021
1973fab
Adding option the calculate and use an effective Efield assuming elec…
csdechant Jun 8, 2021
2c20476
Updating Acceleration By Shooting Method
csdechant Jun 8, 2021
de1bcbc
Adding Dielectric BC based on the integral form
csdechant Jun 8, 2021
6abe7a2
Adding MMS testing
csdechant Jun 8, 2021
3eca429
Adding Updated 2D Input files
csdechant Jun 8, 2021
7a37580
Fixup ES acceleration GEC file
cticenhour Jun 16, 2021
7a25061
Add new mesh without coaxial and 40MHz input file with new mesh and d…
cticenhour Jun 16, 2021
326d912
Add plasma dielectric constant material
cticenhour Jun 17, 2021
d4722c5
Add second time derivative term that uses the new plasma dielectric c…
cticenhour Jun 17, 2021
48c86fc
Add mesh with increased resolution in sheath region
cticenhour Jun 20, 2021
b38a6ce
Add EM vacuum test file
cticenhour Jun 20, 2021
dd4dc95
Get EM vacuum working
cticenhour Jun 21, 2021
4ed0c18
Fix typos in EM vacuum case, adjust mesh for penalty cases, and make …
cticenhour Jun 21, 2021
e18318a
Simplify EM vacuum input and add EM plasma dielectric input
cticenhour Jun 22, 2021
9f16f20
Add dielectric test file
cticenhour Jun 22, 2021
3621ff8
Add optional set of enhanced monitoring options
cticenhour Jun 22, 2021
3465aeb
Add 50 cycles, 50 growth limit tests
cticenhour Jun 22, 2021
2d3c4a3
Add 100 cycles, 50 growth limit tests
cticenhour Jun 22, 2021
cf67c5e
Add coupled basis input files
cticenhour Jun 22, 2021
8841e94
Convert EffectiveEField to generic solver property
cticenhour Jun 22, 2021
546cbca
Clean up coupled basis files (remove warnings, set to default lu)
cticenhour Jun 22, 2021
940b506
Add EM physics
cticenhour Jun 22, 2021
cbe6a99
Lots of new dots:
cticenhour Jun 22, 2021
a985103
Add steady vacuum EM file, rename transient vacuum EM file
cticenhour Jun 22, 2021
cf5d331
Add pseudo transient dielectric EM input file
cticenhour Jun 22, 2021
7d9038a
Add faradays law rf current bc
cticenhour Jun 24, 2021
1b50370
Add shortened mesh and update input
cticenhour Jun 24, 2021
8ec4cc4
Clean up
cticenhour Jun 30, 2021
c897d23
Add initial implementation of cylindrical curlcurl operator for a sca…
cticenhour Jun 30, 2021
9a6b8e9
Reconfigure and rename previous HPhi object to encompass entire wave …
cticenhour Jul 1, 2021
9ce5930
Add gradient to PlasmaDielectricConstant material
cticenhour Jul 2, 2021
e4d532f
Fix typo and add initial HPhi test
cticenhour Jul 2, 2021
a9d4cbc
Add Er and Ez objects for calculation from HPhi
cticenhour Jul 2, 2021
e0234ec
Update EM_HPhi_test input and change driving frequency param name for…
cticenhour Jul 2, 2021
7e6e617
PlasmaDielectricConstant fixes
cticenhour Oct 5, 2021
5f70f0e
Add default value for vector type input parameters #207
MengnanLi91 Sep 27, 2023
f80306e
BCs input parameters have been updated and deprecated for all AD BCs
gsgall Dec 20, 2023
bfe7f5c
CONST ALL THE THINGS + making emmision coeffs materials
gsgall Feb 24, 2024
a3b1fb7
Commenting out MMS test for re-work
csdechant Sep 4, 2024
fb5965f
Updating default values for vector inputs
csdechant Sep 4, 2024
83d04c9
Updating default values for vector inputs
csdechant Sep 4, 2024
02e1d0a
Re-working shooting method accelerator
csdechant Sep 4, 2024
a510288
Initial clean up after rebase
csdechant Oct 3, 2024
0e86dae
Removing 'GEC_2D' case study files'
csdechant Oct 3, 2024
c921a0a
Fixing MMS tests for FieldSolverMaterial update
csdechant Oct 3, 2024
ae8c631
Removing HPhiCylindricalPlasma and PlasmaDielectricConstant kernel ob…
csdechant Nov 7, 2024
d5b3a72
Remove NeumannCircuitVoltageNew.h due to rebase error and update docu…
csdechant Nov 8, 2024
6c3bbf1
Updating documentation for new objects and fixing minor errors in old…
csdechant Nov 8, 2024
efea8f1
Removing FaradayCurrentBC
csdechant Nov 12, 2024
398f831
Updating documentation on DielectricBCWithEffEfield
csdechant Nov 12, 2024
cafb630
Updating test for Shooting Method
csdechant Nov 13, 2024
2a4dbce
Removing old file for Shooting Method test
csdechant Nov 14, 2024
21a0f77
Adding missing rate coefficients for updated tests
csdechant Nov 14, 2024
2526667
Adding test for DielectricBCWithEffEfield and PlasmaDielectricConstan…
csdechant Nov 21, 2024
f87fdbf
Updating docstring for new objects and cleaning up mms test input files
csdechant Nov 22, 2024
0e08a36
Removing trailing whitespace
csdechant Nov 22, 2024
91dfae1
Removing trailing whitespace again
csdechant Nov 22, 2024
bd36de8
Applying Clang format
csdechant Nov 22, 2024
f43997e
Increasing testing time for MMS tests and fixing documentation error …
csdechant Nov 26, 2024
b24b0dd
Changing the tolerances of current_OHm and Efield in DC_argon-With-Wa…
csdechant Nov 26, 2024
c17657f
Including electromagnetics module in the unit makefile
csdechant Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ include $(FRAMEWORK_DIR)/build.mk
include $(FRAMEWORK_DIR)/moose.mk

################################## MODULES ####################################
ALL_MODULES := no
ELECTROMAGNETICS := yes

include $(MOOSE_DIR)/modules/modules.mk
###############################################################################

Expand Down
13 changes: 6 additions & 7 deletions doc/content/source/auxkernels/Current.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@

## Overview

`Current` returns the electric current density of a species in logarithmic form. `Current`
assumes the electrostatic approximation for the electric field.
`Current` returns the electric current density of a species in logarithmic form.

The electrostatic current density is defined as
The current density is defined as

\begin{equation}
J_{j} = q_{j} (\text{sign}_{j} \mu_{j} \left( \text{-} \nabla V\right) n_{j} - D_{j} \nabla (n_{j}))
J_{j} = q_{j} (\text{sign}_{j} \mu_{j} \vec{E} n_{j} - D_{j} \nabla (n_{j}))
\end{equation}

Where $J_{j}$ is the current density, $q_{j}$ is the charge of the species, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species), $\mu_{j}$ is the mobility coefficient, $V$ is the potential, $n_{j}$ is the density, and $D_{j}$ is the diffusion coefficient. When converting the density to logarithmic form and applying a scaling factor of the mesh, `Current` is defined as
Where $J_{j}$ is the current density, $q_{j}$ is the charge of the species, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species), $\mu_{j}$ is the mobility coefficient, $\vec{E}$ is the electric field, $n_{j}$ is the density, and $D_{j}$ is the diffusion coefficient. When converting the density to logarithmic form and applying a scaling factor of the mesh, `Current` is defined as

\begin{equation}
J_{j} = q_{j} N_{A} \left(\text{sign}_{j} \mu_{j} \frac{\text{-} \nabla (V)}{l_{c}} \exp(N_{j}) - D_{j} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}} \right)
J_{j} = q_{j} N_{A} \left(\text{sign}_{j} \mu_{j} \frac{\vec{E}}{l_{c}} \exp(N_{j}) - D_{j} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}} \right)
\end{equation}

Where $N_{j}$ is the molar density of the specie in logarithmic form, $N_{A}$ is Avogadro's number, $l_{c}$ is the scaling factor of the mesh.

For the case of the where artificial diffusion is introduced to the charge specie flux, an additional term is included in the current density, such that:

\begin{equation}
J_{j,\text{ Total}} = J_{j} + q_{j} N_{A} \mu_{j} \frac{\text{-}\lVert \nabla (V) \rVert_{2}}{l_{c}} \frac{h_\text{max}}{2} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}}
J_{j,\text{ Total}} = J_{j} + q_{j} N_{A} \mu_{j} \frac{\text{-}\lVert \vec{E} \rVert_{2}}{l_{c}} \frac{h_\text{max}}{2} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}}
\end{equation}

Where $h_\text{max}$ is the max length of the current element.
Expand Down
8 changes: 4 additions & 4 deletions doc/content/source/auxkernels/DriftDiffusionFluxAux.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
## Overview

`DriftDiffusionFluxAux` returns the simplified drift-diffusion flux of a species. `DriftDiffusionFluxAux`
assumes a mobility and diffusion coefficient of unity, the electrostatic approximation for the electric field, and a non-scaled version of the specie's density.
assumes a mobility and diffusion coefficient of unity and a non-scaled version of the specie's density.

The electrostatic flux is defined as
The flux is defined as

\begin{equation}
\Gamma_{j} = \text{sign}_{j} \left( \text{-}\nabla V\right) n_{j} - \nabla (n_{j})
\Gamma_{j} = \text{sign}_{j} \vec{E} n_{j} - \nabla (n_{j})
\end{equation}

Where $\Gamma_{j}$ is the flux assuming drift-diffusion formulation, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species),
$V$ is the potential, and $n_{j}$ is the density.
$\vec{E}$ is the electric field, and $n_{j}$ is the density.

!alert note
When calculating the drift-diffusion flux for scaled densities and non-unity coefficients, please refer to [`TotalFlux`](/auxkernels/TotalFlux.md).
Expand Down
9 changes: 4 additions & 5 deletions doc/content/source/auxkernels/EFieldAdvAux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@

## Overview

`EFieldAdvAux` returns electric field driven advective flux of defined species in logarithmic form. `EFieldAdvAux`
assumes the electrostatic approximation for the electric field.
`EFieldAdvAux` returns electric field driven advective flux of defined species in logarithmic form.

The advective flux is defined as

\begin{equation}
\Gamma_{\text{Advection}} = \text{sign}_{j} \mu_{j} \left( \text{-} \nabla V\right) n_{j}
\Gamma_{\text{Advection}} = \text{sign}_{j} \mu_{j} \vec{E} n_{j}
\end{equation}

Where $\Gamma_{\text{Advection}}$ is the advective flux, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species), $\mu_{j}$ is the mobility coefficient, $V$ is the potential, and $n_{j}$ is the density. When converting the density to logarithmic form and applying a scaling factor of the mesh,
Where $\Gamma_{\text{Advection}}$ is the advective flux, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species), $\mu_{j}$ is the mobility coefficient, $\vec{E}$ is the electric field, and $n_{j}$ is the density. When converting the density to logarithmic form and applying a scaling factor of the mesh,
`EFieldAdvAux` is defined as

\begin{equation}
\Gamma_{\text{Advection}} = N_{A} \text{sign}_{j} \mu_{j} \frac{\text{-} \nabla (V)}{l_{c}} \exp(N_{j})
\Gamma_{\text{Advection}} = N_{A} \text{sign}_{j} \mu_{j} \frac{\vec{E}}{l_{c}} \exp(N_{j})
\end{equation}

Where $N_{j}$ is the molar density of the specie in logarithmic form, $N_{A}$ is Avogadro's
Expand Down
6 changes: 3 additions & 3 deletions doc/content/source/auxkernels/Efield.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

## Overview

`Efield` returns a component of the electrostatic electric field.
`Efield` returns a component of the electric field.

The formulation of `Efield` is defined as

\begin{equation}
E_{\text{comp.}} = \frac{\text{-} \nabla_{\text{comp.}} (V) \ V_{c}}{l_{c}}
\frac{\vec{E}_{\text{comp.}} \ V_{c}}{l_{c}}
\end{equation}

Where $E_{\text{comp.}}$ is a component of the electric field, $V$ is the potential, $V_{c}$ is the
Where $\vec{E}_{\text{comp.}}$ is a component of the electric field, $V_{c}$ is the
scaling factor of the potential , and $l_{c}$ is the scaling factor of the mesh.

## Example Input File Syntax
Expand Down
15 changes: 7 additions & 8 deletions doc/content/source/auxkernels/PowerDep.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@
## Overview

`PowerDep` returns the amount of power deposited into a user specified specie by
Joule Heating. `PowerDep`
assumes the electrostatic approximation for the electric field.
Joule Heating.

The power deposited by Joule Heating is defined as

\begin{equation}
P_{\text{Joule Heating}} = \Gamma_{j} \cdot \text{-} \nabla (V) \\
P_{\text{Joule Heating}} = \Gamma_{j} \cdot \vec{E} \\
\\[10pt]
\Gamma_{j} = q_{j} (\text{sign}_{j} \mu_{j} \left( \text{-} \nabla V\right) n_{j} - D_{j} \nabla (n_{j}))
\Gamma_{j} = q_{j} (\text{sign}_{j} \mu_{j} \vec{E} n_{j} - D_{j} \nabla (n_{j}))
\end{equation}

Where $P_{\text{Joule Heating}}$ is the power deposited by Joule heating, $q_{j}$ is the charge of the species, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species), $\mu_{j}$ is the mobility coefficient,
$V$ is the potential, $n_{j}$ is the density, and $D_{j}$ is the diffusion coefficient.
$\vec{E}$ is the electric field, $n_{j}$ is the density, and $D_{j}$ is the diffusion coefficient.
When converting the density to log form and applying a scaling factor of the mesh / voltage,
`PowerDep` is defined as

\begin{equation}
P_{\text{Joule Heating}} = \Gamma_{j} \cdot \frac{\text{-} \nabla (V) V_{c}}{l_{c}} \\
P_{\text{Joule Heating}} = \Gamma_{j} \cdot \frac{\vec{E} V_{c}}{l_{c}} \\
\\[10pt]
\Gamma_{j} = q_{j} N_{A} \left( \text{sign}_{j} \mu_{j} \frac{\text{-} \nabla (V)}{l_{c}} \exp(N_{j}) - D_{j} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}} \right)
\Gamma_{j} = q_{j} N_{A} \left( \text{sign}_{j} \mu_{j} \frac{\vec{E}}{l_{c}} \exp(N_{j}) - D_{j} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}} \right)
\end{equation}

Where $N_{j}$ is the molar density of the specie in log form, $N_{A}$ is Avogadro's
Expand All @@ -34,7 +33,7 @@ of the potential.
For the case where artificial diffusion is introduced to the charge specie flux, an additional term is included, such that:

\begin{equation}
\Gamma_{j\text{, Total}} = \Gamma_{j} + q_{j} N_{A} \mu_{j} \frac{\text{-}\lVert \nabla (V) \rVert_{2}}{l_{c}} \frac{h_\text{max}}{2} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}}
\Gamma_{j\text{, Total}} = \Gamma_{j} + q_{j} N_{A} \mu_{j} \frac{\text{-}\lVert \vec{E} \rVert_{2}}{l_{c}} \frac{h_\text{max}}{2} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}}
\end{equation}

Where $h_\text{max}$ is the max length of the current element.
Expand Down
9 changes: 4 additions & 5 deletions doc/content/source/auxkernels/ProcRate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@

## Overview

`ProcRate` returns the production rate for chemistry reactions determined by Townsend coefficients in units of #/m$^{3}$s. `ProcRate`
assumes the electrostatic approximation for the current.
`ProcRate` returns the production rate for chemistry reactions determined by Townsend coefficients in units of #/m$^{3}$s.

The production rate is defined as

\begin{equation}
S_{\text{Townsend}} = \alpha_{j} (\mu_{e} \left( \nabla -V\right) n_{e} - D_{e} \nabla (n_{e}))
S_{\text{Townsend}} = \alpha_{j} (\mu_{e} \vec{E} n_{e} - D_{e} \nabla (n_{e}))
\end{equation}

Where $S_{\text{Townsend}}$ is the production rate determined by Townsend coefficients, $\alpha_{j}$ is the Townsend coefficient for the reaction, $\mu_{e}$ is the mobility coefficient,
$V$ is the potential, $n_{e}$ is the electron density, and $D_{e}$ is the diffusion coefficient.
$\vec{E}$ is the electric field, $n_{e}$ is the electron density, and $D_{e}$ is the diffusion coefficient.
When converting the density to logarithmic form and applying a scaling factor of the mesh,
`ProcRate` is defined as

\begin{equation}
S_{\text{Townsend}} = \alpha_{j} N_{A} \left(\mu_{e} \frac{-\nabla (V)}{l_{c}} \exp(N_{e}) - D_{e} \exp(N_{e}) \frac{\nabla (N_{e})}{l_{c}} \right)
S_{\text{Townsend}} = \alpha_{j} N_{A} \left(\mu_{e} \frac{\vec{E}}{l_{c}} \exp(N_{e}) - D_{e} \exp(N_{e}) \frac{\nabla (N_{e})}{l_{c}} \right)
\end{equation}

Where $N_{e}$ is the molar density of the electrons in logarithmic form, $N_{A}$ is Avogadro's
Expand Down
8 changes: 4 additions & 4 deletions doc/content/source/auxkernels/Sigma.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

## Overview

`Sigma` calculates a simplifed version of the surface charge on a boundary due to the advection flux of an ion species. `Sigma` assumes a mobility coefficient of unity, the electrostatic approximation for the electric field, and a non-scaled version of the specie's density.
`Sigma` calculates a simplifed version of the surface charge on a boundary due to the advection flux of an ion species. `Sigma` assumes a mobility coefficient of unity, and a non-scaled version of the specie's density.

The surface charge is defined as

\begin{equation}
\sigma = \int \Gamma_{i} \cdot \textbf{n} \ \text{d}t \\[10pt]
\Gamma_{i} = \text{-} \nabla (V) n_{i}
\Gamma_{i} = \vec{E} n_{i}
\end{equation}

Where $\sigma$ is the surface charge, $\Gamma_{i}$ is the advective flux of the ions, $\textbf{n}$ is the outward pointing unit normal on the boundary, $V$ is the potential, and $n_{i}$ is the ion density.
Where $\sigma$ is the surface charge, $\Gamma_{i}$ is the advective flux of the ions, $\textbf{n}$ is the outward pointing unit normal on the boundary, $\vec{E}$ is the electric field, and $n_{i}$ is the ion density.

Using the midpoint method for integration, the surface charge calculation becomes

\begin{equation}
\sigma_{t} = \sigma_{t-1} - \nabla (V) n_{i} \cdot \textbf{n} \ \text{d}t
\sigma_{t} = \sigma_{t-1} + \vec{E} n_{i} \cdot \textbf{n} \ \text{d}t
\end{equation}

Where $\sigma_{t}$ is the surface charge of the current time step, $\sigma_{t-1}$ is the surface of the previous time step, and $\text{d}t$ is the difference between time steps.
Expand Down
11 changes: 5 additions & 6 deletions doc/content/source/auxkernels/TotalFlux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

## Overview

`TotalFlux` returns the total flux of a species in logarithmic form. `TotalFlux`
assumes the electrostatic approximation for the electric field.
`TotalFlux` returns the total flux of a species in logarithmic form.

The electrostatic flux is usually defined as
The flux is usually defined as

\begin{equation}
\Gamma_{j} = \text{sign}_{j} \mu_{j} \left( \text{-} \nabla V \right) n_{j} - D_{j} \nabla (n_{j})
\Gamma_{j} = \text{sign}_{j} \mu_{j} \vec{E} n_{j} - D_{j} \nabla (n_{j})
\end{equation}

Where $\Gamma_{j}$ is the flux assuming drift-diffusion formulation, $\mu_{j}$ is the mobility coefficient, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species, $\text{-}1$ for negatively charged species and $\text{0}$ for neutral species), $V$ is the potential, $n_{j}$ is the density, and $D_{j}$ is the diffusion coefficient. When converting the density to logarithmic form, `TotalFlux` is defined as
Where $\Gamma_{j}$ is the flux assuming drift-diffusion formulation, $\mu_{j}$ is the mobility coefficient, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species, $\text{-}1$ for negatively charged species and $\text{0}$ for neutral species), $\vec{E}$ is the electric field, $n_{j}$ is the density, and $D_{j}$ is the diffusion coefficient. When converting the density to logarithmic form, `TotalFlux` is defined as

\begin{equation}
\Gamma_{j} = \text{sign}_{j} \mu_{j} \left(\text{-} \nabla V\right) \exp(N_{j}) - D_{j} \exp(N_{j}) \nabla (N_{j})
\Gamma_{j} = \text{sign}_{j} \mu_{j} \vec{E} \exp(N_{j}) - D_{j} \exp(N_{j}) \nabla (N_{j})
\end{equation}

Where $N_{j}$ is the molar density of the specie in logarithmic form.
Expand Down
20 changes: 10 additions & 10 deletions doc/content/source/bcs/DCIonBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@

## Overview

`DCIonBC` is an electric field driven outflow boundary condition. `DCIonBC` assumes the electrostatic approximation for the electric field.
`DCIonBC` is an electric field driven outflow boundary condition.

The electrostatic electric field driven outflow is defined as
The electric field driven outflow is defined as

\begin{equation}
a =
\begin{cases}
1, & \text{sign}_{j} \mu_{j} \ \text{-} \nabla (V) \cdot \textbf{n} > 0\\
0, & \text{sign}_{j} \mu_{j} \ \text{-} \nabla (V) \cdot \textbf{n} \leq 0\\
1, & \text{sign}_{j} \mu_{j} \ \vec{E} \cdot \textbf{n} > 0\\
0, & \text{sign}_{j} \mu_{j} \ \vec{E} \cdot \textbf{n} \leq 0\\
\end{cases} \\[10pt]
\Gamma_{j} \cdot \textbf{n} = a \ \text{sign}_{j} \mu_{j} \ \text{-} \nabla (V) \cdot \textbf{n} \ n_{j}
\Gamma_{j} \cdot \textbf{n} = a \ \text{sign}_{j} \mu_{j} \ \vec{E} \cdot \textbf{n} \ n_{j}
\end{equation}

Where $\Gamma$ is the outflow normal to the boundary, $\textbf{n}$ is the normal vector of the boundary, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species), $\mu_{j}$ is the mobility coefficient, $n_{j}$ is the density, and $V$ is
the electrostatic potential. $a$ is defined such that the outflow is only defined when the drift velocity is direct towards the wall and zero otherwise. When converting the density to logarithmic form and applying a scaling
Where $\Gamma$ is the outflow normal to the boundary, $\textbf{n}$ is the normal vector of the boundary, $\text{sign}_{j}$ indicates the advection behavior ($\text{+}1$ for positively charged species and $\text{-}1$ for negatively charged species), $\mu_{j}$ is the mobility coefficient, $n_{j}$ is the density, and $\vec{E}$ is
the electric field. $a$ is defined such that the outflow is only defined when the drift velocity is direct towards the wall and zero otherwise. When converting the density to logarithmic form and applying a scaling
factor of the mesh, the strong form for `DCIonBC` is defined as

\begin{equation}
a =
\begin{cases}
1, & \text{sign}_{j} \mu_{j} \ \text{-} \nabla (V) \cdot \textbf{n} > 0\\
0, & \text{sign}_{j} \mu_{j} \ \text{-} \nabla (V) \cdot \textbf{n} \leq 0\\
1, & \text{sign}_{j} \mu_{j} \ \vec{E} \cdot \textbf{n} > 0\\
0, & \text{sign}_{j} \mu_{j} \ \vec{E} \cdot \textbf{n} \leq 0\\
\end{cases} \\[10pt]
\Gamma_{j} \cdot \textbf{n} = a \ \text{sign}_{j} \mu_{j} \ \text{-} \nabla (V / l_{c}) \cdot \textbf{n} \ \exp(N_{j})
\Gamma_{j} \cdot \textbf{n} = a \ \text{sign}_{j} \mu_{j} \ \left(\vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j})
\end{equation}

Where $N_{j}$ is the molar density of the species in logarithmic form and
Expand Down
70 changes: 70 additions & 0 deletions doc/content/source/bcs/DielectricBCWithEffEfield.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# DielectricBCWithEffEfield

!syntax description /BCs/DielectricBCWithEffEfield

## Overview

`DielectricBCWithEffEfield` is a type of [`NeumannBC`](/bcs/NeumannBC.md) for the potential on the boundary of a grounded ideal dielectric. The advection term for the ion is determined by an effective electric field.

The potential at the boundary of a grounded ideal dielectric is defined as

\begin{equation}
\epsilon_{0}\frac{\partial (E \cdot \textbf{n}) }{\partial t} - \frac{\epsilon_{i}}{d_{i}}\frac{\partial V_{i}}{\partial t} = - e \left( \Gamma_{+} \cdot \textbf{n} -\Gamma_{e} \cdot \textbf{n} \right) \\[10pt]
\Gamma_{e} \cdot \textbf{n} = \frac{1}{4}\sqrt{\frac{8 k T_{e}}{\pi m_{e}}} \ n_e - \gamma \Gamma_{+} \cdot \textbf{n} \\[10pt]
\Gamma_{+} \cdot \textbf{n} = a \ \mu_{+} \ \vec{E}_{\text{Eff.}} \cdot \textbf{n} \ n_{+} \\[10pt]
a =
\begin{cases}
1, & \mu_{+} \ \vec{E}_{\text{Eff.}} \cdot \textbf{n} > 0\\
0, & \mu_{+} \ \vec{E}_{\text{Eff.}} \cdot \textbf{n} \leq 0\\
\end{cases}
\end{equation}

where

- $\epsilon_{i}$ is the permittivity of the dielectric,
- $d_{i}$ is the thickness of the dielectric,
- $V_{i}$ is the voltage on the dielectric,
- $\textbf{n}$ is the normal to the boundary,
- $e$ is the elemental charge,
- $\epsilon_{0}$ is the permittivity of free space,
- $E$ is the electric field normal to the dielectric,
- $\Gamma_{e}$ is the electron outflow flux, and
- $\Gamma_{+}$ are the ion outflow flux.

!alert note title=Flux Information
$\Gamma_{e}$ and $\Gamma_{+}$ are defined with the [`SakiyamaElectronDiffusionBC`](/bcs/SakiyamaElectronDiffusionBC.md), [`SakiyamaSecondaryElectronWithEffEfieldBC`](/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.md) and [`SakiyamaIonAdvectionWithEffEfieldBC`](/bcs/SakiyamaIonAdvectionWithEffEfieldBC.md) (please refer to those BC's for more information on the fluxes).

To convert the above equation into the form at a NeumannBC, the time integral is taken such that:

\begin{equation}
\int{ \epsilon_{0}\frac{\partial (E \cdot \textbf{n}) }{\partial t} } dt - \int{ \frac{\epsilon_{i}}{d_{i}}\frac{\partial V_{i}}{\partial t} } dt = \int{ - e \left( \Gamma_{+} \cdot \textbf{n} -\Gamma_{e} \cdot \textbf{n} \right) } dt
\end{equation}

Using the trapezoidal rule for the definite integral and rearranging the equation such that the electric field term is on one side results in:

\begin{equation}
\epsilon_{0} \left( E \cdot \textbf{n} \right) = \epsilon_{0} \left( E_{\text{old}} \cdot \textbf{n} \right) + \frac{\epsilon_{i}}{d_{i}} \left( V - V_
{old} \right) - 0.5 \left( e \left( \Gamma_{+} \cdot \textbf{n} - \Gamma_{e} \cdot \textbf{n} \right) + e \left( \Gamma_{+} \cdot \textbf{n} - \Gamma_{e} \cdot \textbf{n} \right)_{old} \right) dt
\end{equation}

where

- The subscript $\text{old}$ is the value of the variable during the previous time step, and
- $dt$ is the current time step size.

Lastly, the electrostatics approximation is applied to the electric field normal to the dielectric, which results in a NeumannBC for the potential defined as:

\begin{equation}
\epsilon_{0} \left( -\nabla V \cdot \textbf{n} \right) = \epsilon_{0} \left( -\nabla V_{\text{old}} \cdot \textbf{n} \right) + \frac{\epsilon_{i}}{d_{i}} \left( V - V_
{old} \right) - 0.5 \left( e \left( \Gamma_{+} \cdot \textbf{n} - \Gamma_{e} \cdot \textbf{n} \right) + e \left( \Gamma_{+} \cdot \textbf{n} - \Gamma_{e} \cdot \textbf{n} \right)_{old} \right) dt
\end{equation}

## Example Input File Syntax

!listing test/tests/mms/bcs/2D_DielectricBCWithEffEfield.i block=BCs/potential_left_BC

!syntax parameters /BCs/DielectricBCWithEffEfield

!syntax inputs /BCs/DielectricBCWithEffEfield

!syntax children /BCs/DielectricBCWithEffEfield
Loading