diff --git a/Makefile b/Makefile index 2bd177ebd5b..b4f0de7c587 100644 --- a/Makefile +++ b/Makefile @@ -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 ############################################################################### diff --git a/doc/content/source/auxkernels/Current.md b/doc/content/source/auxkernels/Current.md index 3015799371e..1f996ebc495 100644 --- a/doc/content/source/auxkernels/Current.md +++ b/doc/content/source/auxkernels/Current.md @@ -4,19 +4,18 @@ ## 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. @@ -24,7 +23,7 @@ Where $N_{j}$ is the molar density of the specie in logarithmic form, $N_{A}$ is 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. diff --git a/doc/content/source/auxkernels/DriftDiffusionFluxAux.md b/doc/content/source/auxkernels/DriftDiffusionFluxAux.md index ff1d360c7d2..f540f14d4d5 100644 --- a/doc/content/source/auxkernels/DriftDiffusionFluxAux.md +++ b/doc/content/source/auxkernels/DriftDiffusionFluxAux.md @@ -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). diff --git a/doc/content/source/auxkernels/EFieldAdvAux.md b/doc/content/source/auxkernels/EFieldAdvAux.md index cbe951f6a03..d1f59d5f7e6 100644 --- a/doc/content/source/auxkernels/EFieldAdvAux.md +++ b/doc/content/source/auxkernels/EFieldAdvAux.md @@ -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 diff --git a/doc/content/source/auxkernels/Efield.md b/doc/content/source/auxkernels/Efield.md index 26a763194f6..f31afb4e424 100644 --- a/doc/content/source/auxkernels/Efield.md +++ b/doc/content/source/auxkernels/Efield.md @@ -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 diff --git a/doc/content/source/auxkernels/PowerDep.md b/doc/content/source/auxkernels/PowerDep.md index 76a99133036..164ec0bc270 100644 --- a/doc/content/source/auxkernels/PowerDep.md +++ b/doc/content/source/auxkernels/PowerDep.md @@ -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 @@ -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. diff --git a/doc/content/source/auxkernels/ProcRate.md b/doc/content/source/auxkernels/ProcRate.md index ede74ee761c..d7dac5e0358 100644 --- a/doc/content/source/auxkernels/ProcRate.md +++ b/doc/content/source/auxkernels/ProcRate.md @@ -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 diff --git a/doc/content/source/auxkernels/Sigma.md b/doc/content/source/auxkernels/Sigma.md index 0db276c07c8..e1350b651c7 100644 --- a/doc/content/source/auxkernels/Sigma.md +++ b/doc/content/source/auxkernels/Sigma.md @@ -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. diff --git a/doc/content/source/auxkernels/TotalFlux.md b/doc/content/source/auxkernels/TotalFlux.md index a848a1a092b..58d00860fce 100644 --- a/doc/content/source/auxkernels/TotalFlux.md +++ b/doc/content/source/auxkernels/TotalFlux.md @@ -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. diff --git a/doc/content/source/bcs/DCIonBC.md b/doc/content/source/bcs/DCIonBC.md index 8863c1fcef3..38472e98225 100644 --- a/doc/content/source/bcs/DCIonBC.md +++ b/doc/content/source/bcs/DCIonBC.md @@ -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 diff --git a/doc/content/source/bcs/DielectricBCWithEffEfield.md b/doc/content/source/bcs/DielectricBCWithEffEfield.md new file mode 100644 index 00000000000..0b4a04e88bd --- /dev/null +++ b/doc/content/source/bcs/DielectricBCWithEffEfield.md @@ -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 diff --git a/doc/content/source/bcs/DriftDiffusionDoNothingBC.md b/doc/content/source/bcs/DriftDiffusionDoNothingBC.md index d04c98e87d3..30cc494e6c0 100644 --- a/doc/content/source/bcs/DriftDiffusionDoNothingBC.md +++ b/doc/content/source/bcs/DriftDiffusionDoNothingBC.md @@ -6,19 +6,17 @@ `DriftDiffusionDoNothingBC` is an outflow boundary condition where the outflow at the boundary is equal to the bulk dift-diffusion equations. -`DriftDiffusionDoNothingBC` assumes the electrostatic approximation for the electric field. The outflow is defined as \begin{equation} -\Gamma_{j} \cdot \textbf{n} = \text{sign}_{j} \mu_{j} n_{j} \left( - \nabla (V) \right) \cdot \textbf{n} - D_{j} \nabla (n_{j}) \cdot \textbf{n} +\Gamma_{j} \cdot \textbf{n} = \text{sign}_{j} \mu_{j} n_{j} \vec{E} \cdot \textbf{n} - D_{j} \nabla (n_{j}) \cdot \textbf{n} \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, $\text{-}1$ for negatively charged species and $\text{0}$ for neutral species), $\mu_{j}$ is the mobility coefficient, $D_{j}$ is the diffusion coefficient, $n_{j}$ is the density, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `DriftDiffusionDoNothingBC` is defined as +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, $\text{-}1$ for negatively charged species and $\text{0}$ for neutral species), $\mu_{j}$ is the mobility coefficient, $D_{j}$ is the diffusion coefficient, $n_{j}$ is the density, and $\vec{E}$ is the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `DriftDiffusionDoNothingBC` is defined as \begin{equation} -\Gamma_{j} \cdot \textbf{n} = \text{sign}_{j} \mu_{j} \exp(N_{j}) \left( - \nabla (V / l_{c})\right) \cdot \textbf{n} - D_{j} \exp(N_{j}) \nabla (N_{j} / l_{c}) \cdot \textbf{n} +\Gamma_{j} \cdot \textbf{n} = \text{sign}_{j} \mu_{j} \exp(N_{j}) \left(\vec{E} / l_{c} \right) \cdot \textbf{n} - D_{j} \exp(N_{j}) \nabla (N_{j} / l_{c}) \cdot \textbf{n} \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and diff --git a/doc/content/source/bcs/ElectronAdvectionDoNothingBC.md b/doc/content/source/bcs/ElectronAdvectionDoNothingBC.md index e2764790ff4..d85a98adbdd 100644 --- a/doc/content/source/bcs/ElectronAdvectionDoNothingBC.md +++ b/doc/content/source/bcs/ElectronAdvectionDoNothingBC.md @@ -6,19 +6,18 @@ `ElectronAdvectionDoNothingBC` is an outflow boundary condition where the outflow at the boundary is equal to the bulk electron advection equation. -`ElectronAdvectionDoNothingBC` assumes the electrostatic approximation for the electric field. The outflow is defined as \begin{equation} -\Gamma_{e} \cdot \textbf{n} = \text{-} \mu_{e} n_{e} \left( \text{-} \nabla (V)\right) \cdot \textbf{n} +\Gamma_{e} \cdot \textbf{n} = \text{-} \mu_{e} n_{e} \vec{E} \cdot \textbf{n} \end{equation} -Where $\Gamma$ is the outflow normal to the boundary, $\textbf{n}$ is the normal of the boundary, $\mu_{e}$ is the mobility coefficient, $n_{e}$ is the electron density, and $V$ is the electric potential. 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 of the boundary, $\mu_{e}$ is the mobility coefficient, $n_{e}$ is the electron density, and $\vec{E}$ is the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronAdvectionDoNothingBC` is defined as \begin{equation} -\Gamma_{e} \cdot \textbf{n} = \text{-} \mu_{e} \exp(N_{e}) \left( \text{-} \nabla (V / l_{c}) \right) \cdot \textbf{n} +\Gamma_{e} \cdot \textbf{n} = \text{-} \mu_{e} \exp(N_{e}) \left(\vec{E} / l_{c} \right) \cdot \textbf{n} \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and diff --git a/doc/content/source/bcs/HagelaarElectronAdvectionBC.md b/doc/content/source/bcs/HagelaarElectronAdvectionBC.md index 88debb276ec..f7abce8082d 100644 --- a/doc/content/source/bcs/HagelaarElectronAdvectionBC.md +++ b/doc/content/source/bcs/HagelaarElectronAdvectionBC.md @@ -5,35 +5,34 @@ ## Overview `HagelaarElectronAdvectionBC` is an electric field driven outflow boundary condition. -`HagelaarElectronAdvectionBC` assumes the electrostatic approximation for the electric field. -The electrostatic electric field driven outflow is defined as +The electric field driven outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{e} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \ -\vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{e} \ -\vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{e} \cdot \textbf{n} = \frac{1-r_{e}}{1+r_{e}} \left[ -(2 a_{e}-1) \ \mu_{e} -\left( \text{-} \nabla (V) \right) +\vec{E} \cdot \textbf{n} \ n_{e} \right] \end{equation} Where $\Gamma_e \cdot \textbf{n}$ is the outflow normal to the boundary, $n$ is the normal vector of the boundary, -$\mu_{e}$ is the mobility coefficient, $n_{e}$ is the electron density, and $V$ is -the electric potential. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling +$\mu_{e}$ is the mobility coefficient, $n_{e}$ is the electron density, and $\vec{E}$ is +the electric field. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `HagelaarElectronAdvectionBC` is defined as \begin{equation} a = \begin{cases} -1, & \mu_{e} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \ -\vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{e} \ -\vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{e} \cdot \textbf{n} = \frac{1-r_{e}}{1+r_{e}} \left[ -(2 a_{e}-1) \ \mu_{e} \left( - \text{-} \nabla (V / l_{c}) + \vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{e}) \right] \end{equation} diff --git a/doc/content/source/bcs/HagelaarElectronBC.md b/doc/content/source/bcs/HagelaarElectronBC.md index 8cbd2bb891a..f00c29b08ba 100644 --- a/doc/content/source/bcs/HagelaarElectronBC.md +++ b/doc/content/source/bcs/HagelaarElectronBC.md @@ -5,38 +5,35 @@ ## Overview `HagelaarElectronBC` is an electric field driven and thermal outflow boundary condition. -`HagelaarElectronBC` assumes the electrostatic approximation for the electric field. -The electrostatic electric field and thermal driven outflow is defined as +The electric field and thermal driven outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{e} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \ -\vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{e} \ -\vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \frac{n_{\varepsilon}}{n_{e}}} \\[10pt] \Gamma_{e} \cdot \textbf{n} = \frac{1-r_{e}}{1+r_{e}} \left[ -(2 a_{e}-1) \ \mu_{e} -\left( -\text{-} \nabla (V) -\right) +\vec{E} \cdot \textbf{n} \ n_{e} + \frac{1}{2}v_{\text{th},e}n_{e} \right] \end{equation} Where $\Gamma_e \cdot \textbf{n}$ is the outflow normal to the boundary, $\textbf{n}$ is the normal of the boundary, -$\mu_{e}$ is the mobility coefficient, $n_{e}$ is the electron density, $V$ is -the electric potential, $v_{\text{th},e}$ is the thermal velocity of the electrons, $e$ is the elementary charge, and $n_{\varepsilon}$ is the mean energy density. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r_e$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling +$\mu_{e}$ is the mobility coefficient, $n_{e}$ is the electron density, $\vec{E}$ is +the electric field, $v_{\text{th},e}$ is the thermal velocity of the electrons, $e$ is the elementary charge, and $n_{\varepsilon}$ is the mean energy density. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r_e$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `HagelaarElectronBC` is defined as \begin{equation} a = \begin{cases} -1, & \mu_{e} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \ -\vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{e} \ -\vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \exp (N_{\varepsilon} - N_{e})} \\[10pt] \Gamma_{e} \cdot \textbf{n} = \frac{1-r_{e}}{1+r_{e}} \left[ -(2 a_{e}-1) \ \mu_{e} -\left( \text{-} \nabla (V / l_{c}) \right) +\left( \vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{e}) + \frac{1}{2} v_{\text{th},e} \exp(N_{e}) \right] diff --git a/doc/content/source/bcs/HagelaarEnergyAdvectionBC.md b/doc/content/source/bcs/HagelaarEnergyAdvectionBC.md index e91e01a0b58..806bf614823 100644 --- a/doc/content/source/bcs/HagelaarEnergyAdvectionBC.md +++ b/doc/content/source/bcs/HagelaarEnergyAdvectionBC.md @@ -5,40 +5,37 @@ ## Overview `HagelaarEnergyAdvectionBC` is an electric field driven outflow boundary condition with the addition of ion induced secondary electron energy. -`HagelaarEnergyAdvectionBC` assumes the electrostatic approximation for the electric field. The outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{e} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \ -\vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{e} \ -\vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{\epsilon} \cdot \textbf{n} = \frac{1-r_{e}}{1+r_{e}} \left[ -(2 a_{e}-1) \frac{5}{3} \mu_{e} \text{-} \nabla (V) \cdot \textbf{n} \ n_{e} \ \epsilon \right] - \frac{5}{3} \epsilon_{\gamma} (1 - a_{e}) \gamma \left[ \mu_{+} \ -\left( -\text{-} \nabla (V) -\right) +\vec{E} \cdot \textbf{n} \ n_{+} \right] \end{equation} -Where $\Gamma_{\epsilon} \cdot \textbf{n}$ is the outflow of the electron energy density normal to the boundary, $\textbf{n}$ is the normal vector of the boundary, $n_{e}$ is the electron density, $n_{+}$ is the mean energy density, $\mu_{j}$ is the mobility coefficient, $V$ is the electric potential, $\epsilon_{\gamma}$ is the energy of the secondary electron, and $\gamma$ is the ion induced secondary electron coefficient. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling +Where $\Gamma_{\epsilon} \cdot \textbf{n}$ is the outflow of the electron energy density normal to the boundary, $\textbf{n}$ is the normal vector of the boundary, $n_{e}$ is the electron density, $n_{+}$ is the mean energy density, $\mu_{j}$ is the mobility coefficient, $\vec{E}$ is the electric field, $\epsilon_{\gamma}$ is the energy of the secondary electron, and $\gamma$ is the ion induced secondary electron coefficient. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `HagelaarEnergyAdvectionBC` is defined as \begin{equation} a = \begin{cases} -1, & \mu_{e} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \ \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{e} \ \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{\epsilon} \cdot \textbf{n} = \frac{1-r_{e}}{1+r_{e}} \left[ -(2 a_{e}-1) \frac{5}{3} \mu_{e} \left( - \text{-} \nabla (V / l_{c}) +\vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{e}) \ \epsilon \right] - \frac{5}{3} \epsilon_{\gamma} (1 - a_{e}) \gamma \left[ \mu_{+} \ \left( - \text{-} \nabla (V / l_{c}) + \vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{+}) \right] \end{equation} diff --git a/doc/content/source/bcs/HagelaarEnergyBC.md b/doc/content/source/bcs/HagelaarEnergyBC.md index 260801896b4..f18dfabf9b8 100644 --- a/doc/content/source/bcs/HagelaarEnergyBC.md +++ b/doc/content/source/bcs/HagelaarEnergyBC.md @@ -5,39 +5,36 @@ ## Overview `HagelaarEnergyBC` is an electric field driven and thermal outflow boundary condition. -`HagelaarEnergyBC` assumes the electrostatic approximation for the electric field. -The electrostatic electric field and thermal driven outflow is defined as +The electric field and thermal driven outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{\epsilon} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{\epsilon} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{\epsilon} \ -\vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{\epsilon} \ -\vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \frac{n_{\epsilon}}{n_{e}}} \\[10pt] \Gamma_{\epsilon} \cdot \textbf{n} = \frac{1-r_{\epsilon}}{1+r_{\epsilon}} \left[ -(2 a_{\epsilon}-1) \ \mu_{\epsilon} -\left( - \text{-} \nabla (V) - \right) +\vec{E} \cdot \textbf{n} \ n_{\epsilon} + \frac{5}{6}v_{\text{th},e}n_{\epsilon} \right] \end{equation} Where $\Gamma_{\epsilon} \cdot \textbf{n}$ is the outflow normal to the boundary, $\textbf{n}$ is the normal vector of the boundary, -$\mu_{\epsilon}$ is the mobility coefficient, $n_{\epsilon}$ is the mean energy density, $n_{e}$ is the electron density, $V$ is -the electric potential, $v_{\text{th},e}$ is the thermal velocity of the electrons, and $e$ is the elementary charge. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles that are reflected by the surface. When converting the density to log form and applying a scaling +$\mu_{\epsilon}$ is the mobility coefficient, $n_{\epsilon}$ is the mean energy density, $n_{e}$ is the electron density, $\vec{E}$ is +the electric field, $v_{\text{th},e}$ is the thermal velocity of the electrons, and $e$ is the elementary charge. $a$ is defined such that the outflow is only defined when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles that are reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `HagelaarEnergyBC` is defined as \begin{equation} a = \begin{cases} -1, & \mu_{\epsilon} \ \nabla (V) \cdot \textbf{n} > 0\\ -0, & \mu_{\epsilon} \ \nabla (V) \cdot \textbf{n} \leq 0\\ +1, & \mu_{\epsilon} \ -\vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{\epsilon} \ -\vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \exp (N_{\varepsilon} - N_{e})} \\[10pt] \Gamma_{\epsilon} \cdot \textbf{n} = \frac{1-r_{\epsilon}}{1+r_{\epsilon}} \left[ -(2 a_{\epsilon}-1) \ \mu_{\epsilon} \left( -\text{-} \nabla (V / l_{c}) +\vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{\epsilon}) + \frac{5}{6}v_{\text{th},e}\exp(N_{\epsilon}) \right] \end{equation} diff --git a/doc/content/source/bcs/HagelaarIonAdvectionBC.md b/doc/content/source/bcs/HagelaarIonAdvectionBC.md index fdd2ef1959c..e6ae8a42f31 100644 --- a/doc/content/source/bcs/HagelaarIonAdvectionBC.md +++ b/doc/content/source/bcs/HagelaarIonAdvectionBC.md @@ -5,36 +5,33 @@ ## Overview `HagelaarIonAdvectionBC` is an electric field driven outflow boundary condition. -`HagelaarIonAdvectionBC` assumes the electrostatic approximation for the electric field. -The electrostatic electric field driven outflow is defined as +The electric field driven outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{j} \left( -\nabla V \right) \cdot \textbf{n} > 0\\ -0, & \mu_{j} \left( -\nabla V \right) \cdot \textbf{n} \leq 0\\ +1, & \mu_{j} \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} -\left( - \text{-} \nabla (V) -\right) +\vec{E} \cdot \textbf{n} \ n_{j} \right] \end{equation} Where $\Gamma_j \cdot \textbf{n}$ is the flux normal to the boundary, $n$ is the normal vector of the boundary, -$\mu_{j}$ is the mobility coefficient, $n_{j}$ is the ion density, and $V$ is -the electric potential. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `HagelaarIonAdvectionBC` is defined as +$\mu_{j}$ is the mobility coefficient, $n_{j}$ is the ion density, and $\vec{E}$ is +the electric field. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `HagelaarIonAdvectionBC` is defined as \begin{equation} a = \begin{cases} -1, & \mu_{j} \left(- \nabla V \right) \cdot \textbf{n} > 0\\ -0, & \mu_{j} \left( - \nabla V \right) \cdot \textbf{n} \leq 0\\ +1, & \mu_{j} \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} \left( -\text{-} \nabla (V / l_{c}) +\vec{E}V / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j}) \right] \end{equation} diff --git a/doc/content/source/bcs/PotentialDriftOutflowBC.md b/doc/content/source/bcs/PotentialDriftOutflowBC.md index 5681aa926a4..a04b4156b47 100644 --- a/doc/content/source/bcs/PotentialDriftOutflowBC.md +++ b/doc/content/source/bcs/PotentialDriftOutflowBC.md @@ -5,21 +5,21 @@ ## Overview `PotentialDriftOutflowBC` is an electric field driven outflow boundary condition. -`PotentialDriftOutflowBC` assumes a mobility coefficient of unity, the electrostatic approximation for the electric field, and a non-scaled version of the species' density. +`PotentialDriftOutflowBC` assumes a mobility coefficient of unity and a non-scaled version of the species' density. -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} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} > 0\\ -0, & \text{sign}_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} \leq 0\\ +1, & \text{sign}_{j} \vec{E} \cdot \textbf{n} > 0\\ +0, & \text{sign}_{j} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] -\Gamma_{j} \cdot \textbf{n} = a \ \text{sign}_{j} \left( \text{-} \nabla (V)\right) \cdot \textbf{n} \ n_{j} +\Gamma_{j} \cdot \textbf{n} = a \ \text{sign}_{j} \vec{E} \cdot \textbf{n} \ n_{j} \end{equation} Where $\Gamma_{j}$ is the flux assuming drift-diffusion formulation, $\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), -$V$ is the potential, and $n_{j}$ is the density. +$\vec{E}$ is the electric field, and $n_{j}$ is the density. When calculating with scaled densities and non-unity coefficients, please refer to [`HagelaarIonAdvectionBC`](/bcs/HagelaarIonAdvectionBC.md), [`DCIonBC`](/bcs/DCIonBC.md), or [`SakiyamaIonAdvectionBC`](/bcs/SakiyamaIonAdvectionBC.md). diff --git a/doc/content/source/bcs/SakiyamaEnergySecondaryElectronBC.md b/doc/content/source/bcs/SakiyamaEnergySecondaryElectronBC.md index 5251e7e98d6..eded07c5203 100644 --- a/doc/content/source/bcs/SakiyamaEnergySecondaryElectronBC.md +++ b/doc/content/source/bcs/SakiyamaEnergySecondaryElectronBC.md @@ -5,27 +5,26 @@ ## Overview `SakiyamaEnergySecondaryElectronBC` accounts for the mean electron energy density of secondary electrons induced by an ion flux outflow boundary condition. -`SakiyamaEnergySecondaryElectronBC` assumes the electrostatic approximation for the electric field. The ion induced secondary electron mean energy density outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} > 0\\ -0, & \mu_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} \leq 0\\ +1, & \mu_{j} \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{\epsilon} \cdot \textbf{n} = \gamma \frac{5}{3} \frac{n_{\epsilon}}{n_{e}} \left[a \ \mu_{j} -\left( \text{-} \nabla (V) \right) +\vec{E} \cdot \textbf{n} \ n_{j} \right] \end{equation} Where $\Gamma_\epsilon \cdot \textbf{n}$ is the flux normal to the boundary, $\textbf{n}$ is the normal vector of the boundary, -$\mu_{j}$ is the mobility coefficient, $n_{\epsilon}$ is the mean energy density, $n_{j}$ is the ion density, $\gamma$ is the secondary electron coefficient, and $V$ is the electric potential. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaEnergySecondaryElectronBC` is defined as +$\mu_{j}$ is the mobility coefficient, $n_{\epsilon}$ is the mean energy density, $n_{j}$ is the ion density, $\gamma$ is the secondary electron coefficient, and $\vec{E}$ is the electric field. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaEnergySecondaryElectronBC` is defined as \begin{equation} \Gamma_{\epsilon} \cdot \textbf{n} = \gamma \frac{5}{3} \exp(N_{\epsilon}-N_{e}) \left[a \ \mu_{j} -\left( \text{-} \nabla (V / l_{c}) \right) +\left( \vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j}) \right] \end{equation} diff --git a/doc/content/source/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.md b/doc/content/source/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.md new file mode 100644 index 00000000000..c2f0423710a --- /dev/null +++ b/doc/content/source/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.md @@ -0,0 +1,50 @@ +# SakiyamaEnergySecondaryElectronWithEffEfieldBC + +!syntax description /BCs/SakiyamaEnergySecondaryElectronWithEffEfieldBC + +## Overview + +`SakiyamaEnergySecondaryElectronWithEffEfieldBC` accounts for the mean electron energy density of secondary electrons induced by an ion flux outflow boundary condition. The effective electric field is supplied as scalar componets of the field. + +The ion induced secondary electron mean energy density outflow is defined as + +\begin{equation} +a = +\begin{cases} +1, & \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} \leq 0\\ +\end{cases} \\[10pt] +\Gamma_{\epsilon} \cdot \textbf{n} = \gamma \frac{5}{3} \frac{n_{\epsilon}}{n_{e}} \left[a \ \mu_{j} +\vec{E}_{\text{Eff.}} +\cdot \textbf{n} \ n_{j} \right] +\end{equation} + +where + +- $\Gamma_\epsilon \cdot \textbf{n}$ is the flux normal to the boundary, +- $\textbf{n}$ is the normal vector of the boundary, +- $\mu_{j}$ is the mobility coefficient, +- $n_{\epsilon}$ is the mean energy density, +- $n_{j}$ is the ion density, $\gamma$ is the secondary electron coefficient, +- $\vec{E}$ is the effective electric field (supplied as scalar components), and +- $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. + +When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaEnergySecondaryElectronWithEffEfieldBC` is defined as + +\begin{equation} +\Gamma_{\epsilon} \cdot \textbf{n} = \gamma \frac{5}{3} \exp(N_{\epsilon}-N_{e}) \left[a \ \mu_{j} +\left( \vec{E}_{\text{Eff.}} / l_{c} \right) +\cdot \textbf{n} \ \exp(N_{j}) \right] +\end{equation} + +Where $N_{j}$ is the molar density of the species in log form and $l_{c}$ is the scaling factor of the mesh. + +## Example Input File Syntax + +!listing test/tests/mms/bcs/2D_EnergyBC.i block=BCs/energy_left_second_emissions + +!syntax parameters /BCs/SakiyamaEnergySecondaryElectronWithEffEfieldBC + +!syntax inputs /BCs/SakiyamaEnergySecondaryElectronWithEffEfieldBC + +!syntax children /BCs/SakiyamaEnergySecondaryElectronWithEffEfieldBC diff --git a/doc/content/source/bcs/SakiyamaIonAdvectionBC.md b/doc/content/source/bcs/SakiyamaIonAdvectionBC.md index d3b6d73065c..99b2f4c245c 100644 --- a/doc/content/source/bcs/SakiyamaIonAdvectionBC.md +++ b/doc/content/source/bcs/SakiyamaIonAdvectionBC.md @@ -5,24 +5,23 @@ ## Overview `SakiyamaIonAdvectionBC` is an electric field driven outflow boundary condition. -`SakiyamaIonAdvectionBC` assumes the electrostatic approximation for the electric field. -The ion induced secondary electron mean energy density outflow is defined as +The ion density outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{j} \left( \text{-} \nabla (V) \right)\cdot \textbf{n} > 0\\ -0, & \mu_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} \leq 0\\ +1, & \mu_{j} \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] -\Gamma_{j} \cdot \textbf{n} = a \ \mu_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} \ n_{j} +\Gamma_{j} \cdot \textbf{n} = a \ \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 of the boundary, -$\mu_{j}$ is the mobility coefficient, $n_{j}$ is the species density, and $V$ is the electric potential. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaIonAdvectionBC` is defined as +$\mu_{j}$ is the mobility coefficient, $n_{j}$ is the species density, and $\vec{E}$ is the electric field. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaIonAdvectionBC` is defined as \begin{equation} -\Gamma_{j} \cdot \textbf{n} = a \ \mu_{j} \left( \text{-} \nabla (V / l_{c})\right) \cdot \textbf{n} \ \exp(N_{j}) +\Gamma_{j} \cdot \textbf{n} = a \ \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 log form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/bcs/SakiyamaIonAdvectionWithEffEfieldBC.md b/doc/content/source/bcs/SakiyamaIonAdvectionWithEffEfieldBC.md new file mode 100644 index 00000000000..125ebe4c101 --- /dev/null +++ b/doc/content/source/bcs/SakiyamaIonAdvectionWithEffEfieldBC.md @@ -0,0 +1,45 @@ +# SakiyamaIonAdvectionWithEffEfieldBC + +!syntax description /BCs/SakiyamaIonAdvectionWithEffEfieldBC + +## Overview + +`SakiyamaIonAdvectionWithEffEfieldBC` is an electric field driven outflow boundary condition. The effective electric field is supplied as scalar componets of the field. + +The ion outflow is defined as + +\begin{equation} +a = +\begin{cases} +1, & \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} \leq 0\\ +\end{cases} \\[10pt] +\Gamma_{j} \cdot \textbf{n} = a \ \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} \ n_{j} +\end{equation} + +Where + +- $\Gamma$ is the outflow normal to the boundary, +- $\textbf{n}$ is the normal of the boundary, +- $\mu_{j}$ is the mobility coefficient, +- $n_{j}$ is the species density, +- $\vec{E}_{\text{Eff.}}$ is the electric field (supplied as scalar components), and +- $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. + +When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaIonAdvectionWithEffEfieldBC` is defined as + +\begin{equation} +\Gamma_{j} \cdot \textbf{n} = a \ \mu_{j} \left( \vec{E}_{\text{Eff.}} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j}) +\end{equation} + +Where $N_{j}$ is the molar density of the species in log form and $l_{c}$ is the scaling factor of the mesh. + +## Example Input File Syntax + +!listing test/tests/mms/bcs/2D_IonBC.i block=BCs/ion_left_physical_advection + +!syntax parameters /BCs/SakiyamaIonAdvectionWithEffEfieldBC + +!syntax inputs /BCs/SakiyamaIonAdvectionWithEffEfieldBC + +!syntax children /BCs/SakiyamaIonAdvectionWithEffEfieldBC diff --git a/doc/content/source/bcs/SakiyamaSecondaryElectronBC.md b/doc/content/source/bcs/SakiyamaSecondaryElectronBC.md index 1ae6e05d527..ba3dc82cc8d 100644 --- a/doc/content/source/bcs/SakiyamaSecondaryElectronBC.md +++ b/doc/content/source/bcs/SakiyamaSecondaryElectronBC.md @@ -4,25 +4,24 @@ ## Overview -`SakiyamaSecondaryElectronBC` accounts for the mean electron energy density of secondary electrons induced by an ion flux outflow boundary condition. -`SakiyamaSecondaryElectronBC` assumes the electrostatic approximation for the electric field. +`SakiyamaSecondaryElectronBC` accounts for the electron density of secondary electrons induced by an ion flux outflow boundary condition. -The ion induced secondary electron mean energy density outflow is defined as +The ion induced secondary electron density outflow is defined as \begin{equation} a = \begin{cases} -1, & \mu_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} > 0\\ -0, & \mu_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} \leq 0\\ +1, & \mu_{j} \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] -\Gamma_{e} \cdot \textbf{n} = \gamma \left[a \ \mu_{j} \left( \text{-} \nabla (V) \right) \cdot \textbf{n} \ n_{j} \right] +\Gamma_{e} \cdot \textbf{n} = \gamma \left[a \ \mu_{j} \vec{E} \cdot \textbf{n} \ n_{j} \right] \end{equation} Where $\Gamma_e \cdot \textbf{n}$ is the flux normal to the boundary, $\textbf{n}$ is the normal vector of the boundary, -$\mu_{j}$ is the mobility coefficient, $n_{j}$ is the ion density, $\gamma$ is the secondary electron coefficient, and $V$ is the electric potential. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaSecondaryElectronBC` is defined as +$\mu_{j}$ is the mobility coefficient, $n_{j}$ is the ion density, $\gamma$ is the secondary electron coefficient, and $\vec{E}$ is the electric field. $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaSecondaryElectronBC` is defined as \begin{equation} -\Gamma_{e} \cdot \textbf{n} = \gamma \left[a \ \mu_{j} \left( \text{-} \nabla (V / l_{c}) \right) \cdot \textbf{n} \ \exp(N_{j}) \right] +\Gamma_{e} \cdot \textbf{n} = \gamma \left[a \ \mu_{j} \left( \vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j}) \right] \end{equation} Where $N_{j}$ is the molar density of the species in log form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.md b/doc/content/source/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.md new file mode 100644 index 00000000000..a7bac630d42 --- /dev/null +++ b/doc/content/source/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.md @@ -0,0 +1,46 @@ +# SakiyamaSecondaryElectronWithEffEfieldBC + +!syntax description /BCs/SakiyamaSecondaryElectronWithEffEfieldBC + +## Overview + +`SakiyamaSecondaryElectronWithEffEfieldBC` accounts for the electron density of secondary electrons induced by an ion flux outflow boundary condition. The effective electric field is supplied as scalar componets of the field. + +The ion induced secondary electron density outflow is defined as + +\begin{equation} +a = +\begin{cases} +1, & \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} > 0\\ +0, & \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} \leq 0\\ +\end{cases} \\[10pt] +\Gamma_{e} \cdot \textbf{n} = \gamma \left[a \ \mu_{j} \vec{E}_{\text{Eff.}} \cdot \textbf{n} \ n_{j} \right] +\end{equation} + +where + +- $\Gamma_e \cdot \textbf{n}$ is the flux normal to the boundary, +- $\textbf{n}$ is the normal vector of the boundary, +- $\mu_{j}$ is the mobility coefficient, +- $n_{j}$ is the ion density, +- $\gamma$ is the secondary electron coefficient, +- $\vec{E}_{\text{Eff.}}$ is the electric field (supplied as scalar components), and +- $a$ is defined such that the outflow is only non-zero when the drift velocity is directed towards the wall and zero otherwise. + +When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SakiyamaSecondaryElectronWithEffEfieldBC` is defined as + +\begin{equation} +\Gamma_{e} \cdot \textbf{n} = \gamma \left[a \ \mu_{j} \left( \vec{E}_{\text{Eff.}} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j}) \right] +\end{equation} + +Where $N_{j}$ is the molar density of the species in log form and $l_{c}$ is the scaling factor of the mesh. + +## Example Input File Syntax + +!listing test/tests/mms/bcs/2D_ElectronBC.i block=BCs/em_Ar+_second_emissions_left + +!syntax parameters /BCs/SakiyamaSecondaryElectronWithEffEfieldBC + +!syntax inputs /BCs/SakiyamaSecondaryElectronWithEffEfieldBC + +!syntax children /BCs/SakiyamaSecondaryElectronWithEffEfieldBC diff --git a/doc/content/source/bcs/SecondaryElectronBC.md b/doc/content/source/bcs/SecondaryElectronBC.md index 745ef7bfcf6..c1200608399 100644 --- a/doc/content/source/bcs/SecondaryElectronBC.md +++ b/doc/content/source/bcs/SecondaryElectronBC.md @@ -5,34 +5,33 @@ ## Overview `SecondaryElectronBC` is an electron mean energy density of secondary electrons induced by ion flux outflow boundary condition. -`SecondaryElectronBC` assumes the electrostatic approximation for the electric field. \begin{equation} a_{e} = \begin{cases} -1, & \mu_{e} \left( \nabla (V) \right) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \left( \nabla (V) \right)\cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \left( -\vec{E} \right) \cdot \textbf{n} > 0\\ +0, & \mu_{e} \left( -\vec{E} \right)\cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] a_{i} = \begin{cases} -1, & \mu_{i} \left( - \nabla (V) \right) \cdot \textbf{n} > 0\\ -0, & \mu_{i} \left( - \nabla (V) \right)\cdot \textbf{n} \leq 0\\ +1, & \mu_{i} \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{i} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{e} \cdot \textbf{n} = \frac{1 - r_{e}}{1 + r_{e}} \frac{\text{-}1}{2} v_{\text{th},e} n_{\gamma} - \frac{2}{1+r} (1 - a_{e}) \gamma \Gamma_{j} \cdot \textbf{n} \\[10pt] \Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} -\left( \text{-} \nabla (V) \right) +\vec{E} \cdot \textbf{n} \ n_{j} + \frac{1}{2}v_{\text{th},j}n_{j} \right] \\[10pt] v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \frac{n_{\varepsilon}}{n_{e}}} \\[10pt] v_{\text{th},j} = \sqrt{\frac{8k_{B}T}{\pi m_{j}}} \\[10pt] -n_{\gamma} = (1 - a_{e}) \frac{\gamma \Gamma_{i} \cdot \textbf{n}}{\mu_{e} (\text{-}\nabla V) \cdot \textbf{n}} +n_{\gamma} = (1 - a_{e}) \frac{\gamma \Gamma_{i} \cdot \textbf{n}}{\mu_{e} \vec{E} \cdot \textbf{n}} \end{equation} Where the subscripts $e$, $j$ and $\varepsilon$ represents properties of electrons, ions and electron energy respectively, $\Gamma$ is the flux of the electron or ions, $\textbf{n}$ is the normal vector of the boundary, -$\mu$ is the mobility coefficient, $n$ is the species density, $v_\text{th}$ is the thermal velocity of the species, $k_{B}$ is the Boltzmann constant, $T$ is the gas temperature, and $n_{\gamma}$ is electron density emitted by the surface. $a$ is defined such that the outflow is non-zero when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SecondaryElectronBC` is defined as +$\mu$ is the mobility coefficient, $n$ is the species density, $v_\text{th}$ is the thermal velocity of the species, $k_{B}$ is the Boltzmann constant, $T$ is the gas temperature, $\vec{E}$ is the electric field, and $n_{\gamma}$ is electron density emitted by the surface. $a$ is defined such that the outflow is non-zero when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SecondaryElectronBC` is defined as \begin{equation} v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \exp (N_{\varepsilon} - N_{e})} \\[10pt] -\Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} \left( \text{-} \nabla (V / l_{c}) \right) \cdot \textbf{n} \ \exp(N_{j}) + \frac{1}{2}v_{\text{th},j}\exp(N_{j}) \right] +\Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} \left( \vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j}) + \frac{1}{2}v_{\text{th},j}\exp(N_{j}) \right] \end{equation} Where $N_{e}$, $N_{i}$ and $N_{\varepsilon}$ is the molar density of the electrons, ions and electron energy in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/bcs/SecondaryElectronEnergyBC.md b/doc/content/source/bcs/SecondaryElectronEnergyBC.md index 7ad580ec29a..a3e65f9b878 100644 --- a/doc/content/source/bcs/SecondaryElectronEnergyBC.md +++ b/doc/content/source/bcs/SecondaryElectronEnergyBC.md @@ -5,22 +5,21 @@ ## Overview `SecondaryElectronEnergyBC` is an electron mean energy density of secondary electrons induced by ion flux outflow boundary condition. -`SecondaryElectronEnergyBC` assumes the electrostatic approximation for the electric field. \begin{equation} a_{e} = \begin{cases} -1, & \mu_{e} \left( \nabla (V) \right) \cdot \textbf{n} > 0\\ -0, & \mu_{e} \left( \nabla (V) \right)\cdot \textbf{n} \leq 0\\ +1, & \mu_{e} \left( -\vec{E} \right) \cdot \textbf{n} > 0\\ +0, & \mu_{e} \left( -\vec{E} \right)\cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] a_{i} = \begin{cases} -1, & \mu_{i} \left( - \nabla (V) \right) \cdot \textbf{n} > 0\\ -0, & \mu_{i} \left( - \nabla (V) \right)\cdot \textbf{n} \leq 0\\ +1, & \mu_{i} \vec{E} \cdot \textbf{n} > 0\\ +0, & \mu_{i} \vec{E} \cdot \textbf{n} \leq 0\\ \end{cases} \\[10pt] \Gamma_{\epsilon} \cdot \textbf{n} = \frac{1 - r_{e}}{1 + r_{e}} \frac{\text{-}5}{6} v_{\text{th},e} n_{\gamma} \varepsilon_{\gamma} - \frac{5}{3} \frac{2}{1+r} (1 - a_{e}) \gamma \Gamma_{j} \cdot \textbf{n} \\[10pt] \Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} -\left( \text{-} \nabla (V) \right) +\vec{E} \cdot \textbf{n} \ n_{j} + \frac{1}{2}v_{\text{th},j}n_{j} \right] \\[10pt] v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \frac{n_{\varepsilon}}{n_{e}}} \\[10pt] v_{\text{th},j} = \sqrt{\frac{8k_{B}T}{\pi m_{j}}} \\[10pt] @@ -28,11 +27,11 @@ n_{\gamma} = (1 - a_{e}) \frac{\gamma \Gamma_{i} \cdot \textbf{n}}{\mu_{e} (\tex \end{equation} Where the subscripts $e$, $j$ and $\varepsilon$ represents properties of electrons, ions and electron energy respectively, $\Gamma$ is the flux of the electron or ions, $\textbf{n}$ is the normal vector of the boundary, -$\mu$ is the mobility coefficient, $n$ is the species density, $v_\text{th}$ is the thermal velocity of the species, $k_{B}$ is the Boltzmann constant, $T$ is the gas temperature, $n_{\gamma}$ is electron density emitted by the surface, and $\varepsilon_{\gamma}$ is the energy of the secondary electrons. $a$ is defined such that the outflow is non-zero when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SecondaryElectronEnergyBC` is defined as +$\mu$ is the mobility coefficient, $n$ is the species density, $v_\text{th}$ is the thermal velocity of the species, $k_{B}$ is the Boltzmann constant, $T$ is the gas temperature, $\vec{E}$ is the electric field, $n_{\gamma}$ is electron density emitted by the surface, and $\varepsilon_{\gamma}$ is the energy of the secondary electrons. $a$ is defined such that the outflow is non-zero when the drift velocity is directed towards the wall and zero otherwise. $r$ is defined as the fraction of particles reflected by the surface. When converting the density to log form and applying a scaling factor of the mesh, the strong form for `SecondaryElectronEnergyBC` is defined as \begin{equation} v_{\text{th},e} = \sqrt{\frac{8e}{\pi m_{e}} \frac{2}{3} \exp (N_{\varepsilon} - N_{e})} \\[10pt] -\Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} \left( \text{-} \nabla (V / l_{c}) \right) \cdot \textbf{n} \ \exp(N_{j}) + \frac{1}{2}v_{\text{th},j}\exp(N_{j}) \right] +\Gamma_{j} \cdot \textbf{n} = \frac{1-r_{j}}{1+r_{j}} \left[ (2 a_{j}-1) \ \mu_{j} \left( \vec{E} / l_{c} \right) \cdot \textbf{n} \ \exp(N_{j}) + \frac{1}{2}v_{\text{th},j}\exp(N_{j}) \right] \end{equation} Where $N_{e}$, $N_{i}$ and $N_{\varepsilon}$ is the molar density of the electrons, ions and electron energy in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/CoeffDiffusionForShootMethod.md b/doc/content/source/kernels/CoeffDiffusionForShootMethod.md index c4f8fdca0c6..dfdad09ed51 100644 --- a/doc/content/source/kernels/CoeffDiffusionForShootMethod.md +++ b/doc/content/source/kernels/CoeffDiffusionForShootMethod.md @@ -10,9 +10,9 @@ the sensitivity value for the shoothing method. For more information on the impl ## Example Input File Syntax An example of how to use `CoeffDiffusionForShootMethod` can be found in the -test file `Acceleration_By_Shooting_Method_SensitivityMatrix.i`. +test file `Acceleration_By_Shooting_Method.i`. -!listing test/tests/accelerations/Acceleration_By_Shooting_Method_SensitivityMatrix.i block=Kernels/SM_Ar*_diffusion +!listing test/tests/accelerations/Acceleration_By_Shooting_Method.i block=Kernels/SM_Ar*_diffusion !syntax parameters /Kernels/CoeffDiffusionForShootMethod diff --git a/doc/content/source/kernels/DriftDiffusion.md b/doc/content/source/kernels/DriftDiffusion.md index d6a31ee5c85..311f281d106 100644 --- a/doc/content/source/kernels/DriftDiffusion.md +++ b/doc/content/source/kernels/DriftDiffusion.md @@ -4,20 +4,18 @@ ## Overview -`DriftDiffusion` is a flux term containing an electric field driven advection and diffusion term used for variables in logarithmic form. `DriftDiffusion` assumes the electrostatic approximation for the electric field in multiple dimensions and can assume a uniform electric field for 1D. +`DriftDiffusion` is a flux term containing an electric field driven advection and diffusion term used for variables in logarithmic form. The strong form for an electric field driven advection and diffusion flux is usually defined as \begin{equation} -\nabla \cdot \Gamma = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} n_{j} \ E - D_{j} \nabla (n_{j}) \right] \\[10pt] -E = \text{-} \nabla (V) +\nabla \cdot \Gamma = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} n_{j} \ \vec{E} - D_{j} \nabla (n_{j}) \right] \\[10pt] \end{equation} -Where $\Gamma$ is the species' 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, $n_{j}$ is the density, $D_{j}$ is the diffusion coefficient, $E$ is the electric field and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `DriftDiffusion` is defined as +Where $\Gamma$ is the species' 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, $n_{j}$ is the density, $D_{j}$ is the diffusion coefficient, and $\vec{E}$ is the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `DriftDiffusion` is defined as \begin{equation} -\nabla \cdot \Gamma = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} \exp(N_{j}) \ \text{-} \nabla (V / l_{c}) - D_{j} \exp(N_{j}) \nabla (N_{j} / l_{c}) \right] +\nabla \cdot \Gamma = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} \exp(N_{j}) \ (\vec{E} / l_{c}) - D_{j} \exp(N_{j}) \nabla (N_{j} / l_{c}) \right] \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/EEDFReactionLogForShootMethod.md b/doc/content/source/kernels/EEDFReactionLogForShootMethod.md index 5d4ad28650b..99fbc1e2e3c 100644 --- a/doc/content/source/kernels/EEDFReactionLogForShootMethod.md +++ b/doc/content/source/kernels/EEDFReactionLogForShootMethod.md @@ -10,9 +10,9 @@ ## Example Input File Syntax An example of how to use `EEDFReactionLogForShootMethod` can be found in the -test file `Acceleration_By_Shooting_Method_SensitivityMatrix.i`. +test file `Acceleration_By_Shooting_Method.i`. -!listing test/tests/accelerations/Acceleration_By_Shooting_Method_SensitivityMatrix.i block=Kernels/SM_Ar*_stepwise_ionization +!listing test/tests/accelerations/Acceleration_By_Shooting_Method.i block=Kernels/SM_Ar*_stepwise_ionization !syntax parameters /Kernels/EEDFReactionLogForShootMethod diff --git a/doc/content/source/kernels/EFieldAdvection.md b/doc/content/source/kernels/EFieldAdvection.md index 5b62f853a79..9d0f46bd22e 100644 --- a/doc/content/source/kernels/EFieldAdvection.md +++ b/doc/content/source/kernels/EFieldAdvection.md @@ -5,21 +5,20 @@ ## Overview `EFieldAdvection` is the electric field driven advection term used for variables in logarithmic form. -`EFieldAdvection` assumes the electrostatic approximation for the electric field. -The strong form for an electrostatic advection term is usually defined as +The strong form for an advection term is usually defined as \begin{equation} -\nabla \cdot \Gamma_{\text{adv}} = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} n_{j} \ \text{-} \nabla (V) \right] +\nabla \cdot \Gamma_{\text{adv}} = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} n_{j} \ \vec{E} \right] \end{equation} Where $\Gamma_{\text{adv}}$ is the advection component of a species' 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, $n_{j}$ is the density, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling +($\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. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `EFieldAdvection` is defined as \begin{equation} -\nabla \cdot \Gamma_{\text{adv}} = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} \exp(N_{j}) \ \text{-} \nabla (V / l_{c}) \right] +\nabla \cdot \Gamma_{\text{adv}} = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} \exp(N_{j}) \ (\vec{E} / l_{c}) \right] \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and diff --git a/doc/content/source/kernels/EFieldArtDiff.md b/doc/content/source/kernels/EFieldArtDiff.md index 85251a29364..04de01f899d 100644 --- a/doc/content/source/kernels/EFieldArtDiff.md +++ b/doc/content/source/kernels/EFieldArtDiff.md @@ -5,20 +5,19 @@ ## Overview `EFieldArtDiff` adds an artificial diffusion term that is proportional to the magnitude of the electric field driven advection. -`EFieldArtDiff` assumes the electrostatic approximation for the electric field. The strong form for the artificial diffusion flux is usually defined as \begin{equation} -\nabla \cdot \Gamma_{\text{art}} = \nabla \cdot \left[ \mu_{j} \text{-} \nabla (V) \frac{h_\text{max}}{2} \nabla (n_{j}) F_s \right] +\nabla \cdot \Gamma_{\text{art}} = \nabla \cdot \left[ \mu_{j} \vec{E} \frac{h_\text{max}}{2} \nabla (n_{j}) F_s \right] \end{equation} -Where $\Gamma_{\text{art}}$ is the advection component of a species' flux, $\mu_{j}$ is the mobility coefficient, $V$ is the potential, $n_{j}$ is the density, $h_\text{max}$ is the max length of the current element, and F_s is a user defined scaling factor. +Where $\Gamma_{\text{art}}$ is the advection component of a species' flux, $\mu_{j}$ is the mobility coefficient, $\vec{E}$ is the electric field, $n_{j}$ is the density, $h_\text{max}$ is the max length of the current element, and $F_{s}$ is a user defined scaling factor. When converting the density to logarithmic form and applying a scaling factor of the mesh, `EFieldArtDiff` is defined as \begin{equation} -\nabla \cdot \Gamma_{\text{art}} = \nabla \cdot \left[ \mu_{j} \frac{\text{-}\lVert \nabla (V) \rVert_{2}}{l_{c}} \frac{h_{max} l_{c}}{2} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}} * F_s \right] +\nabla \cdot \Gamma_{\text{art}} = \nabla \cdot \left[ \mu_{j} \frac{\text{-}\lVert \vec{E} \rVert_{2}}{l_{c}} \frac{h_{max} l_{c}}{2} \exp(N_{j}) \frac{\nabla (N_{j})}{l_{c}} * F_s \right] \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form, $N_{A}$ is Avogadro's diff --git a/doc/content/source/kernels/EFieldMagnitudeSource.md b/doc/content/source/kernels/EFieldMagnitudeSource.md index d14cf363313..6601e24e6a0 100644 --- a/doc/content/source/kernels/EFieldMagnitudeSource.md +++ b/doc/content/source/kernels/EFieldMagnitudeSource.md @@ -4,15 +4,15 @@ ## Overview -`EFieldMagnitudeSource` adds the magnitude of the electric field squared as a source term. `EFieldMagnitudeSource` assumes the electrostatic approximation for the electric field. +`EFieldMagnitudeSource` adds the magnitude of the electric field squared as a source term. -The magnitude of the electrostatic electric field squared is +The source term is defined as \begin{equation} -S_{\lvert E \rvert} = \nabla V \cdot \nabla V +S_{\lvert E \rvert} = \lVert \vec{E} \rVert_{2} \end{equation} -Where $S_{\lvert E \rvert}$ is the source term and $V$ is the potential. +Where $S_{\lvert E \rvert}$ is the source term and $\vec{E}$ is the electric field. !alert warning title=Untested Class The EFieldMagnitudeSource does not have a formalized test, yet. For this reason, diff --git a/doc/content/source/kernels/EffectiveEField.md b/doc/content/source/kernels/EffectiveEField.md new file mode 100644 index 00000000000..547c6e77f22 --- /dev/null +++ b/doc/content/source/kernels/EffectiveEField.md @@ -0,0 +1,29 @@ +# EffectiveEField + +!syntax description /Kernels/EffectiveEField + +## Overview + +`EffectiveEField` supplies the source term of the time derivative calculation of an +effective electric field for ions. + +This object supplies the right hand term of the following equation: +\begin{equation} +\frac{\vec{E}_{\text{Eff.}}}{\partial t} = \nu_{i} \left( \vec{E} - \vec{E}_{\text{Eff.}} \right) +\end{equation} + +where + +- $\vec{E}_{\text{Eff.}}$ is the effective electric field acting on the ions, +- $\vec{E}$ is the electric field, and +- $\nu_{i}$ is the ion-collision frequency. + +## Example Input File Syntax + +!listing test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i block=Kernels/EffEfield_X_ForceBody + +!syntax parameters /Kernels/EffectiveEField + +!syntax inputs /Kernels/EffectiveEField + +!syntax children /Kernels/EffectiveEField diff --git a/doc/content/source/kernels/EffectiveEFieldAdvection.md b/doc/content/source/kernels/EffectiveEFieldAdvection.md new file mode 100644 index 00000000000..92e9582c25e --- /dev/null +++ b/doc/content/source/kernels/EffectiveEFieldAdvection.md @@ -0,0 +1,39 @@ +# EffectiveEFieldAdvection + +!syntax description /Kernels/EffectiveEFieldAdvection + +## Overview + +`EffectiveEFieldAdvection` is the effective electric field driven advection term used for variables in logarithmic form. +The effective electric field is supplied as scalar componets of the field. + +The strong form for an advection term is usually defined as + +\begin{equation} +\nabla \cdot \Gamma_{\text{adv}} = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} n_{j} \ \vec{E}_{\text{Eff.}} \right] +\end{equation} + +where + +- $\Gamma_{\text{adv}}$ is the advection component of a species' 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, $n_{j}$ is the density, and +- $\vec{E}_{\text{Eff.}}$ is the effective electric field acting on the ions. + +\begin{equation} +\nabla \cdot \Gamma_{\text{adv}} = \nabla \cdot \left[ \text{sign}_{j} \mu_{j} \exp(N_{j}) \ (\vec{E}_{\text{Eff.}} / l_{c}) \right] +\end{equation} + +Where $N_{j}$ is the molar density of the species in logarithmic form and +$l_{c}$ is the scaling factor of the mesh. + + +## Example Input File Syntax + +!listing test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i block=Kernels/ion_advection + +!syntax parameters /Kernels/EffectiveEFieldAdvection + +!syntax inputs /Kernels/EffectiveEFieldAdvection + +!syntax children /Kernels/EffectiveEFieldAdvection diff --git a/doc/content/source/kernels/ElectronEnergyLossFromElastic.md b/doc/content/source/kernels/ElectronEnergyLossFromElastic.md index eb0f69c008e..d1dd19a7f47 100644 --- a/doc/content/source/kernels/ElectronEnergyLossFromElastic.md +++ b/doc/content/source/kernels/ElectronEnergyLossFromElastic.md @@ -4,21 +4,21 @@ ## Overview -`ElectronEnergyLossFromElastic` calculates the electron energy loss from elastic collisions using Townsend coefficients for electrons in logarithmic form. `ElectronEnergyLossFromElastic` assumes the electrostatic approximation for the electric field. +`ElectronEnergyLossFromElastic` calculates the electron energy loss from elastic collisions using Townsend coefficients for electrons in logarithmic form. Electron energy loss from elastic collisions can be described as \begin{equation} S_\text{Loss} = - \lvert \Gamma_{e} \rvert \left[ 3 \alpha_{el} \frac{m_{e}}{m_{g}} \frac{2n_{\epsilon}}{3n_{e}} \right] \\[10pt] -\Gamma_{e} = \mu_{e} n_{e} \nabla (V) - D_{e} \nabla (n_{e}) +\Gamma_{e} = - \mu_{e} n_{e} \vec{E} - D_{e} \nabla (n_{e}) \end{equation} -Where $S_\text{Loss}$ is the loss term of the electron mean energy density, $\Gamma_{e}$ is the electron flux, $\alpha_{el}$ is the Townsend coefficient for elastic electron-neutral collisions, $m_{e}$ is the mass of the electrons, $m_{g}$ is the mass of the neutral species, $n_{e}$ is the electron density, $n_{\epsilon}$ is the electron mean energy density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronEnergyLossFromElastic` is defined as +Where $S_\text{Loss}$ is the loss term of the electron mean energy density, $\Gamma_{e}$ is the electron flux, $\alpha_{el}$ is the Townsend coefficient for elastic electron-neutral collisions, $m_{e}$ is the mass of the electrons, $m_{g}$ is the mass of the neutral species, $n_{e}$ is the electron density, $n_{\epsilon}$ is the electron mean energy density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $\vec{E}$ is +the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronEnergyLossFromElastic` is defined as \begin{equation} S_\text{Loss} = - \lvert \Gamma_{e} \rvert \left[ 3 \alpha_{el} \frac{m_{e}}{m_{g}} \frac{2}{3} \exp(N_{\varepsilon} - N_{e}) \right] \\[10pt] -\Gamma_{e} = \mu_{e} \exp(N_{e}) \nabla (V / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) +\Gamma_{e} = - \mu_{e} \exp(N_{e}) (\vec{E} / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/ElectronEnergyLossFromExcitation.md b/doc/content/source/kernels/ElectronEnergyLossFromExcitation.md index 12378756ed8..a3c094947a4 100644 --- a/doc/content/source/kernels/ElectronEnergyLossFromExcitation.md +++ b/doc/content/source/kernels/ElectronEnergyLossFromExcitation.md @@ -5,21 +5,21 @@ ## Overview -`ElectronEnergyLossFromExcitation` calculates the electron energy loss from metastable excitation using Townsend coefficients for electrons in logarithmic form. `ElectronEnergyLossFromExcitation` assumes the electrostatic approximation for the electric field. +`ElectronEnergyLossFromExcitation` calculates the electron energy loss from metastable excitation using Townsend coefficients for electrons in logarithmic form. Electron energy loss from metastable excitation can be described as \begin{equation} S_\text{Loss} = \text{-} \alpha_{ex} \epsilon_{ex} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} n_{e} \nabla (V) - D_{e} \nabla (n_{e}) +\Gamma_{e} = - \mu_{e} n_{e} \vec{E} - D_{e} \nabla (n_{e}) \end{equation} -Where $S_\text{Loss}$ is the loss term of the electron mean energy density, $\Gamma_{e}$ is the electron flux, $\alpha_{ex}$ is the Townsend coefficient for metastable excitation, $\epsilon_{ex}$ the electron energy lost in an excitation collision, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronEnergyLossFromExcitation` is defined as +Where $S_\text{Loss}$ is the loss term of the electron mean energy density, $\Gamma_{e}$ is the electron flux, $\alpha_{ex}$ is the Townsend coefficient for metastable excitation, $\epsilon_{ex}$ the electron energy lost in an excitation collision, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $\vec{E}$ is +the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronEnergyLossFromExcitation` is defined as \begin{equation} S_\text{Loss} = \text{-} \alpha_{ex} \epsilon_{ex} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} \exp(N_{e}) \nabla (V / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) +\Gamma_{e} = - \mu_{e} \exp(N_{e}) (\vec{E} / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/ElectronEnergyLossFromIonization.md b/doc/content/source/kernels/ElectronEnergyLossFromIonization.md index 82b997a0ef6..a640522d745 100644 --- a/doc/content/source/kernels/ElectronEnergyLossFromIonization.md +++ b/doc/content/source/kernels/ElectronEnergyLossFromIonization.md @@ -4,21 +4,21 @@ ## Overview -`ElectronEnergyLossFromIonization` calculates the electron energy loss from ionization using Townsend coefficients for electrons in logarithmic form. `ElectronEnergyLossFromIonization` assumes the electrostatic approximation for the electric field. +`ElectronEnergyLossFromIonization` calculates the electron energy loss from ionization using Townsend coefficients for electrons in logarithmic form. Electron energy loss from metastable excitation can be described as \begin{equation} S_\text{Loss} = \text{-} \alpha_{iz} \epsilon_{iz} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} n_{e} \ \text{-} \nabla (V) - D_{e} \nabla (n_{e}) +\Gamma_{e} = \text{-} \mu_{e} n_{e} \ \vec{E} - D_{e} \nabla (n_{e}) \end{equation} -Where $S_\text{Loss}$ is the loss term of the electron mean energy density, $Gamma_{e}$ is the electron flux, $\alpha_{iz}$ is the Townsend coefficient for ionization, $\epsilon_{iz}$ the electron energy lost in an ionization collision, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronEnergyLossFromIonization` is defined as +Where $S_\text{Loss}$ is the loss term of the electron mean energy density, $Gamma_{e}$ is the electron flux, $\alpha_{iz}$ is the Townsend coefficient for ionization, $\epsilon_{iz}$ the electron energy lost in an ionization collision, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $\vec{E}$ is +the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronEnergyLossFromIonization` is defined as \begin{equation} S_\text{Loss} = \text{-} \alpha_{iz} \epsilon_{iz} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} \exp(N_{e}) \ \text{-} \nabla (V / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) +\Gamma_{e} = \text{-} \mu_{e} \exp(N_{e}) \ (\vec{E} / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/ElectronsFromIonization.md b/doc/content/source/kernels/ElectronsFromIonization.md index 157e7572470..317a55fb86e 100644 --- a/doc/content/source/kernels/ElectronsFromIonization.md +++ b/doc/content/source/kernels/ElectronsFromIonization.md @@ -4,21 +4,21 @@ ## Overview -`ElectronsFromIonization` is calculates the electron production from ionization using Townsend coefficients for electrons in logarithmic form. `ElectronsFromIonization` assumes the electrostatic approximation for the electric field. +`ElectronsFromIonization` is calculates the electron production from ionization using Townsend coefficients for electrons in logarithmic form. Electron production from ionization can be described as \begin{equation} S_\text{gain} = \alpha_{iz} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} n_{e} \nabla (V) - D_{e} \nabla (n_{e}) +\Gamma_{e} = - \mu_{e} n_{e} \vec{E} - D_{e} \nabla (n_{e}) \end{equation} -Where $S_\text{gain}$ is the electron production from ionization, $\Gamma_{e}$ is the electron flux, $\alpha_{iz}$ is the Townsend coefficient for ionization, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronsFromIonization` is defined as +Where $S_\text{gain}$ is the electron production from ionization, $\Gamma_{e}$ is the electron flux, $\alpha_{iz}$ is the Townsend coefficient for ionization, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $\vec{E}$ is +the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ElectronsFromIonization` is defined as \begin{equation} S_\text{Gain} = \alpha_{iz} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} \exp(N_{e}) \nabla (V / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) +\Gamma_{e} = - \mu_{e} \exp(N_{e}) (\vec{E} / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/ExcitationReaction.md b/doc/content/source/kernels/ExcitationReaction.md index 420e2e9365f..2faf541e93c 100644 --- a/doc/content/source/kernels/ExcitationReaction.md +++ b/doc/content/source/kernels/ExcitationReaction.md @@ -4,21 +4,20 @@ ## Overview -`ExcitationReaction` calculates the metastable excitation production using Townsend coefficients for electrons in logarithmic form. `ExcitationReaction` assumes the electrostatic approximation for the electric field. +`ExcitationReaction` calculates the metastable excitation production using Townsend coefficients for electrons in logarithmic form. Electron energy loss from metastable excitation can be described as \begin{equation} S_\text{Gain} = \alpha_{ex} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} n_{e} \nabla (V) - D_{e} \nabla (n_{e}) +\Gamma_{e} = - \mu_{e} n_{e} \vec{E} - D_{e} \nabla (n_{e}) \end{equation} -Where $S_\text{Gain}$ is the metastable production, $\Gamma_{e}$ is the electron flux, $\alpha_{ex}$ is the Townsend coefficient for metastable excitation, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ExcitationReaction` is defined as +Where $S_\text{Gain}$ is the metastable production, $\Gamma_{e}$ is the electron flux, $\alpha_{ex}$ is the Townsend coefficient for metastable excitation, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $\vec{E}$ is the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `ExcitationReaction` is defined as \begin{equation} S_\text{Gain} = \alpha_{ex} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} \exp(N_{e}) \nabla (V / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) +\Gamma_{e} = - \mu_{e} \exp(N_{e}) (\vec{E} / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/IonsFromIonization.md b/doc/content/source/kernels/IonsFromIonization.md index f1f82f89d28..3cd2522d68e 100644 --- a/doc/content/source/kernels/IonsFromIonization.md +++ b/doc/content/source/kernels/IonsFromIonization.md @@ -4,21 +4,20 @@ ## Overview -`IonsFromIonization` calculates the ion production from ionization using Townsend coefficients for electrons in logarithmic form. `IonsFromIonization` assumes the electrostatic approximation for the electric field. +`IonsFromIonization` calculates the ion production from ionization using Townsend coefficients for electrons in logarithmic form. Ion production from ionization can be described as \begin{equation} S_\text{Gain} = \alpha_{iz} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} n_{e} \nabla (V) - D_{e} \nabla (n_{e}) +\Gamma_{e} = - \mu_{e} n_{e} \vec{E} - D_{e} \nabla (n_{e}) \end{equation} -Where $S_\text{Gain}$ is the ion production from ionization, $\Gamma_{e}$ is the electron flux, $\alpha_{iz}$ is the Townsend coefficient for ionization, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $V$ is -the potential. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `IonsFromIonization` is defined as +Where $S_\text{Gain}$ is the ion production from ionization, $\Gamma_{e}$ is the electron flux, $\alpha_{iz}$ is the Townsend coefficient for ionization, $n_{e}$ is the electron density, $\mu_{e}$ is the mobility coefficient, $D_{e}$ is the diffusion coefficient, and $E$ is the electric field. When converting the density to logarithmic form and applying a scaling factor of the mesh, the strong form for `IonsFromIonization` is defined as \begin{equation} S_\text{Gain} = \alpha_{iz} \lvert \Gamma_{e} \rvert \\[10pt] -\Gamma_{e} = \mu_{e} \exp(N_{e}) \nabla (V / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) +\Gamma_{e} = - \mu_{e} \exp(N_{e}) (\vec{E} / l_{c}) - D_{e} \exp(N_{e}) \nabla (N_{e} / l_{c}) \end{equation} Where $N_{j}$ is the molar density of the species in logarithmic form and $l_{c}$ is the scaling factor of the mesh. diff --git a/doc/content/source/kernels/JouleHeating.md b/doc/content/source/kernels/JouleHeating.md index 382c019f51f..d439f1fa062 100644 --- a/doc/content/source/kernels/JouleHeating.md +++ b/doc/content/source/kernels/JouleHeating.md @@ -5,24 +5,23 @@ ## Overview `JouleHeating` accounts for the heating of electrons through Joule heating -and electron mean energy densities in logarithmic form. `JouleHeating` assumes -the electrostatic approximation for the electric field. +and electron mean energy densities in logarithmic form. The strong form for Joule heating effects for energies in units of eV are usually defined as \begin{equation} -p_{\text{Joule}} = \text{-} \nabla (V) \cdot \left[\text{-} \mu_{e} \ \text{-} \nabla (V) n_{e} - +p_{\text{Joule}} = \vec{E} \cdot \left[\text{-} \mu_{e} \ \vec{E} n_{e} - D_{e} \nabla (n_{e})\right] \end{equation} -Where $p_{\text{Joule}}$ is Joule heating in units of eV/m$^{3}$s, $V$ is the potential, $\mu_{e}$ is the mobility of the electrons, $n_{e}$ is +Where $p_{\text{Joule}}$ is Joule heating in units of eV/m$^{3}$s, $\vec{E}$ is the electric field, $\mu_{e}$ is the mobility of the electrons, $n_{e}$ is the electron density, and $D_{e}$ is the diffusion coefficient. When converting the density to logarithmic form and applying scaling factor to the mesh and voltage, the strong form for `JouleHeating` is defined as \begin{equation} -p_{\text{Joule}} = \frac{\text{-} \nabla (V) V_{c}}{l_{c}} \cdot [\text{-} \mu_{e} \ \frac{\text{-} \nabla (V)}{l_{c}} \exp(N_{e}) - +p_{\text{Joule}} = \frac{\vec{E} V_{c}}{l_{c}} \cdot [\text{-} \mu_{e} \ \frac{\vec{E}}{l_{c}} \exp(N_{e}) - D_{e} \exp(N_{e}) \frac{\nabla (N_{e})}{l_{c}}] \end{equation} diff --git a/doc/content/source/kernels/ReactionSecondOrderLogForShootMethod.md b/doc/content/source/kernels/ReactionSecondOrderLogForShootMethod.md index b0ee513e06a..115a0c847f0 100644 --- a/doc/content/source/kernels/ReactionSecondOrderLogForShootMethod.md +++ b/doc/content/source/kernels/ReactionSecondOrderLogForShootMethod.md @@ -9,9 +9,9 @@ ## Example Input File Syntax An example of how to use `ReactionSecondOrderLogForShootMethod` can be found in the -test file `Acceleration_By_Shooting_Method_SensitivityMatrix.i`. +test file `Acceleration_By_Shooting_Method.i`. -!listing test/tests/accelerations/Acceleration_By_Shooting_Method_SensitivityMatrix.i block=Kernels/SM_Ar*_quenching +!listing test/tests/accelerations/Acceleration_By_Shooting_Method.i block=Kernels/SM_Ar*_quenching !syntax parameters /Kernels/ReactionSecondOrderLogForShootMethod diff --git a/doc/content/source/kernels/ReactionThirdOrderLogForShootMethod.md b/doc/content/source/kernels/ReactionThirdOrderLogForShootMethod.md index 4eb1d4d59d8..16f050831e3 100644 --- a/doc/content/source/kernels/ReactionThirdOrderLogForShootMethod.md +++ b/doc/content/source/kernels/ReactionThirdOrderLogForShootMethod.md @@ -9,9 +9,9 @@ ## Example Input File Syntax An example of how to use `ReactionThirdOrderLogForShootMethod` can be found in the -test file `Acceleration_By_Shooting_Method_SensitivityMatrix.i`. +test file `Acceleration_By_Shooting_Method.i`. -!listing test/tests/accelerations/Acceleration_By_Shooting_Method_SensitivityMatrix.i block=Kernels/SM_Ar*_3B_quenching +!listing test/tests/accelerations/Acceleration_By_Shooting_Method.i block=Kernels/SM_Ar*_3B_quenching !syntax parameters /Kernels/ReactionThirdOrderLogForShootMethod diff --git a/doc/content/source/kernels/ThermalConductivityDiffusion.md b/doc/content/source/kernels/ThermalConductivityDiffusion.md new file mode 100644 index 00000000000..8c97d69f69a --- /dev/null +++ b/doc/content/source/kernels/ThermalConductivityDiffusion.md @@ -0,0 +1,66 @@ +# ThermalConductivityDiffusion + +!syntax description /Kernels/ThermalConductivityDiffusion + +## Overview + +`ThermalConductivityDiffusion` supplies a electron energy diffusion term that assumes an electron thermal conductivity for the electron energy flux. + +The thermal conductivity formulation of the electron energy flux in terms of electron temperature is defined as: + +\begin{equation} + \vec{q}_{e} = -K_{e} \nabla T_{e} + \frac{5}{2}T_{e} \vec{\Gamma}_{e} \\[10pt] + K_{e} = \frac{3}{2} D_{e} n_{e} \\[10pt] + \vec{\Gamma}_{e} = -D_{e} \nabla n_{e} - \mu_{e} n_{e} \vec{E} +\end{equation} + +where + +- $\vec{q}_{e}$ is the electron energy flux, +- $K_{e}$ is the electron thermal conductivity, +- $T_{e}$ is the electron temperature (in units of eV), +- $\vec{\Gamma}_{e}$ is the electron flux, +- $n_{e}$ is the electron density, +- $D_{e}$ is the electron diffusion coefficient, +- $\mu_{e}$ is the electron mobility coefficient, and +- $\vec{E}$ is the electric field. + +Instead of the electron temperature, Zapdos solves for the electron energy density ($n_{\varepsilon}$), such that: + +\begin{equation} + T_{e} = \frac{2}{3} \frac{n_{\varepsilon}}{n_{e}} +\end{equation} + +Using the electron energy density, the thermal conductivity formulation of the electron energy flux becames: + +\begin{equation} + \vec{q}_{e} = -\mu_{\varepsilon} n_{e} \vec{E} - D_{\varepsilon} \nabla n_{\varepsilon} + \frac{2}{3} D_{e} \left( \nabla n_{\varepsilon} - \frac{n_{\varepsilon}}{n_{e}} \nabla n_{e} \right) +\end{equation} + +where + +- $D_{\varepsilon}$ is the electron energy diffusion coefficient (assuming $D_{\varepsilon} = \frac{5}{3} D_{e}$), and +- $\mu_{e}$ is the electron energy mobility coefficient (assuming $\mu_{\varepsilon} = \frac{5}{3} \mu_{e}$). + +The first term is supplied by [EFieldAdvection.md], the second term is suppled by [CoeffDiffusion.md] and the remaining terms are supplied by `ThermalConductivityDiffusion`. + +When converting the density to logarithmic form and applying a scaling factor of the mesh, `ThermalConductivityDiffusion` is defined as + +\begin{equation} +\frac{2}{3} D_{e} \left( \exp(N_{\varepsilon}) \left( \nabla N_{\varepsilon} / l_{c} \right) - \exp(n_{\varepsilon}-n_{e}) \exp(N_{e}) \left( \nabla N_{e} / l_{c} \right) \right) +\end{equation} + +Where $N$ is the molar density of the species in logarithmic form and +$l_{c}$ is the scaling factor of the mesh. + + + +## Example Input File Syntax + +!listing test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i block=Kernels/mean_en_diffusion_correction + +!syntax parameters /Kernels/ThermalConductivityDiffusion + +!syntax inputs /Kernels/ThermalConductivityDiffusion + +!syntax children /Kernels/ThermalConductivityDiffusion diff --git a/doc/content/source/materials/ADMMSEEDFRates.md b/doc/content/source/materials/ADMMSEEDFRates.md new file mode 100644 index 00000000000..e95c62c0283 --- /dev/null +++ b/doc/content/source/materials/ADMMSEEDFRates.md @@ -0,0 +1,17 @@ +# ADMMSEEDFRates + +!syntax description /Materials/ADMMSEEDFRates + +## Overview + +`ADMMSEEDFRates` supplies the electron mean energy dependent coefficients for a user-specifed function for the purposes of methods of manufactured solutions (MMS) verification. This object also calculates the derivative of the electron mean energy dependent coefficients with respect to the electron density and the electron energy density. + +## Example Input File Syntax + +!listing test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i block=Materials/Material_Coeff_Set2 + +!syntax parameters /Materials/ADMMSEEDFRates + +!syntax inputs /Materials/ADMMSEEDFRates + +!syntax children /Materials/ADMMSEEDFRates diff --git a/doc/content/source/materials/FieldSolverMaterial.md b/doc/content/source/materials/FieldSolverMaterial.md new file mode 100644 index 00000000000..b98b2e24662 --- /dev/null +++ b/doc/content/source/materials/FieldSolverMaterial.md @@ -0,0 +1,44 @@ +# FieldSolverMaterial + +!syntax description /Materials/FieldSolverMaterial + +## Overview + +`FieldSolverMaterial` provides the electric field as a material property. The calculation of the electric field can either be determined assuming electrostatic or electromagnetic conditions. + +When assuming electrostatic conditions (which is the default setting), the electric field is defined as: + +\begin{equation} +\vec{E}_{\text{mat.}} = -\nabla V +\end{equation} + +where + +- $\vec{E}_{\text{mat.}}$ is the electric field as a material property generated by this object, and +- $V$ is a user supplied electrostatic potential. + +When assuming electromagnetic conditions, the electic field is defined as: + +\begin{equation} +\vec{E}_{\text{mat.}} = \vec{E} +\end{equation} + +where + +- $\vec{E}$ is a user supplied electric field from an electromagnetic solver. + +## Example Input File Syntax + +For electrostatic conditions, `FieldSolverMaterial` is set as: + +!listing test/tests/field_solver/field_solver_material_electrostatic.i block=Materials/field_solver + +For electromagnetic conditions, `FieldSolverMaterial` is set as: + +!listing test/tests/field_solver/field_solver_material_electromagnetic.i block=Materials/field_solver + +!syntax parameters /Materials/FieldSolverMaterial + +!syntax inputs /Materials/FieldSolverMaterial + +!syntax children /Materials/FieldSolverMaterial diff --git a/doc/content/source/materials/PlasmaDielectricConstant.md b/doc/content/source/materials/PlasmaDielectricConstant.md new file mode 100644 index 00000000000..e4958b2b596 --- /dev/null +++ b/doc/content/source/materials/PlasmaDielectricConstant.md @@ -0,0 +1,35 @@ +# PlasmaDielectricConstant + +!syntax description /Materials/PlasmaDielectricConstant + +## Overview + +`PlasmaDielectricConstant` provides the real and complex components of the plasma dielectric coefficient, along with the spatial gradient and the first time derivative of the plasma dielectric coefficient. + +The plasma dielectic coefficient is defined as: + +\begin{equation} +\varepsilon_{p} = \varepsilon_{0} \left[ 1 - \frac{\omega_{pe}^{2}}{\omega \left( \omega - j \nu_{m} \right)} \right] \\[10pt] +\omega_{pe} = \sqrt{\frac{e^{2} n_{e}}{\varepsilon_{0} m_{e}}} +\end{equation} + +where + +- $\varepsilon_{p}$ is the plasma dielectric coefficient, +- $\varepsilon_{0}$ is the permittivity of free space, +- $\omega_{pe}$ is the plasma frequency, +- $\omega$ is the drive frequency of the wave propagation, +- $\nu_{m}$ is the electron-neutral collision frequency, +- $e$ is the elementary charge, +- $n_{e}$ is the electron density, and +- $m_{e}$ is the electron mass. + +## Example Input File Syntax + +!listing test/tests/mms/materials/2D_PlasmaDielectricConstant.i block=Materials/Plasma_dielectric + +!syntax parameters /Materials/PlasmaDielectricConstant + +!syntax inputs /Materials/PlasmaDielectricConstant + +!syntax children /Materials/PlasmaDielectricConstant diff --git a/doc/content/syntax/DriftDiffusionAction/index.md b/doc/content/syntax/DriftDiffusionAction/index.md index 68b4f44fd9f..4bd5551d09e 100644 --- a/doc/content/syntax/DriftDiffusionAction/index.md +++ b/doc/content/syntax/DriftDiffusionAction/index.md @@ -1 +1,21 @@ -!template load file=stubs/moose_system.md.template name=DriftDiffusionAction syntax=/DriftDiffusionAction +# DriftDiffusionAction System + +!alert construction title=Undocumented System +The DriftDiffusionAction system has not been documented. The content listed below should be used as a starting +point for documenting the system, which includes the typical automatic documentation associated with +a system; however, what is contained is ultimately determined by what is necessary to make the +documentation clear for users. + +## Overview + +!! Replace this line with information regarding the DriftDiffusionAction system. + +## Example Input File Syntax + +!! Describe and include an example of how to use the DriftDiffusionAction system. + +!syntax list /DriftDiffusionAction objects=True actions=False subsystems=False + +!syntax list /DriftDiffusionAction objects=False actions=False subsystems=True + +!syntax list /DriftDiffusionAction objects=False actions=True subsystems=False diff --git a/doc/content/syntax/PeriodicControllers/index.md b/doc/content/syntax/PeriodicControllers/index.md index 05c183780a8..83e017f9747 100644 --- a/doc/content/syntax/PeriodicControllers/index.md +++ b/doc/content/syntax/PeriodicControllers/index.md @@ -1 +1,21 @@ -!template load file=stubs/moose_system.md.template name=PeriodicControllers syntax=/PeriodicControllers +# PeriodicControllers System + +!alert construction title=Undocumented System +The PeriodicControllers system has not been documented. The content listed below should be used as a starting +point for documenting the system, which includes the typical automatic documentation associated with +a system; however, what is contained is ultimately determined by what is necessary to make the +documentation clear for users. + +## Overview + +!! Replace this line with information regarding the PeriodicControllers system. + +## Example Input File Syntax + +!! Describe and include an example of how to use the PeriodicControllers system. + +!syntax list /PeriodicControllers objects=True actions=False subsystems=False + +!syntax list /PeriodicControllers objects=False actions=False subsystems=True + +!syntax list /PeriodicControllers objects=False actions=True subsystems=False diff --git a/doc/content/syntax/PeriodicRelativeNodalDifference/index.md b/doc/content/syntax/PeriodicRelativeNodalDifference/index.md index 0da0362552c..73fce2f72bd 100644 --- a/doc/content/syntax/PeriodicRelativeNodalDifference/index.md +++ b/doc/content/syntax/PeriodicRelativeNodalDifference/index.md @@ -1 +1,21 @@ -!template load file=stubs/moose_system.md.template name=PeriodicRelativeNodalDifference syntax=/PeriodicRelativeNodalDifference +# PeriodicRelativeNodalDifference System + +!alert construction title=Undocumented System +The PeriodicRelativeNodalDifference system has not been documented. The content listed below should be used as a starting +point for documenting the system, which includes the typical automatic documentation associated with +a system; however, what is contained is ultimately determined by what is necessary to make the +documentation clear for users. + +## Overview + +!! Replace this line with information regarding the PeriodicRelativeNodalDifference system. + +## Example Input File Syntax + +!! Describe and include an example of how to use the PeriodicRelativeNodalDifference system. + +!syntax list /PeriodicRelativeNodalDifference objects=True actions=False subsystems=False + +!syntax list /PeriodicRelativeNodalDifference objects=False actions=False subsystems=True + +!syntax list /PeriodicRelativeNodalDifference objects=False actions=True subsystems=False diff --git a/include/actions/AddDriftDiffusionAction.h b/include/actions/AddDriftDiffusionAction.h index d1593657429..1d128ce49ce 100644 --- a/include/actions/AddDriftDiffusionAction.h +++ b/include/actions/AddDriftDiffusionAction.h @@ -23,18 +23,24 @@ class AddDriftDiffusionAction : public Action virtual void act(); protected: - virtual void addChargeSourceKernels(const std::string & potential_name, - const std::string & charged_particle_name); + virtual void addChargeSourceKernels(const std::string & field_name, + const std::string & charged_particle_name, + const MooseEnum & field_solver); virtual void addADKernels(const std::string & name, - const std::string & potential_name, + const std::string & field_name, const bool & Using_offset, const bool & charged, const bool & energy); virtual void addPosition(const std::string & position_name, const int & component); virtual void addDensityLog(const std::string & particle_name); - virtual void addCurrent(const std::string & particle_name, const std::string & potential_name); + virtual void addCurrent(const std::string & particle_name, + const std::string & field_property_name); virtual void addEfield(const std::string & Efield_name, - const std::string & potential_name, + const std::string & field_property_name, const int & component); + virtual void addFieldSolverMaterial(const std::string & field_name, + const std::string & field_property_name, + const MooseEnum & field_solver, + const bool & effective_field); }; diff --git a/include/actions/AddPeriodicControllers.h b/include/actions/AddPeriodicControllers.h index 025c63a1486..301f68ba013 100644 --- a/include/actions/AddPeriodicControllers.h +++ b/include/actions/AddPeriodicControllers.h @@ -41,6 +41,7 @@ class AddPeriodicControllers : public Action Real _start_time; Real _period; Real _cycles_per_controls; + Real _cycles_between_controls; Real _num_controller_set; std::string _name; diff --git a/include/auxkernels/Current.h b/include/auxkernels/Current.h index abe73c852ba..769eb8ac327 100644 --- a/include/auxkernels/Current.h +++ b/include/auxkernels/Current.h @@ -30,7 +30,7 @@ class CurrentTempl : public AuxKernel const MooseVariable & _density_var; const VariableValue & _density_log; const VariableGradient & _grad_density_log; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const GenericMaterialProperty & _mu; const MaterialProperty & _sgn; const GenericMaterialProperty & _diff; diff --git a/include/auxkernels/DriftDiffusionFluxAux.h b/include/auxkernels/DriftDiffusionFluxAux.h index 52e4e324dac..b7338073ece 100644 --- a/include/auxkernels/DriftDiffusionFluxAux.h +++ b/include/auxkernels/DriftDiffusionFluxAux.h @@ -24,7 +24,7 @@ class DriftDiffusionFluxAux : public AuxKernel private: const Real _sgn; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const VariableValue & _u; const VariableGradient & _grad_u; const int _component; diff --git a/include/auxkernels/EFieldAdvAux.h b/include/auxkernels/EFieldAdvAux.h index a46335c3575..d38e87bb382 100644 --- a/include/auxkernels/EFieldAdvAux.h +++ b/include/auxkernels/EFieldAdvAux.h @@ -30,7 +30,7 @@ class EFieldAdvAuxTempl : public AuxKernel MooseVariable & _density_var; const VariableValue & _density_log; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; // Material properties diff --git a/include/auxkernels/Efield.h b/include/auxkernels/Efield.h index 4ba26a5c0ff..493307020fc 100644 --- a/include/auxkernels/Efield.h +++ b/include/auxkernels/Efield.h @@ -36,7 +36,7 @@ class Efield : public AuxKernel Real _r_units; std::string _potential_units; - /// The gradient of a coupled variable - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; + Real _voltage_scaling; }; diff --git a/include/auxkernels/PowerDep.h b/include/auxkernels/PowerDep.h index 6262763d15c..18b5bcc701c 100644 --- a/include/auxkernels/PowerDep.h +++ b/include/auxkernels/PowerDep.h @@ -29,7 +29,7 @@ class PowerDepTempl : public AuxKernel MooseVariable & _density_var; const VariableValue & _density_log; const VariableGradient & _grad_density_log; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const GenericMaterialProperty & _mu; const MaterialProperty & _sgn; const GenericMaterialProperty & _diff; diff --git a/include/auxkernels/ProcRate.h b/include/auxkernels/ProcRate.h index a68612a7ccf..ceb99d049b7 100644 --- a/include/auxkernels/ProcRate.h +++ b/include/auxkernels/ProcRate.h @@ -27,7 +27,7 @@ class ProcRateTempl : public AuxKernel const VariableValue & _em; const VariableGradient & _grad_em; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const GenericMaterialProperty & _muem; const MaterialProperty & _sgnem; const GenericMaterialProperty & _diffem; diff --git a/include/auxkernels/Sigma.h b/include/auxkernels/Sigma.h index 1734fb02d08..225ea88c24c 100644 --- a/include/auxkernels/Sigma.h +++ b/include/auxkernels/Sigma.h @@ -25,5 +25,5 @@ class Sigma : public AuxKernel protected: const VariableValue & _u_old; const VariableValue & _n; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; }; diff --git a/include/auxkernels/TotalFlux.h b/include/auxkernels/TotalFlux.h index 8120cdd3222..3cc87b5a01d 100644 --- a/include/auxkernels/TotalFlux.h +++ b/include/auxkernels/TotalFlux.h @@ -27,7 +27,7 @@ class TotalFluxTempl : public AuxKernel const MooseVariable & _density_var; const VariableValue & _density_log; const VariableGradient & _grad_density_log; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const GenericMaterialProperty & _mu; const MaterialProperty & _sgn; const GenericMaterialProperty & _diff; diff --git a/include/bcs/DCIonBC.h b/include/bcs/DCIonBC.h index 3ff7faa11a5..26f339ba32f 100644 --- a/include/bcs/DCIonBC.h +++ b/include/bcs/DCIonBC.h @@ -24,8 +24,7 @@ class DCIonBC : public ADIntegratedBC const Real _r_units; - /// Coupled variables - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; /// Material properties const ADMaterialProperty & _mu; diff --git a/include/bcs/DielectricBCWithEffEfield.h b/include/bcs/DielectricBCWithEffEfield.h new file mode 100644 index 00000000000..d9e14d1e2fd --- /dev/null +++ b/include/bcs/DielectricBCWithEffEfield.h @@ -0,0 +1,114 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADIntegratedBC.h" + +/** + * Time integrated dielectric boundary condition + */ +class DielectricBCWithEffEfield : public ADIntegratedBC +{ +public: + static InputParameters validParams(); + + DielectricBCWithEffEfield(const InputParameters & parameters); + +protected: + virtual ADReal computeQpResidual() override; + + /// Scaling units for the position + Real _r_units; + + /// Variable value during previous time step + const VariableValue & _u_old; + /// Gradient of variable during previous time step + const VariableGradient & _grad_u_old; + + /// Electron mean energy density value + const ADVariableValue & _mean_en; + /// Electron mean energy density variable + MooseVariable & _mean_en_var; + /// Electron mean energy density value during previous time step + const VariableValue & _mean_en_old; + /// Electron density value + const ADVariableValue & _em; + /// Electron density variable + MooseVariable & _em_var; + /// Electron density value during previous time step + const VariableValue & _em_old; + /// Ion density value + const ADVariableValue & _ip; + /// Ion density variable + MooseVariable & _ip_var; + /// Ion density value during previous time step + const VariableValue & _ip_old; + + /// x-component of the electric field value + const ADVariableValue & _Ex; + /// x-component of the electric field variable + MooseVariable & _Ex_var; + /// x-component of the electric field value during previous time step + const VariableValue & _Ex_old; + /// y-component of the electric field value + const ADVariableValue & _Ey; + /// y-component of the electric field variable + MooseVariable & _Ey_var; + /// y-component of the electric field value during previous time step + const VariableValue & _Ey_old; + /// z-component of the electric field value + const ADVariableValue & _Ez; + /// z-component of the electric field variable + MooseVariable & _Ez_var; + /// z-component of the electric field value during previous time step + const VariableValue & _Ez_old; + + /// Elementary charge + const MaterialProperty & _e; + /// Permittivity of free space + const ADMaterialProperty & _epsilon_0; + /// Avogadro's number + const MaterialProperty & _N_A; + + /// Charge sign of the ions + const MaterialProperty & _sgnip; + /// Mobility coefficient of the ions + const ADMaterialProperty & _muip; + /// Mass of electrons + const MaterialProperty & _massem; + /// Secondary electron coefficient + Real _user_se_coeff; + + /// Permittivity of the dielectric + const Real & _epsilon_d; + /// Thickness of the dielectric + const Real & _thickness; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise + Real _a; + /// Value of "_a" during previous time step + Real _a_old; + /// Value of ion flux + ADRealVectorValue _ion_flux; + /// Value of ion flux during previous time step + ADRealVectorValue _ion_flux_old; + /// Electron thermal velocity + ADReal _v_thermal; + /// Value of electron thermal velocity during previous time step + Real _v_thermal_old; + /// Electron flux + ADRealVectorValue _em_flux; + /// Value of electron flux during previous time step + ADRealVectorValue _em_flux_old; + /// Scaling units for the potential (V or kV) + std::string _potential_units; + /// Scaling value for the potential + Real _voltage_scaling; +}; diff --git a/include/bcs/DriftDiffusionDoNothingBC.h b/include/bcs/DriftDiffusionDoNothingBC.h index 96694f06a6a..15bb43cbe6b 100644 --- a/include/bcs/DriftDiffusionDoNothingBC.h +++ b/include/bcs/DriftDiffusionDoNothingBC.h @@ -34,6 +34,5 @@ class DriftDiffusionDoNothingBC : public ADIntegratedBC const ADMaterialProperty & _diffusivity; ADMaterialProperty _user_diff; - const ADVariableGradient & _grad_potential; - ADVariableGradient _minus_e_field; + const ADMaterialProperty & _electric_field; }; diff --git a/include/bcs/ElectronAdvectionDoNothingBC.h b/include/bcs/ElectronAdvectionDoNothingBC.h index 22037e12d20..0ade4b62def 100644 --- a/include/bcs/ElectronAdvectionDoNothingBC.h +++ b/include/bcs/ElectronAdvectionDoNothingBC.h @@ -28,8 +28,5 @@ class ElectronAdvectionDoNothingBC : public ADIntegratedBC const ADMaterialProperty & _muem; const MaterialProperty & _sign; - -private: - // Coupled variables - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; }; diff --git a/include/bcs/FieldEmissionBC.h b/include/bcs/FieldEmissionBC.h index 6b480d68e4e..a80d9af2c0b 100644 --- a/include/bcs/FieldEmissionBC.h +++ b/include/bcs/FieldEmissionBC.h @@ -27,8 +27,6 @@ class FieldEmissionBC : public ADIntegratedBC const unsigned int _num_ions; // Coupled variables - - const ADVariableGradient & _grad_potential; std::vector _ip_var; std::vector _ip; std::vector _grad_ip; @@ -44,6 +42,8 @@ class FieldEmissionBC : public ADIntegratedBC const MaterialProperty & _work_function; const MaterialProperty & _field_enhancement; + const ADMaterialProperty & _electric_field; + Real _a; ADRealVectorValue _ion_flux; const Real _tau; diff --git a/include/bcs/HagelaarElectronAdvectionBC.h b/include/bcs/HagelaarElectronAdvectionBC.h index 109f7f021bd..00f4ac058e6 100644 --- a/include/bcs/HagelaarElectronAdvectionBC.h +++ b/include/bcs/HagelaarElectronAdvectionBC.h @@ -25,9 +25,8 @@ class HagelaarElectronAdvectionBC : public ADIntegratedBC const Real _r_units; const Real _r; - // Coupled variables - const ADVariableGradient & _grad_potential; - const ADMaterialProperty & _muem; Real _a; + + const ADMaterialProperty & _electric_field; }; diff --git a/include/bcs/HagelaarElectronBC.h b/include/bcs/HagelaarElectronBC.h index 36970c17e65..be2f73444e4 100644 --- a/include/bcs/HagelaarElectronBC.h +++ b/include/bcs/HagelaarElectronBC.h @@ -26,7 +26,6 @@ class HagelaarElectronBC : public ADIntegratedBC const Real & _r; /// Coupled variables - const ADVariableGradient & _grad_potential; const ADVariableValue & _mean_en; /// Material properties @@ -34,6 +33,8 @@ class HagelaarElectronBC : public ADIntegratedBC const MaterialProperty & _massem; const MaterialProperty & _e; + const ADMaterialProperty & _electric_field; + Real _a; ADReal _v_thermal; }; diff --git a/include/bcs/HagelaarEnergyAdvectionBC.h b/include/bcs/HagelaarEnergyAdvectionBC.h index 6acb16c7a5d..1de535eca3f 100644 --- a/include/bcs/HagelaarEnergyAdvectionBC.h +++ b/include/bcs/HagelaarEnergyAdvectionBC.h @@ -26,8 +26,6 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC const Real _r; const unsigned int _num_ions; // Coupled variables - - const ADVariableGradient & _grad_potential; std::vector _ip_var; std::vector _ip; std::vector _grad_ip; @@ -40,6 +38,8 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC const Real _se_energy; const ADMaterialProperty & _mumean_en; + const ADMaterialProperty & _electric_field; + Real _a; ADRealVectorValue _ion_flux; Real _v_thermal; diff --git a/include/bcs/HagelaarEnergyBC.h b/include/bcs/HagelaarEnergyBC.h index 62945a22db5..c7041353066 100644 --- a/include/bcs/HagelaarEnergyBC.h +++ b/include/bcs/HagelaarEnergyBC.h @@ -25,13 +25,14 @@ class HagelaarEnergyBC : public ADIntegratedBC const Real _r_units; const Real & _r; - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; const MaterialProperty & _massem; const MaterialProperty & _e; const ADMaterialProperty & _mumean_en; + const ADMaterialProperty & _electric_field; + Real _a; ADReal _v_thermal; }; diff --git a/include/bcs/HagelaarIonAdvectionBC.h b/include/bcs/HagelaarIonAdvectionBC.h index 27089df06cd..da85480be6b 100644 --- a/include/bcs/HagelaarIonAdvectionBC.h +++ b/include/bcs/HagelaarIonAdvectionBC.h @@ -25,9 +25,7 @@ class HagelaarIonAdvectionBC : public ADIntegratedBC const Real _r_units; const Real & _r; - // Coupled variables - - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const ADMaterialProperty & _mu; const MaterialProperty & _e; diff --git a/include/bcs/LymberopoulosElectronBC.h b/include/bcs/LymberopoulosElectronBC.h index 51a4cfa2fdf..d4e1b2bf9a5 100644 --- a/include/bcs/LymberopoulosElectronBC.h +++ b/include/bcs/LymberopoulosElectronBC.h @@ -28,10 +28,11 @@ class LymberopoulosElectronBC : public ADIntegratedBC const unsigned int _num_ions; // Coupled variables - const ADVariableGradient & _grad_potential; std::vector _ion_var; std::vector _ion; + const ADMaterialProperty & _electric_field; + std::vector *> _sgnion; std::vector *> _muion; diff --git a/include/bcs/LymberopoulosIonBC.h b/include/bcs/LymberopoulosIonBC.h index fe226823c93..14276aaee40 100644 --- a/include/bcs/LymberopoulosIonBC.h +++ b/include/bcs/LymberopoulosIonBC.h @@ -24,8 +24,7 @@ class LymberopoulosIonBC : public ADIntegratedBC const Real _r_units; - // Coupled variables - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const ADMaterialProperty & _mu; }; diff --git a/include/bcs/PotentialDriftOutflowBC.h b/include/bcs/PotentialDriftOutflowBC.h index 6301a62ae6d..18cd6f1e7f8 100644 --- a/include/bcs/PotentialDriftOutflowBC.h +++ b/include/bcs/PotentialDriftOutflowBC.h @@ -25,5 +25,5 @@ class PotentialDriftOutflowBC : public ADIntegratedBC virtual ADReal computeQpResidual() override; const int _charge_sign; - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; }; diff --git a/include/bcs/SakiyamaEnergySecondaryElectronBC.h b/include/bcs/SakiyamaEnergySecondaryElectronBC.h index cb36433d561..c3c3f1ab478 100644 --- a/include/bcs/SakiyamaEnergySecondaryElectronBC.h +++ b/include/bcs/SakiyamaEnergySecondaryElectronBC.h @@ -28,7 +28,6 @@ class SakiyamaEnergySecondaryElectronBC : public ADIntegratedBC const std::vector _se_coeff_names; std::vector *> _se_coeff; // Coupled variables - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; std::vector _ip_var; std::vector _ip; @@ -41,4 +40,6 @@ class SakiyamaEnergySecondaryElectronBC : public ADIntegratedBC Real _a; ADReal _se_energy; ADRealVectorValue _ion_flux; + + const ADMaterialProperty & _electric_field; }; diff --git a/include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h b/include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h new file mode 100644 index 00000000000..6b2648b7d38 --- /dev/null +++ b/include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h @@ -0,0 +1,61 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADIntegratedBC.h" + +/** + * Kinetic secondary electron for mean electron energy boundary condition + * with an effective electric field for ions + */ +class SakiyamaEnergySecondaryElectronWithEffEfieldBC : public ADIntegratedBC +{ +public: + static InputParameters validParams(); + + SakiyamaEnergySecondaryElectronWithEffEfieldBC(const InputParameters & parameters); + +protected: + virtual ADReal computeQpResidual() override; + + /// Scaling units for the position + Real _r_units; + /// If true, secondary electron energy is equal to electron energy + bool Te_dependent; + /// x-component of the electric field + const ADVariableValue & _Ex; + /// y-component of the electric field + const ADVariableValue & _Ey; + /// z-component of the electric field + const ADVariableValue & _Ez; + /// Electron density + const ADVariableValue & _em; + /// Ion density variables + std::vector _ip_var; + /// Ion density values + std::vector _ip; + /// Charge sign of the ions + std::vector *> _sgnip; + /// Mobility coefficient of the ions + std::vector *> _muip; + /// Secondary electron coefficient + Real _se_coeff; + /// Custom secondary electron energy + Real _user_se_energy; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise + Real _a; + /// Term for secondary electron energy + ADReal _se_energy; + /// Ion flux + ADRealVectorValue _ion_flux; + /// Number of ions defined + unsigned int _num_ions; +}; diff --git a/include/bcs/SakiyamaIonAdvectionBC.h b/include/bcs/SakiyamaIonAdvectionBC.h index e2bde6d3cc5..70bd3133111 100644 --- a/include/bcs/SakiyamaIonAdvectionBC.h +++ b/include/bcs/SakiyamaIonAdvectionBC.h @@ -24,12 +24,10 @@ class SakiyamaIonAdvectionBC : public ADIntegratedBC const Real _r_units; - // Coupled variables - - const ADVariableGradient & _grad_potential; - const ADMaterialProperty & _mu; const MaterialProperty & _sgn; + const ADMaterialProperty & _electric_field; + Real _a; }; diff --git a/include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h b/include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h new file mode 100644 index 00000000000..d782b86dd09 --- /dev/null +++ b/include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h @@ -0,0 +1,43 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADIntegratedBC.h" + +/** + * Kinetic advective ion boundary condition + * with an effective electric field for ions + */ +class SakiyamaIonAdvectionWithEffEfieldBC : public ADIntegratedBC +{ +public: + static InputParameters validParams(); + + SakiyamaIonAdvectionWithEffEfieldBC(const InputParameters & parameters); + +protected: + virtual ADReal computeQpResidual() override; + + /// Scaling units for the position + Real _r_units; + /// x-component of the electric field + const ADVariableValue & _Ex; + /// y-component of the electric field + const ADVariableValue & _Ey; + /// z-component of the electric field + const ADVariableValue & _Ez; + /// Mobility coefficient + const ADMaterialProperty & _mu; + /// Charge sign of the species + const MaterialProperty & _sgn; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise + Real _a; +}; diff --git a/include/bcs/SakiyamaSecondaryElectronBC.h b/include/bcs/SakiyamaSecondaryElectronBC.h index db2294a8493..312f89c852b 100644 --- a/include/bcs/SakiyamaSecondaryElectronBC.h +++ b/include/bcs/SakiyamaSecondaryElectronBC.h @@ -27,8 +27,6 @@ class SakiyamaSecondaryElectronBC : public ADIntegratedBC const std::vector _se_coeff_names; std::vector *> _se_coeff; // Coupled variables - - const ADVariableGradient & _grad_potential; std::vector _ip; Real _a; @@ -36,4 +34,6 @@ class SakiyamaSecondaryElectronBC : public ADIntegratedBC std::vector *> _sgnip; std::vector *> _muip; + + const ADMaterialProperty & _electric_field; }; diff --git a/include/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.h b/include/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.h new file mode 100644 index 00000000000..360d3f8d4bc --- /dev/null +++ b/include/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.h @@ -0,0 +1,51 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADIntegratedBC.h" + +/** + * Kinetic secondary electron boundary condition + * with an effective electric field for ions + */ +class SakiyamaSecondaryElectronWithEffEfieldBC : public ADIntegratedBC +{ +public: + static InputParameters validParams(); + + SakiyamaSecondaryElectronWithEffEfieldBC(const InputParameters & parameters); + +protected: + virtual ADReal computeQpResidual() override; + + /// Scaling units for the position + Real _r_units; + /// x-component of the electric field + const ADVariableValue & _Ex; + /// y-component of the electric field + const ADVariableValue & _Ey; + /// z-component of the electric field + const ADVariableValue & _Ez; + /// Ion density values + std::vector _ip; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise + Real _a; + /// Ion flux + ADRealVectorValue _ion_flux; + /// Secondary electron coefficient + Real _user_se_coeff; + /// Charge sign of the ions + std::vector *> _sgnip; + /// Mobility coefficient of the ions + std::vector *> _muip; + /// Number of ions defined + unsigned int _num_ions; +}; diff --git a/include/bcs/SchottkyEmissionBC.h b/include/bcs/SchottkyEmissionBC.h index ece6d050b9f..005739888e7 100644 --- a/include/bcs/SchottkyEmissionBC.h +++ b/include/bcs/SchottkyEmissionBC.h @@ -28,8 +28,6 @@ class SchottkyEmissionBC : public ADIntegratedBC const std::vector _se_coeff_names; std::vector *> _se_coeff; // Coupled variables - - const ADVariableGradient & _grad_potential; const ADVariableValue & _mean_en; std::vector _ip_var; @@ -54,6 +52,8 @@ class SchottkyEmissionBC : public ADIntegratedBC bool _relax; std::string _potential_units; + const ADMaterialProperty & _electric_field; + // Unique variables Real _voltage_scaling; diff --git a/include/bcs/SecondaryElectronBC.h b/include/bcs/SecondaryElectronBC.h index 66dde8de5fe..80684978d1b 100644 --- a/include/bcs/SecondaryElectronBC.h +++ b/include/bcs/SecondaryElectronBC.h @@ -30,8 +30,6 @@ class SecondaryElectronBC : public ADIntegratedBC const std::vector _se_coeff_names; std::vector *> _se_coeff; // Coupled variables - - const ADVariableGradient & _grad_potential; const ADVariableValue & _mean_en; std::vector _ip; std::vector _grad_ip; @@ -44,6 +42,8 @@ class SecondaryElectronBC : public ADIntegratedBC std::vector *> _Tip; std::vector *> _massip; + const ADMaterialProperty & _electric_field; + Real _a; Real _b; ADReal _v_thermal; diff --git a/include/bcs/SecondaryElectronEnergyBC.h b/include/bcs/SecondaryElectronEnergyBC.h index c5085ed997e..0c799e00291 100644 --- a/include/bcs/SecondaryElectronEnergyBC.h +++ b/include/bcs/SecondaryElectronEnergyBC.h @@ -30,8 +30,6 @@ class SecondaryElectronEnergyBC : public ADIntegratedBC const std::vector _se_coeff_names; std::vector *> _se_coeff; // Coupled variables - - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; std::vector _ip; std::vector _grad_ip; @@ -47,6 +45,8 @@ class SecondaryElectronEnergyBC : public ADIntegratedBC const Real & _se_energy; const ADMaterialProperty & _mumean_en; + const ADMaterialProperty & _electric_field; + Real _a; Real _b; ADReal _v_thermal; diff --git a/include/dgkernels/DGEFieldAdvection.h b/include/dgkernels/DGEFieldAdvection.h index 34e6476d44e..22b04505701 100644 --- a/include/dgkernels/DGEFieldAdvection.h +++ b/include/dgkernels/DGEFieldAdvection.h @@ -25,7 +25,6 @@ class DGEFieldAdvection : public ADDGKernel const ADMaterialProperty & _mu_neighbor; const MaterialProperty & _sgn_neighbor; - MooseVariable & _potential_var; - const ADVariableGradient & _grad_potential; - const ADVariableGradient & _grad_potential_neighbor; + const ADMaterialProperty & _electric_field; + const ADMaterialProperty & _electric_field_neighbor; }; diff --git a/include/interfacekernels/InterfaceAdvection.h b/include/interfacekernels/InterfaceAdvection.h index 23c050cb5e1..17fc65e585d 100644 --- a/include/interfacekernels/InterfaceAdvection.h +++ b/include/interfacekernels/InterfaceAdvection.h @@ -28,8 +28,7 @@ class InterfaceAdvection : public ADInterfaceKernel Real _r_units; Real _r_neighbor_units; - MooseVariable & _potential_neighbor_var; - const ADVariableGradient & _grad_potential_neighbor; + const ADMaterialProperty & _electric_field_neighbor; MooseVariable & _mean_en_neighbor_var; const ADVariableValue & _mean_en_neighbor; diff --git a/include/kernels/DriftDiffusion.h b/include/kernels/DriftDiffusion.h index ebfa4519e60..e3e9d1bd848 100644 --- a/include/kernels/DriftDiffusion.h +++ b/include/kernels/DriftDiffusion.h @@ -34,7 +34,5 @@ class DriftDiffusion : public ADKernel const ADMaterialProperty & _diffusivity; ADMaterialProperty _user_diff; - unsigned int _potential_id; - const ADVariableGradient & _grad_potential; - ADVariableGradient _minus_e_field; + const ADMaterialProperty & _electric_field; }; diff --git a/include/kernels/EEDFReactionLogForShootMethod.h b/include/kernels/EEDFReactionLogForShootMethod.h index bb2c1ccd9b6..b67861ff12a 100644 --- a/include/kernels/EEDFReactionLogForShootMethod.h +++ b/include/kernels/EEDFReactionLogForShootMethod.h @@ -24,7 +24,6 @@ class EEDFReactionLogForShootMethod : public ADKernel const ADVariableValue & _electron; const ADVariableValue & _density; - const ADVariableValue & _energy; const ADMaterialProperty & _reaction_coeff; const Real & _stoichiometric_coeff; diff --git a/include/kernels/EFieldAdvection.h b/include/kernels/EFieldAdvection.h index f3f1db3a7d4..d0e84205344 100644 --- a/include/kernels/EFieldAdvection.h +++ b/include/kernels/EFieldAdvection.h @@ -29,6 +29,5 @@ class EFieldAdvection : public ADKernel /// The diffusion coefficient (either constant or mixture-averaged) const ADMaterialProperty & _mu; const MaterialProperty & _sign; - - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; }; diff --git a/include/kernels/EFieldArtDiff.h b/include/kernels/EFieldArtDiff.h index f6e6e211acc..4c32b39f62c 100644 --- a/include/kernels/EFieldArtDiff.h +++ b/include/kernels/EFieldArtDiff.h @@ -22,12 +22,10 @@ class EFieldArtDiff : public ADKernel protected: virtual ADReal computeQpResidual() override; - /// Coupled variables - const ADVariableGradient & _grad_potential; - const Real & _scale; const Real _r_units; /// Material Properties const ADMaterialProperty & _mu; + const ADMaterialProperty & _electric_field; }; diff --git a/include/kernels/EFieldMagnitudeSource.h b/include/kernels/EFieldMagnitudeSource.h index dfcd84e1b4b..fa5b47f3475 100644 --- a/include/kernels/EFieldMagnitudeSource.h +++ b/include/kernels/EFieldMagnitudeSource.h @@ -22,5 +22,5 @@ class EFieldMagnitudeSource : public ADKernel protected: virtual ADReal computeQpResidual() override; - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; }; diff --git a/include/kernels/EffectiveEField.h b/include/kernels/EffectiveEField.h new file mode 100644 index 00000000000..74d3e56deb8 --- /dev/null +++ b/include/kernels/EffectiveEField.h @@ -0,0 +1,38 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADKernel.h" + +/** + * Supplies the source term of the time derivative calculation of the effective electric field for + * ions + */ +class EffectiveEField : public ADKernel +{ +public: + static InputParameters validParams(); + + EffectiveEField(const InputParameters & parameters); + +protected: + virtual ADReal computeQpResidual(); + +private: + /// Position units + const Real _r_units; + /// Momentum-transfer frequency of ions + const Real _nu; + /// Component of the electric field + unsigned _component; + /// Electric field provided as a material property + const ADMaterialProperty & _electric_field; +}; diff --git a/include/kernels/EffectiveEFieldAdvection.h b/include/kernels/EffectiveEFieldAdvection.h new file mode 100644 index 00000000000..2f4b5a6ae90 --- /dev/null +++ b/include/kernels/EffectiveEFieldAdvection.h @@ -0,0 +1,43 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADKernel.h" + +/* + * Effective electric field driven advection term. The effective electric + * field is supplied as scalar components of the field + */ +class EffectiveEFieldAdvection : public ADKernel +{ +public: + static InputParameters validParams(); + + EffectiveEFieldAdvection(const InputParameters & parameters); + +protected: + virtual ADReal computeQpResidual(); + +private: + /// Position units + const Real _r_units; + + /// Mobility coefficient + const ADMaterialProperty & _mu; + /// Charge sign of the species + const MaterialProperty & _sign; + /// x-component of the electric field + const ADVariableValue & _u_Efield; + /// y-component of the electric field + const ADVariableValue & _v_Efield; + /// z-component of the electric field + const ADVariableValue & _w_Efield; +}; diff --git a/include/kernels/ElectronEnergyLossFromElastic.h b/include/kernels/ElectronEnergyLossFromElastic.h index 3fdbd16b4ef..e9dd21cc891 100644 --- a/include/kernels/ElectronEnergyLossFromElastic.h +++ b/include/kernels/ElectronEnergyLossFromElastic.h @@ -30,8 +30,8 @@ class ElectronEnergyLossFromElastic : public ADKernel const MaterialProperty & _massem; const MaterialProperty & _massGas; const ADMaterialProperty & _alpha_el; + const ADMaterialProperty & _electric_field; - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ElectronEnergyLossFromExcitation.h b/include/kernels/ElectronEnergyLossFromExcitation.h index 22a449d1c92..2e4d7ed46d7 100644 --- a/include/kernels/ElectronEnergyLossFromExcitation.h +++ b/include/kernels/ElectronEnergyLossFromExcitation.h @@ -28,8 +28,8 @@ class ElectronEnergyLossFromExcitation : public ADKernel const ADMaterialProperty & _muem; const ADMaterialProperty & _alpha_ex; const MaterialProperty & _Eex; + const ADMaterialProperty & _electric_field; - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ElectronEnergyLossFromIonization.h b/include/kernels/ElectronEnergyLossFromIonization.h index 56b5b059a16..3218aa7d3b1 100644 --- a/include/kernels/ElectronEnergyLossFromIonization.h +++ b/include/kernels/ElectronEnergyLossFromIonization.h @@ -28,8 +28,8 @@ class ElectronEnergyLossFromIonization : public ADKernel const ADMaterialProperty & _muem; const ADMaterialProperty & _alpha_iz; const MaterialProperty & _Eiz; + const ADMaterialProperty & _electric_field; - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ElectronsFromIonization.h b/include/kernels/ElectronsFromIonization.h index e7599bdc410..1d3a6bc80ad 100644 --- a/include/kernels/ElectronsFromIonization.h +++ b/include/kernels/ElectronsFromIonization.h @@ -27,13 +27,12 @@ class ElectronsFromIonization : public ADKernel const ADMaterialProperty & _diffem; const ADMaterialProperty & _muem; const ADMaterialProperty & _alpha_iz; + const ADMaterialProperty & _electric_field; ADMaterialProperty _user_diffem; ADMaterialProperty _user_muem; ADMaterialProperty _user_alpha_iz; const ADVariableValue & _mean_en; - const ADVariableGradient & _grad_potential; - ADVariableGradient _minus_e_field; const ADVariableValue & _em; const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ExcitationReaction.h b/include/kernels/ExcitationReaction.h index 42f7620e8f7..b0ea485121c 100644 --- a/include/kernels/ExcitationReaction.h +++ b/include/kernels/ExcitationReaction.h @@ -28,9 +28,9 @@ class ExcitationReaction : public ADKernel const ADMaterialProperty & _diffem; const ADMaterialProperty & _muem; const ADMaterialProperty & _alpha_source; + const ADMaterialProperty & _electric_field; const ADVariableValue & _mean_en; - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; const ADVariableGradient & _grad_em; diff --git a/include/kernels/IonsFromIonization.h b/include/kernels/IonsFromIonization.h index 9f597751bef..a51cd0e6d49 100644 --- a/include/kernels/IonsFromIonization.h +++ b/include/kernels/IonsFromIonization.h @@ -27,9 +27,9 @@ class IonsFromIonization : public ADKernel const ADMaterialProperty & _diffem; const ADMaterialProperty & _muem; const ADMaterialProperty & _alpha_iz; + const ADMaterialProperty & _electric_field; const ADVariableValue & _mean_en; - const ADVariableGradient & _grad_potential; const ADVariableValue & _em; const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/JouleHeating.h b/include/kernels/JouleHeating.h index 64e4a2f1984..8f3c59893d9 100644 --- a/include/kernels/JouleHeating.h +++ b/include/kernels/JouleHeating.h @@ -30,7 +30,7 @@ class JouleHeating : public ADKernel /// The diffusion coefficient (either constant or mixture-averaged) const ADMaterialProperty & _diff; const ADMaterialProperty & _mu; - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; const ADVariableValue & _em; const ADVariableGradient & _grad_em; diff --git a/include/kernels/ShootMethodLog.h b/include/kernels/ShootMethodLog.h index 0f8addd8238..8b54c220662 100644 --- a/include/kernels/ShootMethodLog.h +++ b/include/kernels/ShootMethodLog.h @@ -26,5 +26,4 @@ class ShootMethodLog : public ADKernel const ADVariableValue & _density_at_end_cycle; const ADVariableValue & _sensitivity; const Real & _limit; - ADReal _acceleration; }; diff --git a/include/kernels/ThermalConductivityDiffusion.h b/include/kernels/ThermalConductivityDiffusion.h new file mode 100644 index 00000000000..5f534a8601a --- /dev/null +++ b/include/kernels/ThermalConductivityDiffusion.h @@ -0,0 +1,41 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADKernel.h" + +/** + * Electron energy diffusion term + * that assumes a thermal conductivity of + * K = 3/2 D_e n_e + */ +class ThermalConductivityDiffusion : public ADKernel +{ +public: + static InputParameters validParams(); + + ThermalConductivityDiffusion(const InputParameters & parameters); + +protected: + virtual ADReal computeQpResidual() override; + +private: + /// Position units + Real _r_units; + /// Coefficient relating diffusion coefficient * density to thermal conductivity + Real _coeff; + /// Diffusion coefficient + const ADMaterialProperty & _diffem; + /// Electron density + const ADVariableValue & _em; + /// Gradient of electron density + const ADVariableGradient & _grad_em; +}; diff --git a/include/materials/ADMMSEEDFRates.h b/include/materials/ADMMSEEDFRates.h new file mode 100644 index 00000000000..f19d2b7ebe4 --- /dev/null +++ b/include/materials/ADMMSEEDFRates.h @@ -0,0 +1,56 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "ADMaterial.h" + +/** + * Add material properties used for MMS verifications involving + properties as a function of electron mean energy. + */ +class ADMMSEEDFRates : public ADMaterial +{ +public: + static InputParameters validParams(); + ADMMSEEDFRates(const InputParameters & parameters); + +protected: + virtual void initQpStatefulProperties() override; + virtual void computeQpProperties() override; + + /// Electron density + const ADVariableValue & _em; + /// Electron mean energy density + const ADVariableValue & _mean_en; + + /// Name of material properties + std::vector _prop_names; + /// Name of functions representing property values + std::vector _prop_values; + /// Name of functions representing derivative of the property values wrt the electron mean energy + std::vector _d_prop_values_actual_mean_en; + + /// Number of named material properties + unsigned int _num_props; + + /// Material properties + std::vector *> _properties; + /// Functions of material properties + std::vector _functions; + /// Functions of derivatives of material properties + std::vector _deriv_functions; + + using ADMaterial::_communicator; + +private: + /** + * A helper method for evaluating the functions + */ + void computeQpFunctions(); +}; diff --git a/include/materials/ADSurfaceCharge.h b/include/materials/ADSurfaceCharge.h index bd174510d1a..9e8615f9691 100644 --- a/include/materials/ADSurfaceCharge.h +++ b/include/materials/ADSurfaceCharge.h @@ -32,8 +32,7 @@ class ADSurfaceCharge : public ADMaterial, public DerivativeMaterialPropertyName Real _r_units; const std::string _potential_units; - - const ADVariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; unsigned int _num_species; std::vector _species; diff --git a/include/materials/FieldSolverMaterial.h b/include/materials/FieldSolverMaterial.h new file mode 100644 index 00000000000..25534008ccf --- /dev/null +++ b/include/materials/FieldSolverMaterial.h @@ -0,0 +1,32 @@ +#pragma once + +#include "ADMaterial.h" + +/** + * Material object that provides an interface to an external electromagnetic + * field solver for all Zapdos objects via the "field" material property. Default + * is an electrostatic interface, where the `potential` coupled variable parameter + * must be provided. + */ +class FieldSolverMaterial : public ADMaterial +{ +public: + static InputParameters validParams(); + + FieldSolverMaterial(const InputParameters & parameters); + +protected: + virtual void computeQpProperties() override; + + /// Gradient of coupled electrostatic potential + const ADVariableGradient & _grad_potential; + + /// Coupled electric field variable + const ADVectorVariableValue & _electric_field; + + /// Electric field material property + ADMaterialProperty & _field; + + /// Variable that holds user solver setting (electrostatic or electromagnetic) + const MooseEnum _mode; +}; diff --git a/include/materials/GasBase.h b/include/materials/GasBase.h index 54fa27c73cf..3d236555ef4 100644 --- a/include/materials/GasBase.h +++ b/include/materials/GasBase.h @@ -109,5 +109,4 @@ class GasBase : public ADMaterial const ADVariableValue & _em; const ADVariableValue & _mean_en; - const ADVariableGradient & _grad_potential; }; diff --git a/include/materials/PlasmaDielectricConstant.h b/include/materials/PlasmaDielectricConstant.h new file mode 100644 index 00000000000..6c3fb749304 --- /dev/null +++ b/include/materials/PlasmaDielectricConstant.h @@ -0,0 +1,75 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ADMaterial.h" + +/** + * Provides the real and complex components, the spatial gradient and + * the first time derivative of the plasma dielectric. + */ +class PlasmaDielectricConstant : public ADMaterial +{ +public: + static InputParameters validParams(); + + PlasmaDielectricConstant(const InputParameters & parameters); + +protected: + virtual void computeQpProperties() override; + + /// Value of dielectric constant, real component + ADMaterialProperty & _eps_r_real; + /// Gradient of dielectric constant, real component + ADMaterialProperty & _eps_r_real_grad; + /// First time derivative of dielectric constant, real component + ADMaterialProperty & _eps_r_real_dot; + /// Second time derivative of dielectric constant, real component + ADMaterialProperty & _eps_r_real_dot_dot; + /// Value of dielectric constant, imaginary component + ADMaterialProperty & _eps_r_imag; + /// Gradient of dielectric constant, imaginary component + ADMaterialProperty & _eps_r_imag_grad; + /// First time derivative of dielectric constant, imaginary component + ADMaterialProperty & _eps_r_imag_dot; + /// Second time derivative of dielectric constant, imaginary component + ADMaterialProperty & _eps_r_imag_dot_dot; + + /// Electron charge + const Real _elementary_charge; + /// Electron mass + const Real _electron_mass; + /// Vacuum permittivity + const Real _eps_vacuum; + /// pi + const Real _pi; + + /// Electron-neutral collision frequency (Hz) + const Real & _nu; + + /// Operating frequency (Hz) + const Real & _frequency; + + /// Electron density coupled variable value + const ADVariableValue & _em; + + /// Electron density coupled variable gradient + const ADVariableGradient & _em_grad; + + /// Electron density variable + MooseVariable * _em_var; + + /// Electron density first time derivative + const ADVariableValue & _em_dot; + + /// Electron density second time derivative + const ADVariableValue & _em_dot_dot; +}; diff --git a/include/materials/Water.h b/include/materials/Water.h index 18f8c158d4f..6ad4bb4a39f 100644 --- a/include/materials/Water.h +++ b/include/materials/Water.h @@ -168,5 +168,6 @@ class Water : public ADMaterial const ADVariableValue & _HO2; const ADVariableValue & _O3; const ADVariableValue & _O3m; - const ADVariableGradient & _grad_potential; + + const ADMaterialProperty & _electric_field; }; diff --git a/include/postprocessors/SideCurrent.h b/include/postprocessors/SideCurrent.h index 8be8c21954c..0a41e6000ae 100644 --- a/include/postprocessors/SideCurrent.h +++ b/include/postprocessors/SideCurrent.h @@ -43,7 +43,8 @@ class SideCurrent : public SideIntegralVariablePostprocessor Real _a; Real _b; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; + const VariableValue & _mean_en; const VariableValue & _Arp; const MaterialProperty & _muArp; diff --git a/include/postprocessors/SideTotFluxIntegral.h b/include/postprocessors/SideTotFluxIntegral.h index 42ee90b5efc..a28d249e331 100644 --- a/include/postprocessors/SideTotFluxIntegral.h +++ b/include/postprocessors/SideTotFluxIntegral.h @@ -42,5 +42,5 @@ class SideTotFluxIntegral : public SideIntegralVariablePostprocessor const MaterialProperty & _sgn; Real _a; - const VariableGradient & _grad_potential; + const ADMaterialProperty & _electric_field; }; diff --git a/src/actions/AddDriftDiffusionAction.C b/src/actions/AddDriftDiffusionAction.C index e34315587c1..381aefd2329 100644 --- a/src/actions/AddDriftDiffusionAction.C +++ b/src/actions/AddDriftDiffusionAction.C @@ -38,6 +38,17 @@ registerMooseAction("ZapdosApp", AddDriftDiffusionAction, "add_variable"); registerMooseAction("ZapdosApp", AddDriftDiffusionAction, "add_kernel"); registerMooseAction("ZapdosApp", AddDriftDiffusionAction, "add_aux_kernel"); +registerMooseAction("ZapdosApp", AddDriftDiffusionAction, "add_material"); + +namespace DriftDiffusionActionEnums +{ +// Setup comparison enum (less overhead than string comparison, when necessary) +enum ComparisonEnum +{ + ELECTROSTATIC, + ELECTROMAGNETIC +}; +} // namespace DriftDiffusionActionEnums InputParameters AddDriftDiffusionAction::validParams() @@ -53,24 +64,35 @@ AddDriftDiffusionAction::validParams() "secondary_charged_particles", {}, "These are charged particles whose advection term in determined by" - " an effective potential."); + " an effective field."); params.addParam>( - "eff_potentials", + "eff_fields", {}, - "The effective potentials that only affect their respective secondary" + "The effective fields that only affect their respective secondary" " charged particle."); params.addParam("electrons", "User given variable name for energy dependent electrons"); - params.addParam("potential", "The gives the potential a variable name"); - params.addParam( - "Is_potential_unique", - false, - "Is this potential unique to this block?" - "If not, then the potential variable should be defined in the Variable Block."); + params.addParam("field", "The gives the field a variable name"); + MooseEnum field_solver("electrostatic electromagnetic", "electrostatic"); + params.addParam( + "field_solver", + field_solver, + "Electrostatic or electromagnetic field solver (default = electrostatic)."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); + params.addParam>( + "eff_fields_property_names", + {}, + "Name of the solver interface material property for the effective fields."); + params.addParam("Is_field_unique", + false, + "Is the field unique to this block?" + "If not, then the field variable should be defined in the Variable Block."); params.addParam("First_DriftDiffusionAction_in_block", true, "Is this the first DriftDiffusionAction for this block?" - "If not, then the potential diffusion kernel and Position auxkernel will " + "If not, then the field solver kernels and Position auxkernel will " "NOT be supplied by this action."); params.addParam("mean_energy", "The gives the mean energy a variable name"); @@ -82,7 +104,7 @@ AddDriftDiffusionAction::validParams() params.addParam("using_offset", false, "Is the LogStabilizationMoles Kernel being used"); params.addParam( "offset", 20.0, "The offset parameter that goes into the exponential function"); - params.addRequiredParam("potential_units", "Units of potential"); + params.addRequiredParam("potential_units", "Units of potential (V or kV)"); params.addRequiredParam("use_moles", "Whether to convert from units of moles to #."); params.addParam>( "Additional_Outputs", @@ -106,17 +128,22 @@ AddDriftDiffusionAction::act() // Converting the given names into VariableName NonlinearVariableName em_name; NonlinearVariableName mean_en_name; - NonlinearVariableName potential_name; + NonlinearVariableName field_name; + + // Saving the field solver choice + MooseEnum field_solver = getParam("field_solver"); bool em_present = (isParamValid("electrons") ? true : false); bool mean_en_present = (isParamValid("mean_energy") ? true : false); - bool potential_present = (isParamValid("potential") ? true : false); + bool field_present = (isParamValid("field") ? true : false); if (em_present) em_name = getParam("electrons"); if (mean_en_present) mean_en_name = getParam("mean_energy"); - if (potential_present) - potential_name = getParam("potential"); + if (field_present) + field_name = getParam("field"); + + std::string field_property_name = getParam("field_property_name"); std::vector Ions = getParam>("charged_particle"); @@ -126,21 +153,26 @@ AddDriftDiffusionAction::act() unsigned int number_ions = Ions.size(); unsigned int number_neutrals = Neutrals.size(); - if (!potential_present && (em_present || (number_ions > 0))) - mooseError("There are electrons or charged_particles that are missing their potential! Please " - "check your input."); + if (!field_present && (em_present || (number_ions > 0))) + mooseError( + "There are electrons or charged_particles that are missing their electric field! Please " + "check your input."); std::vector sec_particle = getParam>("secondary_charged_particles"); - std::vector eff_potentials = - getParam>("eff_potentials"); + std::vector eff_fields = + getParam>("eff_fields"); + + std::vector eff_fields_property_names = + getParam>("eff_fields_property_names"); unsigned int number_sec_particle = sec_particle.size(); - unsigned int number_eff_potentials = eff_potentials.size(); + unsigned int number_eff_fields = eff_fields.size(); - if (number_sec_particle != number_eff_potentials) + // TODO: add another != for this for the property names list + if (number_sec_particle != number_eff_fields) mooseError("There are secondary_charged_particles that are missing their corresponding " - "effective potential (eff_potentials)! Please check your input."); + "effective fields (eff_fields)! Please check your input."); // Converting the given additional outputs std::vector Outputs = getParam>("Additional_Outputs"); @@ -149,10 +181,10 @@ AddDriftDiffusionAction::act() // Converting the boolean statements bool Using_offset = getParam("using_offset"); - bool New_potential = getParam("Is_potential_unique"); + bool New_field = getParam("Is_field_unique"); bool First_Action = getParam("First_DriftDiffusionAction_in_block"); - // The variable type for the nonlinear variables + // The variable type for the nonlinear scalar variables auto fe_type = AddVariableAction::feType(_pars); auto type = AddVariableAction::variableType(fe_type); auto var_params = _factory.getValidParams(type); @@ -161,6 +193,15 @@ AddDriftDiffusionAction::act() var_params.set>("block") = getParam>("block"); + // The variable type for the nonlinear vector variables + auto fe_type_vec = AddVariableAction::feType(_pars); + auto type_vec = AddVariableAction::variableType(fe_type_vec); + auto var_params_vec = _factory.getValidParams(type_vec); + var_params_vec.set("order") = "FIRST"; + var_params_vec.set("family") = "NEDELEC_ONE"; + var_params_vec.set>("block") = + getParam>("block"); + // The variable type for the aux variables auto aux_params = _factory.getValidParams(type); aux_params.set("order") = "CONSTANT"; @@ -186,7 +227,7 @@ AddDriftDiffusionAction::act() _problem->addAuxVariable(type, neutrals_name + "_density", aux_params); } - // Adding electrons, mean energy, and potential variables + // Adding electrons, mean energy, and field variables if (em_present) { _problem->addVariable(type, em_name, var_params); @@ -196,9 +237,13 @@ AddDriftDiffusionAction::act() { _problem->addVariable(type, mean_en_name, var_params); } - if (New_potential && potential_present) + if (New_field && field_present && field_solver == DriftDiffusionActionEnums::ELECTROSTATIC) + { + _problem->addVariable(type, field_name, var_params); + } + if (New_field && field_present && field_solver == DriftDiffusionActionEnums::ELECTROMAGNETIC) { - _problem->addVariable(type, potential_name, var_params); + _problem->addVariable(type, field_name, var_params_vec); } // Adding charged particles who are effective by an effective potential @@ -299,14 +344,14 @@ AddDriftDiffusionAction::act() // Adding energy dependent electron kernels, if present in block if (em_present) { - addADKernels(em_name, potential_name, Using_offset, true, false); - addChargeSourceKernels(potential_name, em_name); + addADKernels(em_name, field_property_name, Using_offset, true, false); + addChargeSourceKernels(field_name, em_name, field_solver); } // Adding energy electron mean energy kernels, if present in block if (mean_en_present) { - addADKernels(mean_en_name, potential_name, Using_offset, false, true); + addADKernels(mean_en_name, field_property_name, Using_offset, false, true); } // Adding Kernels for the charged particle @@ -314,41 +359,47 @@ AddDriftDiffusionAction::act() { std::string ion_name = Ions[cur_num]; - addADKernels(ion_name, potential_name, Using_offset, true, false); - addChargeSourceKernels(potential_name, ion_name); + addADKernels(ion_name, field_property_name, Using_offset, true, false); + addChargeSourceKernels(field_name, ion_name, field_solver); } - // Adding the diffusion Kernel for the potential - if (potential_present && First_Action) + // Adding the diffusion Kernel for the potential (if electrostatic) + if (field_present && First_Action && field_solver == DriftDiffusionActionEnums::ELECTROSTATIC) { InputParameters params = _factory.getValidParams("CoeffDiffusionLin"); - params.set("variable") = {potential_name}; + params.set("variable") = {field_name}; params.set("position_units") = getParam("position_units"); params.set>("block") = getParam>("block"); _problem->addKernel("CoeffDiffusionLin", - potential_name + "_diffusion" + + field_name + "_diffusion" + Moose::stringify(getParam>("block")) + "_block", params); } + if (field_present && First_Action && field_solver == DriftDiffusionActionEnums::ELECTROMAGNETIC) + { + mooseWarning("Setting up EM field equations has not yet been setup in DriftDiffusionAction, " + "and must be set up manually!"); + } // Adding Kernels for the neutrals for (unsigned int cur_num = 0; cur_num < number_neutrals; cur_num++) { std::string neutral_name = Neutrals[cur_num]; - addADKernels(neutral_name, potential_name, Using_offset, false, false); + addADKernels(neutral_name, field_property_name, Using_offset, false, false); } - // Adding Kernels for charged particles who are effective by an effective potential + // Adding Kernels for charged particles who are affected by an effective field for (unsigned int cur_num = 0; cur_num < number_sec_particle; cur_num++) { std::string sec_particle_name = sec_particle[cur_num]; - std::string eff_potentials_name = eff_potentials[cur_num]; + std::string eff_fields_name = eff_fields[cur_num]; + std::string eff_fields_property_name = eff_fields_property_names[cur_num]; - addADKernels(sec_particle_name, eff_potentials_name, Using_offset, true, false); - addChargeSourceKernels(potential_name, sec_particle_name); + addADKernels(sec_particle_name, eff_fields_property_name, Using_offset, true, false); + addChargeSourceKernels(field_name, sec_particle_name, field_solver); } } @@ -409,20 +460,20 @@ AddDriftDiffusionAction::act() { if (em_present) { - addCurrent(em_name, potential_name); + addCurrent(em_name, field_property_name); } for (unsigned int cur_num = 0; cur_num < number_ions; cur_num++) { std::string ion_name = Ions[cur_num]; - addCurrent(ion_name, potential_name); + addCurrent(ion_name, field_property_name); } for (unsigned int cur_num = 0; cur_num < number_sec_particle; cur_num++) { std::string sec_particle_name = sec_particle[cur_num]; - std::string eff_potentials_name = eff_potentials[cur_num]; - addCurrent(sec_particle_name, eff_potentials_name); + std::string eff_fields_property_name = eff_fields_property_names[cur_num]; + addCurrent(sec_particle_name, eff_fields_property_name); } } @@ -439,7 +490,7 @@ AddDriftDiffusionAction::act() addEfield("EField" + dir + Moose::stringify(getParam>("block")), - potential_name, + field_property_name, component); } } @@ -457,19 +508,39 @@ AddDriftDiffusionAction::act() } } } + else if (_current_task == "add_material") + { + if (field_present && First_Action) + { + addFieldSolverMaterial(field_name, field_property_name, field_solver, false); + + // Adding material interfaces for charged particles who are affected by an effective field + for (unsigned int cur_num = 0; cur_num < number_sec_particle; cur_num++) + { + std::string eff_fields_name = eff_fields[cur_num]; + std::string eff_fields_property_name = eff_fields_property_names[cur_num]; + addFieldSolverMaterial(eff_fields_name, eff_fields_property_name, field_solver, true); + } + } + } } // Adding potentials charge sources void -AddDriftDiffusionAction::addChargeSourceKernels(const std::string & potential_name, - const std::string & charged_particle_name) +AddDriftDiffusionAction::addChargeSourceKernels(const std::string & field_name, + const std::string & charged_particle_name, + const MooseEnum & field_solver) { - InputParameters params = _factory.getValidParams("ChargeSourceMoles_KV"); - params.set("variable") = {potential_name}; - params.set>("charged") = {charged_particle_name}; - params.set("potential_units") = getParam("potential_units"); - params.set>("block") = getParam>("block"); - _problem->addKernel("ChargeSourceMoles_KV", charged_particle_name + "_charge_source", params); + // Add charge source contribution to electrostatic problem only + if (field_solver == DriftDiffusionActionEnums::ELECTROSTATIC) + { + InputParameters params = _factory.getValidParams("ChargeSourceMoles_KV"); + params.set("variable") = {field_name}; + params.set>("charged") = {charged_particle_name}; + params.set("potential_units") = getParam("potential_units"); + params.set>("block") = getParam>("block"); + _problem->addKernel("ChargeSourceMoles_KV", charged_particle_name + "_charge_source", params); + } } /* @@ -478,7 +549,7 @@ AddDriftDiffusionAction::addChargeSourceKernels(const std::string & potential_na */ void AddDriftDiffusionAction::addADKernels(const std::string & name, - const std::string & potential_name, + const std::string & field_property_name, const bool & Using_offset, const bool & charged, const bool & energy) @@ -494,7 +565,7 @@ AddDriftDiffusionAction::addADKernels(const std::string & name, { InputParameters params1 = _factory.getValidParams("EFieldAdvection"); params1.set("variable") = {name}; - params1.set>("potential") = {potential_name}; + params1.set("field_property_name") = {field_property_name}; params1.set("position_units") = getParam("position_units"); params1.set>("block") = getParam>("block"); @@ -511,7 +582,7 @@ AddDriftDiffusionAction::addADKernels(const std::string & name, { InputParameters params3 = _factory.getValidParams("EFieldAdvection"); params3.set("variable") = {name}; - params3.set>("potential") = {potential_name}; + params3.set("field_property_name") = {field_property_name}; params3.set("position_units") = getParam("position_units"); params3.set>("block") = getParam>("block"); @@ -519,7 +590,7 @@ AddDriftDiffusionAction::addADKernels(const std::string & name, InputParameters params4 = _factory.getValidParams("JouleHeating"); params4.set("variable") = {name}; - params4.set>("potential") = {potential_name}; + params4.set("field_property_name") = {field_property_name}; params4.set>("em") = {getParam("electrons")}; params4.set("potential_units") = getParam("potential_units"); params4.set("position_units") = getParam("position_units"); @@ -574,11 +645,11 @@ AddDriftDiffusionAction::addDensityLog(const std::string & particle_name) // Adding the Aux kernels for current void AddDriftDiffusionAction::addCurrent(const std::string & particle_name, - const std::string & potential_name) + const std::string & field_property_name) { InputParameters params = _factory.getValidParams("ADCurrent"); params.set("variable") = {"Current_" + particle_name}; - params.set>("potential") = {potential_name}; + params.set("field_property_name") = {field_property_name}; params.set>("density_log") = {particle_name}; params.set("position_units") = getParam("position_units"); params.set>("block") = getParam>("block"); @@ -588,15 +659,36 @@ AddDriftDiffusionAction::addCurrent(const std::string & particle_name, // Adding the Aux kernels for the Efield void AddDriftDiffusionAction::addEfield(const std::string & Efield_name, - const std::string & potential_name, + const std::string & field_property_name, const int & component) { InputParameters params = _factory.getValidParams("Efield"); params.set("variable") = {Efield_name}; - params.set>("potential") = {potential_name}; + params.set("field_property_name") = {field_property_name}; params.set("position_units") = getParam("position_units"); params.set("component") = component; params.set("potential_units") = getParam("potential_units"); params.set>("block") = getParam>("block"); _problem->addAuxKernel("Efield", Efield_name, params); } + +// Adding the material interface for FieldSolverMaterial +void +AddDriftDiffusionAction::addFieldSolverMaterial(const std::string & field_name, + const std::string & field_property_name, + const MooseEnum & field_solver, + const bool & effective_field) +{ + InputParameters params = _factory.getValidParams("FieldSolverMaterial"); + params.set("solver") = {field_solver}; + if (field_solver == DriftDiffusionActionEnums::ELECTROSTATIC) + params.set>("potential") = {field_name}; + if (field_solver == DriftDiffusionActionEnums::ELECTROMAGNETIC) + params.set>("electric_field") = {field_name}; + params.set("property_name") = {field_property_name}; + params.set>("block") = getParam>("block"); + if (effective_field) + _problem->addMaterial("FieldSolverMaterial", "FieldSolver_" + name() + "_eff", params); + else + _problem->addMaterial("FieldSolverMaterial", "FieldSolver_" + name(), params); +} diff --git a/src/actions/AddPeriodicControllers.C b/src/actions/AddPeriodicControllers.C index 0201f301f30..163f2ccaaf0 100644 --- a/src/actions/AddPeriodicControllers.C +++ b/src/actions/AddPeriodicControllers.C @@ -71,6 +71,10 @@ AddPeriodicControllers::validParams() params.addParam( "starting_cycle", 0.0, "The number of the cycles before starting the control scheme"); params.addRequiredParam("cycle_frequency", "The cycle's frequency in Hz"); + params.addParam("cycles_per_controls", + 1.0, + "The number of cycles that occurs during the controllers" + "(e.g. the number of cycles during the accelerations)"); params.addParam("cycles_between_controls", 1.0, "The number of cycles between controllers" @@ -100,7 +104,8 @@ AddPeriodicControllers::AddPeriodicControllers(const InputParameters & params) _start_time((1. / getParam("cycle_frequency")) * getParam("starting_cycle")), _period(1. / getParam("cycle_frequency")), - _cycles_per_controls(getParam("cycles_between_controls")), + _cycles_per_controls(getParam("cycles_per_controls")), + _cycles_between_controls(getParam("cycles_between_controls")), _num_controller_set(getParam("num_controller_set")), _name(getParam("name")) { @@ -138,29 +143,35 @@ AddPeriodicControllers::act() // The end time is start time plus 0.0001 times the period for (MooseIndex(_enable_start) j = 0; j < _enable_start.size(); ++j) { - _enable_start_start_time_index[j] = _start_time + _cycles_per_controls * _period * i; + _enable_start_start_time_index[j] = + _start_time + (_cycles_between_controls + _cycles_per_controls) * _period * i; _enable_start_end_time_index[j] = - _start_time + _cycles_per_controls * _period * i + (_period * 0.0001); + _start_time + (_cycles_between_controls + _cycles_per_controls) * _period * i + + (_period * 0.0001); } for (MooseIndex(_enable_during) j = 0; j < _enable_during.size(); ++j) { - _enable_during_start_time_index[j] = _start_time + _cycles_per_controls * _period * i; + _enable_during_start_time_index[j] = + _start_time + (_cycles_between_controls + _cycles_per_controls) * _period * i; _enable_during_end_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0001); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0001); } // If control cycles are back to back, then enable_start and enable_end times would be the // same, To avoid this, if cycles are back to back, then the enable_end starts at + // 0.0001*period. - if (_cycles_per_controls == 1.0) + if (_cycles_between_controls == 1.0) { for (MooseIndex(_enable_end) j = 0; j < _enable_end.size(); ++j) { _enable_end_start_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0001); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0001); _enable_end_end_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0002); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0002); } } else @@ -168,37 +179,45 @@ AddPeriodicControllers::act() for (MooseIndex(_enable_end) j = 0; j < _enable_end.size(); ++j) { _enable_end_start_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i; + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i; _enable_end_end_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0001); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0001); } } for (MooseIndex(_disable_start) j = 0; j < _disable_start.size(); ++j) { - _disable_start_start_time_index[j] = _start_time + _cycles_per_controls * _period * i; + _disable_start_start_time_index[j] = + _start_time + (_cycles_between_controls + _cycles_per_controls) * _period * i; _disable_start_end_time_index[j] = - _start_time + _cycles_per_controls * _period * i + (_period * 0.0001); + _start_time + (_cycles_between_controls + _cycles_per_controls) * _period * i + + (_period * 0.0001); } for (MooseIndex(_disable_during) j = 0; j < _disable_during.size(); ++j) { - _disable_during_start_time_index[j] = _start_time + _cycles_per_controls * _period * i; + _disable_during_start_time_index[j] = + _start_time + (_cycles_between_controls + _cycles_per_controls) * _period * i; _disable_during_end_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0001); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0001); } // If control cycles are back to back, then disable_start and disable_end times would be the // same, To avoid this, if cycles are back to back, then the disable_end starts at + // 0.0001*period - if (_cycles_per_controls == 1.0) + if (_cycles_between_controls == 1.0) { for (MooseIndex(_disable_end) j = 0; j < _disable_end.size(); ++j) { _disable_end_start_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0001); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0001); _disable_end_end_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0002); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0002); } } else @@ -206,9 +225,11 @@ AddPeriodicControllers::act() for (MooseIndex(_disable_end) j = 0; j < _disable_end.size(); ++j) { _disable_end_start_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i; + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i; _disable_end_end_time_index[j] = - (_start_time + _period) + _cycles_per_controls * _period * i + (_period * 0.0001); + (_start_time + _period * _cycles_per_controls) + + (_cycles_between_controls + _cycles_per_controls) * _period * i + (_period * 0.0001); } } diff --git a/src/auxkernels/Current.C b/src/auxkernels/Current.C index 94d74fc0f2c..f4784c27d93 100644 --- a/src/auxkernels/Current.C +++ b/src/auxkernels/Current.C @@ -24,12 +24,14 @@ CurrentTempl::validParams() InputParameters params = AuxKernel::validParams(); params.addRequiredCoupledVar("density_log", "The log of the species density"); - params.addRequiredCoupledVar("potential", "The potential"); params.addParam( "component", 0, "The component of the Current vector. (0 = x, 1 = y, 2 = z)"); params.addParam( "art_diff", false, "Whether there is a current contribution from artificial diffusion."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Returns the electric current associated with the flux of the specified species"); return params; @@ -45,7 +47,8 @@ CurrentTempl::CurrentTempl(const InputParameters & parameters) _density_var(*getVar("density_log", 0)), _density_log(coupledValue("density_log")), _grad_density_log(coupledGradient("density_log")), - _grad_potential(coupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mu(getGenericMaterialProperty("mu" + _density_var.name())), _sgn(getMaterialProperty("sgn" + _density_var.name())), _diff(getGenericMaterialProperty("diff" + _density_var.name())), @@ -58,14 +61,14 @@ Real CurrentTempl::computeValue() { Real r = _sgn[_qp] * 1.6e-19 * 6.02e23 * - (_sgn[_qp] * raw_value(_mu[_qp]) * -_grad_potential[_qp](_component) * _r_units * - std::exp(_density_log[_qp]) - + (_sgn[_qp] * raw_value(_mu[_qp]) * raw_value(_electric_field[_qp](_component)) * + _r_units * std::exp(_density_log[_qp]) - raw_value(_diff[_qp]) * std::exp(_density_log[_qp]) * _grad_density_log[_qp](_component) * _r_units); if (_art_diff) { - Real vd_mag = raw_value(_mu[_qp]) * _grad_potential[_qp].norm() * _r_units; + Real vd_mag = raw_value(_mu[_qp]) * raw_value((-_electric_field[_qp]).norm()) * _r_units; Real delta = vd_mag * _current_elem->hmax() / 2.; r += _sgn[_qp] * 1.6e-19 * 6.02e23 * -delta * std::exp(_density_log[_qp]) * _grad_density_log[_qp](_component) * _r_units; diff --git a/src/auxkernels/DriftDiffusionFluxAux.C b/src/auxkernels/DriftDiffusionFluxAux.C index 697f88171e4..8ecf533b4bc 100644 --- a/src/auxkernels/DriftDiffusionFluxAux.C +++ b/src/auxkernels/DriftDiffusionFluxAux.C @@ -10,13 +10,14 @@ #include "DriftDiffusionFluxAux.h" +using MetaPhysicL::raw_value; + registerMooseObject("ZapdosApp", DriftDiffusionFluxAux); InputParameters DriftDiffusionFluxAux::validParams() { InputParameters params = AuxKernel::validParams(); - params.addRequiredCoupledVar("potential", "The potential responsible for charge advection"); params.addParam("positive_charge", true, "Whether the potential is advecting positive " @@ -24,6 +25,9 @@ DriftDiffusionFluxAux::validParams() "negative."); params.addRequiredCoupledVar("u", "The drift-diffusing species."); params.addParam("component", 0, "The flux component you want to see."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Returns the drift-diffusion flux of the specified species"); return params; } @@ -31,7 +35,8 @@ DriftDiffusionFluxAux::validParams() DriftDiffusionFluxAux::DriftDiffusionFluxAux(const InputParameters & parameters) : AuxKernel(parameters), _sgn(getParam("positive_charge") ? 1 : -1), - _grad_potential(coupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _u(coupledValue("u")), _grad_u(coupledGradient("u")), _component(getParam("component")) @@ -41,5 +46,5 @@ DriftDiffusionFluxAux::DriftDiffusionFluxAux(const InputParameters & parameters) Real DriftDiffusionFluxAux::computeValue() { - return _sgn * -_grad_potential[_qp](_component) * _u[_qp] - _grad_u[_qp](_component); + return _sgn * raw_value(_electric_field[_qp](_component)) * _u[_qp] - _grad_u[_qp](_component); } diff --git a/src/auxkernels/EFieldAdvAux.C b/src/auxkernels/EFieldAdvAux.C index c67aba2ab5e..e2c660d7166 100644 --- a/src/auxkernels/EFieldAdvAux.C +++ b/src/auxkernels/EFieldAdvAux.C @@ -22,10 +22,11 @@ InputParameters EFieldAdvAuxTempl::validParams() { InputParameters params = AuxKernel::validParams(); - params.addRequiredCoupledVar( - "potential", "The gradient of the potential will be used to compute the advection velocity."); params.addRequiredCoupledVar("density_log", "The variable representing the log of the density."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addParam("component", 0, "The component the EField Vector. (0 = x, 1 = y, 2 = z)"); params.addClassDescription( "Returns the electric field driven advective flux of the specified species"); @@ -42,7 +43,9 @@ EFieldAdvAuxTempl::EFieldAdvAuxTempl(const InputParameters & parameters) _density_var(*getVar("density_log", 0)), _density_log(coupledValue("density_log")), - _grad_potential(coupledGradient("potential")), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), // Material properties @@ -56,7 +59,7 @@ Real EFieldAdvAuxTempl::computeValue() { return _sgn[_qp] * raw_value(_mu[_qp]) * std::exp(_density_log[_qp]) * - -_grad_potential[_qp](_component) * _r_units * 6.02e23; + raw_value(_electric_field[_qp](_component)) * _r_units * 6.02e23; } template class EFieldAdvAuxTempl; diff --git a/src/auxkernels/Efield.C b/src/auxkernels/Efield.C index 016aa8a6eb8..facd0da020e 100644 --- a/src/auxkernels/Efield.C +++ b/src/auxkernels/Efield.C @@ -17,11 +17,13 @@ Efield::validParams() { InputParameters params = AuxKernel::validParams(); - params.addRequiredCoupledVar("potential", "The potential"); params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("potential_units", "The potential units."); params.addRequiredParam("component", "The component of the electric field to access. Accepts an integer"); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Returns the defined component of the electric field (0 = x, 1 = y, 2 = z)"); return params; @@ -33,7 +35,8 @@ Efield::Efield(const InputParameters & parameters) _component(getParam("component")), _r_units(1. / getParam("position_units")), _potential_units(getParam("potential_units")), - _grad_potential(coupledGradient("potential")) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { if (_potential_units.compare("V") == 0) _voltage_scaling = 1.; @@ -44,5 +47,5 @@ Efield::Efield(const InputParameters & parameters) Real Efield::computeValue() { - return -_grad_potential[_qp](_component) * _r_units * _voltage_scaling; + return MetaPhysicL::raw_value(_electric_field[_qp](_component)) * _r_units * _voltage_scaling; } diff --git a/src/auxkernels/PowerDep.C b/src/auxkernels/PowerDep.C index d8a341cd79e..4e73ab54f4b 100644 --- a/src/auxkernels/PowerDep.C +++ b/src/auxkernels/PowerDep.C @@ -24,11 +24,13 @@ PowerDepTempl::validParams() InputParameters params = AuxKernel::validParams(); params.addRequiredCoupledVar("density_log", "The electron density"); - params.addRequiredCoupledVar("potential", "The potential"); params.addParam( "art_diff", false, "Whether there is a current contribution from artificial diffusion."); params.addRequiredParam("potential_units", "The potential units."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Amount of power deposited into a user specified specie by Joule Heating"); return params; @@ -42,7 +44,8 @@ PowerDepTempl::PowerDepTempl(const InputParameters & parameters) _density_var(*getVar("density_log", 0)), _density_log(coupledValue("density_log")), _grad_density_log(coupledGradient("density_log")), - _grad_potential(coupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mu(getGenericMaterialProperty("mu" + _density_var.name())), _sgn(getMaterialProperty("sgn" + _density_var.name())), _diff(getGenericMaterialProperty("diff" + _density_var.name())), @@ -62,19 +65,19 @@ PowerDepTempl::computeValue() { _current = _sgn[_qp] * 1.6e-19 * 6.02e23 * - (_sgn[_qp] * raw_value(_mu[_qp]) * -_grad_potential[_qp] * _r_units * + (_sgn[_qp] * raw_value(_mu[_qp]) * raw_value(_electric_field[_qp]) * _r_units * std::exp(_density_log[_qp]) - raw_value(_diff[_qp]) * std::exp(_density_log[_qp]) * _grad_density_log[_qp] * _r_units); if (_art_diff) { - Real vd_mag = raw_value(_mu[_qp]) * _grad_potential[_qp].norm() * _r_units; + Real vd_mag = raw_value(_mu[_qp]) * raw_value((-_electric_field[_qp]).norm()) * _r_units; Real delta = vd_mag * _current_elem->hmax() / 2.; _current += _sgn[_qp] * 1.6e-19 * 6.02e23 * -delta * std::exp(_density_log[_qp]) * _grad_density_log[_qp] * _r_units; } - return _current * -_grad_potential[_qp] * _r_units * _voltage_scaling; + return _current * raw_value(_electric_field[_qp]) * _r_units * _voltage_scaling; } template class PowerDepTempl; diff --git a/src/auxkernels/ProcRate.C b/src/auxkernels/ProcRate.C index 5ed20f673e9..462b1e7e2b4 100644 --- a/src/auxkernels/ProcRate.C +++ b/src/auxkernels/ProcRate.C @@ -24,11 +24,13 @@ ProcRateTempl::validParams() InputParameters params = AuxKernel::validParams(); params.addRequiredCoupledVar("em", "The electron density"); - params.addRequiredCoupledVar("potential", "The potential"); params.addRequiredParam( "proc", "The process that we want to get the townsend coefficient for. Options are iz, ex, and el."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Reaction rate for electron impact collisions in units of #/m$^{3}$s. User can pass " "choice of elastic, excitation, or ionization Townsend coefficients"); @@ -42,7 +44,8 @@ ProcRateTempl::ProcRateTempl(const InputParameters & parameters) _r_units(1. / getParam("position_units")), _em(coupledValue("em")), _grad_em(coupledGradient("em")), - _grad_potential(coupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _muem(getGenericMaterialProperty("muem")), _sgnem(getMaterialProperty("sgnem")), _diffem(getGenericMaterialProperty("diffem")), @@ -55,8 +58,8 @@ template Real ProcRateTempl::computeValue() { - _em_current = 6.02e23 * (_sgnem[_qp] * raw_value(_muem[_qp]) * -_grad_potential[_qp] * _r_units * - std::exp(_em[_qp]) - + _em_current = 6.02e23 * (_sgnem[_qp] * raw_value(_muem[_qp]) * raw_value(_electric_field[_qp]) * + _r_units * std::exp(_em[_qp]) - raw_value(_diffem[_qp]) * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units); return raw_value(_alpha[_qp]) * _em_current.norm(); diff --git a/src/auxkernels/Sigma.C b/src/auxkernels/Sigma.C index 2a81935d6a0..0cd0b4b1d89 100644 --- a/src/auxkernels/Sigma.C +++ b/src/auxkernels/Sigma.C @@ -17,9 +17,10 @@ InputParameters Sigma::validParams() { InputParameters params = AuxKernel::validParams(); - + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addRequiredCoupledVar("n", "The density of the ions."); - params.addRequiredCoupledVar("potential", "The potential"); params.addClassDescription( "Calculates the surface charge due to a simplified version of the ion flux " "to a boundary."); @@ -30,12 +31,13 @@ Sigma::Sigma(const InputParameters & parameters) : AuxKernel(parameters), _u_old(uOld()), _n(coupledValue("n")), - _grad_potential(coupledGradient("potential")) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } Real Sigma::computeValue() { - return _u_old[_qp] + _dt * -_grad_potential[_qp] * _n[_qp] * _assembly.normals()[_qp]; + return _u_old[_qp] + _dt * raw_value(_electric_field[_qp]) * _n[_qp] * _assembly.normals()[_qp]; } diff --git a/src/auxkernels/TotalFlux.C b/src/auxkernels/TotalFlux.C index 1d67493ba7e..ffceed34b75 100644 --- a/src/auxkernels/TotalFlux.C +++ b/src/auxkernels/TotalFlux.C @@ -22,9 +22,10 @@ InputParameters TotalFluxTempl::validParams() { InputParameters params = AuxKernel::validParams(); - + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addRequiredCoupledVar("density_log", "The electron density"); - params.addRequiredCoupledVar("potential", "The potential"); params.addParam( "component", 0, "The component of the TotalFlux vector. (0 = x, 1 = y, 2 = z)"); params.addClassDescription("Returns the total flux of the specified species"); @@ -40,7 +41,8 @@ TotalFluxTempl::TotalFluxTempl(const InputParameters & parameters) _density_var(*getVar("density_log", 0)), _density_log(coupledValue("density_log")), _grad_density_log(coupledGradient("density_log")), - _grad_potential(coupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mu(getGenericMaterialProperty("mu" + _density_var.name())), _sgn(getMaterialProperty("sgn" + _density_var.name())), _diff(getGenericMaterialProperty("diff" + _density_var.name())) @@ -51,7 +53,8 @@ template Real TotalFluxTempl::computeValue() { - return _sgn[_qp] * raw_value(_mu[_qp]) * -_grad_potential[_qp](_component) * + return _sgn[_qp] * raw_value(_mu[_qp]) * raw_value(_electric_field[_qp](_component)) * + std::exp(_density_log[_qp]) - raw_value(_diff[_qp]) * std::exp(_density_log[_qp]) * _grad_density_log[_qp](_component); } diff --git a/src/bcs/DCIonBC.C b/src/bcs/DCIonBC.C index 80beec94bc5..a363e38f1b9 100644 --- a/src/bcs/DCIonBC.C +++ b/src/bcs/DCIonBC.C @@ -16,8 +16,10 @@ InputParameters DCIonBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Electric field driven outflow boundary condition" " (Based on [!cite](hagelaar2000boundary))"); return params; @@ -28,8 +30,8 @@ DCIonBC::DCIonBC(const InputParameters & parameters) _r_units(1. / getParam("position_units")), - // Coupled Variables - _grad_potential(adCoupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mu(getADMaterialProperty("mu" + _var.name())), _sgn(getMaterialProperty("sgn" + _var.name())) @@ -40,7 +42,7 @@ DCIonBC::DCIonBC(const InputParameters & parameters) ADReal DCIonBC::computeQpResidual() { - if (_normals[_qp] * _sgn[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * _sgn[_qp] * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -50,6 +52,6 @@ DCIonBC::computeQpResidual() } return _test[_i][_qp] * _r_units * - (_a * _mu[_qp] * _sgn[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_u[_qp]) * + (_a * _mu[_qp] * _sgn[_qp] * _electric_field[_qp] * _r_units * std::exp(_u[_qp]) * _normals[_qp]); } diff --git a/src/bcs/DielectricBCWithEffEfield.C b/src/bcs/DielectricBCWithEffEfield.C new file mode 100644 index 00000000000..bca88cb8b7c --- /dev/null +++ b/src/bcs/DielectricBCWithEffEfield.C @@ -0,0 +1,146 @@ +//* This file is part of the MOOSE framework +//* https://www.mooseframework.org +//* +//* All rights reserved, see COPYRIGHT for full restrictions +//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "DielectricBCWithEffEfield.h" + +registerMooseObject("ZapdosApp", DielectricBCWithEffEfield); + +InputParameters +DielectricBCWithEffEfield::validParams() +{ + InputParameters params = ADIntegratedBC::validParams(); + params.addRequiredParam("dielectric_constant", "The dielectric constant of the material."); + params.addRequiredParam("thickness", "The thickness of the material."); + params.addRequiredParam("position_units", "Units of position."); + params.addRequiredCoupledVar("mean_en", "The mean energy."); + params.addRequiredCoupledVar("em", "The electron density."); + params.addRequiredCoupledVar("ip", "The ion density."); + + params.addRequiredCoupledVar("Ex", "The EField in the x-direction"); + params.addCoupledVar("Ey", "The EField in the y-direction"); // only required in 2D and 3D + params.addCoupledVar("Ez", "The EField in the z-direction"); // only required in 3D + + params.addParam("users_gamma", + "A secondary electron emission coeff. only used for this BC."); + params.addRequiredParam("potential_units", "The potential units."); + params.addClassDescription("Time integrated dielectric boundary condition" + " (Based on [!cite](lymberopoulos1994modeling))"); + return params; +} + +DielectricBCWithEffEfield::DielectricBCWithEffEfield(const InputParameters & parameters) + : ADIntegratedBC(parameters), + _r_units(1. / getParam("position_units")), + + _u_old(_var.slnOld()), + _grad_u_old(_var.gradSlnOld()), + + _mean_en(adCoupledValue("mean_en")), + _mean_en_var(*getVar("mean_en", 0)), + _mean_en_old(_mean_en_var.slnOld()), + _em(adCoupledValue("em")), + _em_var(*getVar("em", 0)), + _em_old(_em_var.slnOld()), + _ip(adCoupledValue("ip")), + _ip_var(*getVar("ip", 0)), + _ip_old(_ip_var.slnOld()), + + _Ex(adCoupledValue("Ex")), + _Ex_var(*getVar("Ex", 0)), + _Ex_old(_Ex_var.slnOld()), + + //_Ey(adCoupledValue("Ey")), + _Ey(isCoupled("Ey") ? adCoupledValue("Ey") : _ad_zero), + _Ey_var(*getVar("Ey", 0)), + //_Ey_old(_Ey_var.slnOld()), + _Ey_old(isCoupled("Ey") ? _Ey_var.slnOld() : _zero), + + //_Ez(adCoupledValue("Ez")), + _Ez(isCoupled("Ez") ? adCoupledValue("Ez") : _ad_zero), + _Ez_var(*getVar("Ez", 0)), + //_Ez_old(_Ez_var.slnOld()), + _Ez_old(isCoupled("Ez") ? _Ez_var.slnOld() : _zero), + + _e(getMaterialProperty("e")), + _epsilon_0(getADMaterialProperty("diff" + _var.name())), + _N_A(getMaterialProperty("N_A")), + + _sgnip(getMaterialProperty("sgn" + _ip_var.name())), + _muip(getADMaterialProperty("mu" + _ip_var.name())), + _massem(getMaterialProperty("massem")), + _user_se_coeff(getParam("users_gamma")), + + _epsilon_d(getParam("dielectric_constant")), + _thickness(getParam("thickness")), + _a(0.5), + _a_old(0.5), + _ion_flux(0, 0, 0), + _ion_flux_old(0, 0, 0), + _v_thermal(0), + _v_thermal_old(0), + _em_flux(0, 0, 0), + _em_flux_old(0, 0, 0), + _potential_units(getParam("potential_units")) +{ + if (_potential_units.compare("V") == 0) + _voltage_scaling = 1.; + else if (_potential_units.compare("kV") == 0) + _voltage_scaling = 1000; +} + +ADReal +DielectricBCWithEffEfield::computeQpResidual() +{ + + ADRealVectorValue EField(_Ex[_qp], _Ey[_qp], _Ez[_qp]); + + if (_normals[_qp] * _sgnip[_qp] * EField >= 0.0) + { + _a = 1.0; + } + else + { + _a = 0.0; + } + + _ion_flux = (_a * _sgnip[_qp] * _muip[_qp] * EField * _r_units * std::exp(_ip[_qp])); + + _v_thermal = + std::sqrt(8 * _e[_qp] * 2.0 / 3 * std::exp(_mean_en[_qp] - _em[_qp]) / (M_PI * _massem[_qp])); + + _em_flux = + (0.25 * _v_thermal * std::exp(_em[_qp]) * _normals[_qp]) - (_user_se_coeff * _ion_flux); + + RealVectorValue EField_old(_Ex_old[_qp], _Ey_old[_qp], _Ez_old[_qp]); + + if (_normals[_qp] * _sgnip[_qp] * EField_old >= 0.0) + { + _a_old = 1.0; + } + else + { + _a_old = 0.0; + } + + _ion_flux_old = + (_a_old * _sgnip[_qp] * _muip[_qp] * EField_old * _r_units * std::exp(_ip_old[_qp])); + + _v_thermal_old = std::sqrt(8 * _e[_qp] * 2.0 / 3 * std::exp(_mean_en_old[_qp] - _em_old[_qp]) / + (M_PI * _massem[_qp])); + + _em_flux_old = (0.25 * _v_thermal_old * std::exp(_em_old[_qp]) * _normals[_qp]) - + (_user_se_coeff * _ion_flux_old); + + ADRealVectorValue _int = (_e[_qp] * _N_A[_qp] / _voltage_scaling) * _dt * + (0.5 * (_ion_flux - _em_flux) + 0.5 * (_ion_flux_old - _em_flux_old)); + + return _test[_i][_qp] * _r_units * + (-_epsilon_0[_qp] * _grad_u_old[_qp] * _normals[_qp] + + (_epsilon_d / _thickness) * (_u[_qp] - _u_old[_qp]) - _int * _normals[_qp]); +} diff --git a/src/bcs/DriftDiffusionDoNothingBC.C b/src/bcs/DriftDiffusionDoNothingBC.C index 168d6406f46..14b1c5977d2 100644 --- a/src/bcs/DriftDiffusionDoNothingBC.C +++ b/src/bcs/DriftDiffusionDoNothingBC.C @@ -16,16 +16,14 @@ InputParameters DriftDiffusionDoNothingBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); - params.addCoupledVar( - "potential", "The gradient of the potential will be used to compute the advection velocity."); params.addRequiredParam("position_units", "Units of position."); - params.addParam("EField", - "Optionally can use a specified electric field for 1D " - "simulations in place of a potential variable"); params.addParam("mu", "The mobility."); params.addParam("diff", "The diffusivity."); params.addParam("sign", "The sign of the charged particle."); params.addParam("use_material_props", true, "Whether to use a material for properties."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Boundary condition where the flux at the boundary is equal to the " "bulk dift-diffusion equation"); return params; @@ -44,32 +42,25 @@ DriftDiffusionDoNothingBC::DriftDiffusionDoNothingBC(const InputParameters & par ? getADMaterialProperty("diff" + _var.name()) : _user_diff), - // Coupled variables - _grad_potential(isCoupled("potential") ? adCoupledGradient("potential") : _minus_e_field) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { - if (!(isCoupled("potential") || parameters.isParamSetByUser("EField"))) - mooseError("You must either couple in a potential variable or set an EField."); - auto max_qps = _fe_problem.getMaxQps(); _user_diff.resize(max_qps); _user_mu.resize(max_qps); _user_sign.resize(max_qps); - if (!(isCoupled("potential"))) - _minus_e_field.resize(max_qps); for (decltype(max_qps) qp = 0; qp < max_qps; ++qp) { _user_diff[qp] = getParam("diff"); _user_mu[qp] = getParam("mu"); _user_sign[qp] = getParam("sign"); - if (!(isCoupled("potential"))) - _minus_e_field[qp] = RealGradient(-getParam("EField")); } } ADReal DriftDiffusionDoNothingBC::computeQpResidual() { - return _mu[_qp] * _sign[_qp] * std::exp(_u[_qp]) * -_grad_potential[_qp] * _r_units * + return _mu[_qp] * _sign[_qp] * std::exp(_u[_qp]) * _electric_field[_qp] * _r_units * _normals[_qp] * _test[_i][_qp] * _r_units - _diffusivity[_qp] * std::exp(_u[_qp]) * _grad_u[_qp] * _r_units * _normals[_qp] * _test[_i][_qp] * _r_units; diff --git a/src/bcs/ElectronAdvectionDoNothingBC.C b/src/bcs/ElectronAdvectionDoNothingBC.C index 9c53360fda4..8ef256b3d16 100644 --- a/src/bcs/ElectronAdvectionDoNothingBC.C +++ b/src/bcs/ElectronAdvectionDoNothingBC.C @@ -16,9 +16,10 @@ InputParameters ElectronAdvectionDoNothingBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); - params.addRequiredCoupledVar( - "potential", "The gradient of the potential will be used to compute the advection velocity."); params.addRequiredParam("position_units", "The units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Boundary condition where the electron advection flux at the boundary " "is equal to the bulk electron advection equation"); return params; @@ -32,14 +33,14 @@ ElectronAdvectionDoNothingBC::ElectronAdvectionDoNothingBC(const InputParameters _muem(getADMaterialProperty("muem")), _sign(getMaterialProperty("sgnem")), - // Coupled variables - _grad_potential(adCoupledGradient("potential")) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } ADReal ElectronAdvectionDoNothingBC::computeQpResidual() { - return _muem[_qp] * _sign[_qp] * std::exp(_u[_qp]) * -_grad_potential[_qp] * _position_units * + return _muem[_qp] * _sign[_qp] * std::exp(_u[_qp]) * _electric_field[_qp] * _position_units * _normals[_qp] * _test[_i][_qp] * _position_units; } diff --git a/src/bcs/FieldEmissionBC.C b/src/bcs/FieldEmissionBC.C index ef18b25b8fb..491166ee323 100644 --- a/src/bcs/FieldEmissionBC.C +++ b/src/bcs/FieldEmissionBC.C @@ -17,7 +17,6 @@ FieldEmissionBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam>( "emission_coeffs", @@ -26,6 +25,9 @@ FieldEmissionBC::validParams() params.addRequiredParam("potential_units", "The potential units."); params.addParam("tau", 1e-9, "The time constant for ramping the boundary condition."); params.addParam("relax", false, "Use relaxation for emission."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "The electron flux boundary condition due to field emission" " (Based on [!cite](forbes2006simple) and [!cite](forbes2008physics))"); @@ -38,8 +40,6 @@ FieldEmissionBC::FieldEmissionBC(const InputParameters & parameters) _r_units(1. / getParam("position_units")), _r(getParam("r")), _num_ions(coupledComponents("ions")), - // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _muem(getADMaterialProperty("muem")), _massem(getMaterialProperty("massem")), @@ -47,6 +47,10 @@ FieldEmissionBC::FieldEmissionBC(const InputParameters & parameters) _se_coeff_names(getParam>("emission_coeffs")), _work_function(getMaterialProperty("work_function")), _field_enhancement(getMaterialProperty("field_enhancement")), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), + _a(0.5), _ion_flux(0, 0, 0), _tau(getParam("tau")), @@ -95,7 +99,7 @@ FieldEmissionBC::FieldEmissionBC(const InputParameters & parameters) ADReal FieldEmissionBC::computeQpResidual() { - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; return 0; @@ -107,7 +111,7 @@ FieldEmissionBC::computeQpResidual() for (unsigned int i = 0; i < _num_ions; ++i) { - _ion_flux = (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * -_grad_potential[_qp] * _r_units * + _ion_flux = (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * _electric_field[_qp] * _r_units * std::exp((*_ip[i])[_qp]) - (*_Dip[i])[_qp] * std::exp((*_ip[i])[_qp]) * (*_grad_ip[i])[_qp] * _r_units; jSE += _e[_qp] * 6.02E23 * _normals[_qp] * (*_se_coeff[i])[_qp] * _ion_flux; @@ -121,7 +125,7 @@ FieldEmissionBC::computeQpResidual() // v(f) = 1 - f + (f/6)*ln(f) // f = c*(F/wf^2) - F = -(1 - _a) * _field_enhancement[_qp] * _normals[_qp] * _grad_potential[_qp] * _r_units; + F = -(1 - _a) * _field_enhancement[_qp] * _normals[_qp] * -_electric_field[_qp] * _r_units; f = FE_c * F / std::pow(_work_function[_qp], 2); v = 1 - f + (f / 6) * std::log(f); diff --git a/src/bcs/HagelaarElectronAdvectionBC.C b/src/bcs/HagelaarElectronAdvectionBC.C index c4f321591f4..5ba3b29a2d3 100644 --- a/src/bcs/HagelaarElectronAdvectionBC.C +++ b/src/bcs/HagelaarElectronAdvectionBC.C @@ -17,8 +17,10 @@ HagelaarElectronAdvectionBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Kinetic advective electron boundary condition" " (Based on [!cite](hagelaar2000boundary))"); return params; @@ -30,17 +32,18 @@ HagelaarElectronAdvectionBC::HagelaarElectronAdvectionBC(const InputParameters & _r_units(1. / getParam("position_units")), _r(getParam("r")), - _grad_potential(adCoupledGradient("potential")), - _muem(getADMaterialProperty("muem")), - _a(0.5) + _a(0.5), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } ADReal HagelaarElectronAdvectionBC::computeQpResidual() { - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -50,6 +53,6 @@ HagelaarElectronAdvectionBC::computeQpResidual() } return _test[_i][_qp] * _r_units * (1. - _r) / (1. + _r) * - (-(2 * _a - 1) * _muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_u[_qp]) * + (-(2 * _a - 1) * _muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_u[_qp]) * _normals[_qp]); } diff --git a/src/bcs/HagelaarElectronBC.C b/src/bcs/HagelaarElectronBC.C index 2b480d6df16..8c163b3eb9f 100644 --- a/src/bcs/HagelaarElectronBC.C +++ b/src/bcs/HagelaarElectronBC.C @@ -17,10 +17,12 @@ HagelaarElectronBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("electron_energy", "The mean electron energy density in log form"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Kinetic electron boundary condition" " (Based on [!cite](hagelaar2000boundary))"); return params; @@ -32,12 +34,14 @@ HagelaarElectronBC::HagelaarElectronBC(const InputParameters & parameters) _r(getParam("r")), // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _mean_en(adCoupledValue("electron_energy")), _muem(getADMaterialProperty("muem")), _massem(getMaterialProperty("massem")), - _e(getMaterialProperty("e")) + _e(getMaterialProperty("e")), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { _a = 0.0; _v_thermal = 0.0; @@ -46,7 +50,7 @@ HagelaarElectronBC::HagelaarElectronBC(const InputParameters & parameters) ADReal HagelaarElectronBC::computeQpResidual() { - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -59,7 +63,7 @@ HagelaarElectronBC::computeQpResidual() std::sqrt(8 * _e[_qp] * 2.0 / 3 * std::exp(_mean_en[_qp] - _u[_qp]) / (M_PI * _massem[_qp])); return _test[_i][_qp] * _r_units * (1. - _r) / (1. + _r) * - (-(2 * _a - 1) * _muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_u[_qp]) * + (-(2 * _a - 1) * _muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_u[_qp]) * _normals[_qp] + 0.5 * _v_thermal * std::exp(_u[_qp])); } diff --git a/src/bcs/HagelaarEnergyAdvectionBC.C b/src/bcs/HagelaarEnergyAdvectionBC.C index 81ba2524d60..4ca43711a8d 100644 --- a/src/bcs/HagelaarEnergyAdvectionBC.C +++ b/src/bcs/HagelaarEnergyAdvectionBC.C @@ -17,12 +17,14 @@ HagelaarEnergyAdvectionBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam>( "emission_coeffs", "The species-dependent secondary electron emission coefficients for this boundary"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addRequiredParam("secondary_electron_energy", "The secondary electron energy in eV"); params.addClassDescription("Kinetic advective electron energy boundary condition" " (Based on [!cite](hagelaar2000boundary))"); @@ -36,10 +38,13 @@ HagelaarEnergyAdvectionBC::HagelaarEnergyAdvectionBC(const InputParameters & par _r(getParam("r")), _num_ions(coupledComponents("ions")), // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _se_coeff_names(getParam>("emission_coeffs")), _se_energy(getParam("secondary_electron_energy")), _mumean_en(getADMaterialProperty("mumean_en")), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), + _a(0.5), _ion_flux(0, 0, 0), _v_thermal(0), @@ -71,7 +76,7 @@ HagelaarEnergyAdvectionBC::computeQpResidual() { // reset this value just to be safe _bc_val = 0; - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -82,7 +87,7 @@ HagelaarEnergyAdvectionBC::computeQpResidual() for (unsigned int i = 0; i < _num_ions; ++i) { - _ion_flux = (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * -_grad_potential[_qp] * _r_units * + _ion_flux = (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * _electric_field[_qp] * _r_units * std::exp((*_ip[i])[_qp]) - (*_Dip[i])[_qp] * std::exp((*_ip[i])[_qp]) * (*_grad_ip[i])[_qp] * _r_units; _bc_val += @@ -91,7 +96,7 @@ HagelaarEnergyAdvectionBC::computeQpResidual() return _test[_i][_qp] * _r_units / (6. * (_r + 1.)) * (_bc_val + (_r - 1.) * (std::exp(_u[_qp]) - _se_energy * _n_gamma) * - (6. * -_grad_potential[_qp] * _r_units * _normals[_qp] * _mumean_en[_qp] * + (6. * _electric_field[_qp] * _r_units * _normals[_qp] * _mumean_en[_qp] * (2. * _a - 1.) - 5. * _v_thermal)); } diff --git a/src/bcs/HagelaarEnergyBC.C b/src/bcs/HagelaarEnergyBC.C index 2d642fd29e4..937bede1492 100644 --- a/src/bcs/HagelaarEnergyBC.C +++ b/src/bcs/HagelaarEnergyBC.C @@ -17,9 +17,11 @@ HagelaarEnergyBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("electrons", "The electron density in log form"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Kinetic electron mean energy boundary condition" " (Based on [!cite](hagelaar2000boundary))"); return params; @@ -31,12 +33,13 @@ HagelaarEnergyBC::HagelaarEnergyBC(const InputParameters & parameters) _r(getParam("r")), // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("electrons")), _massem(getMaterialProperty("massem")), _e(getMaterialProperty("e")), - _mumean_en(getADMaterialProperty("mumean_en")) + _mumean_en(getADMaterialProperty("mumean_en")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { _a = 0.5; _v_thermal = 0.0; @@ -45,7 +48,7 @@ HagelaarEnergyBC::HagelaarEnergyBC(const InputParameters & parameters) ADReal HagelaarEnergyBC::computeQpResidual() { - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -57,7 +60,7 @@ HagelaarEnergyBC::computeQpResidual() std::sqrt(8 * _e[_qp] * 2.0 / 3 * std::exp(_u[_qp] - _em[_qp]) / (M_PI * _massem[_qp])); return _test[_i][_qp] * _r_units * (1. - _r) / (1. + _r) * - (-(2. * _a - 1.) * _mumean_en[_qp] * -_grad_potential[_qp] * _r_units * _normals[_qp] + + (-(2. * _a - 1.) * _mumean_en[_qp] * _electric_field[_qp] * _r_units * _normals[_qp] + 5. / 6. * _v_thermal) * std::exp(_u[_qp]); } diff --git a/src/bcs/HagelaarIonAdvectionBC.C b/src/bcs/HagelaarIonAdvectionBC.C index 4aa47dccc00..0e267dc547a 100644 --- a/src/bcs/HagelaarIonAdvectionBC.C +++ b/src/bcs/HagelaarIonAdvectionBC.C @@ -17,8 +17,10 @@ HagelaarIonAdvectionBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Kinetic advective ion boundary condition" " (Based on [!cite](hagelaar2000boundary))"); return params; @@ -30,8 +32,8 @@ HagelaarIonAdvectionBC::HagelaarIonAdvectionBC(const InputParameters & parameter _r_units(1. / getParam("position_units")), _r(getParam("r")), - // Coupled Variables - _grad_potential(adCoupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mu(getADMaterialProperty("mu" + _var.name())), _e(getMaterialProperty("e")), @@ -43,7 +45,7 @@ HagelaarIonAdvectionBC::HagelaarIonAdvectionBC(const InputParameters & parameter ADReal HagelaarIonAdvectionBC::computeQpResidual() { - if (_normals[_qp] * _sgn[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * _sgn[_qp] * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -53,6 +55,6 @@ HagelaarIonAdvectionBC::computeQpResidual() } return _test[_i][_qp] * _r_units * (1. - _r) / (1. + _r) * - ((2 * _a - 1) * _sgn[_qp] * _mu[_qp] * -_grad_potential[_qp] * _r_units * + ((2 * _a - 1) * _sgn[_qp] * _mu[_qp] * _electric_field[_qp] * _r_units * std::exp(_u[_qp]) * _normals[_qp]); } diff --git a/src/bcs/LymberopoulosElectronBC.C b/src/bcs/LymberopoulosElectronBC.C index 05b52eb15d7..d002644bf87 100644 --- a/src/bcs/LymberopoulosElectronBC.C +++ b/src/bcs/LymberopoulosElectronBC.C @@ -19,9 +19,11 @@ LymberopoulosElectronBC::validParams() params.addRequiredParam("ks", "The recombination coefficient"); params.addRequiredParam>( "emission_coeffs", "The species-dependent secondary electron emission coefficients"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Simpified kinetic electron boundary condition" " (Based on [!cite](Lymberopoulos1993))"); return params; @@ -34,8 +36,9 @@ LymberopoulosElectronBC::LymberopoulosElectronBC(const InputParameters & paramet _ks(getParam("ks")), _gamma(getParam>("emission_coeffs")), _num_ions(coupledComponents("ions")), - // Coupled Variables - _grad_potential(adCoupledGradient("potential")) + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { // Resize the vectors to store _num_ions values: _ion.resize(_num_ions); @@ -63,7 +66,7 @@ LymberopoulosElectronBC::computeQpResidual() _ion_flux.zero(); for (unsigned int i = 0; i < _num_ions; ++i) { - _ion_flux += _gamma[i] * (*_sgnion[i])[_qp] * (*_muion[i])[_qp] * -_grad_potential[_qp] * + _ion_flux += _gamma[i] * (*_sgnion[i])[_qp] * (*_muion[i])[_qp] * _electric_field[_qp] * _r_units * std::exp((*_ion[i])[_qp]); } diff --git a/src/bcs/LymberopoulosIonBC.C b/src/bcs/LymberopoulosIonBC.C index 2f55ab3d2ee..70af8b6f0d7 100644 --- a/src/bcs/LymberopoulosIonBC.C +++ b/src/bcs/LymberopoulosIonBC.C @@ -16,8 +16,10 @@ InputParameters LymberopoulosIonBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Simpified kinetic ion boundary condition" " (Based on [!cite](Lymberopoulos1993))"); return params; @@ -28,8 +30,8 @@ LymberopoulosIonBC::LymberopoulosIonBC(const InputParameters & parameters) _r_units(1. / getParam("position_units")), - // Coupled Variables - _grad_potential(adCoupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mu(getADMaterialProperty("mu" + _var.name())) { @@ -38,6 +40,6 @@ LymberopoulosIonBC::LymberopoulosIonBC(const InputParameters & parameters) ADReal LymberopoulosIonBC::computeQpResidual() { - return _test[_i][_qp] * _r_units * _mu[_qp] * -_grad_potential[_qp] * _r_units * + return _test[_i][_qp] * _r_units * _mu[_qp] * _electric_field[_qp] * _r_units * std::exp(_u[_qp]) * _normals[_qp]; } diff --git a/src/bcs/PotentialDriftOutflowBC.C b/src/bcs/PotentialDriftOutflowBC.C index 5d12990f9f4..702b4af1c49 100644 --- a/src/bcs/PotentialDriftOutflowBC.C +++ b/src/bcs/PotentialDriftOutflowBC.C @@ -17,12 +17,10 @@ PotentialDriftOutflowBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); MooseEnum charge_sign("positive=1 negative=-1", "positive"); - params.addRequiredCoupledVar( - "potential", "The gradient of the potential will be used to compute the advection velocity."); - params.addRequiredCoupledVar( - "potential", "The gradient of the potential will be used to compute the advection velocity."); - params.addParam("charge_sign", charge_sign, "The sign of the charged particle."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("The drift flux boundary condition"); return params; } @@ -30,15 +28,16 @@ PotentialDriftOutflowBC::validParams() PotentialDriftOutflowBC::PotentialDriftOutflowBC(const InputParameters & parameters) : ADIntegratedBC(parameters), _charge_sign(getParam("charge_sign")), - _grad_potential(adCoupledGradient("potential")) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } ADReal PotentialDriftOutflowBC::computeQpResidual() { - if (_charge_sign * -_grad_potential[_qp] * _normals[_qp] > 0.) - return _charge_sign * -_grad_potential[_qp] * _normals[_qp] * _u[_qp]; + if (_charge_sign * _electric_field[_qp] * _normals[_qp] > 0.) + return _charge_sign * _electric_field[_qp] * _normals[_qp] * _u[_qp]; else return 0.; } diff --git a/src/bcs/SakiyamaEnergySecondaryElectronBC.C b/src/bcs/SakiyamaEnergySecondaryElectronBC.C index 71248caf86f..082be7af8cf 100644 --- a/src/bcs/SakiyamaEnergySecondaryElectronBC.C +++ b/src/bcs/SakiyamaEnergySecondaryElectronBC.C @@ -23,10 +23,12 @@ SakiyamaEnergySecondaryElectronBC::validParams() "Tse_equal_Te", "The secondary electron temperature equal the electron temperature in eV"); params.addParam( "secondary_electron_energy", 1.0, "The secondary electron temperature in eV"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("electrons", "The electron density in log form"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Kinetic secondary electron for mean electron energy boundary condition" " (Based on [!cite](sakiyama2007nonthermal))"); @@ -42,14 +44,16 @@ SakiyamaEnergySecondaryElectronBC::SakiyamaEnergySecondaryElectronBC( _num_ions(coupledComponents("ions")), _se_coeff_names(getParam>("emission_coeffs")), // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("electrons")), _user_se_energy(getParam("secondary_electron_energy")), _a(0.5), _se_energy(0), - _ion_flux(0, 0, 0) + _ion_flux(0, 0, 0), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { if (_se_coeff_names.size() != _num_ions) @@ -79,7 +83,7 @@ SakiyamaEnergySecondaryElectronBC::computeQpResidual() _ion_flux.zero(); for (unsigned int i = 0; i < _num_ions; ++i) { - if (_normals[_qp] * (*_sgnip[i])[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * (*_sgnip[i])[_qp] * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -89,7 +93,7 @@ SakiyamaEnergySecondaryElectronBC::computeQpResidual() } _ion_flux += (*_se_coeff[i])[_qp] * _a * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * - -_grad_potential[_qp] * _r_units * std::exp((*_ip[i])[_qp]); + _electric_field[_qp] * _r_units * std::exp((*_ip[i])[_qp]); } if (Te_dependent) diff --git a/src/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.C b/src/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.C new file mode 100644 index 00000000000..ca8007a1eca --- /dev/null +++ b/src/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.C @@ -0,0 +1,106 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "SakiyamaEnergySecondaryElectronWithEffEfieldBC.h" + +registerMooseObject("ZapdosApp", SakiyamaEnergySecondaryElectronWithEffEfieldBC); + +InputParameters +SakiyamaEnergySecondaryElectronWithEffEfieldBC::validParams() +{ + InputParameters params = ADIntegratedBC::validParams(); + params.addRequiredParam("se_coeff", "The secondary electron coefficient"); + params.addRequiredParam( + "Tse_equal_Te", "The secondary electron temperature equal the electron temperature in eV"); + params.addParam( + "user_se_energy", 1.0, "The user's value of the secondary electron temperature in eV"); + params.addRequiredCoupledVar("Ex", "The EField in the x-direction"); + params.addCoupledVar("Ey", 0, "The EField in the y-direction"); // only required in 2D and 3D + params.addCoupledVar("Ez", 0, "The EField in the z-direction"); // only required in 3D + params.addRequiredCoupledVar("em", "The electron density."); + params.addRequiredCoupledVar("ip", "The ion density."); + params.addRequiredParam("position_units", "Units of position."); + params.addClassDescription( + "Kinetic secondary electron for mean electron energy boundary condition" + " (Based on [!cite](sakiyama2007nonthermal))"); + return params; +} + +SakiyamaEnergySecondaryElectronWithEffEfieldBC::SakiyamaEnergySecondaryElectronWithEffEfieldBC( + const InputParameters & parameters) + : ADIntegratedBC(parameters), + + _r_units(1. / getParam("position_units")), + Te_dependent(getParam("Tse_equal_Te")), + + _Ex(adCoupledValue("Ex")), + _Ey(adCoupledValue("Ey")), + _Ez(adCoupledValue("Ez")), + + _em(adCoupledValue("em")), + + _se_coeff(getParam("se_coeff")), + _user_se_energy(getParam("user_se_energy")), + _a(0.5), + _se_energy(0), + _ion_flux(0, 0, 0) +{ + _num_ions = coupledComponents("ip"); + + _ip.resize(_num_ions); + _ip_var.resize(_num_ions); + _muip.resize(_num_ions); + _sgnip.resize(_num_ions); + + for (unsigned int i = 0; i < _num_ions; ++i) + { + _ip_var[i] = getVar("ip", i); + _ip[i] = &adCoupledValue("ip", i); + _muip[i] = &getADMaterialProperty("mu" + (*getVar("ip", i)).name()); + _sgnip[i] = &getMaterialProperty("sgn" + (*getVar("ip", i)).name()); + } +} + +ADReal +SakiyamaEnergySecondaryElectronWithEffEfieldBC::computeQpResidual() +{ + ADRealVectorValue EField(_Ex[_qp], _Ey[_qp], _Ez[_qp]); + + _ion_flux.zero(); + for (unsigned int i = 0; i < _num_ions; ++i) + { + if (_normals[_qp] * (*_sgnip[i])[_qp] * EField >= 0.0) + { + _a = 1.0; + } + else + { + _a = 0.0; + } + + //_ion_flux += _a * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * -_grad_potential[_qp] * _r_units * + // std::exp((*_ip[i])[_qp]); + + _ion_flux += + _a * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * EField * _r_units * std::exp((*_ip[i])[_qp]); + } + + if (Te_dependent) + { + _se_energy = std::exp(_u[_qp] - _em[_qp]); + } + else + { + _se_energy = _user_se_energy; + } + + return -_test[_i][_qp] * _r_units * _se_coeff * (5.0 / 3.0) * _se_energy * _ion_flux * + _normals[_qp]; +} diff --git a/src/bcs/SakiyamaIonAdvectionBC.C b/src/bcs/SakiyamaIonAdvectionBC.C index b113362b956..b4902e0982f 100644 --- a/src/bcs/SakiyamaIonAdvectionBC.C +++ b/src/bcs/SakiyamaIonAdvectionBC.C @@ -16,8 +16,10 @@ InputParameters SakiyamaIonAdvectionBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Kinetic advective ion boundary condition" " (Based on [!cite](sakiyama2006corona))"); return params; @@ -28,11 +30,12 @@ SakiyamaIonAdvectionBC::SakiyamaIonAdvectionBC(const InputParameters & parameter _r_units(1. / getParam("position_units")), - // Coupled Variables - _grad_potential(adCoupledGradient("potential")), - _mu(getADMaterialProperty("mu" + _var.name())), _sgn(getMaterialProperty("sgn" + _var.name())), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), + _a(0.5) { } @@ -40,7 +43,7 @@ SakiyamaIonAdvectionBC::SakiyamaIonAdvectionBC(const InputParameters & parameter ADReal SakiyamaIonAdvectionBC::computeQpResidual() { - if (_normals[_qp] * _sgn[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * _sgn[_qp] * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -50,6 +53,6 @@ SakiyamaIonAdvectionBC::computeQpResidual() } return _test[_i][_qp] * _r_units * - (_a * _sgn[_qp] * _mu[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_u[_qp]) * + (_a * _sgn[_qp] * _mu[_qp] * _electric_field[_qp] * _r_units * std::exp(_u[_qp]) * _normals[_qp]); } diff --git a/src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C b/src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C new file mode 100644 index 00000000000..7dc63cda96a --- /dev/null +++ b/src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C @@ -0,0 +1,64 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "SakiyamaIonAdvectionWithEffEfieldBC.h" + +registerMooseObject("ZapdosApp", SakiyamaIonAdvectionWithEffEfieldBC); + +InputParameters +SakiyamaIonAdvectionWithEffEfieldBC::validParams() +{ + InputParameters params = ADIntegratedBC::validParams(); + params.addRequiredCoupledVar("Ex", "The EField in the x-direction"); + params.addCoupledVar("Ey", 0, "The EField in the y-direction"); // only required in 2D and 3D + params.addCoupledVar("Ez", 0, "The EField in the z-direction"); // only required in 3D + params.addRequiredParam("position_units", "Units of position."); + params.addClassDescription("Kinetic advective ion boundary condition" + " (Based on [!cite](sakiyama2006corona))"); + return params; +} + +SakiyamaIonAdvectionWithEffEfieldBC::SakiyamaIonAdvectionWithEffEfieldBC( + const InputParameters & parameters) + : ADIntegratedBC(parameters), + + _r_units(1. / getParam("position_units")), + + _Ex(adCoupledValue("Ex")), + _Ey(adCoupledValue("Ey")), + _Ez(adCoupledValue("Ez")), + + _mu(getADMaterialProperty("mu" + _var.name())), + _sgn(getMaterialProperty("sgn" + _var.name())), + _a(0.5) +{ +} + +ADReal +SakiyamaIonAdvectionWithEffEfieldBC::computeQpResidual() +{ + ADRealVectorValue EField(_Ex[_qp], _Ey[_qp], _Ez[_qp]); + + if (_normals[_qp] * _sgn[_qp] * EField >= 0.0) + { + _a = 1.0; + } + else + { + _a = 0.0; + } + + // return _test[_i][_qp] * _r_units * + // (_a * _sgn[_qp] * _mu[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_u[_qp]) * + // _normals[_qp]); + + return _test[_i][_qp] * _r_units * + (_a * _sgn[_qp] * _mu[_qp] * EField * _r_units * std::exp(_u[_qp]) * _normals[_qp]); +} diff --git a/src/bcs/SakiyamaSecondaryElectronBC.C b/src/bcs/SakiyamaSecondaryElectronBC.C index a20bbe352ee..5b09ee53b7b 100644 --- a/src/bcs/SakiyamaSecondaryElectronBC.C +++ b/src/bcs/SakiyamaSecondaryElectronBC.C @@ -16,11 +16,13 @@ InputParameters SakiyamaSecondaryElectronBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam>( "emission_coeffs", "A list of species-dependent secondary electron emission coefficients"); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Kinetic secondary electron boundary condition" " (Based on [!cite](sakiyama2006corona))"); return params; @@ -32,11 +34,11 @@ SakiyamaSecondaryElectronBC::SakiyamaSecondaryElectronBC(const InputParameters & _r_units(1. / getParam("position_units")), _num_ions(coupledComponents("ions")), _se_coeff_names(getParam>("emission_coeffs")), - // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _a(0.5), - _ion_flux(0, 0, 0) + _ion_flux(0, 0, 0), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { if (_se_coeff_names.size() != _num_ions) mooseError("SakiyamaSecondaryElectronBC with name ", @@ -63,7 +65,7 @@ SakiyamaSecondaryElectronBC::computeQpResidual() _ion_flux.zero(); for (unsigned int i = 0; i < _num_ions; ++i) { - if (_normals[_qp] * (*_sgnip[i])[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * (*_sgnip[i])[_qp] * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -73,7 +75,7 @@ SakiyamaSecondaryElectronBC::computeQpResidual() } _ion_flux += (*_se_coeff[i])[_qp] * _a * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * - -_grad_potential[_qp] * _r_units * std::exp((*_ip[i])[_qp]); + _electric_field[_qp] * _r_units * std::exp((*_ip[i])[_qp]); } return -_test[_i][_qp] * _r_units * _a * _ion_flux * _normals[_qp]; diff --git a/src/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.C b/src/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.C new file mode 100644 index 00000000000..67dcc312fa5 --- /dev/null +++ b/src/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.C @@ -0,0 +1,83 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "SakiyamaSecondaryElectronWithEffEfieldBC.h" + +registerMooseObject("ZapdosApp", SakiyamaSecondaryElectronWithEffEfieldBC); + +InputParameters +SakiyamaSecondaryElectronWithEffEfieldBC::validParams() +{ + InputParameters params = ADIntegratedBC::validParams(); + params.addRequiredCoupledVar("ip", "The ion density."); + params.addRequiredCoupledVar("Ex", "The EField in the x-direction"); + params.addCoupledVar("Ey", 0, "The EField in the y-direction"); // only required in 2D and 3D + params.addCoupledVar("Ez", 0, "The EField in the z-direction"); // only required in 3D + params.addRequiredParam("position_units", "Units of position."); + params.addParam("users_gamma", + "A secondary electron emission coeff. only used for this BC."); + params.addClassDescription("Kinetic secondary electron boundary condition" + " (Based on [!cite](sakiyama2006corona))"); + return params; +} + +SakiyamaSecondaryElectronWithEffEfieldBC::SakiyamaSecondaryElectronWithEffEfieldBC( + const InputParameters & parameters) + : ADIntegratedBC(parameters), + + _r_units(1. / getParam("position_units")), + + _Ex(adCoupledValue("Ex")), + _Ey(adCoupledValue("Ey")), + _Ez(adCoupledValue("Ez")), + + _a(0.5), + _ion_flux(0, 0, 0), + _user_se_coeff(getParam("users_gamma")) +{ + _num_ions = coupledComponents("ip"); + + _ip.resize(_num_ions); + _muip.resize(_num_ions); + _sgnip.resize(_num_ions); + + for (unsigned int i = 0; i < _num_ions; ++i) + { + _ip[i] = &adCoupledValue("ip", i); + _muip[i] = &getADMaterialProperty("mu" + (*getVar("ip", i)).name()); + _sgnip[i] = &getMaterialProperty("sgn" + (*getVar("ip", i)).name()); + } +} + +ADReal +SakiyamaSecondaryElectronWithEffEfieldBC::computeQpResidual() +{ + ADRealVectorValue EField(_Ex[_qp], _Ey[_qp], _Ez[_qp]); + + _ion_flux.zero(); + for (unsigned int i = 0; i < _num_ions; ++i) + { + if (_normals[_qp] * (*_sgnip[i])[_qp] * EField >= 0.0) + { + _a = 1.0; + } + else + { + _a = 0.0; + } + //_ion_flux += _a * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * -_grad_potential[_qp] * _r_units * + // std::exp((*_ip[i])[_qp]); + + _ion_flux += + _a * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * EField * _r_units * std::exp((*_ip[i])[_qp]); + } + + return -_test[_i][_qp] * _r_units * _a * _user_se_coeff * _ion_flux * _normals[_qp]; +} diff --git a/src/bcs/SchottkyEmissionBC.C b/src/bcs/SchottkyEmissionBC.C index 95cb435bf82..a94c39e6ea8 100644 --- a/src/bcs/SchottkyEmissionBC.C +++ b/src/bcs/SchottkyEmissionBC.C @@ -17,7 +17,6 @@ SchottkyEmissionBC::validParams() { InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient"); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("electron_energy", "The mean electron energy density in log form"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam>( @@ -28,6 +27,9 @@ SchottkyEmissionBC::validParams() params.addRequiredParam("potential_units", "The potential units."); params.addParam("tau", 1e-9, "The time constant for ramping the boundary condition."); params.addParam("relax", false, "Use relaxation for emission."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "The electron flux boundary condition due to field ehanced thermionic emission (Schottky " "emission)" @@ -43,7 +45,6 @@ SchottkyEmissionBC::SchottkyEmissionBC(const InputParameters & parameters) _num_ions(coupledComponents("ions")), _se_coeff_names(getParam>("emission_coeffs")), // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _mean_en(adCoupledValue("electron_energy")), _massem(getMaterialProperty("massem")), @@ -57,7 +58,9 @@ SchottkyEmissionBC::SchottkyEmissionBC(const InputParameters & parameters) _ion_flux(0, 0, 0), _tau(getParam("tau")), _relax(getParam("relax")), - _potential_units(getParam("potential_units")) + _potential_units(getParam("potential_units")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { if (_se_coeff_names.size() != _num_ions) @@ -103,7 +106,7 @@ SchottkyEmissionBC::computeQpResidual() _v_thermal = std::sqrt(8 * _e[_qp] * 2.0 / 3 * std::exp(_mean_en[_qp] - _u[_qp]) / (M_PI * _massem[_qp])); - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; return 0; @@ -116,7 +119,7 @@ SchottkyEmissionBC::computeQpResidual() for (unsigned int i = 0; i < _num_ions; ++i) { _ion_flux += (*_se_coeff[i])[_qp] * - ((*_sgnip[i])[_qp] * (*_muip[i])[_qp] * -_grad_potential[_qp] * _r_units * + ((*_sgnip[i])[_qp] * (*_muip[i])[_qp] * _electric_field[_qp] * _r_units * std::exp((*_ip[i])[_qp]) - (*_Dip[i])[_qp] * std::exp((*_ip[i])[_qp]) * (*_grad_ip[i])[_qp] * _r_units); } @@ -125,7 +128,7 @@ SchottkyEmissionBC::computeQpResidual() // je = AR * T^2 * exp(-(wf - dPhi) / (kB * T)) // dPhi = _dPhi_over_F * sqrt(F) // eV - F = -(1 - _a) * _field_enhancement[_qp] * _normals[_qp] * _grad_potential[_qp] * _r_units; + F = -(1 - _a) * _field_enhancement[_qp] * _normals[_qp] * -_electric_field[_qp] * _r_units; kB = 8.617385E-5; // eV/K dPhi = _dPhi_over_F * std::sqrt(F); diff --git a/src/bcs/SecondaryElectronBC.C b/src/bcs/SecondaryElectronBC.C index f323f51410c..4ab8680d44f 100644 --- a/src/bcs/SecondaryElectronBC.C +++ b/src/bcs/SecondaryElectronBC.C @@ -18,10 +18,12 @@ SecondaryElectronBC::validParams() InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient of the electrons."); params.addParam("r_ion", 0, "The reflection coefficient of the ions."); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("electron_energy", "The mean electron energy density in log form"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addRequiredParam>( "emission_coeffs", "A list of species-dependent secondary electron emission coefficients"); params.addClassDescription("Kinetic secondary electron boundary condition"); @@ -37,12 +39,14 @@ SecondaryElectronBC::SecondaryElectronBC(const InputParameters & parameters) _num_ions(coupledComponents("ions")), _se_coeff_names(getParam>("emission_coeffs")), // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _mean_en(adCoupledValue("electron_energy")), _muem(getADMaterialProperty("muem")), _massem(getMaterialProperty("massem")), - _e(getMaterialProperty("e")) + _e(getMaterialProperty("e")), + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { _ion_flux = 0; @@ -84,7 +88,7 @@ SecondaryElectronBC::SecondaryElectronBC(const InputParameters & parameters) ADReal SecondaryElectronBC::computeQpResidual() { - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -96,19 +100,19 @@ SecondaryElectronBC::computeQpResidual() _ion_flux = 0; for (unsigned int i = 0; i < _num_ions; ++i) { - if (_normals[_qp] * (*_sgnip[i])[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * (*_sgnip[i])[_qp] * _electric_field[_qp] > 0.0) _b = 1.0; else _b = 0.0; _ion_flux += (*_se_coeff[i])[_qp] * std::exp((*_ip[i])[_qp]) * (0.5 * std::sqrt(8 * _kb[_qp] * (*_Tip[i])[_qp] / (M_PI * (*_massip[i])[_qp])) + - (2 * _b - 1) * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * -_grad_potential[_qp] * + (2 * _b - 1) * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * _electric_field[_qp] * _r_units * _normals[_qp]); } _ion_flux *= (1.0 - _r_ion) / (1.0 + _r_ion); _n_gamma = (1. - _a) * _ion_flux / - (_muem[_qp] * -_grad_potential[_qp] * _r_units * _normals[_qp] + + (_muem[_qp] * _electric_field[_qp] * _r_units * _normals[_qp] + std::numeric_limits::epsilon()); _v_thermal = std::sqrt(8 * _e[_qp] * 2.0 / 3 * std::exp(_mean_en[_qp] - _u[_qp]) / (M_PI * _massem[_qp])); diff --git a/src/bcs/SecondaryElectronEnergyBC.C b/src/bcs/SecondaryElectronEnergyBC.C index b5cd61e1dfc..78a370027ad 100644 --- a/src/bcs/SecondaryElectronEnergyBC.C +++ b/src/bcs/SecondaryElectronEnergyBC.C @@ -18,10 +18,12 @@ SecondaryElectronEnergyBC::validParams() InputParameters params = ADIntegratedBC::validParams(); params.addRequiredParam("r", "The reflection coefficient of the electrons."); params.addParam("r_ion", 0, "The reflection coefficient of the ions."); - params.addRequiredCoupledVar("potential", "The electric potential"); params.addRequiredCoupledVar("electrons", "The electron density in log form"); params.addRequiredCoupledVar("ions", "A list of ion densities in log form"); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addRequiredParam>( "emission_coeffs", "A species-dependent list of secondary electron emission coefficients"); params.addRequiredParam("secondary_electron_energy", "The secondary electron energy in eV"); @@ -39,7 +41,6 @@ SecondaryElectronEnergyBC::SecondaryElectronEnergyBC(const InputParameters & par _num_ions(coupledComponents("ions")), _se_coeff_names(getParam>("emission_coeffs")), // Coupled Variables - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("electrons")), _muem(getADMaterialProperty("muem")), @@ -47,7 +48,9 @@ SecondaryElectronEnergyBC::SecondaryElectronEnergyBC(const InputParameters & par _e(getMaterialProperty("e")), _se_energy(getParam("secondary_electron_energy")), - _mumean_en(getADMaterialProperty("mumean_en")) + _mumean_en(getADMaterialProperty("mumean_en")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { _ion_flux = 0; _a = 0.5; @@ -89,7 +92,7 @@ SecondaryElectronEnergyBC::SecondaryElectronEnergyBC(const InputParameters & par ADReal SecondaryElectronEnergyBC::computeQpResidual() { - if (_normals[_qp] * -1.0 * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * -1.0 * _electric_field[_qp] > 0.0) { _a = 1.0; } @@ -101,18 +104,18 @@ SecondaryElectronEnergyBC::computeQpResidual() _ion_flux = 0; for (unsigned int i = 0; i < _num_ions; ++i) { - if (_normals[_qp] * (*_sgnip[i])[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * (*_sgnip[i])[_qp] * _electric_field[_qp] > 0.0) _b = 1.0; else _b = 0.0; _ion_flux += (*_se_coeff[i])[_qp] * std::exp((*_ip[i])[_qp]) * (0.5 * std::sqrt(8 * _kb[_qp] * (*_Tip[i])[_qp] / (M_PI * (*_massip[i])[_qp])) + - (2 * _b - 1) * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * -_grad_potential[_qp] * + (2 * _b - 1) * (*_sgnip[i])[_qp] * (*_muip[i])[_qp] * _electric_field[_qp] * _r_units * _normals[_qp]); } _n_gamma = (1. - _a) * _ion_flux / - (_muem[_qp] * -_grad_potential[_qp] * _r_units * _normals[_qp] + + (_muem[_qp] * _electric_field[_qp] * _r_units * _normals[_qp] + std::numeric_limits::epsilon()); _v_thermal = diff --git a/src/dgkernels/DGEFieldAdvection.C b/src/dgkernels/DGEFieldAdvection.C index 29e8baba3cb..ffada4c0ec1 100644 --- a/src/dgkernels/DGEFieldAdvection.C +++ b/src/dgkernels/DGEFieldAdvection.C @@ -16,7 +16,14 @@ InputParameters DGEFieldAdvection::validParams() { InputParameters params = ADDGKernel::validParams(); - params.addRequiredCoupledVar("potential", "The potential that drives advection."); + params.addParam( + "field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property on the primary side of the interface."); + params.addParam( + "neighbor_field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property on the neighbor side of the interface."); params.addClassDescription( "The discontinuous Galerkin form of the generic electric field driven advection term" "(Densities must be in log form)"); @@ -31,9 +38,10 @@ DGEFieldAdvection::DGEFieldAdvection(const InputParameters & parameters) _mu_neighbor(getNeighborADMaterialProperty("mu" + _var.name())), _sgn_neighbor(getNeighborMaterialProperty("sgn" + _var.name())), - _potential_var(*getVar("potential", 0)), - _grad_potential(adCoupledGradient("potential")), - _grad_potential_neighbor(_potential_var.adGradSlnNeighbor()) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), + _electric_field_neighbor(getNeighborADMaterialProperty( + getParam("neighbor_field_property_name"))) { } @@ -41,9 +49,9 @@ ADReal DGEFieldAdvection::computeQpResidual(Moose::DGResidualType type) { ADReal r = 0; - ADRealVectorValue _velocity = _mu[_qp] * _sgn[_qp] * -_grad_potential[_qp]; + ADRealVectorValue _velocity = _mu[_qp] * _sgn[_qp] * _electric_field[_qp]; ADRealVectorValue _velocity_neighbor = - _mu_neighbor[_qp] * _sgn_neighbor[_qp] * -_grad_potential_neighbor[_qp]; + _mu_neighbor[_qp] * _sgn_neighbor[_qp] * _electric_field_neighbor[_qp]; ADRealVectorValue _velocity_average = 0.5 * (_velocity + _velocity_neighbor); switch (type) diff --git a/src/interfacekernels/InterfaceAdvection.C b/src/interfacekernels/InterfaceAdvection.C index e5bf0f6a1e9..d93aa0aec97 100644 --- a/src/interfacekernels/InterfaceAdvection.C +++ b/src/interfacekernels/InterfaceAdvection.C @@ -16,8 +16,6 @@ InputParameters InterfaceAdvection::validParams() { InputParameters params = ADInterfaceKernel::validParams(); - params.addRequiredCoupledVar("potential_neighbor", - "The potential on the slave side of the interface."); params.addRequiredCoupledVar("mean_en_neighbor", "The log of the product of the mean energy and " "electron density on the slave side of the " @@ -25,6 +23,10 @@ InterfaceAdvection::validParams() params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("neighbor_position_units", "The units of position in the neighboring domain."); + params.addParam( + "neighbor_field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property on the neighbor side of the interface."); params.addClassDescription( "Used to include the electric field driven advective flux of species" "into or out of a neighboring subdomain. Currently this interface kernel" @@ -39,8 +41,8 @@ InterfaceAdvection::InterfaceAdvection(const InputParameters & parameters) _r_units(1. / getParam("position_units")), _r_neighbor_units(1. / getParam("neighbor_position_units")), - _potential_neighbor_var(*getVar("potential_neighbor", 0)), - _grad_potential_neighbor(_potential_neighbor_var.adGradSlnNeighbor()), + _electric_field_neighbor(getNeighborADMaterialProperty( + getParam("neighbor_field_property_name"))), _mean_en_neighbor_var(*getVar("mean_en_neighbor", 0)), _mean_en_neighbor(_mean_en_neighbor_var.adSlnNeighbor()), @@ -57,7 +59,7 @@ InterfaceAdvection::computeQpResidual(Moose::DGResidualType type) switch (type) { case Moose::Element: - r = _mu_neighbor[_qp] * _sgn_neighbor[_qp] * -_grad_potential_neighbor[_qp] * + r = _mu_neighbor[_qp] * _sgn_neighbor[_qp] * _electric_field_neighbor[_qp] * _r_neighbor_units * std::exp(_neighbor_value[_qp]) * _normals[_qp] * _test[_i][_qp] * _r_units; break; diff --git a/src/kernels/CoeffDiffusionForShootMethod.C b/src/kernels/CoeffDiffusionForShootMethod.C index 5af0c4ff945..f6b7a09863b 100644 --- a/src/kernels/CoeffDiffusionForShootMethod.C +++ b/src/kernels/CoeffDiffusionForShootMethod.C @@ -35,6 +35,5 @@ CoeffDiffusionForShootMethod::CoeffDiffusionForShootMethod(const InputParameters ADReal CoeffDiffusionForShootMethod::computeQpResidual() { - return -_diffusivity[_qp] * (_grad_test[_i][_qp] * _r_units) * -_grad_test[_i][_qp] * _r_units * - _u[_qp]; + return _grad_test[_i][_qp] * _r_units * _diffusivity[_qp] * _grad_u[_qp] * _r_units; } diff --git a/src/kernels/DriftDiffusion.C b/src/kernels/DriftDiffusion.C index 4f502c5b3f4..b275b7092de 100644 --- a/src/kernels/DriftDiffusion.C +++ b/src/kernels/DriftDiffusion.C @@ -16,16 +16,14 @@ InputParameters DriftDiffusion::validParams() { InputParameters params = ADKernel::validParams(); - params.addCoupledVar( - "potential", "The gradient of the potential will be used to compute the advection velocity."); params.addRequiredParam("position_units", "Units of position."); - params.addParam("EField", - "Optionally can use a specified electric field for 1D " - "simulations in place of a potential variable"); params.addParam("mu", "The user-defined mobility."); params.addParam("diff", "The user-defined diffusivity."); params.addParam("sign", "The user-defined sign of the charged particle."); params.addParam("use_material_props", true, "Whether to use a material for properties."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Generic drift-diffusion equation that contains both " "an electric field driven advection term and a diffusion term " "(Densities must be in logarithmic form)"); @@ -46,15 +44,9 @@ DriftDiffusion::DriftDiffusion(const InputParameters & parameters) _diffusivity(getParam("use_material_props") ? getADMaterialProperty("diff" + _var.name()) : _user_diff), - - // Coupled variables - _grad_potential(isCoupled("potential") ? adCoupledGradient("potential") : _minus_e_field) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { - if (!(isCoupled("potential") || parameters.isParamSetByUser("EField"))) - mooseError("You must either couple in a potential variable or set an EField."); - - if (!(isCoupled("potential"))) - _minus_e_field.resize(_fe_problem.getMaxQps(), RealGradient(-getParam("EField"))); auto max_qps = _fe_problem.getMaxQps(); _user_diff.resize(max_qps); _user_mu.resize(max_qps); @@ -70,7 +62,7 @@ DriftDiffusion::DriftDiffusion(const InputParameters & parameters) ADReal DriftDiffusion::computeQpResidual() { - return _mu[_qp] * _sign[_qp] * std::exp(_u[_qp]) * -_grad_potential[_qp] * _r_units * + return _mu[_qp] * _sign[_qp] * std::exp(_u[_qp]) * _electric_field[_qp] * _r_units * -_grad_test[_i][_qp] * _r_units - _diffusivity[_qp] * std::exp(_u[_qp]) * _grad_u[_qp] * _r_units * -_grad_test[_i][_qp] * _r_units; diff --git a/src/kernels/EEDFReactionLogForShootMethod.C b/src/kernels/EEDFReactionLogForShootMethod.C index e53ac150668..f359c374597 100644 --- a/src/kernels/EEDFReactionLogForShootMethod.C +++ b/src/kernels/EEDFReactionLogForShootMethod.C @@ -18,7 +18,6 @@ EEDFReactionLogForShootMethod::validParams() InputParameters params = ADKernel::validParams(); params.addRequiredCoupledVar("electron", "The electron species variable."); params.addRequiredCoupledVar("density", "The accelerated density variable."); - params.addRequiredCoupledVar("energy", "The energy variable."); params.addRequiredParam("reaction", "The full reaction equation."); params.addRequiredParam("coefficient", "The stoichiometric coefficient."); params.addParam( @@ -38,7 +37,6 @@ EEDFReactionLogForShootMethod::EEDFReactionLogForShootMethod(const InputParamete : ADKernel(parameters), _electron(adCoupledValue("electron")), _density(adCoupledValue("density")), - _energy(adCoupledValue("energy")), _reaction_coeff(getADMaterialProperty("k" + getParam("number") + "_" + getParam("reaction"))), _stoichiometric_coeff(getParam("coefficient")) @@ -48,6 +46,6 @@ EEDFReactionLogForShootMethod::EEDFReactionLogForShootMethod(const InputParamete ADReal EEDFReactionLogForShootMethod::computeQpResidual() { - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * 1.0 * - std::exp(_electron[_qp]) * _u[_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * _u[_qp] * + std::exp(_electron[_qp]); } diff --git a/src/kernels/EFieldAdvection.C b/src/kernels/EFieldAdvection.C index aeecf475dc6..b953fb800aa 100644 --- a/src/kernels/EFieldAdvection.C +++ b/src/kernels/EFieldAdvection.C @@ -16,9 +16,10 @@ InputParameters EFieldAdvection::validParams() { InputParameters params = ADKernel::validParams(); - params.addRequiredCoupledVar( - "potential", "The gradient of the potential will be used to compute the advection velocity."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Generic electric field driven advection term. (Densities must be in logarithmic form.)"); return params; @@ -29,13 +30,14 @@ EFieldAdvection::EFieldAdvection(const InputParameters & parameters) _r_units(1. / getParam("position_units")), _mu(getADMaterialProperty("mu" + _var.name())), _sign(getMaterialProperty("sgn" + _var.name())), - _grad_potential(adCoupledGradient("potential")) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } ADReal EFieldAdvection::computeQpResidual() { - return _mu[_qp] * _sign[_qp] * std::exp(_u[_qp]) * -_grad_potential[_qp] * _r_units * + return _mu[_qp] * _sign[_qp] * std::exp(_u[_qp]) * _electric_field[_qp] * _r_units * -_grad_test[_i][_qp] * _r_units; } diff --git a/src/kernels/EFieldArtDiff.C b/src/kernels/EFieldArtDiff.C index 45fb3c51a70..9e5b9c6b6cd 100644 --- a/src/kernels/EFieldArtDiff.C +++ b/src/kernels/EFieldArtDiff.C @@ -16,10 +16,11 @@ InputParameters EFieldArtDiff::validParams() { InputParameters params = ADKernel::validParams(); - params.addRequiredCoupledVar("potential", - "The potential for calculating the advection velocity."); params.addParam("scale", 1., "Amount to scale artificial diffusion."); params.addRequiredParam("position_units", "Units of position"); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Generic artificial electric field driven advection term " "(Densities must be in logarithmic form)"); return params; @@ -28,20 +29,20 @@ EFieldArtDiff::validParams() EFieldArtDiff::EFieldArtDiff(const InputParameters & parameters) : ADKernel(parameters), - // Coupled variables - _grad_potential(adCoupledGradient("potential")), _scale(getParam("scale")), _r_units(1. / getParam("position_units")), // Material properties - _mu(getADMaterialProperty("mu" + _var.name())) + _mu(getADMaterialProperty("mu" + _var.name())), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } ADReal EFieldArtDiff::computeQpResidual() { - ADReal vd_mag = _mu[_qp] * _grad_potential[_qp].norm() * _r_units; + ADReal vd_mag = _mu[_qp] * (-_electric_field[_qp]).norm() * _r_units; ADReal delta = vd_mag * _current_elem->hmax() / (2.0 * _r_units); return -_grad_test[_i][_qp] * _r_units * (-delta * std::exp(_u[_qp]) * _grad_u[_qp] * _r_units) * diff --git a/src/kernels/EFieldMagnitudeSource.C b/src/kernels/EFieldMagnitudeSource.C index 0b852ab7ecc..43c6d20868d 100644 --- a/src/kernels/EFieldMagnitudeSource.C +++ b/src/kernels/EFieldMagnitudeSource.C @@ -16,19 +16,22 @@ InputParameters EFieldMagnitudeSource::validParams() { InputParameters params = ADKernel::validParams(); - params.addRequiredCoupledVar("potential", "The electric potential."); - params.addClassDescription( - "Electric field magnitude term based on the electrostatic approximation"); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); + params.addClassDescription("Electric field magnitude source term"); return params; } EFieldMagnitudeSource::EFieldMagnitudeSource(const InputParameters & parameters) - : ADKernel(parameters), _grad_potential(adCoupledGradient("potential")) + : ADKernel(parameters), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } ADReal EFieldMagnitudeSource::computeQpResidual() { - return -_test[_i][_qp] * _grad_potential[_qp] * _grad_potential[_qp]; + return -_test[_i][_qp] * _electric_field[_qp].norm(); } diff --git a/src/kernels/EffectiveEField.C b/src/kernels/EffectiveEField.C new file mode 100644 index 00000000000..b19434a8f01 --- /dev/null +++ b/src/kernels/EffectiveEField.C @@ -0,0 +1,44 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "EffectiveEField.h" + +registerADMooseObject("ZapdosApp", EffectiveEField); + +InputParameters +EffectiveEField::validParams() +{ + InputParameters params = ADKernel::validParams(); + params.addRequiredParam("position_units", "Units of position."); + params.addRequiredParam("nu", "The momentum-transfer frequency of the ion."); + params.addRequiredParam("component", "The Efield component that this is applied to."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); + params.addClassDescription("Supplies the source term of the time derivative calculation of the " + "effective electric field for ions."); + return params; +} + +EffectiveEField::EffectiveEField(const InputParameters & parameters) + : ADKernel(parameters), + _r_units(1. / getParam("position_units")), + _nu(getParam("nu")), + _component(getParam("component")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) +{ +} + +ADReal +EffectiveEField::computeQpResidual() +{ + return -_test[_i][_qp] * _nu * (_electric_field[_qp](_component) - _u[_qp]); +} diff --git a/src/kernels/EffectiveEFieldAdvection.C b/src/kernels/EffectiveEFieldAdvection.C new file mode 100644 index 00000000000..9dfc2a54758 --- /dev/null +++ b/src/kernels/EffectiveEFieldAdvection.C @@ -0,0 +1,47 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "EffectiveEFieldAdvection.h" + +registerADMooseObject("ZapdosApp", EffectiveEFieldAdvection); + +InputParameters +EffectiveEFieldAdvection::validParams() +{ + InputParameters params = ADKernel::validParams(); + params.addRequiredCoupledVar("u", "x-Effective Efield"); + params.addCoupledVar("v", 0, "y-Effective Efield"); // only required in 2D and 3D + params.addCoupledVar("w", 0, "z-Effective Efield"); // only required in 3D + params.addRequiredParam("position_units", "Units of position."); + params.addClassDescription( + "Effective electric field driven advection term. The effective electric field is supplied as " + "scalar components of the field. (Densities must be in logarithmic form.)"); + return params; +} + +EffectiveEFieldAdvection::EffectiveEFieldAdvection(const InputParameters & parameters) + : ADKernel(parameters), + _r_units(1. / getParam("position_units")), + _mu(getADMaterialProperty("mu" + _var.name())), + _sign(getMaterialProperty("sgn" + _var.name())), + _u_Efield(adCoupledValue("u")), + _v_Efield(adCoupledValue("v")), + _w_Efield(adCoupledValue("w")) +{ +} + +ADReal +EffectiveEFieldAdvection::computeQpResidual() +{ + ADRealVectorValue Efield(_u_Efield[_qp], _v_Efield[_qp], _w_Efield[_qp]); + + return _mu[_qp] * _sign[_qp] * std::exp(_u[_qp]) * Efield * _r_units * -_grad_test[_i][_qp] * + _r_units; +} diff --git a/src/kernels/ElectronEnergyLossFromElastic.C b/src/kernels/ElectronEnergyLossFromElastic.C index c4d3685ad17..d61a6b7844c 100644 --- a/src/kernels/ElectronEnergyLossFromElastic.C +++ b/src/kernels/ElectronEnergyLossFromElastic.C @@ -16,9 +16,11 @@ InputParameters ElectronEnergyLossFromElastic::validParams() { InputParameters params = ADKernel::validParams(); - params.addRequiredCoupledVar("potential", "The potential."); params.addRequiredCoupledVar("em", "The electron density."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Electron energy loss term for elastic collisions using Townsend coefficient " "(Densities must be in logarithmic form)"); @@ -36,8 +38,9 @@ ElectronEnergyLossFromElastic::ElectronEnergyLossFromElastic(const InputParamete _massem(getMaterialProperty("massem")), _massGas(getMaterialProperty("massGas")), _alpha_el(getADMaterialProperty("alpha_el")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("em")), _grad_em(adCoupledGradient("em")) { @@ -46,7 +49,7 @@ ElectronEnergyLossFromElastic::ElectronEnergyLossFromElastic(const InputParamete ADReal ElectronEnergyLossFromElastic::computeQpResidual() { - ADReal electron_flux_mag = (-_muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_em[_qp]) - + ADReal electron_flux_mag = (-_muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_em[_qp]) - _diffem[_qp] * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units) .norm(); ADReal Eel = -3.0 * _massem[_qp] / _massGas[_qp] * 2.0 / 3 * std::exp(_u[_qp] - _em[_qp]); diff --git a/src/kernels/ElectronEnergyLossFromExcitation.C b/src/kernels/ElectronEnergyLossFromExcitation.C index 97e2dd99981..01622f56467 100644 --- a/src/kernels/ElectronEnergyLossFromExcitation.C +++ b/src/kernels/ElectronEnergyLossFromExcitation.C @@ -16,9 +16,11 @@ InputParameters ElectronEnergyLossFromExcitation::validParams() { InputParameters params = ADKernel::validParams(); - params.addRequiredCoupledVar("potential", "The potential."); params.addRequiredCoupledVar("em", "The electron density."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Electron energy loss term for inelastic excitation collisions " "using Townsend coefficient, the energy lost in Volts in a single " "excitation collision (Densities must be in logarithmic form)"); @@ -35,8 +37,9 @@ ElectronEnergyLossFromExcitation::ElectronEnergyLossFromExcitation( _muem(getADMaterialProperty("muem")), _alpha_ex(getADMaterialProperty("alpha_ex")), _Eex(getMaterialProperty("Eex")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("em")), _grad_em(adCoupledGradient("em")) { @@ -45,7 +48,7 @@ ElectronEnergyLossFromExcitation::ElectronEnergyLossFromExcitation( ADReal ElectronEnergyLossFromExcitation::computeQpResidual() { - ADReal electron_flux_mag = (-_muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_em[_qp]) - + ADReal electron_flux_mag = (-_muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_em[_qp]) - _diffem[_qp] * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units) .norm(); ADReal ex_term = _alpha_ex[_qp] * electron_flux_mag; diff --git a/src/kernels/ElectronEnergyLossFromIonization.C b/src/kernels/ElectronEnergyLossFromIonization.C index 69cdf313b12..de14908cc86 100644 --- a/src/kernels/ElectronEnergyLossFromIonization.C +++ b/src/kernels/ElectronEnergyLossFromIonization.C @@ -16,9 +16,11 @@ InputParameters ElectronEnergyLossFromIonization::validParams() { InputParameters params = ADKernel::validParams(); - params.addRequiredCoupledVar("potential", "The potential."); params.addRequiredCoupledVar("em", "The electron density."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Electron energy loss term for inelastic ionization collisions " "using Townsend coefficients, the energy lost in Volts in a single " "ionization collision (Densities must be in logarithmic form)"); @@ -35,8 +37,9 @@ ElectronEnergyLossFromIonization::ElectronEnergyLossFromIonization( _muem(getADMaterialProperty("muem")), _alpha_iz(getADMaterialProperty("alpha_iz")), _Eiz(getMaterialProperty("Eiz")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("em")), _grad_em(adCoupledGradient("em")) { @@ -45,7 +48,7 @@ ElectronEnergyLossFromIonization::ElectronEnergyLossFromIonization( ADReal ElectronEnergyLossFromIonization::computeQpResidual() { - ADReal electron_flux_mag = (-_muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_em[_qp]) - + ADReal electron_flux_mag = (-_muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_em[_qp]) - _diffem[_qp] * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units) .norm(); ADReal iz_term = _alpha_iz[_qp] * electron_flux_mag; diff --git a/src/kernels/ElectronsFromIonization.C b/src/kernels/ElectronsFromIonization.C index 1491d6bc4ce..1d80d9cf9b4 100644 --- a/src/kernels/ElectronsFromIonization.C +++ b/src/kernels/ElectronsFromIonization.C @@ -17,16 +17,15 @@ ElectronsFromIonization::validParams() { InputParameters params = ADKernel::validParams(); params.addCoupledVar("mean_en", 3, "The electron mean energy."); - params.addCoupledVar("potential", "The potential."); params.addRequiredCoupledVar("em", "The electron density in logarithmic form."); params.addRequiredParam("position_units", "Units of position."); - params.addParam("EField", - "Optionally can use a specified electric field for 1D " - "simulations in place of a potential variable"); params.addParam("use_material_props", true, "Whether to use a material for properties."); params.addParam("muem", "The mobility."); params.addParam("diffem", "The diffusivity."); params.addParam("alpha_iz", "The Townsend ionization coefficient."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Rate of production of electrons from ionization using Townsend coefficients " "(Electron density must be in logarithmic form)"); @@ -43,16 +42,12 @@ ElectronsFromIonization::ElectronsFromIonization(const InputParameters & paramet _muem(getParam("use_material_props") ? getADMaterialProperty("muem") : _user_muem), _alpha_iz(getParam("use_material_props") ? getADMaterialProperty("alpha_iz") : _user_alpha_iz), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mean_en(adCoupledValue("mean_en")), - _grad_potential(isCoupled("potential") ? adCoupledGradient("potential") : _minus_e_field), _em(adCoupledValue("em")), _grad_em(adCoupledGradient("em")) { - if (!(isCoupled("potential") || parameters.isParamSetByUser("EField"))) - mooseError("You must either couple in a potential variable or set an EField."); - - if (!(isCoupled("potential"))) - _minus_e_field.resize(_fe_problem.getMaxQps(), RealGradient(-getParam("EField"))); if (!(getParam("use_material_props"))) { auto max_qps = _fe_problem.getMaxQps(); @@ -73,7 +68,7 @@ ElectronsFromIonization::ElectronsFromIonization(const InputParameters & paramet ADReal ElectronsFromIonization::computeQpResidual() { - ADReal electron_flux_mag = (-_muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_em[_qp]) - + ADReal electron_flux_mag = (-_muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_em[_qp]) - _diffem[_qp] * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units) .norm(); ADReal iz_term = _alpha_iz[_qp] * electron_flux_mag; diff --git a/src/kernels/ExcitationReaction.C b/src/kernels/ExcitationReaction.C index 5b81835ad0c..4d63f3f7422 100644 --- a/src/kernels/ExcitationReaction.C +++ b/src/kernels/ExcitationReaction.C @@ -17,10 +17,12 @@ ExcitationReaction::validParams() { InputParameters params = ADKernel::validParams(); params.addRequiredCoupledVar("mean_en", "The electron mean energy."); - params.addRequiredCoupledVar("potential", "The potential."); params.addRequiredCoupledVar("em", "The electron density."); params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("reactant", "Checks if the variable is the reactant."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Rate of production of metastables from excitation using Townsend coefficients " "(Densities must be in logarithmic form)"); @@ -35,8 +37,9 @@ ExcitationReaction::ExcitationReaction(const InputParameters & parameters) _diffem(getADMaterialProperty("diffem")), _muem(getADMaterialProperty("muem")), _alpha_source(getADMaterialProperty("alpha_ex")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mean_en(adCoupledValue("mean_en")), - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("em")), _grad_em(adCoupledGradient("em")), _reactant(getParam("reactant")) @@ -46,7 +49,7 @@ ExcitationReaction::ExcitationReaction(const InputParameters & parameters) ADReal ExcitationReaction::computeQpResidual() { - ADReal electron_flux_mag = (-_muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_em[_qp]) - + ADReal electron_flux_mag = (-_muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_em[_qp]) - _diffem[_qp] * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units) .norm(); diff --git a/src/kernels/IonsFromIonization.C b/src/kernels/IonsFromIonization.C index 700311fe987..8d027b77bfb 100644 --- a/src/kernels/IonsFromIonization.C +++ b/src/kernels/IonsFromIonization.C @@ -17,9 +17,11 @@ IonsFromIonization::validParams() { InputParameters params = ADKernel::validParams(); params.addRequiredCoupledVar("mean_en", "The electron mean energy."); - params.addRequiredCoupledVar("potential", "The potential."); params.addRequiredCoupledVar("em", "The electron density."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Rate of production of ions from ionization using Townsend coefficients " "(Ion density must be in logarithmic form)"); @@ -34,9 +36,10 @@ IonsFromIonization::IonsFromIonization(const InputParameters & parameters) _diffem(getADMaterialProperty("diffem")), _muem(getADMaterialProperty("muem")), _alpha_iz(getADMaterialProperty("alpha_iz")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mean_en(adCoupledValue("mean_en")), - _grad_potential(adCoupledGradient("potential")), _em(adCoupledValue("em")), _grad_em(adCoupledGradient("em")) { @@ -45,7 +48,7 @@ IonsFromIonization::IonsFromIonization(const InputParameters & parameters) ADReal IonsFromIonization::computeQpResidual() { - ADReal electron_flux_mag = (-_muem[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_em[_qp]) - + ADReal electron_flux_mag = (-_muem[_qp] * _electric_field[_qp] * _r_units * std::exp(_em[_qp]) - _diffem[_qp] * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units) .norm(); ADReal iz_term = _alpha_iz[_qp] * electron_flux_mag; diff --git a/src/kernels/JouleHeating.C b/src/kernels/JouleHeating.C index 479bbea6985..cddecd6132e 100644 --- a/src/kernels/JouleHeating.C +++ b/src/kernels/JouleHeating.C @@ -17,9 +17,11 @@ JouleHeating::validParams() { InputParameters params = ADKernel::validParams(); params.addRequiredCoupledVar("em", "The electron density."); - params.addRequiredCoupledVar("potential", "The electron density."); params.addRequiredParam("potential_units", "The potential units."); params.addRequiredParam("position_units", "Units of position."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Joule heating term for electrons (densities must be in logarithmic " "form), where the Jacobian is " "computed using forward automatic differentiation."); @@ -32,7 +34,8 @@ JouleHeating::JouleHeating(const InputParameters & parameters) _potential_units(getParam("potential_units")), _diff(getADMaterialProperty("diffem")), _mu(getADMaterialProperty("muem")), - _grad_potential(adCoupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _em(adCoupledValue("em")), _grad_em(adCoupledGradient("em")) { @@ -47,7 +50,7 @@ JouleHeating::JouleHeating(const InputParameters & parameters) ADReal JouleHeating::computeQpResidual() { - return _test[_i][_qp] * -_grad_potential[_qp] * _r_units * _voltage_scaling * - (-_mu[_qp] * -_grad_potential[_qp] * _r_units * std::exp(_em[_qp]) - + return _test[_i][_qp] * _electric_field[_qp] * _r_units * _voltage_scaling * + (-_mu[_qp] * _electric_field[_qp] * _r_units * std::exp(_em[_qp]) - _diff[_qp] * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units); } diff --git a/src/kernels/ReactionSecondOrderLogForShootMethod.C b/src/kernels/ReactionSecondOrderLogForShootMethod.C index 5bf1f3be020..156c0344831 100644 --- a/src/kernels/ReactionSecondOrderLogForShootMethod.C +++ b/src/kernels/ReactionSecondOrderLogForShootMethod.C @@ -51,14 +51,12 @@ ReactionSecondOrderLogForShootMethod::ReactionSecondOrderLogForShootMethod( ADReal ReactionSecondOrderLogForShootMethod::computeQpResidual() { + Real power; + + power = 1.; if (_v_id == _density_id) - { - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * 2.0 * - std::exp(_v[_qp]) * _u[_qp]; - } - else - { - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * 1.0 * - std::exp(_v[_qp]) * _u[_qp]; - } + power += 1.; + + return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * power * + std::exp(_v[_qp]) * _u[_qp]; } diff --git a/src/kernels/ShootMethodLog.C b/src/kernels/ShootMethodLog.C index 62825f91675..1b44e47963a 100644 --- a/src/kernels/ShootMethodLog.C +++ b/src/kernels/ShootMethodLog.C @@ -55,8 +55,7 @@ ShootMethodLog::ShootMethodLog(const InputParameters & parameters) _density_at_start_cycle(adCoupledValue("density_at_start_cycle")), _density_at_end_cycle(adCoupledValue("density_at_end_cycle")), _sensitivity(adCoupledValue("sensitivity_variable")), - _limit(getParam("growth_limit")), - _acceleration(0.0) + _limit(getParam("growth_limit")) { } @@ -64,27 +63,10 @@ ADReal ShootMethodLog::computeQpResidual() { - ADReal _acceleration_growth = std::pow((1. - _sensitivity[_qp]), -1.); - - if (_limit == 0.0) - { - _acceleration = _acceleration_growth * - (std::exp(_density_at_start_cycle[_qp]) - std::exp(_density_at_end_cycle[_qp])); - } - else - { - if (_acceleration_growth > _limit) - { - _acceleration = - _limit * (std::exp(_density_at_start_cycle[_qp]) - std::exp(_density_at_end_cycle[_qp])); - } - else - { - _acceleration = _acceleration_growth * (std::exp(_density_at_start_cycle[_qp]) - - std::exp(_density_at_end_cycle[_qp])); - } - } + ADReal Scaling = 1.0 / ((1. - _sensitivity[_qp]) + (1. / _limit)); return _test[_i][_qp] * - (std::exp(_u[_qp]) - std::exp(_density_at_start_cycle[_qp]) + _acceleration); + (std::exp(_u[_qp]) - std::exp(_density_at_start_cycle[_qp]) + + (std::exp(_density_at_start_cycle[_qp]) - std::exp(_density_at_end_cycle[_qp])) * + Scaling); } diff --git a/src/kernels/ThermalConductivityDiffusion.C b/src/kernels/ThermalConductivityDiffusion.C new file mode 100644 index 00000000000..d42cd72dc6a --- /dev/null +++ b/src/kernels/ThermalConductivityDiffusion.C @@ -0,0 +1,45 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "ThermalConductivityDiffusion.h" + +registerADMooseObject("ZapdosApp", ThermalConductivityDiffusion); + +InputParameters +ThermalConductivityDiffusion::validParams() +{ + InputParameters params = ADKernel::validParams(); + params.addRequiredCoupledVar("em", "The log of the electron density."); + params.addRequiredParam("position_units", "Units of position."); + params.addClassDescription("Electron energy diffusion term " + "that assumes a thermal conductivity of " + "$K = 3/2 D_e n_e$ "); + return params; +} + +ThermalConductivityDiffusion::ThermalConductivityDiffusion(const InputParameters & parameters) + : ADKernel(parameters), + _r_units(1. / getParam("position_units")), + _coeff(2.0 / 3.0), + + _diffem(getADMaterialProperty("diffem")), + + _em(adCoupledValue("em")), + _grad_em(adCoupledGradient("em")) +{ +} + +ADReal +ThermalConductivityDiffusion::computeQpResidual() +{ + return -_grad_test[_i][_qp] * _r_units * _coeff * _diffem[_qp] * + (std::exp(_u[_qp]) * _grad_u[_qp] * _r_units - + std::exp(_u[_qp] - _em[_qp]) * std::exp(_em[_qp]) * _grad_em[_qp] * _r_units); +} diff --git a/src/materials/ADMMSEEDFRates.C b/src/materials/ADMMSEEDFRates.C new file mode 100644 index 00000000000..84d13ba8e91 --- /dev/null +++ b/src/materials/ADMMSEEDFRates.C @@ -0,0 +1,84 @@ +#include "ADMMSEEDFRates.h" +#include "MooseUtils.h" +#include "Function.h" + +// MOOSE includes +#include "MooseVariable.h" + +registerADMooseObject("ZapdosApp", ADMMSEEDFRates); + +InputParameters +ADMMSEEDFRates::validParams() +{ + InputParameters params = ADMaterial::validParams(); + params.addParam>("prop_names", + "The names of the properties this material will have"); + params.addParam>("prop_values", + "The corresponding names of the " + "functions that are going to provide " + "the values for the variables"); + params.addParam>("d_prop_d_actual_mean_en", + "The corresponding names of the " + "functions that are going to provide " + "the derivative values wrt the" + "actual mean energy for the variables"); + params.addCoupledVar("mean_energy", "The electron mean energy in log form."); + params.addCoupledVar("electrons", "The electron density."); + params.addClassDescription("Add material properties used for MMS verifications involving " + "properties as a function of electron mean energy."); + return params; +} + +ADMMSEEDFRates::ADMMSEEDFRates(const InputParameters & parameters) + : ADMaterial(parameters), + _em(adCoupledValue("electrons")), + _mean_en(adCoupledValue("mean_energy")), + _prop_names(getParam>("prop_names")), + _prop_values(getParam>("prop_values")), + _d_prop_values_actual_mean_en(getParam>("d_prop_d_actual_mean_en")) +{ + unsigned int num_names = _prop_names.size(); + unsigned int num_values = _prop_values.size(); + unsigned int num_deriv = _d_prop_values_actual_mean_en.size(); + + if ((num_names != num_values) || (num_names != num_deriv) || (num_values != num_deriv)) + mooseError("Number of prop_names, prop_values and d_prop_d_actual_mean_en much match."); + + _num_props = num_names; + + _properties.resize(num_names); + _functions.resize(num_names); + _deriv_functions.resize(num_names); + + for (unsigned int i = 0; i < _num_props; i++) + { + _properties[i] = &declareADProperty(_prop_names[i]); + _functions[i] = &getFunctionByName(_prop_values[i]); + _deriv_functions[i] = &getFunctionByName(_d_prop_values_actual_mean_en[i]); + } +} + +void +ADMMSEEDFRates::initQpStatefulProperties() +{ + computeQpFunctions(); +} + +void +ADMMSEEDFRates::computeQpProperties() +{ + computeQpFunctions(); +} + +void +ADMMSEEDFRates::computeQpFunctions() +{ + for (unsigned int i = 0; i < _num_props; i++) + { + (*_properties[i])[_qp].value() = (*_functions[i]).value(_t, _q_point[_qp]); + + (*_properties[i])[_qp].derivatives() = (*_deriv_functions[i]).value(_t, _q_point[_qp]) * + std::exp(_mean_en[_qp].value() - _em[_qp].value()) * + (_mean_en[_qp].derivatives() - _em[_qp].derivatives()); + } +} diff --git a/src/materials/ADSurfaceCharge.C b/src/materials/ADSurfaceCharge.C index 7ac8d8f7411..13063f0a6ab 100644 --- a/src/materials/ADSurfaceCharge.C +++ b/src/materials/ADSurfaceCharge.C @@ -21,7 +21,6 @@ ADSurfaceCharge::validParams() "Hagelaar", "The name of the family of BCs being used in this model. " "Options: Hagelaar (DEFAULT), Sakiyama, Lymberopoulos."); - params.addRequiredCoupledVar("potential", "The potential that drives the advective flux."); params.addParam("r_ion", 0.0, "The ion reflection coefficient on this boundary."); params.addParam("r_electron", 0.0, "The electron reflection coefficient on this boundary."); params.addRequiredParam("position_units", "Units of position."); @@ -35,6 +34,9 @@ ADSurfaceCharge::validParams() "Note that this should be consistent with the selected boundary conditions; if a secondary " "electron BC is used on this boundary, this should be true. DEFAULT: true."); params.addRequiredParam("potential_units", "The potential units."); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription( "Adds a surface charge material property based on the rate of change of the total charged " "flux to a boundary. (NOTE: this material is meant to be boundary-restricted.)"); @@ -50,7 +52,8 @@ ADSurfaceCharge::ADSurfaceCharge(const InputParameters & parameters) _r_units(1. / getParam("position_units")), _potential_units(getParam("potential_units")), - _grad_potential(adCoupledGradient("potential")) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { // Define voltage scaling parameter if (_potential_units.compare("V") == 0) @@ -97,7 +100,7 @@ ADSurfaceCharge::computeQpProperties() for (unsigned int i = 0; i < _num_species; ++i) { _charge_flux += (*_sgn[i])[_qp] * std::exp((*_species[i])[_qp]) * - ((*_sgn[i])[_qp] * (*_mu[i])[_qp] * -_grad_potential[_qp] * _r_units - + ((*_sgn[i])[_qp] * (*_mu[i])[_qp] * _electric_field[_qp] * _r_units - (*_diff[i])[_qp] * (*_grad_species[i])[_qp] * _r_units) * _normals[_qp]; } diff --git a/src/materials/FieldSolverMaterial.C b/src/materials/FieldSolverMaterial.C new file mode 100644 index 00000000000..9559e0d0879 --- /dev/null +++ b/src/materials/FieldSolverMaterial.C @@ -0,0 +1,77 @@ +#include "FieldSolverMaterial.h" + +registerMooseObject("ZapdosApp", FieldSolverMaterial); + +InputParameters +FieldSolverMaterial::validParams() +{ + InputParameters params = ADMaterial::validParams(); + params.addClassDescription( + "FieldSolverMaterial provides an electric field property for Zapdos objects. This enables " + "an interface to an external electromagnetic field solver for all Zapdos objects. Default is " + "an electrostatic interface, where the `potential` coupled variable parameter must be " + "provided."); + MooseEnum solver("electrostatic electromagnetic", "electrostatic"); + params.addParam( + "solver", solver, "Electrostatic or electromagnetic field solver (default = electrostatic)."); + params.addCoupledVar("potential", "Electrostatic potential variable."); + params.addCoupledVar("electric_field", + "Electric field variable provided by electromagnetic solver."); + params.addParam("property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); + return params; +} + +FieldSolverMaterial::FieldSolverMaterial(const InputParameters & parameters) + : Material(parameters), + _grad_potential(isCoupled("potential") ? adCoupledGradient("potential") : _ad_grad_zero), + _electric_field(isCoupled("electric_field") ? adCoupledVectorValue("electric_field") + : _ad_grad_zero), + _field(declareADProperty(getParam("property_name"))), + _mode(getParam("solver")) +{ + enum ComparisonEnum + { + ELECTROSTATIC, + ELECTROMAGNETIC + }; + + if (_mode == ELECTROSTATIC && parameters.isParamSetByUser("electric_field") && + !parameters.isParamSetByUser("potential")) + { + mooseError("Solver mode is electrostatic, but electric field was provided. Please either " + "change the mode or provide a potential variable."); + } + else if (_mode == ELECTROMAGNETIC && parameters.isParamSetByUser("potential") && + !parameters.isParamSetByUser("electric_field")) + { + mooseError("Solver mode is electromagnetic, but potential was provided. Please either change " + "the mode or provide an electric field variable."); + } + else if (parameters.isParamSetByUser("electric_field") && + parameters.isParamSetByUser("potential")) + { + mooseError("Both electric field and potential variables have been provided. Please provide " + "only one, consistent with the solver mode parameter."); + } + else if (!parameters.isParamSetByUser("electric_field") && + !parameters.isParamSetByUser("potential")) + { + mooseError("Neither potential nor electric field variables are defined. Please provide a " + "variable for field determination."); + } +} + +void +FieldSolverMaterial::computeQpProperties() +{ + if (isParamValid("potential")) + { + _field[_qp] = -_grad_potential[_qp]; + } + else if (isParamValid("electric_field")) + { + _field[_qp] = _electric_field[_qp]; + } +} diff --git a/src/materials/Gas.C b/src/materials/Gas.C index 4748ae2e4aa..aea624fae4d 100644 --- a/src/materials/Gas.C +++ b/src/materials/Gas.C @@ -49,7 +49,6 @@ Gas::validParams() params.addParam("user_T_gas", 300, "The gas temperature in Kelvin."); params.addParam("user_p_gas", 1.01e5, "The gas pressure in Pascals."); - params.addCoupledVar("potential", "The potential for calculating the electron velocity"); params.addCoupledVar("em", "Species concentration needed to calculate the poisson source"); params.addCoupledVar("mean_en", "The electron mean energy in log form."); params.addCoupledVar("ip", "The ion density."); diff --git a/src/materials/GasBase.C b/src/materials/GasBase.C index e8b92d3e79a..7b14adbbf29 100644 --- a/src/materials/GasBase.C +++ b/src/materials/GasBase.C @@ -51,7 +51,6 @@ GasBase::validParams() params.addParam("user_T_gas", 300, "The gas temperature in Kelvin."); params.addParam("user_p_gas", 1.01e5, "The gas pressure in Pascals."); - params.addCoupledVar("potential", "The potential for calculating the electron velocity"); params.addCoupledVar("em", "Species concentration needed to calculate the poisson source"); params.addCoupledVar("mean_en", "The electron mean energy in log form."); params.addCoupledVar("ip", "The ion density."); @@ -145,8 +144,7 @@ GasBase::GasBase(const InputParameters & parameters) _TemVolts(declareADProperty("TemVolts")), _em(isCoupled("em") ? adCoupledValue("em") : _ad_zero), - _mean_en(isCoupled("mean_en") ? adCoupledValue("mean_en") : _ad_zero), - _grad_potential(adCoupledGradient("potential")) + _mean_en(isCoupled("mean_en") ? adCoupledValue("mean_en") : _ad_zero) { if (_potential_units.compare("V") == 0) _voltage_scaling = 1.; diff --git a/src/materials/GasElectronMoments.C b/src/materials/GasElectronMoments.C index d532b00216b..4ad413cafb9 100644 --- a/src/materials/GasElectronMoments.C +++ b/src/materials/GasElectronMoments.C @@ -50,7 +50,6 @@ GasElectronMoments::validParams() params.addParam("user_T_gas", 300, "The gas temperature in Kelvin."); params.addCoupledVar("user_p_gas", "The gas pressure in Pascals."); - params.addCoupledVar("potential", "The potential for calculating the electron velocity"); params.addCoupledVar("em", "Species concentration needed to calculate the poisson source"); params.addCoupledVar("mean_en", "The electron mean energy in log form."); params.addCoupledVar("ip", "The ion density."); diff --git a/src/materials/PlasmaDielectricConstant.C b/src/materials/PlasmaDielectricConstant.C new file mode 100644 index 00000000000..6de9c6e94d4 --- /dev/null +++ b/src/materials/PlasmaDielectricConstant.C @@ -0,0 +1,97 @@ +#include "PlasmaDielectricConstant.h" + +registerMooseObject("ZapdosApp", PlasmaDielectricConstant); + +InputParameters +PlasmaDielectricConstant::validParams() +{ + InputParameters params = ADMaterial::validParams(); + params.addRequiredParam("electron_neutral_collision_frequency", + "The electron-neutral collision frequency (in Hz)."); + params.addRequiredParam("driving_frequency", "Driving frequency of plasma (in Hz)."); + params.addRequiredCoupledVar("em", "Electron density coupled variable."); + params.addClassDescription("Provides the real and complex components, the spatial gradient and " + "the first time derivative of the plasma dielectric."); + return params; +} + +PlasmaDielectricConstant::PlasmaDielectricConstant(const InputParameters & parameters) + : ADMaterial(parameters), + _eps_r_real(declareADProperty("plasma_dielectric_constant_real")), + _eps_r_real_grad(declareADProperty("plasma_dielectric_constant_real_grad")), + _eps_r_real_dot(declareADProperty("plasma_dielectric_constant_real_dot")), + _eps_r_real_dot_dot(declareADProperty("plasma_dielectric_constant_real_dot_dot")), + _eps_r_imag(declareADProperty("plasma_dielectric_constant_imag")), + _eps_r_imag_grad(declareADProperty("plasma_dielectric_constant_imag_grad")), + _eps_r_imag_dot(declareADProperty("plasma_dielectric_constant_imag_dot")), + _eps_r_imag_dot_dot(declareADProperty("plasma_dielectric_constant_imag_dot_dot")), + _elementary_charge(1.6022e-19), + _electron_mass(9.1095e-31), + _eps_vacuum(8.8542e-12), + _pi(libMesh::pi), + _nu(getParam("electron_neutral_collision_frequency")), + _frequency(getParam("driving_frequency")), + _em(adCoupledValue("em")), + _em_grad(adCoupledGradient("em")), + _em_var(getVar("em", 0)), + _em_dot(_fe_problem.isTransient() ? _em_var->adUDot() : _ad_zero), + _em_dot_dot(_fe_problem.isTransient() ? _em_var->adUDotDot() : _ad_zero) +{ +} + +void +PlasmaDielectricConstant::computeQpProperties() +{ + /// Calculate the plasma frequency + Real omega_pe_const = std::sqrt(std::pow(_elementary_charge, 2) / (_eps_vacuum * _electron_mass)); + ADReal omega_pe = omega_pe_const * std::sqrt(std::exp(_em[_qp])); + + // Calculate the value of the plasma dielectric constant + _eps_r_real[_qp] = 1.0 - (std::pow(omega_pe, 2) / + (std::pow(2 * _pi * _frequency, 2) + std::pow(2 * _pi * _nu, 2))); + _eps_r_imag[_qp] = + (-1.0 * std::pow(omega_pe, 2) * 2 * _pi * _nu) / + (std::pow(2 * _pi * _frequency, 3) + 2 * _pi * _frequency * std::pow(2 * _pi * _nu, 2)); + + // Calculate the gradient of the plasma dielectric constant + ADReal grad_const = + -std::pow(omega_pe, 2) / (std::pow(2 * _pi * _frequency, 2) + std::pow(2 * _pi * _nu, 2)); + _eps_r_real_grad[_qp] = grad_const * _em_grad[_qp]; + _eps_r_imag_grad[_qp] = (grad_const * 2 * _pi * _nu / (2 * _pi * _frequency)) * _em_grad[_qp]; + + if (_fe_problem.isTransient()) + { + // Calculate the first time derivative of the linear electron density + ADReal lin_dot = _em_dot[_qp] * std::exp(_em[_qp]); + + // Calculate the first time derivative of the plasma dielectric constant + _eps_r_real_dot[_qp] = -1.0 * std::pow(omega_pe_const, 2) * lin_dot / + (std::pow(2 * _pi * _frequency, 2) + std::pow(2 * _pi * _nu, 2)); + + _eps_r_imag_dot[_qp] = + -1.0 * std::pow(omega_pe_const, 2) * 2 * _pi * _nu * lin_dot / + (std::pow(2 * _pi * _frequency, 3) + 2 * _pi * _frequency * std::pow(2 * _pi * _nu, 2)); + + /* + * TODO: The second derivative of the dielectric coefficient is currently showing + * a convergence slope of less than 2 using the manufactured solution in file + * /test/tests/mms/materials/2D_PlasmaDielectricConstant.i. + * + * The current theory is that one of the terms in 'lin_dot_dot' is + * significantly smaller than the other term that the error is affecting the + * convergence slope, but more study is needed. + */ + /* + // Calculate the second time derivative of the linear electron density + ADReal lin_dot_dot = + _em_dot_dot[_qp] * std::exp(_em[_qp]) + std::pow(_em_dot[_qp], 2) * std::exp(_em[_qp]); + + // Calculate the second time derivative of the plasma dielectric constant + _eps_r_real_dot_dot[_qp] = -1.0 * std::pow(omega_pe_const, 2) * lin_dot_dot / + (std::pow(2 * _pi * _frequency, 2) + std::pow(2 * _pi * _nu, 2)); + _eps_r_imag_dot_dot[_qp] = + -1.0 * std::pow(omega_pe_const, 2) * 2 * _pi * _nu * lin_dot_dot / + (std::pow(2 * _pi * _frequency, 3) + 2 * _pi * _frequency * std::pow(2 * _pi * _nu, 2)); + */ + } +} diff --git a/src/materials/Water.C b/src/materials/Water.C index 6e50337e141..d00f562a202 100644 --- a/src/materials/Water.C +++ b/src/materials/Water.C @@ -38,6 +38,9 @@ Water::validParams() params.addCoupledVar("O3", "ozone molecules"); params.addCoupledVar("O3m", "ozone anions"); params.addCoupledVar("potential", "The potential"); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Material properties of water species"); return params; } @@ -192,7 +195,9 @@ Water::Water(const InputParameters & parameters) _HO2(isCoupled("HO2") ? adCoupledValue("HO2") : _ad_zero), _O3(isCoupled("O3") ? adCoupledValue("O3") : _ad_zero), _O3m(isCoupled("O3m") ? adCoupledValue("O3m") : _ad_zero), - _grad_potential(isCoupled("potential") ? adCoupledGradient("potential") : _ad_grad_zero) + + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } @@ -330,7 +335,8 @@ Water::computeQpProperties() // Material version of aux variables - _EField[_qp] = -_grad_potential[_qp](0); + _EField[_qp] = _electric_field[_qp](0); // TODO: does this need to be 0 component now? consider + // fixing this up....1D will request the 0 by default _OHm_lin[_qp] = std::exp(_OHm[_qp]); _H3Op_lin[_qp] = std::exp(_H3Op[_qp]); } diff --git a/src/postprocessors/SideCurrent.C b/src/postprocessors/SideCurrent.C index 2aacd260ac4..512df30a6de 100644 --- a/src/postprocessors/SideCurrent.C +++ b/src/postprocessors/SideCurrent.C @@ -13,6 +13,8 @@ // MOOSE includes #include "MooseVariable.h" +using MetaPhysicL::raw_value; + registerMooseObject("ZapdosApp", SideCurrent); InputParameters @@ -24,12 +26,14 @@ SideCurrent::validParams() params.addRequiredParam( "mobility", "The name of the mobility material property that will be used in the flux computation."); - params.addRequiredCoupledVar("potential", "The potential that drives the advective flux."); params.addRequiredParam("r", "The reflection coefficient"); params.addRequiredParam("position_units", "Units of position."); params.addRequiredCoupledVar("mean_en", "Electron energy."); params.addRequiredCoupledVar("ions", "All of the ions that can interact with this boundary."); params.addRequiredCoupledVar("Arp", "Argon ion density. (temporary)"); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); return params; } @@ -45,7 +49,8 @@ SideCurrent::SideCurrent(const InputParameters & parameters) _e(getMaterialProperty("e")), _sgn(getMaterialProperty("sgnArp")), _a(0.5), - _grad_potential(coupledGradient("potential")), + _electric_field( + getADMaterialProperty(getParam("field_property_name"))), _mean_en(coupledValue("mean_en")), _Arp(coupledValue("Arp")), _muArp(getMaterialProperty("muArp")) @@ -77,7 +82,7 @@ SideCurrent::computeQpIntegral() // Output units for base case are: mol / (m^2 * s) // _v_thermal = std::sqrt(8 * _kb[_qp] * _T_heavy[_qp] / (M_PI * _mass[_qp])); - if (_normals[_qp] * _sgn[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * _sgn[_qp] * _electric_field[_qp] > 0.0) { _a = 1.0; _b = 0.0; @@ -94,25 +99,25 @@ SideCurrent::computeQpIntegral() _ion_flux = 0.0; for (unsigned int i = 0; i < _num_ions; ++i) - _ion_flux += 0.5 * - std::sqrt(8 * _kb[_qp] * (*_T_ions[i])[_qp] / (M_PI * (*_mass_ions[i])[_qp])) * - std::exp((*_ions[i])[_qp]) + - (2 * _a - 1) * (*_sgn_ions[i])[_qp] * (*_mu_ions[i])[_qp] * -_grad_potential[_qp] * - _r_units * std::exp((*_ions[i])[_qp]) * _normals[_qp]; + _ion_flux += + 0.5 * std::sqrt(8 * _kb[_qp] * (*_T_ions[i])[_qp] / (M_PI * (*_mass_ions[i])[_qp])) * + std::exp((*_ions[i])[_qp]) + + (2 * _a - 1) * (*_sgn_ions[i])[_qp] * (*_mu_ions[i])[_qp] * + raw_value(_electric_field[_qp]) * _r_units * std::exp((*_ions[i])[_qp]) * _normals[_qp]; return ((1. - _r) / (1. + _r) * _ion_flux + (1. - _r) / (1. + _r) * - (-(2 * _b - 1) * _mobility_coef[_qp] * -_grad_potential[_qp] * _r_units * + (-(2 * _b - 1) * _mobility_coef[_qp] * raw_value(_electric_field[_qp]) * _r_units * std::exp(_u[_qp]) * _normals[_qp] + 0.5 * _ve_thermal * std::exp(_u[_qp]))) * 6.022e23 * 1.602e-19 * _r_units; /* return ((1. - _r) / (1. + _r) * 0.5 * _v_thermal * std::exp(_Arp[_qp]) + (1. - _r) / (1. + _r) * - ((2 * _a - 1) * _sgn[_qp] * _muArp[_qp] * -_grad_potential[_qp] * _r_units * + ((2 * _a - 1) * _sgn[_qp] * _muArp[_qp] * raw_value(_electric_field[_qp]) * _r_units * std::exp(_Arp[_qp]) * _normals[_qp]) + (1. - _r) / (1. + _r) * - (-(2 * _b - 1) * _mobility_coef[_qp] * -_grad_potential[_qp] * _r_units * + (-(2 * _b - 1) * _mobility_coef[_qp] * raw_value(_electric_field[_qp]) * _r_units * std::exp(_u[_qp]) * _normals[_qp] + 0.5 * _ve_thermal * std::exp(_u[_qp]))) * 6.022e23 * 1.602e-19 * _r_units; diff --git a/src/postprocessors/SideTotFluxIntegral.C b/src/postprocessors/SideTotFluxIntegral.C index d48adb9179f..4b0a6c50f4c 100644 --- a/src/postprocessors/SideTotFluxIntegral.C +++ b/src/postprocessors/SideTotFluxIntegral.C @@ -13,6 +13,8 @@ // MOOSE includes #include "MooseVariable.h" +using MetaPhysicL::raw_value; + registerMooseObject("ZapdosApp", SideTotFluxIntegral); InputParameters @@ -24,11 +26,13 @@ SideTotFluxIntegral::validParams() params.addRequiredParam( "mobility", "The name of the mobility material property that will be used in the flux computation."); - params.addRequiredCoupledVar("potential", "The potential that drives the advective flux."); params.addRequiredParam("r", "The reflection coefficient"); params.addRequiredParam("position_units", "Units of position."); params.addParam( "user_velocity", -1., "Optional parameter if user wants to specify the thermal velocity"); + params.addParam("field_property_name", + "field_solver_interface_property", + "Name of the solver interface material property."); params.addClassDescription("Returns the flux of a defined species at a boundary"); return params; } @@ -51,7 +55,8 @@ SideTotFluxIntegral::SideTotFluxIntegral(const InputParameters & parameters) _sgn(getMaterialProperty("sgn" + _variable->name())), _a(0.5), - _grad_potential(coupledGradient("potential")) + _electric_field( + getADMaterialProperty(getParam("field_property_name"))) { } @@ -65,16 +70,17 @@ SideTotFluxIntegral::computeQpIntegral() else _v_thermal = std::sqrt(8 * _kb[_qp] * _T_heavy[_qp] / (M_PI * _mass[_qp])); - if (_normals[_qp] * _sgn[_qp] * -_grad_potential[_qp] > 0.0) + if (_normals[_qp] * _sgn[_qp] * _electric_field[_qp] > 0.0) _a = 1.0; else _a = 0.0; - // return -_mobility_coef[_qp] * _grad_potential[_qp] * _normals[_qp] * std::exp(_u[_qp]) + // return -_mobility_coef[_qp] * raw_value(-_electric_field[_qp]) * _normals[_qp] * + // std::exp(_u[_qp]) // -_diffusion_coef[_qp] * std::exp(_u[_qp]) * _grad_u[_qp] * _normals[_qp]; return (1. - _r) / (1. + _r) * 0.5 * _v_thermal * std::exp(_u[_qp]) + (1. - _r) / (1. + _r) * - ((2 * _a - 1) * _sgn[_qp] * _mobility_coef[_qp] * -_grad_potential[_qp] * _r_units * - std::exp(_u[_qp]) * _normals[_qp]); + ((2 * _a - 1) * _sgn[_qp] * _mobility_coef[_qp] * raw_value(_electric_field[_qp]) * + _r_units * std::exp(_u[_qp]) * _normals[_qp]); } diff --git a/test/tests/1d_dc/NonlocalPotentialBCWithSchottky.i b/test/tests/1d_dc/NonlocalPotentialBCWithSchottky.i index 3aeb30306c9..1a46753fb2f 100644 --- a/test/tests/1d_dc/NonlocalPotentialBCWithSchottky.i +++ b/test/tests/1d_dc/NonlocalPotentialBCWithSchottky.i @@ -126,7 +126,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -138,7 +137,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -152,7 +150,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -186,7 +183,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -199,7 +195,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -214,7 +209,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -227,7 +221,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -235,7 +228,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -243,7 +235,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -251,7 +242,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -360,7 +350,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -370,7 +359,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -380,7 +368,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -389,7 +376,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -398,7 +384,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -456,14 +441,12 @@ area = 5.02e-7 # Formerly 3.14e-6 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -472,7 +455,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -481,7 +463,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -542,7 +523,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -556,7 +536,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # mean_en = mean_en # r = 0 # position_units = ${dom0Scale} @@ -566,7 +545,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -583,7 +561,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -599,7 +576,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -609,7 +585,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -619,7 +594,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -675,7 +649,6 @@ area = 5.02e-7 # Formerly 3.14e-6 interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 @@ -686,4 +659,8 @@ area = 5.02e-7 # Formerly 3.14e-6 property_tables_file = td_argon_mean_en.txt block = 0 [] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [] diff --git a/test/tests/1d_dc/densities_mean_en.i b/test/tests/1d_dc/densities_mean_en.i index 13fd391b241..8e2eaa36a51 100644 --- a/test/tests/1d_dc/densities_mean_en.i +++ b/test/tests/1d_dc/densities_mean_en.i @@ -116,7 +116,6 @@ dom1Scale = 1e-7 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -129,7 +128,6 @@ dom1Scale = 1e-7 [em_ionization] type = ElectronsFromIonization variable = em - potential = potential mean_en = mean_en em = em block = 0 @@ -149,7 +147,6 @@ dom1Scale = 1e-7 [emliq_advection] type = EFieldAdvection variable = emliq - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -220,7 +217,6 @@ dom1Scale = 1e-7 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -233,7 +229,6 @@ dom1Scale = 1e-7 [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -253,7 +248,6 @@ dom1Scale = 1e-7 [OHm_advection] type = EFieldAdvection variable = OHm - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -289,7 +283,6 @@ dom1Scale = 1e-7 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -302,7 +295,6 @@ dom1Scale = 1e-7 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -310,7 +302,6 @@ dom1Scale = 1e-7 [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -318,7 +309,6 @@ dom1Scale = 1e-7 [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -326,7 +316,6 @@ dom1Scale = 1e-7 [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -497,7 +486,6 @@ dom1Scale = 1e-7 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -507,7 +495,6 @@ dom1Scale = 1e-7 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -517,7 +504,6 @@ dom1Scale = 1e-7 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -526,7 +512,6 @@ dom1Scale = 1e-7 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -535,7 +520,6 @@ dom1Scale = 1e-7 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -631,7 +615,6 @@ dom1Scale = 1e-7 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 @@ -639,14 +622,12 @@ dom1Scale = 1e-7 [Efield_l] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom1Scale} block = 1 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -655,7 +636,6 @@ dom1Scale = 1e-7 [] [Current_emliq] type = ADCurrent - potential = potential density_log = emliq variable = Current_emliq art_diff = false @@ -664,7 +644,6 @@ dom1Scale = 1e-7 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -674,7 +653,6 @@ dom1Scale = 1e-7 [Current_OHm] block = 1 type = ADCurrent - potential = potential density_log = OHm variable = Current_OHm art_diff = false @@ -683,13 +661,11 @@ dom1Scale = 1e-7 [tot_flux_OHm] block = 1 type = ADTotalFlux - potential = potential density_log = OHm variable = tot_flux_OHm [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -704,7 +680,6 @@ dom1Scale = 1e-7 [] [EFieldAdvAux_emliq] type = ADEFieldAdvAux - potential = potential density_log = emliq variable = EFieldAdvAux_emliq block = 1 @@ -723,7 +698,6 @@ dom1Scale = 1e-7 [em_advection] type = InterfaceAdvection mean_en_neighbor = mean_en - potential_neighbor = potential neighbor_var = em variable = emliq boundary = master1_interface @@ -765,7 +739,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'master0_interface' - potential = potential electron_energy = mean_en r = 0.99 position_units = ${dom0Scale} @@ -781,7 +754,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'master0_interface' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -789,7 +761,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'master0_interface' - potential = potential electrons = em r = 0.99 position_units = ${dom0Scale} @@ -798,7 +769,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -807,7 +777,6 @@ dom1Scale = 1e-7 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -825,7 +794,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -833,7 +801,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -842,14 +809,12 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = right - potential = potential position_units = ${dom1Scale} [] [OHm_physical] type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -945,7 +910,6 @@ dom1Scale = 1e-7 interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = .05 @@ -955,6 +919,10 @@ dom1Scale = 1e-7 [water_block] type = Water block = 1 + [] + [field_solver] + type = FieldSolverMaterial potential = potential + block = '0 1' [] [] diff --git a/test/tests/1d_dc/mean_en.i b/test/tests/1d_dc/mean_en.i index e857453aa69..7c059566316 100644 --- a/test/tests/1d_dc/mean_en.i +++ b/test/tests/1d_dc/mean_en.i @@ -118,7 +118,6 @@ dom1Scale = 1e-7 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -131,7 +130,6 @@ dom1Scale = 1e-7 [em_ionization] type = ElectronsFromIonization variable = em - potential = potential mean_en = mean_en em = em block = 0 @@ -151,7 +149,6 @@ dom1Scale = 1e-7 [emliq_advection] type = EFieldAdvection variable = emliq - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -222,7 +219,6 @@ dom1Scale = 1e-7 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -235,7 +231,6 @@ dom1Scale = 1e-7 [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -255,7 +250,6 @@ dom1Scale = 1e-7 [OHm_advection] type = EFieldAdvection variable = OHm - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -291,7 +285,6 @@ dom1Scale = 1e-7 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -304,7 +297,6 @@ dom1Scale = 1e-7 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -312,7 +304,6 @@ dom1Scale = 1e-7 [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -320,7 +311,6 @@ dom1Scale = 1e-7 [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -328,7 +318,6 @@ dom1Scale = 1e-7 [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -499,7 +488,6 @@ dom1Scale = 1e-7 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -509,7 +497,6 @@ dom1Scale = 1e-7 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -519,7 +506,6 @@ dom1Scale = 1e-7 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -528,7 +514,6 @@ dom1Scale = 1e-7 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -537,7 +522,6 @@ dom1Scale = 1e-7 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -633,7 +617,6 @@ dom1Scale = 1e-7 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 @@ -641,14 +624,12 @@ dom1Scale = 1e-7 [Efield_l] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom1Scale} block = 1 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -657,7 +638,6 @@ dom1Scale = 1e-7 [] [Current_emliq] type = ADCurrent - potential = potential density_log = emliq variable = Current_emliq art_diff = false @@ -666,7 +646,6 @@ dom1Scale = 1e-7 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -676,7 +655,6 @@ dom1Scale = 1e-7 [Current_OHm] block = 1 type = ADCurrent - potential = potential density_log = OHm variable = Current_OHm art_diff = false @@ -685,13 +663,11 @@ dom1Scale = 1e-7 [tot_flux_OHm] block = 1 type = ADTotalFlux - potential = potential density_log = OHm variable = tot_flux_OHm [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -706,7 +682,6 @@ dom1Scale = 1e-7 [] [EFieldAdvAux_emliq] type = ADEFieldAdvAux - potential = potential density_log = emliq variable = EFieldAdvAux_emliq block = 1 @@ -725,7 +700,6 @@ dom1Scale = 1e-7 [em_advection] type = InterfaceAdvection mean_en_neighbor = mean_en - potential_neighbor = potential neighbor_var = em variable = emliq boundary = master1_interface @@ -748,7 +722,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'master0_interface' - potential = potential electrons = em r = 0.99 position_units = ${dom0Scale} @@ -757,7 +730,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -766,7 +738,6 @@ dom1Scale = 1e-7 type = SecondaryElectronEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em ions = 'Arp' r = 0 @@ -799,7 +770,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'master0_interface' - potential = potential electron_energy = mean_en r = 0.99 position_units = ${dom0Scale} @@ -815,7 +785,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'master0_interface' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -824,7 +793,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -833,7 +801,6 @@ dom1Scale = 1e-7 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -851,7 +818,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -860,14 +826,12 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = right - potential = potential position_units = ${dom1Scale} [] [OHm_physical] type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -929,7 +893,6 @@ dom1Scale = 1e-7 interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.05 @@ -939,6 +902,10 @@ dom1Scale = 1e-7 [water_block] type = Water block = 1 + [] + [field_solver] + type = FieldSolverMaterial potential = potential + block = '0 1' [] [] diff --git a/test/tests/1d_dc/mean_en_multi.i b/test/tests/1d_dc/mean_en_multi.i index 76ec170e52a..ca8fdbb8dca 100644 --- a/test/tests/1d_dc/mean_en_multi.i +++ b/test/tests/1d_dc/mean_en_multi.i @@ -110,7 +110,6 @@ dom1Scale = 1e-7 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -123,7 +122,6 @@ dom1Scale = 1e-7 [em_ionization] type = ElectronsFromIonization variable = em - potential = potential mean_en = mean_en em = em block = 0 @@ -142,7 +140,6 @@ dom1Scale = 1e-7 [emliq_advection] type = EFieldAdvection variable = emliq - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -213,7 +210,6 @@ dom1Scale = 1e-7 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -221,7 +217,6 @@ dom1Scale = 1e-7 [ArEx_excitation] type = ExcitationReaction variable = ArEx - potential = potential em = em mean_en = mean_en block = 0 @@ -232,7 +227,6 @@ dom1Scale = 1e-7 [ArEx_deexcitation] type = ExcitationReaction variable = ArEx - potential = potential em = em mean_en = mean_en block = 0 @@ -249,7 +243,6 @@ dom1Scale = 1e-7 [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -308,7 +301,6 @@ dom1Scale = 1e-7 [OHm_advection] type = EFieldAdvection variable = OHm - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -344,7 +336,6 @@ dom1Scale = 1e-7 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -357,7 +348,6 @@ dom1Scale = 1e-7 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -365,7 +355,6 @@ dom1Scale = 1e-7 [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -374,7 +363,6 @@ dom1Scale = 1e-7 [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -382,7 +370,6 @@ dom1Scale = 1e-7 [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -571,7 +558,6 @@ dom1Scale = 1e-7 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -581,7 +567,6 @@ dom1Scale = 1e-7 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -591,7 +576,6 @@ dom1Scale = 1e-7 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -600,7 +584,6 @@ dom1Scale = 1e-7 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -609,7 +592,6 @@ dom1Scale = 1e-7 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -717,7 +699,6 @@ dom1Scale = 1e-7 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 @@ -725,14 +706,12 @@ dom1Scale = 1e-7 [Efield_l] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom1Scale} block = 1 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -741,7 +720,6 @@ dom1Scale = 1e-7 [] [Current_emliq] type = ADCurrent - potential = potential density_log = emliq variable = Current_emliq art_diff = false @@ -750,7 +728,6 @@ dom1Scale = 1e-7 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -760,7 +737,6 @@ dom1Scale = 1e-7 [Current_OHm] block = 1 type = ADCurrent - potential = potential density_log = OHm variable = Current_OHm art_diff = false @@ -769,13 +745,11 @@ dom1Scale = 1e-7 [tot_flux_OHm] block = 1 type = ADTotalFlux - potential = potential density_log = OHm variable = tot_flux_OHm [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -790,7 +764,6 @@ dom1Scale = 1e-7 [] [EFieldAdvAux_emliq] type = ADEFieldAdvAux - potential = potential density_log = emliq variable = EFieldAdvAux_emliq block = 1 @@ -809,7 +782,6 @@ dom1Scale = 1e-7 [em_advection] type = InterfaceAdvection mean_en_neighbor = mean_en - potential_neighbor = potential neighbor_var = em variable = emliq boundary = master1_interface @@ -851,7 +823,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'master0_interface' - potential = potential electron_energy = mean_en r = 0.99 position_units = ${dom0Scale} @@ -867,7 +838,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'master0_interface' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -875,7 +845,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'master0_interface' - potential = potential electrons = em r = 0.99 position_units = ${dom0Scale} @@ -884,7 +853,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -893,7 +861,6 @@ dom1Scale = 1e-7 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -911,7 +878,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -947,7 +913,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -956,7 +921,6 @@ dom1Scale = 1e-7 type = SecondaryElectronEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em ions = 'Arp' r = 0 @@ -968,14 +932,12 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = right - potential = potential position_units = ${dom1Scale} [] [OHm_physical] type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -1051,7 +1013,6 @@ dom1Scale = 1e-7 interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = .05 @@ -1083,6 +1044,10 @@ dom1Scale = 1e-7 [water_block] type = Water block = 1 + [] + [field_solver] + type = FieldSolverMaterial potential = potential + block = '0 1' [] [] diff --git a/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables.i b/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables.i index 7321033e3f5..be57cfce3f3 100644 --- a/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables.i +++ b/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables.i @@ -56,7 +56,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -105,7 +104,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -259,7 +257,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -272,7 +269,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -545,13 +541,11 @@ dom0Scale = 25.4e-3 [Efield_calc] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -560,7 +554,6 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential density_log = Ar+ variable = Current_Ar art_diff = false @@ -594,7 +587,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -606,7 +598,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -614,14 +605,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -708,6 +697,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = false @@ -715,7 +708,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At100mTorr.i b/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At100mTorr.i index f1af4823e20..865375a7fdb 100644 --- a/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At100mTorr.i +++ b/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At100mTorr.i @@ -43,7 +43,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -92,7 +91,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential_ion position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -246,7 +244,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -259,7 +256,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -581,21 +577,18 @@ dom0Scale = 25.4e-3 [Efieldx_calc] type = Efield component = 0 - potential = potential variable = Efieldx position_units = ${dom0Scale} [] [Efieldy_calc] type = Efield component = 1 - potential = potential variable = Efieldy position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -604,7 +597,6 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential_ion density_log = Ar+ variable = Current_Ar art_diff = false @@ -659,7 +651,6 @@ dom0Scale = 25.4e-3 [em_Ar+_second_emissions] type = SakiyamaSecondaryElectronBC variable = em - potential = potential_ion ions = Ar+ emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -670,7 +661,6 @@ dom0Scale = 25.4e-3 [Ar+_physical_advection] type = SakiyamaIonAdvectionBC variable = Ar+ - potential = potential_ion boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' position_units = ${dom0Scale} [] @@ -697,7 +687,6 @@ dom0Scale = 25.4e-3 variable = mean_en electrons = em ions = Ar+ - potential = potential_ion Tse_equal_Te = true emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -763,6 +752,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = true @@ -770,7 +763,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_se_coeff = 0.00 property_tables_file = Argon_reactions_paper_RateCoefficients/electron_moments.txt diff --git a/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At1Torr.i b/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At1Torr.i index 30d2ea1fc7a..53fff4ae98c 100644 --- a/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At1Torr.i +++ b/test/tests/Conference_Syntax_Tests/Lymberopoulos_with_argon_metastables_2D_At1Torr.i @@ -44,7 +44,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -93,7 +92,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential_ion position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -247,7 +245,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -260,7 +257,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -582,21 +578,18 @@ dom0Scale = 25.4e-3 [Efieldx_calc] type = Efield component = 0 - potential = potential variable = Efieldx position_units = ${dom0Scale} [] [Efieldy_calc] type = Efield component = 1 - potential = potential variable = Efieldy position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -605,7 +598,6 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential_ion density_log = Ar+ variable = Current_Ar art_diff = false @@ -660,7 +652,6 @@ dom0Scale = 25.4e-3 [em_Ar+_second_emissions] type = SakiyamaSecondaryElectronBC variable = em - potential = potential_ion ions = Ar+ emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -671,7 +662,6 @@ dom0Scale = 25.4e-3 [Ar+_physical_advection] type = SakiyamaIonAdvectionBC variable = Ar+ - potential = potential_ion boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' position_units = ${dom0Scale} [] @@ -698,7 +688,6 @@ dom0Scale = 25.4e-3 variable = mean_en electrons = em ions = Ar+ - potential = potential_ion Tse_equal_Te = true emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -764,6 +753,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = true @@ -771,7 +764,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_se_coeff = 0.00 property_tables_file = Argon_reactions_paper_RateCoefficients/electron_moments.txt diff --git a/test/tests/DriftDiffusionAction/2D_RF_Plasma_actions.i b/test/tests/DriftDiffusionAction/2D_RF_Plasma_actions.i index 6eb2fdbb38b..eb99ad04357 100644 --- a/test/tests/DriftDiffusionAction/2D_RF_Plasma_actions.i +++ b/test/tests/DriftDiffusionAction/2D_RF_Plasma_actions.i @@ -28,9 +28,10 @@ dom0Scale = 25.4e-3 secondary_charged_particles = Ar+ Neutrals = Ar* mean_energy = mean_en - potential = potential - eff_potentials = potential_ion - Is_potential_unique = true + field = potential + eff_fields = potential_ion + eff_fields_property_names = potential_ion_property + Is_field_unique = true using_offset = false position_units = ${dom0Scale} Additional_Outputs = 'ElectronTemperature Current EField' @@ -423,7 +424,7 @@ dom0Scale = 25.4e-3 [em_Ar+_second_emissions] type = SakiyamaSecondaryElectronBC variable = em - potential = potential_ion + field_property_name = potential_ion_property ions = Ar+ emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -434,7 +435,7 @@ dom0Scale = 25.4e-3 [Ar+_physical_advection] type = SakiyamaIonAdvectionBC variable = Ar+ - potential = potential_ion + field_property_name = potential_ion_property boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' position_units = ${dom0Scale} [] @@ -461,7 +462,7 @@ dom0Scale = 25.4e-3 variable = mean_en electrons = em ions = Ar+ - potential = potential_ion + field_property_name = potential_ion_property Tse_equal_Te = true emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -534,7 +535,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_se_coeff = 0.00 property_tables_file = Argon_reactions_paper_RateCoefficients/electron_moments.txt diff --git a/test/tests/DriftDiffusionAction/2D_RF_Plasma_no_actions.i b/test/tests/DriftDiffusionAction/2D_RF_Plasma_no_actions.i index 04c65f61cb9..9028fcab482 100644 --- a/test/tests/DriftDiffusionAction/2D_RF_Plasma_no_actions.i +++ b/test/tests/DriftDiffusionAction/2D_RF_Plasma_no_actions.i @@ -48,7 +48,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -97,7 +96,7 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential_ion + field_property_name = field_solver_interface_property_eff position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -251,7 +250,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -264,7 +262,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -553,21 +550,18 @@ dom0Scale = 25.4e-3 [Efieldx_calc] type = Efield component = 0 - potential = potential variable = Efieldx position_units = ${dom0Scale} [] [Efieldy_calc] type = Efield component = 1 - potential = potential variable = Efieldy position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -576,7 +570,7 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential_ion + field_property_name = field_solver_interface_property_eff density_log = Ar+ variable = Current_Ar+ art_diff = false @@ -593,18 +587,21 @@ dom0Scale = 25.4e-3 variable = potential boundary = 'Top_Electrode' function = potential_top_bc_func + preset = false [] [potential_bottom_plate] type = FunctionDirichletBC variable = potential boundary = 'Bottom_Electrode' function = potential_bottom_bc_func + preset = false [] [potential_dirichlet_bottom_plate] type = DirichletBC variable = potential boundary = 'Walls' value = 0 + preset = false [] [potential_Dielectric] type = EconomouDielectricBC @@ -631,7 +628,7 @@ dom0Scale = 25.4e-3 [em_Ar+_second_emissions] type = SakiyamaSecondaryElectronBC variable = em - potential = potential_ion + field_property_name = field_solver_interface_property_eff ions = Ar+ emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -642,7 +639,7 @@ dom0Scale = 25.4e-3 [Ar+_physical_advection] type = SakiyamaIonAdvectionBC variable = Ar+ - potential = potential_ion + field_property_name = field_solver_interface_property_eff boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' position_units = ${dom0Scale} [] @@ -669,7 +666,7 @@ dom0Scale = 25.4e-3 variable = mean_en electrons = em ions = Ar+ - potential = potential_ion + field_property_name = field_solver_interface_property_eff Tse_equal_Te = true emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -735,6 +732,15 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [field_solver_eff] + type = FieldSolverMaterial + potential = potential_ion + property_name = field_solver_interface_property_eff + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = true @@ -742,7 +748,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_se_coeff = 0.00 property_tables_file = Argon_reactions_paper_RateCoefficients/electron_moments.txt diff --git a/test/tests/DriftDiffusionAction/RF_Plasma_actions.i b/test/tests/DriftDiffusionAction/RF_Plasma_actions.i index b477e623235..071af97641e 100644 --- a/test/tests/DriftDiffusionAction/RF_Plasma_actions.i +++ b/test/tests/DriftDiffusionAction/RF_Plasma_actions.i @@ -36,8 +36,8 @@ dom0Scale = 25.4e-3 charged_particle = Ar+ Neutrals = Ar* mean_energy = mean_en - potential = potential - Is_potential_unique = true + field = potential + Is_field_unique = true using_offset = false position_units = ${dom0Scale} Additional_Outputs = 'ElectronTemperature Current EField' @@ -364,7 +364,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -376,7 +375,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -384,14 +382,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -485,7 +481,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/test/tests/DriftDiffusionAction/RF_Plasma_no_actions.i b/test/tests/DriftDiffusionAction/RF_Plasma_no_actions.i index a5f77d6763a..b8d4045515a 100644 --- a/test/tests/DriftDiffusionAction/RF_Plasma_no_actions.i +++ b/test/tests/DriftDiffusionAction/RF_Plasma_no_actions.i @@ -61,7 +61,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -110,7 +109,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -264,7 +262,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -277,7 +274,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -506,13 +502,11 @@ dom0Scale = 25.4e-3 [Efield_calc] type = Efield component = 0 - potential = potential variable = EFieldx position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -520,7 +514,6 @@ dom0Scale = 25.4e-3 [] [Current_Ar+] type = ADCurrent - potential = potential density_log = Ar+ variable = Current_Ar+ art_diff = false @@ -535,12 +528,14 @@ dom0Scale = 25.4e-3 variable = potential boundary = 'left' function = potential_bc_func + preset = false [] [potential_dirichlet_right] type = DirichletBC variable = potential boundary = 'right' value = 0 + preset = false [] #New Boundary conditions for electons, same as in paper @@ -553,7 +548,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -565,7 +559,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -573,14 +566,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -667,6 +658,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = false @@ -674,7 +669,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/test/tests/DriftDiffusionAction/mean_en_actions.i b/test/tests/DriftDiffusionAction/mean_en_actions.i index b419e687890..4da2ab723e3 100644 --- a/test/tests/DriftDiffusionAction/mean_en_actions.i +++ b/test/tests/DriftDiffusionAction/mean_en_actions.i @@ -121,8 +121,8 @@ dom1Scale = 1e-7 [Plasma] electrons = em charged_particle = Arp - potential = potential - Is_potential_unique = false + field = potential + Is_field_unique = false mean_energy = mean_en using_offset = true position_units = ${dom0Scale} @@ -132,8 +132,8 @@ dom1Scale = 1e-7 [Water] electrons = emliq charged_particle = OHm - potential = potential - Is_potential_unique = false + field = potential + Is_field_unique = false using_offset = true position_units = ${dom1Scale} block = 1 @@ -146,7 +146,6 @@ dom1Scale = 1e-7 [em_ionization] type = ElectronsFromIonization variable = em - potential = potential mean_en = mean_en em = em block = 0 @@ -167,7 +166,6 @@ dom1Scale = 1e-7 [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -190,7 +188,6 @@ dom1Scale = 1e-7 [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -198,7 +195,6 @@ dom1Scale = 1e-7 [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -206,7 +202,6 @@ dom1Scale = 1e-7 [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -292,7 +287,6 @@ dom1Scale = 1e-7 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -302,7 +296,6 @@ dom1Scale = 1e-7 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -312,7 +305,6 @@ dom1Scale = 1e-7 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -321,7 +313,6 @@ dom1Scale = 1e-7 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -330,7 +321,6 @@ dom1Scale = 1e-7 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -383,13 +373,11 @@ dom1Scale = 1e-7 [tot_flux_OHm] block = 1 type = ADTotalFlux - potential = potential density_log = OHm variable = tot_flux_OHm [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -404,7 +392,6 @@ dom1Scale = 1e-7 [] [EFieldAdvAux_emliq] type = ADEFieldAdvAux - potential = potential density_log = emliq variable = EFieldAdvAux_emliq block = 1 @@ -423,7 +410,6 @@ dom1Scale = 1e-7 [em_advection] type = InterfaceAdvection mean_en_neighbor = mean_en - potential_neighbor = potential neighbor_var = em variable = emliq boundary = master1_interface @@ -446,7 +432,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'master0_interface' - potential = potential electrons = em r = 0.99 position_units = ${dom0Scale} @@ -455,7 +440,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -464,7 +448,6 @@ dom1Scale = 1e-7 type = SecondaryElectronEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em ions = 'Arp' r = 0 @@ -496,7 +479,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'master0_interface' - potential = potential electron_energy = mean_en r = 0.99 position_units = ${dom0Scale} @@ -512,7 +494,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'master0_interface' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -521,7 +502,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -530,7 +510,6 @@ dom1Scale = 1e-7 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -548,7 +527,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -557,14 +535,12 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = right - potential = potential position_units = ${dom1Scale} [] [OHm_physical] type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -626,7 +602,6 @@ dom1Scale = 1e-7 interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.05 @@ -636,6 +611,5 @@ dom1Scale = 1e-7 [water_block] type = Water block = 1 - potential = potential [] [] diff --git a/test/tests/DriftDiffusionAction/mean_en_no_actions.i b/test/tests/DriftDiffusionAction/mean_en_no_actions.i index 4c81fc0a821..47d34420e27 100644 --- a/test/tests/DriftDiffusionAction/mean_en_no_actions.i +++ b/test/tests/DriftDiffusionAction/mean_en_no_actions.i @@ -121,7 +121,6 @@ dom1Scale = 1e-7 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -134,7 +133,6 @@ dom1Scale = 1e-7 [em_ionization] type = ElectronsFromIonization variable = em - potential = potential mean_en = mean_en em = em block = 0 @@ -148,7 +146,6 @@ dom1Scale = 1e-7 # [em_advection_stabilization] # type = EFieldArtDiff # variable = em - # potential = potential # block = 0 # [] @@ -160,7 +157,6 @@ dom1Scale = 1e-7 [emliq_advection] type = EFieldAdvection variable = emliq - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -188,7 +184,6 @@ dom1Scale = 1e-7 # [emliq_advection_stabilization] # type = EFieldArtDiff # variable = emliq - # potential = potential # block = 1 # [] @@ -237,7 +232,6 @@ dom1Scale = 1e-7 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -250,7 +244,6 @@ dom1Scale = 1e-7 [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -264,7 +257,6 @@ dom1Scale = 1e-7 # [Arp_advection_stabilization] # type = EFieldArtDiff # variable = Arp - # potential = potential # block = 0 # [] @@ -276,7 +268,6 @@ dom1Scale = 1e-7 [OHm_advection] type = EFieldAdvection variable = OHm - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -294,7 +285,6 @@ dom1Scale = 1e-7 # [OHm_advection_stabilization] # type = EFieldArtDiff # variable = OHm - # potential = potential # block = 1 # [] [OHm_product_first_order_rxn] @@ -318,7 +308,6 @@ dom1Scale = 1e-7 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -331,7 +320,6 @@ dom1Scale = 1e-7 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -339,7 +327,6 @@ dom1Scale = 1e-7 [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -347,7 +334,6 @@ dom1Scale = 1e-7 [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -355,7 +341,6 @@ dom1Scale = 1e-7 [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -369,7 +354,6 @@ dom1Scale = 1e-7 # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] [] @@ -572,7 +556,6 @@ dom1Scale = 1e-7 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -582,7 +565,6 @@ dom1Scale = 1e-7 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -592,7 +574,6 @@ dom1Scale = 1e-7 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -601,7 +582,6 @@ dom1Scale = 1e-7 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -610,7 +590,6 @@ dom1Scale = 1e-7 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -706,7 +685,6 @@ dom1Scale = 1e-7 [Efield_g] type = Efield component = 0 - potential = potential variable = EFieldx0 position_units = ${dom0Scale} block = 0 @@ -714,14 +692,12 @@ dom1Scale = 1e-7 [Efield_l] type = Efield component = 0 - potential = potential variable = EFieldx1 position_units = ${dom1Scale} block = 1 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -730,7 +706,6 @@ dom1Scale = 1e-7 [] [Current_emliq] type = ADCurrent - potential = potential density_log = emliq variable = Current_emliq art_diff = false @@ -739,7 +714,6 @@ dom1Scale = 1e-7 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -749,7 +723,6 @@ dom1Scale = 1e-7 [Current_OHm] block = 1 type = ADCurrent - potential = potential density_log = OHm variable = Current_OHm art_diff = false @@ -758,13 +731,11 @@ dom1Scale = 1e-7 [tot_flux_OHm] block = 1 type = ADTotalFlux - potential = potential density_log = OHm variable = tot_flux_OHm [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -779,7 +750,6 @@ dom1Scale = 1e-7 [] [EFieldAdvAux_emliq] type = ADEFieldAdvAux - potential = potential density_log = emliq variable = EFieldAdvAux_emliq block = 1 @@ -798,7 +768,6 @@ dom1Scale = 1e-7 [em_advection] type = InterfaceAdvection mean_en_neighbor = mean_en - potential_neighbor = potential neighbor_var = em variable = emliq boundary = master1_interface @@ -821,7 +790,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'master0_interface' - potential = potential electrons = em r = 0.99 position_units = ${dom0Scale} @@ -830,7 +798,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -839,7 +806,6 @@ dom1Scale = 1e-7 type = SecondaryElectronEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em ions = 'Arp' r = 0 @@ -871,7 +837,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'master0_interface' - potential = potential electron_energy = mean_en r = 0.99 position_units = ${dom0Scale} @@ -887,7 +852,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'master0_interface' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -896,7 +860,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -905,7 +868,6 @@ dom1Scale = 1e-7 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -923,7 +885,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -932,14 +893,12 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = right - potential = potential position_units = ${dom1Scale} [] [OHm_physical] type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -1001,16 +960,24 @@ dom1Scale = 1e-7 interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.05 block = 0 property_tables_file = td_argon_mean_en.txt [] + [gas_field_solver] + type = FieldSolverMaterial + potential = potential + block = 0 + [] [water_block] type = Water block = 1 + [] + [water_field_solver] + type = FieldSolverMaterial potential = potential + block = 1 [] [] diff --git a/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables.i b/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables.i index 38d99795bea..08a1def2a9c 100644 --- a/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables.i +++ b/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables.i @@ -56,7 +56,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -105,7 +104,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -259,7 +257,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -272,7 +269,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -545,13 +541,11 @@ dom0Scale = 25.4e-3 [Efield_calc] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -560,7 +554,6 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential density_log = Ar+ variable = Current_Ar art_diff = false @@ -596,7 +589,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -608,7 +600,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -616,14 +607,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -710,6 +699,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = false @@ -717,7 +710,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables_2D_At100mTorr_CoarseMesh.i b/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables_2D_At100mTorr_CoarseMesh.i index 6d6c344e7c3..7d236c20a46 100644 --- a/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables_2D_At100mTorr_CoarseMesh.i +++ b/test/tests/Lymberopoulos_rf_discharge/Lymberopoulos_with_argon_metastables_2D_At100mTorr_CoarseMesh.i @@ -43,7 +43,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -92,7 +91,7 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential_ion + field_property_name = field_ion position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -246,7 +245,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -259,7 +257,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -581,21 +578,18 @@ dom0Scale = 25.4e-3 [Efieldx_calc] type = Efield component = 0 - potential = potential variable = Efieldx position_units = ${dom0Scale} [] [Efieldy_calc] type = Efield component = 1 - potential = potential variable = Efieldy position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -604,7 +598,7 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential_ion + field_property_name = field_ion density_log = Ar+ variable = Current_Ar art_diff = false @@ -662,7 +656,7 @@ dom0Scale = 25.4e-3 [em_Ar+_second_emissions] type = SakiyamaSecondaryElectronBC variable = em - potential = potential_ion + field_property_name = field_ion ions = Ar+ emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -673,7 +667,7 @@ dom0Scale = 25.4e-3 [Ar+_physical_advection] type = SakiyamaIonAdvectionBC variable = Ar+ - potential = potential_ion + field_property_name = field_ion boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' position_units = ${dom0Scale} [] @@ -700,7 +694,7 @@ dom0Scale = 25.4e-3 variable = mean_en electrons = em ions = Ar+ - potential = potential_ion + field_property_name = field_ion Tse_equal_Te = true emission_coeffs = 0.01 boundary = 'Top_Electrode Bottom_Electrode Top_Insulator Bottom_Insulator Walls' @@ -766,6 +760,15 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [field_solver_ion] + type = FieldSolverMaterial + potential = potential_ion + property_name = field_ion + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = true @@ -773,7 +776,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_se_coeff = 0.00 property_tables_file = Argon_reactions_paper_RateCoefficients/electron_moments.txt diff --git a/test/tests/Schottky_emission/Example1/Input.i b/test/tests/Schottky_emission/Example1/Input.i index dc598730edc..d65f0c5fe71 100644 --- a/test/tests/Schottky_emission/Example1/Input.i +++ b/test/tests/Schottky_emission/Example1/Input.i @@ -115,7 +115,6 @@ vhigh = -200E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -127,7 +126,6 @@ vhigh = -200E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -141,7 +139,6 @@ vhigh = -200E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -175,7 +172,6 @@ vhigh = -200E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -188,7 +184,6 @@ vhigh = -200E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -203,7 +198,6 @@ vhigh = -200E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -216,7 +210,6 @@ vhigh = -200E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -224,7 +217,6 @@ vhigh = -200E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -232,7 +224,6 @@ vhigh = -200E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -240,7 +231,6 @@ vhigh = -200E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -349,7 +339,6 @@ vhigh = -200E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -359,7 +348,6 @@ vhigh = -200E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -369,7 +357,6 @@ vhigh = -200E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -378,7 +365,6 @@ vhigh = -200E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -387,7 +373,6 @@ vhigh = -200E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -445,14 +430,12 @@ vhigh = -200E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -461,7 +444,6 @@ vhigh = -200E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -470,7 +452,6 @@ vhigh = -200E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -514,7 +495,6 @@ vhigh = -200E-3 #kV # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -528,7 +508,6 @@ vhigh = -200E-3 #kV # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -538,7 +517,6 @@ vhigh = -200E-3 #kV type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -555,7 +533,6 @@ vhigh = -200E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -571,7 +548,6 @@ vhigh = -200E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -581,7 +557,6 @@ vhigh = -200E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -591,7 +566,6 @@ vhigh = -200E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -641,13 +615,16 @@ vhigh = -200E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/Schottky_emission/Example2/Input.i b/test/tests/Schottky_emission/Example2/Input.i index cd7332852f4..6da942c53f9 100644 --- a/test/tests/Schottky_emission/Example2/Input.i +++ b/test/tests/Schottky_emission/Example2/Input.i @@ -115,7 +115,6 @@ vhigh = -80E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -127,7 +126,6 @@ vhigh = -80E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -141,7 +139,6 @@ vhigh = -80E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -175,7 +172,6 @@ vhigh = -80E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -188,7 +184,6 @@ vhigh = -80E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -203,7 +198,6 @@ vhigh = -80E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -216,7 +210,6 @@ vhigh = -80E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -224,7 +217,6 @@ vhigh = -80E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -232,7 +224,6 @@ vhigh = -80E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -240,7 +231,6 @@ vhigh = -80E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -349,7 +339,6 @@ vhigh = -80E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -359,7 +348,6 @@ vhigh = -80E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -369,7 +357,6 @@ vhigh = -80E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -378,7 +365,6 @@ vhigh = -80E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -387,7 +373,6 @@ vhigh = -80E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -445,14 +430,12 @@ vhigh = -80E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -461,7 +444,6 @@ vhigh = -80E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -470,7 +452,6 @@ vhigh = -80E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -514,7 +495,6 @@ vhigh = -80E-3 #kV # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -528,7 +508,6 @@ vhigh = -80E-3 #kV # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -538,7 +517,6 @@ vhigh = -80E-3 #kV type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -555,7 +533,6 @@ vhigh = -80E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -571,7 +548,6 @@ vhigh = -80E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -581,7 +557,6 @@ vhigh = -80E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -591,7 +566,6 @@ vhigh = -80E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -641,13 +615,16 @@ vhigh = -80E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/Schottky_emission/Example3/Input.i b/test/tests/Schottky_emission/Example3/Input.i index 8a0cb2fc63a..c1157ea9643 100644 --- a/test/tests/Schottky_emission/Example3/Input.i +++ b/test/tests/Schottky_emission/Example3/Input.i @@ -118,7 +118,6 @@ threeTimesRelaxTime = 150E-6 #s # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -130,7 +129,6 @@ threeTimesRelaxTime = 150E-6 #s [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -144,7 +142,6 @@ threeTimesRelaxTime = 150E-6 #s type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -178,7 +175,6 @@ threeTimesRelaxTime = 150E-6 #s [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -191,7 +187,6 @@ threeTimesRelaxTime = 150E-6 #s [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -206,7 +201,6 @@ threeTimesRelaxTime = 150E-6 #s [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -219,7 +213,6 @@ threeTimesRelaxTime = 150E-6 #s [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -227,7 +220,6 @@ threeTimesRelaxTime = 150E-6 #s [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -235,7 +227,6 @@ threeTimesRelaxTime = 150E-6 #s [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -243,7 +234,6 @@ threeTimesRelaxTime = 150E-6 #s [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -352,7 +342,6 @@ threeTimesRelaxTime = 150E-6 #s [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -362,7 +351,6 @@ threeTimesRelaxTime = 150E-6 #s [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -372,7 +360,6 @@ threeTimesRelaxTime = 150E-6 #s [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -381,7 +368,6 @@ threeTimesRelaxTime = 150E-6 #s [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -390,7 +376,6 @@ threeTimesRelaxTime = 150E-6 #s [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -448,14 +433,12 @@ threeTimesRelaxTime = 150E-6 #s [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -464,7 +447,6 @@ threeTimesRelaxTime = 150E-6 #s [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -473,7 +455,6 @@ threeTimesRelaxTime = 150E-6 #s [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -517,7 +498,6 @@ threeTimesRelaxTime = 150E-6 #s # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -531,7 +511,6 @@ threeTimesRelaxTime = 150E-6 #s # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -541,7 +520,6 @@ threeTimesRelaxTime = 150E-6 #s type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -558,7 +536,6 @@ threeTimesRelaxTime = 150E-6 #s type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -574,7 +551,6 @@ threeTimesRelaxTime = 150E-6 #s type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -584,7 +560,6 @@ threeTimesRelaxTime = 150E-6 #s type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -594,7 +569,6 @@ threeTimesRelaxTime = 150E-6 #s type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -644,13 +618,16 @@ threeTimesRelaxTime = 150E-6 #s [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/Schottky_emission/Example4/Input.i b/test/tests/Schottky_emission/Example4/Input.i index e541207a1cc..d6bc2a31545 100644 --- a/test/tests/Schottky_emission/Example4/Input.i +++ b/test/tests/Schottky_emission/Example4/Input.i @@ -128,7 +128,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -140,7 +139,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -154,7 +152,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -188,7 +185,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -201,7 +197,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -216,7 +211,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -229,7 +223,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -237,7 +230,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -245,7 +237,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -253,7 +244,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -362,7 +352,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -372,7 +361,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -382,7 +370,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -391,7 +378,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -400,7 +386,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -458,14 +443,12 @@ area = 5.02e-7 # Formerly 3.14e-6 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -474,7 +457,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -483,7 +465,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -544,7 +525,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -558,7 +538,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -568,7 +547,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -585,7 +563,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -601,7 +578,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -611,7 +587,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -621,7 +596,6 @@ area = 5.02e-7 # Formerly 3.14e-6 type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -671,13 +645,16 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/Schottky_emission/Example4/Jac.i b/test/tests/Schottky_emission/Example4/Jac.i index f287e59a878..1230c63517c 100644 --- a/test/tests/Schottky_emission/Example4/Jac.i +++ b/test/tests/Schottky_emission/Example4/Jac.i @@ -120,7 +120,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # # [mean_en_advection_stabilization] # # type = EFieldArtDiff # # variable = mean_en - # # potential = potential # # block = 0 # # [] @@ -132,7 +131,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [em_advection] # type = EFieldAdvection # variable = em - # potential = potential # mean_en = mean_en # block = 0 # position_units = ${dom0Scale} @@ -148,7 +146,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = ElectronsFromIonization # em = em # variable = em - # potential = potential # mean_en = mean_en # block = 0 # position_units = ${dom0Scale} @@ -182,7 +179,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [Arp_advection] # type = EFieldAdvection # variable = Arp - # potential = potential # position_units = ${dom0Scale} # block = 0 # [] @@ -195,7 +191,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [Arp_ionization] # type = IonsFromIonization # variable = Arp - # potential = potential # em = em # mean_en = mean_en # block = 0 @@ -210,7 +205,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [mean_en_advection] # type = EFieldAdvection # variable = mean_en - # potential = potential # em = em # block = 0 # position_units = ${dom0Scale} @@ -225,7 +219,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [mean_en_joule_heating] # type = JouleHeating # variable = mean_en - # potential = potential # em = em # block = 0 # position_units = ${dom0Scale} @@ -233,7 +226,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [mean_en_ionization] # type = ElectronEnergyLossFromIonization # variable = mean_en - # potential = potential # em = em # block = 0 # position_units = ${dom0Scale} @@ -241,7 +233,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [mean_en_elastic] # type = ElectronEnergyLossFromElastic # variable = mean_en - # potential = potential # em = em # block = 0 # position_units = ${dom0Scale} @@ -249,7 +240,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # [mean_en_excitation] # type = ElectronEnergyLossFromExcitation # variable = mean_en - # potential = potential # em = em # block = 0 # position_units = ${dom0Scale} @@ -358,7 +348,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -368,7 +357,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -378,7 +366,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -387,7 +374,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -396,7 +382,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -454,14 +439,12 @@ area = 5.02e-7 # Formerly 3.14e-6 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -470,7 +453,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -479,7 +461,6 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -540,7 +521,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # # type = SecondaryElectronBC # variable = em # boundary = 'left' - # potential = potential # ions = Arp # electron_energy = mean_en # r = 1 @@ -553,7 +533,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # # type = HagelaarElectronBC # # variable = em # # boundary = 'left' - # # potential = potential # # electron_energy = mean_en # # r = 0 # # position_units = ${dom0Scale} @@ -563,7 +542,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = HagelaarElectronAdvectionBC # variable = em # boundary = right - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -581,7 +559,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = HagelaarIonAdvectionBC # variable = Arp # boundary = 'left' - # potential = potential # r = 0 # position_units = ${dom0Scale} # [] @@ -597,7 +574,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = HagelaarIonAdvectionBC # variable = Arp # boundary = right - # potential = potential # r = 0 # position_units = ${dom0Scale} # [] @@ -607,7 +583,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = HagelaarEnergyBC # variable = mean_en # boundary = 'left' - # potential = potential # electrons = em # ions = Arp # r = 0 @@ -618,7 +593,6 @@ area = 5.02e-7 # Formerly 3.14e-6 # type = HagelaarEnergyBC # variable = mean_en # boundary = right - # potential = potential # electrons = em # ions = Arp # r = 0 @@ -672,13 +646,16 @@ area = 5.02e-7 # Formerly 3.14e-6 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/Schottky_emission/PaschenLaw/Input.i b/test/tests/Schottky_emission/PaschenLaw/Input.i index 7369a63c611..a8b1e36a085 100644 --- a/test/tests/Schottky_emission/PaschenLaw/Input.i +++ b/test/tests/Schottky_emission/PaschenLaw/Input.i @@ -116,7 +116,6 @@ vhigh = -0.10 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -128,7 +127,6 @@ vhigh = -0.10 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -142,7 +140,6 @@ vhigh = -0.10 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -176,7 +173,6 @@ vhigh = -0.10 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -189,7 +185,6 @@ vhigh = -0.10 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -204,7 +199,6 @@ vhigh = -0.10 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -217,7 +211,6 @@ vhigh = -0.10 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -225,7 +218,6 @@ vhigh = -0.10 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -233,7 +225,6 @@ vhigh = -0.10 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -241,7 +232,6 @@ vhigh = -0.10 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -350,7 +340,6 @@ vhigh = -0.10 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -360,7 +349,6 @@ vhigh = -0.10 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -370,7 +358,6 @@ vhigh = -0.10 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -379,7 +366,6 @@ vhigh = -0.10 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -388,7 +374,6 @@ vhigh = -0.10 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -446,14 +431,12 @@ vhigh = -0.10 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -462,7 +445,6 @@ vhigh = -0.10 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -471,7 +453,6 @@ vhigh = -0.10 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -515,7 +496,6 @@ vhigh = -0.10 #kV # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -529,7 +509,6 @@ vhigh = -0.10 #kV # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -539,7 +518,6 @@ vhigh = -0.10 #kV type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -556,7 +534,6 @@ vhigh = -0.10 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -572,7 +549,6 @@ vhigh = -0.10 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -582,7 +558,6 @@ vhigh = -0.10 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -592,7 +567,6 @@ vhigh = -0.10 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -642,13 +616,16 @@ vhigh = -0.10 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/accelerations/Acceleration_By_Averaging_acceleration_sub.i b/test/tests/accelerations/Acceleration_By_Averaging_acceleration_sub.i index 4160061e0c6..992c79d1109 100644 --- a/test/tests/accelerations/Acceleration_By_Averaging_acceleration_sub.i +++ b/test/tests/accelerations/Acceleration_By_Averaging_acceleration_sub.i @@ -56,7 +56,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -105,7 +104,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -257,7 +255,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -270,7 +267,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -354,7 +350,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -366,7 +361,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -374,14 +368,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -425,6 +417,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = false @@ -432,7 +428,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/test/tests/accelerations/Acceleration_By_Averaging_main.i b/test/tests/accelerations/Acceleration_By_Averaging_main.i index 1f3b0e190b5..54121f262d4 100644 --- a/test/tests/accelerations/Acceleration_By_Averaging_main.i +++ b/test/tests/accelerations/Acceleration_By_Averaging_main.i @@ -59,7 +59,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -108,7 +107,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -261,7 +259,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -274,7 +271,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -508,13 +504,11 @@ dom0Scale = 25.4e-3 [Efield_calc] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -523,7 +517,6 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential density_log = Ar+ variable = Current_Ar art_diff = false @@ -559,7 +552,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -571,7 +563,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -579,14 +570,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -661,6 +650,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = false @@ -668,7 +661,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/test/tests/accelerations/Acceleration_By_Shooting_Method.i b/test/tests/accelerations/Acceleration_By_Shooting_Method.i index 0cc34941118..af8b09ab177 100644 --- a/test/tests/accelerations/Acceleration_By_Shooting_Method.i +++ b/test/tests/accelerations/Acceleration_By_Shooting_Method.i @@ -1,7 +1,4 @@ -#This test starts the simulation at 50 rf cycle, then accelerates -#at the 55 rf cycle mark and stops at 57 rf cycles - -dom0Scale = 25.4e-3 +dom0Scale=25.4e-3 [GlobalParams] potential_units = kV @@ -9,11 +6,28 @@ dom0Scale = 25.4e-3 [] [Mesh] - file = 'Acceleration_By_Shooting_Method_Initial_Conditions.e' + [geo] + type = FileMeshGenerator + file = 'Acceleration_By_Shooting_Method_Initial_Conditions.e' + use_for_exodus_restart = true + [] + [left] + type = SideSetsFromNormalsGenerator + normals = '-1 0 0' + new_boundary = 'left' + input = geo + [] + [right] + type = SideSetsFromNormalsGenerator + normals = '1 0 0' + new_boundary = 'right' + input = left + [] [] [Problem] type = FEProblem + allow_initial_conditions_with_restart = true [] [Variables] @@ -36,20 +50,23 @@ dom0Scale = 25.4e-3 [potential] initial_from_file_var = potential [] + + [SM_Ar*] + initial_from_file_var = SM_Ar* + [] [] [Kernels] - #Electron Equations +#Electron Equations #Time Derivative term of electron [em_time_deriv] - type = ElectronTimeDerivative + type = TimeDerivativeLog variable = em [] #Advection term of electron [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -60,27 +77,25 @@ dom0Scale = 25.4e-3 [] #Net electron production from ionization [em_ionization] - type = EEDFReactionLog + type = ADEEDFReactionLog variable = em electrons = em - mean_energy = mean_en target = Ar reaction = 'em + Ar -> em + em + Ar+' coefficient = 1 [] #Net electron production from step-wise ionization [em_stepwise_ionization] - type = EEDFReactionLog + type = ADEEDFReactionLog variable = em electrons = em - mean_energy = mean_en target = Ar* reaction = 'em + Ar* -> em + em + Ar+' coefficient = 1 [] #Net electron production from metastable pooling [em_pooling] - type = ReactionSecondOrderLog + type = ADReactionSecondOrderLog variable = em v = Ar* w = Ar* @@ -88,17 +103,16 @@ dom0Scale = 25.4e-3 coefficient = 1 [] - #Argon Ion Equations +#Argon Ion Equations #Time Derivative term of the ions [Ar+_time_deriv] - type = ElectronTimeDerivative + type = TimeDerivativeLog variable = Ar+ [] #Advection term of ions [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -108,27 +122,25 @@ dom0Scale = 25.4e-3 [] #Net ion production from ionization [Ar+_ionization] - type = EEDFReactionLog + type = ADEEDFReactionLog variable = Ar+ electrons = em - mean_energy = mean_en target = Ar reaction = 'em + Ar -> em + em + Ar+' coefficient = 1 [] #Net ion production from step-wise ionization [Ar+_stepwise_ionization] - type = EEDFReactionLog + type = ADEEDFReactionLog variable = Ar+ electrons = em - mean_energy = mean_en target = Ar* reaction = 'em + Ar* -> em + em + Ar+' coefficient = 1 [] #Net ion production from metastable pooling [Ar+_pooling] - type = ReactionSecondOrderLog + type = ADReactionSecondOrderLog variable = Ar+ v = Ar* w = Ar* @@ -136,10 +148,10 @@ dom0Scale = 25.4e-3 coefficient = 1 [] - #Argon Excited Equations +#Argon Excited Equations #Time Derivative term of excited Argon [Ar*_time_deriv] - type = ElectronTimeDerivative + type = TimeDerivativeLog variable = Ar* [] #Diffusion term of excited Argon @@ -150,47 +162,44 @@ dom0Scale = 25.4e-3 [] #Net excited Argon production from excitation [Ar*_excitation] - type = EEDFReactionLog + type = ADEEDFReactionLog variable = Ar* electrons = em target = Ar - mean_energy = mean_en reaction = 'em + Ar -> em + Ar*' coefficient = 1 [] #Net excited Argon loss from step-wise ionization [Ar*_stepwise_ionization] - type = EEDFReactionLog + type = ADEEDFReactionLog variable = Ar* electrons = em target = Ar* - mean_energy = mean_en reaction = 'em + Ar* -> em + em + Ar+' coefficient = -1 [] #Net excited Argon loss from superelastic collisions [Ar*_collisions] - type = EEDFReactionLog + type = ADEEDFReactionLog variable = Ar* electrons = em target = Ar* - mean_energy = mean_en reaction = 'em + Ar* -> em + Ar' coefficient = -1 [] #Net excited Argon loss from quenching to resonant [Ar*_quenching] - type = EEDFReactionLog + type = ADReactionSecondOrderLog variable = Ar* - electrons = em - target = Ar* - mean_energy = mean_en + v = em + w = Ar* reaction = 'em + Ar* -> em + Ar_r' coefficient = -1 + _w_eq_u = true [] #Net excited Argon loss from metastable pooling [Ar*_pooling] - type = ReactionSecondOrderLog + type = ADReactionSecondOrderLog variable = Ar* v = Ar* w = Ar* @@ -201,17 +210,17 @@ dom0Scale = 25.4e-3 [] #Net excited Argon loss from two-body quenching [Ar*_2B_quenching] - type = ReactionSecondOrderLog + type = ADReactionSecondOrderLog variable = Ar* - v = Ar* - w = Ar + v = Ar + w = Ar* reaction = 'Ar* + Ar -> Ar + Ar' coefficient = -1 _v_eq_u = true [] #Net excited Argon loss from three-body quenching [Ar*_3B_quenching] - type = ReactionThirdOrderLog + type = ADReactionThirdOrderLog variable = Ar* v = Ar* w = Ar @@ -221,7 +230,7 @@ dom0Scale = 25.4e-3 _v_eq_u = true [] - #Voltage Equations +#Voltage Equations #Voltage term in Poissons Eqaution [potential_diffusion_dom0] type = CoeffDiffusionLin @@ -229,7 +238,7 @@ dom0Scale = 25.4e-3 position_units = ${dom0Scale} [] #Ion term in Poissons Equation - [Ar+_charge_source] + [Ar+_charge_source] type = ChargeSourceMoles_KV variable = potential charged = Ar+ @@ -241,17 +250,16 @@ dom0Scale = 25.4e-3 charged = em [] - #Electron Energy Equations +#Electron Energy Equations #Time Derivative term of electron energy [mean_en_time_deriv] - type = ElectronTimeDerivative + type = TimeDerivativeLog variable = mean_en [] #Advection term of electron energy [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -260,17 +268,23 @@ dom0Scale = 25.4e-3 variable = mean_en position_units = ${dom0Scale} [] + #The correction for electrons energy's diffusion term + [mean_en_diffusion_correction] + type = ThermalConductivityDiffusion + variable = mean_en + em = em + position_units = ${dom0Scale} + [] #Joule Heating term [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] #Energy loss from ionization [Ionization_Loss] - type = EEDFEnergyLog + type = ADEEDFEnergyLog variable = mean_en electrons = em target = Ar @@ -279,7 +293,7 @@ dom0Scale = 25.4e-3 [] #Energy loss from excitation [Excitation_Loss] - type = EEDFEnergyLog + type = ADEEDFEnergyLog variable = mean_en electrons = em target = Ar @@ -288,7 +302,7 @@ dom0Scale = 25.4e-3 [] #Energy loss from step-wise ionization [Stepwise_Ionization_Loss] - type = EEDFEnergyLog + type = ADEEDFEnergyLog variable = mean_en electrons = em target = Ar* @@ -297,162 +311,169 @@ dom0Scale = 25.4e-3 [] #Energy gain from superelastic collisions [Collisions_Loss] - type = EEDFEnergyLog + type = ADEEDFEnergyLog variable = mean_en electrons = em target = Ar* reaction = 'em + Ar* -> em + Ar' threshold_energy = 11.56 [] -[] -[AuxVariables] - [Te] - order = CONSTANT - family = MONOMIAL - [] +################################################################################### - [x] - order = CONSTANT - family = MONOMIAL +#Argon Excited Equations + #Time Derivative term of excited Argon + [SM_Ar*_time_deriv] + type = MassLumpedTimeDerivative + variable = SM_Ar* + enable = false [] - - [x_node] + #Diffusion term of excited Argon + [SM_Ar*_diffusion] + type = CoeffDiffusionForShootMethod + variable = SM_Ar* + density = Ar* + position_units = ${dom0Scale} + enable = false [] - - [em_lin] - order = CONSTANT - family = MONOMIAL + #Net excited Argon loss from step-wise ionization + [SM_Ar*_stepwise_ionization] + type = EEDFReactionLogForShootMethod + variable = SM_Ar* + electron = em + density = Ar* + reaction = 'em + Ar* -> em + em + Ar+' + coefficient = -1 + enable = false [] - - [Ar+_lin] - order = CONSTANT - family = MONOMIAL + #Net excited Argon loss from superelastic collisions + [SM_Ar*_collisions] + type = EEDFReactionLogForShootMethod + variable = SM_Ar* + electron = em + density = Ar* + reaction = 'em + Ar* -> em + Ar' + coefficient = -1 + enable = false [] - - [Ar*_lin] - order = CONSTANT - family = MONOMIAL + #Net excited Argon loss from quenching to resonant + [SM_Ar*_quenching] + type = ReactionSecondOrderLogForShootMethod + variable = SM_Ar* + density = Ar* + v = em + reaction = 'em + Ar* -> em + Ar_r' + coefficient = -1 + enable = false [] - - [Ar] + #Net excited Argon loss from metastable pooling + [SM_Ar*_pooling] + type = ReactionSecondOrderLogForShootMethod + variable = SM_Ar* + density = Ar* + v = Ar* + reaction = 'Ar* + Ar* -> Ar+ + Ar + em' + coefficient = -2 + enable = false [] - - [Efield] - order = CONSTANT - family = MONOMIAL + #Net excited Argon loss from two-body quenching + [SM_Ar*_2B_quenching] + type = ReactionSecondOrderLogForShootMethod + variable = SM_Ar* + density = Ar* + v = Ar + reaction = 'Ar* + Ar -> Ar + Ar' + coefficient = -1 + enable = false + [] + #Net excited Argon loss from three-body quenching + [SM_Ar*_3B_quenching] + type = ReactionThirdOrderLogForShootMethod + variable = SM_Ar* + density = Ar* + v = Ar + w = Ar + reaction = 'Ar* + Ar + Ar -> Ar_2 + Ar' + coefficient = -1 + enable = false [] - [Current_em] - order = CONSTANT - family = MONOMIAL - block = 0 + [SM_Ar*_Null] + type = NullKernel + variable = SM_Ar* [] - [Current_Ar] - order = CONSTANT - family = MONOMIAL - block = 0 +[] + +#Variables for scaled nodes and background gas +[AuxVariables] + [SM_Ar*Reset] + initial_condition = 1.0 [] - [emRate] - order = CONSTANT - family = MONOMIAL - block = 0 + [Ar*S] [] - [exRate] - order = CONSTANT - family = MONOMIAL - block = 0 + + [x_node] [] - [swRate] - order = CONSTANT - family = MONOMIAL - block = 0 + + [Ar] [] - [deexRate] + + [Te] order = CONSTANT family = MONOMIAL - block = 0 [] - [quRate] + + [x] order = CONSTANT family = MONOMIAL - block = 0 [] - [poolRate] + + [em_lin] order = CONSTANT family = MONOMIAL - block = 0 [] - [TwoBRate] + [Ar+_lin] order = CONSTANT family = MONOMIAL - block = 0 [] - [ThreeBRate] + [Ar*_lin] order = CONSTANT family = MONOMIAL - block = 0 [] [] +#Kernels that define the scaled nodes and background gas [AuxKernels] - [emRate] - type = ProcRateForRateCoeff - variable = emRate - v = em - w = Ar - reaction = 'em + Ar -> em + em + Ar+' - [] - [exRate] - type = ProcRateForRateCoeff - variable = exRate - v = em - w = Ar - reaction = 'em + Ar -> em + Ar*' - [] - [swRate] - type = ProcRateForRateCoeff - variable = swRate - v = em - w = Ar* - reaction = 'em + Ar* -> em + em + Ar+' - [] - [deexRate] - type = ProcRateForRateCoeff - variable = deexRate - v = em - w = Ar* - reaction = 'em + Ar* -> em + Ar' - [] - [quRate] - type = ProcRateForRateCoeff - variable = quRate - v = em - w = Ar* - reaction = 'em + Ar* -> em + Ar_r' - [] - [poolRate] - type = ProcRateForRateCoeff - variable = poolRate - v = Ar* - w = Ar* - reaction = 'Ar* + Ar* -> Ar+ + Ar + em' - [] - [TwoBRate] - type = ProcRateForRateCoeff - variable = TwoBRate - v = Ar* - w = Ar - reaction = 'Ar* + Ar -> Ar + Ar' + [Ar*S_for_Shooting] + type = QuotientAux + variable = Ar*S + numerator = Ar* + denominator = 1.0 + enable = false + execute_on = 'TIMESTEP_END' +[] + +[Constant_SM_Ar*Reset] + type = ConstantAux + variable = SM_Ar*Reset + value = 1.0 + execute_on = INITIAL +[] + + [x_ng] + type = Position + variable = x_node + position_units = ${dom0Scale} [] - [ThreeBRate] - type = ProcRateForRateCoeffThreeBody - variable = ThreeBRate - v = Ar* - w = Ar - x = Ar - reaction = 'Ar* + Ar + Ar -> Ar_2 + Ar' + + [Ar_val] + type = FunctionAux + variable = Ar + # value = 3.22e22 + function = 'log(3.22e22/6.02e23)' + execute_on = INITIAL [] + [Te] type = ElectronTemperature variable = Te @@ -465,12 +486,6 @@ dom0Scale = 25.4e-3 position_units = ${dom0Scale} [] - [x_ng] - type = Position - variable = x_node - position_units = ${dom0Scale} - [] - [em_lin] type = DensityMoles variable = em_lin @@ -486,44 +501,10 @@ dom0Scale = 25.4e-3 variable = Ar*_lin density_log = Ar* [] - - [Ar_val] - type = ConstantAux - variable = Ar - # value = 3.22e22 - value = -2.928623 - execute_on = INITIAL - [] - - [Efield_calc] - type = Efield - component = 0 - potential = potential - variable = Efield - position_units = ${dom0Scale} - [] - [Current_em] - type = ADCurrent - potential = potential - density_log = em - variable = Current_em - art_diff = false - block = 0 - position_units = ${dom0Scale} - [] - [Current_Ar] - type = ADCurrent - potential = potential - density_log = Ar+ - variable = Current_Ar - art_diff = false - block = 0 - position_units = ${dom0Scale} - [] [] [BCs] - #Voltage Boundary Condition +#Voltage Boundary Condition [potential_left] type = FunctionDirichletBC variable = potential @@ -539,17 +520,14 @@ dom0Scale = 25.4e-3 preset = false [] - #Boundary conditions for electons +#Boundary conditions for electons [em_physical_right] type = LymberopoulosElectronBC variable = em boundary = 'right' emission_coeffs = 0.01 - #gamma = 1 ks = 1.19e5 - #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -557,45 +535,26 @@ dom0Scale = 25.4e-3 variable = em boundary = 'left' emission_coeffs = 0.01 - #gamma = 1 ks = 1.19e5 - #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] - #Boundary conditions for ions +#Boundary conditions for ions [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] - #New Boundary conditions for metastables - [Ar*_physical_right_diffusion] - type = LogDensityDirichletBC - variable = Ar* - boundary = 'right' - value = 1e-5 - [] - [Ar*_physical_left_diffusion] - type = LogDensityDirichletBC - variable = Ar* - boundary = 'left' - value = 1e-5 - [] - - #Boundary conditions for electron mean energy +#Boundary conditions for mean energy [mean_en_physical_right] type = ElectronTemperatureDirichletBC variable = mean_en @@ -610,28 +569,59 @@ dom0Scale = 25.4e-3 value = 0.5 boundary = 'left' [] + + #Boundary conditions for ions + [Ar*_physical_right_diffusion] + type = ADDirichletBC + variable = Ar* + boundary = 'right' + value = -50.0 + [] + [Ar*_physical_left_diffusion] + type = ADDirichletBC + variable = Ar* + boundary = 'left' + value = -50.0 + [] [] +#Functions for IC and Potential BC [Functions] [potential_bc_func] type = ParsedFunction - expression = '0.100*sin(2*pi*13.56e6*t)' + value = '0.100*sin(2*pi*13.56e6*t)' + [] + [density_ic_func] + type = ParsedFunction + value = 'log((1e13 + 1e15 * (1-x/(1.0))^2 * (x/(1.0))^2)/6.02e23)' + [] + [energy_density_ic_func] + type = ParsedFunction + value = 'log(32.) + log((1e13 + 1e15 * (1-x/(1.0))^2 * (x/(1.0))^2)/6.02e23)' [] [] +#Material properties of species and background gas [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] + #If elecron mobility and diffusion are NOT constant, set + #"interp_elastic_coeff = true". This lets the mobility and + #diffusivity to be energy dependent, as dictated by the txt file type = GasElectronMoments - interp_trans_coeffs = false - interp_elastic_coeff = false - ramp_trans_coeffs = false - user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en + interp_elastic_coeff = false + interp_trans_coeffs = false + ramp_trans_coeffs = false + user_p_gas = 133.33 + user_T_gas = 300 user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 - property_tables_file = Argon_reactions_paper_RateCoefficients/electron_moments.txt + property_tables_file = Argon_reactions_RateCoefficients/electron_moments.txt [] [gas_species_0] type = ADHeavySpecies @@ -641,73 +631,87 @@ dom0Scale = 25.4e-3 mobility = 0.144409938 diffusivity = 6.428571e-3 [] - [gas_species_1] + [gas_species_2] type = ADHeavySpecies - heavy_species_name = Ar* + heavy_species_name = Ar heavy_species_mass = 6.64e-26 heavy_species_charge = 0.0 - diffusivity = 7.515528e-3 [] - [gas_species_2] + [gas_species_1] type = ADHeavySpecies - heavy_species_name = Ar + heavy_species_name = Ar* heavy_species_mass = 6.64e-26 heavy_species_charge = 0.0 + diffusivity = 7.515528e-3 [] [reaction_0] - type = ZapdosEEDFRateConstant + #type = ADZapdosEEDFRateLinearInterpolation + type = InterpolatedCoefficientLinear + #type = ADZapdosEEDFRateConstant mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar -> em + Ar*.txt' + property_file = 'Argon_reactions_RateCoefficients/reaction_em + Ar -> em + Ar*.txt' reaction = 'em + Ar -> em + Ar*' + file_location = '.' electrons = em [] [reaction_1] - type = ZapdosEEDFRateConstant + #type = ADZapdosEEDFRateLinearInterpolation + type = InterpolatedCoefficientLinear + #type = ADZapdosEEDFRateConstant mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar -> em + em + Ar+.txt' + property_file = 'Argon_reactions_RateCoefficients/reaction_em + Ar -> em + em + Ar+.txt' reaction = 'em + Ar -> em + em + Ar+' + file_location = '.' electrons = em [] [reaction_2] - type = ZapdosEEDFRateConstant + #type = ADZapdosEEDFRateLinearInterpolation + type = InterpolatedCoefficientLinear + #type = ADZapdosEEDFRateConstant mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar* -> em + Ar.txt' + property_file = 'Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + Ar.txt' reaction = 'em + Ar* -> em + Ar' + file_location = '.' electrons = em [] [reaction_3] - type = ZapdosEEDFRateConstant + #type = ADZapdosEEDFRateLinearInterpolation + type = InterpolatedCoefficientLinear + #type = ADZapdosEEDFRateConstant mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar* -> em + em + Ar+.txt' + property_file = 'Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + em + Ar+.txt' reaction = 'em + Ar* -> em + em + Ar+' + file_location = '.' electrons = em [] [reaction_4] - type = GenericRateConstant + type = ADGenericRateConstant reaction = 'em + Ar* -> em + Ar_r' #reaction_rate_value = 2e-13 reaction_rate_value = 1.2044e11 [] [reaction_5] - type = GenericRateConstant + type = ADGenericRateConstant reaction = 'Ar* + Ar* -> Ar+ + Ar + em' #reaction_rate_value = 6.2e-16 reaction_rate_value = 373364000 [] [reaction_6] - type = GenericRateConstant + type = ADGenericRateConstant reaction = 'Ar* + Ar -> Ar + Ar' #reaction_rate_value = 3e-21 reaction_rate_value = 1806.6 [] [reaction_7] - type = GenericRateConstant + type = ADGenericRateConstant reaction = 'Ar* + Ar + Ar -> Ar_2 + Ar' #reaction_rate_value = 1.1e-43 reaction_rate_value = 39890.9324 [] [] +#Acceleration Schemes are dictated by MultiApps, Transfers, +#and PeriodicControllers [MultiApps] #MultiApp of Acceleration by Shooting Method [Shooting] @@ -718,82 +722,109 @@ dom0Scale = 25.4e-3 [] [] + [Transfers] #MultiApp Transfers for Acceleration by Shooting Method - [em_to_Shooting] + [SM_Ar*Reset_to_Shooting] type = MultiAppCopyTransfer - to_multi_app = Shooting - source_variable = em - variable = em + direction = to_multiapp + multi_app = Shooting + source_variable = SM_Ar*Reset + variable = SM_Ar*Reset enable = false [] - [Ar+_to_Shooting] - type = MultiAppCopyTransfer - to_multi_app = Shooting - source_variable = Ar+ - variable = Ar+ - enable = false - [] - [mean_en_to_Shooting] + + [Ar*_to_Shooting] type = MultiAppCopyTransfer - to_multi_app = Shooting - source_variable = mean_en - variable = mean_en + direction = to_multiapp + multi_app = Shooting + source_variable = Ar* + variable = Ar* enable = false [] - [potential_to_Shooting] + [Ar*S_to_Shooting] type = MultiAppCopyTransfer - to_multi_app = Shooting - source_variable = potential - variable = potential + direction = to_multiapp + multi_app = Shooting + source_variable = Ar*S + variable = Ar*S enable = false [] - [Ar*_to_Shooting] + [Ar*T_to_Shooting] type = MultiAppCopyTransfer - to_multi_app = Shooting + direction = to_multiapp + multi_app = Shooting source_variable = Ar* - variable = Ar* + variable = Ar*T enable = false [] - [Ar*S_to_Shooting] + [SMDeriv_to_Shooting] type = MultiAppCopyTransfer - to_multi_app = Shooting - source_variable = Ar* - variable = Ar*S + direction = to_multiapp + multi_app = Shooting + source_variable = SM_Ar* + variable = SM_Ar* enable = false [] [Ar*New_from_Shooting] type = MultiAppCopyTransfer - from_multi_app = Shooting + direction = from_multiapp + multi_app = Shooting source_variable = Ar* variable = Ar* enable = false [] + [SM_Ar*Reset_from_Shooting] + type = MultiAppCopyTransfer + direction = from_multiapp + multi_app = Shooting + source_variable = SM_Ar*Reset + variable = SM_Ar* + enable = false + [] + + [Ar*Relative_Diff] + type = MultiAppPostprocessorTransfer + direction = from_multiapp + multi_app = Shooting + from_postprocessor = Meta_Relative_Diff + to_postprocessor = Meta_Relative_Diff + reduction_type = minimum + enable = false + [] [] #The Action the add the TimePeriod Controls to turn off and on the MultiApps [PeriodicControllers] [Shooting] - Enable_at_cycle_start = 'MultiApps::Shooting - Transfers::em_to_Shooting *::Ar+_to_Shooting *::mean_en_to_Shooting - *::potential_to_Shooting *::Ar*_to_Shooting *::Ar*S_to_Shooting - Transfers::Ar*New_from_Shooting' - starting_cycle = 55 + Enable_at_cycle_start = '*::Ar*S_for_Shooting' + + Enable_during_cycle = '*::SM_Ar*_time_deriv *::SM_Ar*_diffusion *::SM_Ar*_stepwise_ionization + *::SM_Ar*_collisions *::SM_Ar*_quenching *::SM_Ar*_pooling + *::SM_Ar*_2B_quenching *::SM_Ar*_3B_quenching' + + Enable_at_cycle_end = 'MultiApps::Shooting + *::SM_Ar*Reset_to_Shooting *::Ar*_to_Shooting + *::Ar*S_to_Shooting *::Ar*T_to_Shooting + *::SMDeriv_to_Shooting *::Ar*New_from_Shooting + *::SM_Ar*Reset_from_Shooting *::Ar*Relative_Diff' cycle_frequency = 13.56e6 - cycles_between_controls = 30 - num_controller_set = 2000 + #starting_cycle = 25 + #cycles_between_controls = 25 + starting_cycle = 50 + cycles_between_controls = 50 + cycles_per_controls = 1 + num_controller_set = 2 name = Shooting [] [] -#New postprocessor that calculates the inverse of the plasma frequency [Postprocessors] - [InversePlasmaFreq] - type = PlasmaFrequencyInverse - variable = em - use_moles = true - execute_on = 'INITIAL TIMESTEP_BEGIN' + #Hold the metastable relative difference during the + #Shooting Method acceleration + [Meta_Relative_Diff] + type = Receiver [] [] @@ -812,23 +843,24 @@ dom0Scale = 25.4e-3 [Executioner] type = Transient - start_time = 3.68731563e-6 - end_time = 4.20353982e-6 - petsc_options = '-snes_converged_reason -snes_linesearch_monitor' - solve_type = NEWTON - petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type -snes_linesearch_minlambda' - petsc_options_value = 'lu NONZERO 1.e-10 fgmres 1e-3' + start_time = 3.6873e-6 + end_time = 3.798e-6 - dtmin = 1e-14 - l_max_its = 20 + solve_type = NEWTON + line_search = none + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' - scheme = bdf2 + scheme = newmark-beta dt = 1e-9 + dtmin = 1e-14 [] [Outputs] perf_graph = true [out] type = Exodus + execute_on = 'FINAL' [] [] diff --git a/test/tests/accelerations/Acceleration_By_Shooting_Method_Initial_Conditions.e b/test/tests/accelerations/Acceleration_By_Shooting_Method_Initial_Conditions.e index 29a3162d31d..4ed597265e1 100644 Binary files a/test/tests/accelerations/Acceleration_By_Shooting_Method_Initial_Conditions.e and b/test/tests/accelerations/Acceleration_By_Shooting_Method_Initial_Conditions.e differ diff --git a/test/tests/accelerations/Acceleration_By_Shooting_Method_SensitivityMatrix.i b/test/tests/accelerations/Acceleration_By_Shooting_Method_SensitivityMatrix.i deleted file mode 100644 index b755ce31d28..00000000000 --- a/test/tests/accelerations/Acceleration_By_Shooting_Method_SensitivityMatrix.i +++ /dev/null @@ -1,870 +0,0 @@ -dom0Scale = 25.4e-3 - -[GlobalParams] - potential_units = kV - use_moles = true -[] - -[Mesh] - [file] - type = FileMeshGenerator - file = 'Lymberopoulos_paper.msh' - [] - [left] - type = SideSetsFromNormalsGenerator - normals = '-1 0 0' - new_boundary = 'left' - input = file - [] - [right] - type = SideSetsFromNormalsGenerator - normals = '1 0 0' - new_boundary = 'right' - input = left - [] -[] - -[Problem] - type = FEProblem -[] - -[Variables] - [em] - [] - - [Ar+] - [] - - [Ar*] - [] - - [mean_en] - [] - - [potential] - [] - - [SMDeriv] - [] -[] - -[Kernels] - #Electron Equations (Same as in paper) - #Time Derivative term of electron - [em_time_deriv] - type = ElectronTimeDerivative - variable = em - [] - #Advection term of electron - [em_advection] - type = EFieldAdvection - variable = em - potential = potential - position_units = ${dom0Scale} - [] - #Diffusion term of electrons - [em_diffusion] - type = CoeffDiffusion - variable = em - position_units = ${dom0Scale} - [] - #Net electron production from ionization - [em_ionization] - type = ADEEDFReactionLog - variable = em - electrons = em - target = Ar - reaction = 'em + Ar -> em + em + Ar+' - coefficient = 1 - [] - #Net electron production from step-wise ionization - [em_stepwise_ionization] - type = ADEEDFReactionLog - variable = em - electrons = em - target = Ar* - reaction = 'em + Ar* -> em + em + Ar+' - coefficient = 1 - [] - #Net electron production from metastable pooling - [em_pooling] - type = ADReactionSecondOrderLog - variable = em - v = Ar* - w = Ar* - reaction = 'Ar* + Ar* -> Ar+ + Ar + em' - coefficient = 1 - [] - - #Argon Ion Equations (Same as in paper) - #Time Derivative term of the ions - [Ar+_time_deriv] - type = ElectronTimeDerivative - variable = Ar+ - [] - #Advection term of ions - [Ar+_advection] - type = EFieldAdvection - variable = Ar+ - potential = potential - position_units = ${dom0Scale} - [] - [Ar+_diffusion] - type = CoeffDiffusion - variable = Ar+ - position_units = ${dom0Scale} - [] - #Net ion production from ionization - [Ar+_ionization] - type = ADEEDFReactionLog - variable = Ar+ - electrons = em - target = Ar - reaction = 'em + Ar -> em + em + Ar+' - coefficient = 1 - [] - #Net ion production from step-wise ionization - [Ar+_stepwise_ionization] - type = ADEEDFReactionLog - variable = Ar+ - electrons = em - target = Ar* - reaction = 'em + Ar* -> em + em + Ar+' - coefficient = 1 - [] - #Net ion production from metastable pooling - [Ar+_pooling] - type = ADReactionSecondOrderLog - variable = Ar+ - v = Ar* - w = Ar* - reaction = 'Ar* + Ar* -> Ar+ + Ar + em' - coefficient = 1 - [] - - #Argon Excited Equations (Same as in paper) - #Time Derivative term of excited Argon - [Ar*_time_deriv] - type = ElectronTimeDerivative - variable = Ar* - [] - #Diffusion term of excited Argon - [Ar*_diffusion] - type = CoeffDiffusion - variable = Ar* - position_units = ${dom0Scale} - [] - #Net excited Argon production from excitation - [Ar*_excitation] - type = ADEEDFReactionLog - variable = Ar* - electrons = em - target = Ar - reaction = 'em + Ar -> em + Ar*' - coefficient = 1 - [] - #Net excited Argon loss from step-wise ionization - [Ar*_stepwise_ionization] - type = ADEEDFReactionLog - variable = Ar* - electrons = em - target = Ar* - reaction = 'em + Ar* -> em + em + Ar+' - coefficient = -1 - [] - #Net excited Argon loss from superelastic collisions - [Ar*_collisions] - type = ADEEDFReactionLog - variable = Ar* - electrons = em - target = Ar* - reaction = 'em + Ar* -> em + Ar' - coefficient = -1 - [] - #Net excited Argon loss from quenching to resonant - [Ar*_quenching] - type = ADEEDFReactionLog - variable = Ar* - electrons = em - target = Ar* - reaction = 'em + Ar* -> em + Ar_r' - coefficient = -1 - [] - #Net excited Argon loss from metastable pooling - [Ar*_pooling] - type = ADReactionSecondOrderLog - variable = Ar* - v = Ar* - w = Ar* - reaction = 'Ar* + Ar* -> Ar+ + Ar + em' - coefficient = -2 - _v_eq_u = true - _w_eq_u = true - [] - #Net excited Argon loss from two-body quenching - [Ar*_2B_quenching] - type = ADReactionSecondOrderLog - variable = Ar* - v = Ar* - w = Ar - reaction = 'Ar* + Ar -> Ar + Ar' - coefficient = -1 - _v_eq_u = true - [] - #Net excited Argon loss from three-body quenching - [Ar*_3B_quenching] - type = ADReactionThirdOrderLog - variable = Ar* - v = Ar* - w = Ar - x = Ar - reaction = 'Ar* + Ar + Ar -> Ar_2 + Ar' - coefficient = -1 - _v_eq_u = true - [] - - #Voltage Equations (Same as in paper) - #Voltage term in Poissons Eqaution - [potential_diffusion_dom0] - type = CoeffDiffusionLin - variable = potential - position_units = ${dom0Scale} - [] - #Ion term in Poissons Equation - [Ar+_charge_source] - type = ChargeSourceMoles_KV - variable = potential - charged = Ar+ - [] - #Electron term in Poissons Equation - [em_charge_source] - type = ChargeSourceMoles_KV - variable = potential - charged = em - [] - - #Since the paper uses electron temperature as a variable, the energy equation is in - #a different form but should be the same physics - #Time Derivative term of electron energy - [mean_en_time_deriv] - type = ElectronTimeDerivative - variable = mean_en - [] - #Advection term of electron energy - [mean_en_advection] - type = EFieldAdvection - variable = mean_en - potential = potential - position_units = ${dom0Scale} - [] - #Diffusion term of electrons energy - [mean_en_diffusion] - type = CoeffDiffusion - variable = mean_en - position_units = ${dom0Scale} - [] - #Joule Heating term - [mean_en_joule_heating] - type = JouleHeating - variable = mean_en - potential = potential - em = em - position_units = ${dom0Scale} - [] - #Energy loss from ionization - [Ionization_Loss] - type = ADEEDFEnergyLog - variable = mean_en - electrons = em - target = Ar - reaction = 'em + Ar -> em + em + Ar+' - threshold_energy = -15.7 - [] - #Energy loss from excitation - [Excitation_Loss] - type = ADEEDFEnergyLog - variable = mean_en - electrons = em - target = Ar - reaction = 'em + Ar -> em + Ar*' - threshold_energy = -11.56 - [] - #Energy loss from step-wise ionization - [Stepwise_Ionization_Loss] - type = ADEEDFEnergyLog - variable = mean_en - electrons = em - target = Ar* - reaction = 'em + Ar* -> em + em + Ar+' - threshold_energy = -4.14 - [] - #Energy gain from superelastic collisions - [Collisions_Loss] - type = ADEEDFEnergyLog - variable = mean_en - electrons = em - target = Ar* - reaction = 'em + Ar* -> em + Ar' - threshold_energy = 11.56 - [] - - #Argon Excited Equations For Shooting Method - #Time Derivative term of excited Argon - [SM_Ar*_time_deriv] - type = TimeDerivative - variable = SMDeriv - [] - #Diffusion term of excited Argon - [SM_Ar*_diffusion] - type = CoeffDiffusionForShootMethod - variable = SMDeriv - density = Ar* - position_units = ${dom0Scale} - [] - #Net excited Argon loss from step-wise ionization - [SM_Ar*_stepwise_ionization] - type = EEDFReactionLogForShootMethod - variable = SMDeriv - density = Ar* - electron = em - energy = mean_en - reaction = 'em + Ar* -> em + em + Ar+' - coefficient = -1 - [] - #Net excited Argon loss from superelastic collisions - [SM_Ar*_collisions] - type = EEDFReactionLogForShootMethod - variable = SMDeriv - density = Ar* - electron = em - energy = mean_en - reaction = 'em + Ar* -> em + Ar' - coefficient = -1 - [] - #Net excited Argon loss from quenching to resonant - [SM_Ar*_quenching] - type = ReactionSecondOrderLogForShootMethod - variable = SMDeriv - density = Ar* - v = em - reaction = 'em + Ar* -> em + Ar_r' - coefficient = -1 - [] - #Net excited Argon loss from metastable pooling - [SM_Ar*_pooling] - type = ReactionSecondOrderLogForShootMethod - variable = SMDeriv - density = Ar* - v = Ar* - reaction = 'Ar* + Ar* -> Ar+ + Ar + em' - coefficient = -2 - [] - #Net excited Argon loss from two-body quenching - [SM_Ar*_2B_quenching] - type = ReactionSecondOrderLogForShootMethod - variable = SMDeriv - density = Ar* - v = Ar - reaction = 'Ar* + Ar -> Ar + Ar' - coefficient = -1 - [] - #Net excited Argon loss from three-body quenching - [SM_Ar*_3B_quenching] - type = ReactionThirdOrderLogForShootMethod - variable = SMDeriv - density = Ar* - v = Ar - w = Ar - reaction = 'Ar* + Ar + Ar -> Ar_2 + Ar' - coefficient = -1 - [] -[] - -[AuxVariables] - [emDeBug] - [] - [Ar+_DeBug] - [] - [Ar*_DeBug] - [] - [mean_enDeBug] - [] - - [Te] - order = CONSTANT - family = MONOMIAL - [] - - [x] - order = CONSTANT - family = MONOMIAL - [] - - [x_node] - [] - - [rho] - order = CONSTANT - family = MONOMIAL - [] - - [em_lin] - order = CONSTANT - family = MONOMIAL - [] - - [Ar+_lin] - order = CONSTANT - family = MONOMIAL - [] - - [Ar*_lin] - order = CONSTANT - family = MONOMIAL - [] - - [Ar] - [] - - [Efield] - order = CONSTANT - family = MONOMIAL - [] - - [Current_em] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [Current_Ar] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [emRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [exRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [swRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [deexRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [quRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [poolRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [TwoBRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] - [ThreeBRate] - order = CONSTANT - family = MONOMIAL - block = 0 - [] -[] - -[AuxKernels] - [emDeBug] - type = DebugResidualAux - variable = emDeBug - debug_variable = em - #execute_on = 'LINEAR NONLINEAR TIMESTEP_BEGIN' - [] - [Ar+_DeBug] - type = DebugResidualAux - variable = Ar+_DeBug - debug_variable = Ar+ - #execute_on = 'LINEAR NONLINEAR TIMESTEP_BEGIN' - [] - [mean_enDeBug] - type = DebugResidualAux - variable = mean_enDeBug - debug_variable = mean_en - #execute_on = 'LINEAR NONLINEAR TIMESTEP_BEGIN' - [] - [Ar*_DeBug] - type = DebugResidualAux - variable = Ar*_DeBug - debug_variable = Ar* - #execute_on = 'LINEAR NONLINEAR TIMESTEP_BEGIN' - [] - - [emRate] - type = ADProcRateForRateCoeff - variable = emRate - v = em - w = Ar - reaction = 'em + Ar -> em + em + Ar+' - [] - [exRate] - type = ADProcRateForRateCoeff - variable = exRate - v = em - w = Ar* - reaction = 'em + Ar -> em + Ar*' - [] - [swRate] - type = ADProcRateForRateCoeff - variable = swRate - v = em - w = Ar* - reaction = 'em + Ar* -> em + em + Ar+' - [] - [deexRate] - type = ADProcRateForRateCoeff - variable = deexRate - v = em - w = Ar* - reaction = 'em + Ar* -> em + Ar' - [] - [quRate] - type = ADProcRateForRateCoeff - variable = quRate - v = em - w = Ar* - reaction = 'em + Ar* -> em + Ar_r' - [] - [poolRate] - type = ADProcRateForRateCoeff - variable = poolRate - v = Ar* - w = Ar* - reaction = 'Ar* + Ar* -> Ar+ + Ar + em' - [] - [TwoBRate] - type = ADProcRateForRateCoeff - variable = TwoBRate - v = Ar* - w = Ar - reaction = 'Ar* + Ar -> Ar + Ar' - [] - [ThreeBRate] - type = ADProcRateForRateCoeffThreeBody - variable = ThreeBRate - v = Ar* - w = Ar - x = Ar - reaction = 'Ar* + Ar + Ar -> Ar_2 + Ar' - [] - [Te] - type = ElectronTemperature - variable = Te - electron_density = em - mean_en = mean_en - [] - [x_g] - type = Position - variable = x - position_units = ${dom0Scale} - [] - - [x_ng] - type = Position - variable = x_node - position_units = ${dom0Scale} - [] - - [em_lin] - type = DensityMoles - variable = em_lin - density_log = em - [] - [Ar+_lin] - type = DensityMoles - variable = Ar+_lin - density_log = Ar+ - [] - [Ar*_lin] - type = DensityMoles - variable = Ar*_lin - density_log = Ar* - [] - - [Ar_val] - type = ConstantAux - variable = Ar - # value = 3.22e22 - value = -2.928623 - execute_on = INITIAL - [] - - [Efield_calc] - type = Efield - component = 0 - potential = potential - variable = Efield - position_units = ${dom0Scale} - [] - [Current_em] - type = ADCurrent - potential = potential - density_log = em - variable = Current_em - art_diff = false - block = 0 - position_units = ${dom0Scale} - [] - [Current_Ar] - type = ADCurrent - potential = potential - density_log = Ar+ - variable = Current_Ar - art_diff = false - block = 0 - position_units = ${dom0Scale} - [] -[] - -[BCs] - #Voltage Boundary Condition, same as in paper - [potential_left] - type = FunctionDirichletBC - variable = potential - boundary = 'left' - function = potential_bc_func - preset = false - [] - [potential_dirichlet_right] - type = DirichletBC - variable = potential - boundary = 'right' - value = 0 - preset = false - [] - - #New Boundary conditions for electons, same as in paper - [em_physical_right] - type = LymberopoulosElectronBC - variable = em - boundary = 'right' - emission_coeffs = 0.01 - #gamma = 1 - ks = 1.19e5 - #ks = 0.0 - ions = Ar+ - potential = potential - position_units = ${dom0Scale} - [] - [em_physical_left] - type = LymberopoulosElectronBC - variable = em - boundary = 'left' - emission_coeffs = 0.01 - #gamma = 1 - ks = 1.19e5 - #ks = 0.0 - ions = Ar+ - potential = potential - position_units = ${dom0Scale} - [] - - #New Boundary conditions for ions, should be the same as in paper - [Ar+_physical_right_advection] - type = LymberopoulosIonBC - variable = Ar+ - potential = potential - boundary = 'right' - position_units = ${dom0Scale} - [] - [Ar+_physical_left_advection] - type = LymberopoulosIonBC - variable = Ar+ - potential = potential - boundary = 'left' - position_units = ${dom0Scale} - [] - - #New Boundary conditions for ions, should be the same as in paper - #(except the metastables are not set to zero, since Zapdos uses log form) - [Ar*_physical_right_diffusion] - type = LogDensityDirichletBC - variable = Ar* - boundary = 'right' - value = 1e-5 - [] - [Ar*_physical_left_diffusion] - type = LogDensityDirichletBC - variable = Ar* - boundary = 'left' - value = 1e-5 - [] - - #New Boundary conditions for mean energy, should be the same as in paper - [mean_en_physical_right] - type = ElectronTemperatureDirichletBC - variable = mean_en - electrons = em - value = 0.5 - boundary = 'right' - [] - [mean_en_physical_left] - type = ElectronTemperatureDirichletBC - variable = mean_en - electrons = em - value = 0.5 - boundary = 'left' - [] - -[] - -[Functions] - [potential_bc_func] - type = ParsedFunction - expression = '0.100*sin(2*pi*13.56e6*t)' - [] -[] - -[Materials] - [GasBasics] - type = GasElectronMoments - interp_trans_coeffs = false - interp_elastic_coeff = false - ramp_trans_coeffs = false - user_p_gas = 133.322 - em = em - potential = potential - mean_en = mean_en - user_electron_mobility = 30.0 - user_electron_diffusion_coeff = 119.8757763975 - property_tables_file = Argon_reactions_paper_RateCoefficients/electron_moments.txt - [] - [gas_species_0] - type = ADHeavySpecies - heavy_species_name = Ar+ - heavy_species_mass = 6.64e-26 - heavy_species_charge = 1.0 - mobility = 0.144409938 - diffusivity = 6.428571e-3 - [] - [gas_species_1] - type = ADHeavySpecies - heavy_species_name = Ar* - heavy_species_mass = 6.64e-26 - heavy_species_charge = 0.0 - diffusivity = 7.515528e-3 - [] - [gas_species_2] - type = ADHeavySpecies - heavy_species_name = Ar - heavy_species_mass = 6.64e-26 - heavy_species_charge = 0.0 - [] - [reaction_0] - type = ADZapdosEEDFRateConstant - mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar -> em + Ar*.txt' - reaction = 'em + Ar -> em + Ar*' - electrons = em - [] - [reaction_1] - type = ADZapdosEEDFRateConstant - mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar -> em + em + Ar+.txt' - reaction = 'em + Ar -> em + em + Ar+' - electrons = em - [] - [reaction_2] - type = ADZapdosEEDFRateConstant - mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar* -> em + Ar.txt' - reaction = 'em + Ar* -> em + Ar' - electrons = em - [] - [reaction_3] - type = ADZapdosEEDFRateConstant - mean_energy = mean_en - property_file = 'Argon_reactions_paper_RateCoefficients/reaction_em + Ar* -> em + em + Ar+.txt' - reaction = 'em + Ar* -> em + em + Ar+' - electrons = em - [] - [reaction_4] - type = ADGenericRateConstant - reaction = 'em + Ar* -> em + Ar_r' - #reaction_rate_value = 2e-13 - reaction_rate_value = 1.2044e11 - [] - [reaction_5] - type = ADGenericRateConstant - reaction = 'Ar* + Ar* -> Ar+ + Ar + em' - #reaction_rate_value = 6.2e-16 - reaction_rate_value = 373364000 - [] - [reaction_6] - type = ADGenericRateConstant - reaction = 'Ar* + Ar -> Ar + Ar' - #reaction_rate_value = 3e-21 - reaction_rate_value = 1806.6 - [] - [reaction_7] - type = ADGenericRateConstant - reaction = 'Ar* + Ar + Ar -> Ar_2 + Ar' - #reaction_rate_value = 1.1e-43 - reaction_rate_value = 39890.9324 - [] -[] - -#New postprocessor that calculates the inverse of the plasma frequency -[Postprocessors] - [InversePlasmaFreq] - type = PlasmaFrequencyInverse - variable = em - use_moles = true - execute_on = 'INITIAL TIMESTEP_BEGIN' - [] -[] - -[Preconditioning] - active = 'smp' - [smp] - type = SMP - full = true - [] - - [fdp] - type = FDP - full = true - [] -[] - -[Executioner] - type = Transient - end_time = 73.74631268e-9 - petsc_options = '-snes_converged_reason -snes_linesearch_monitor' - solve_type = NEWTON - petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type -snes_linesearch_minlambda' - petsc_options_value = 'lu NONZERO 1.e-10 fgmres 1e-3' - nl_rel_tol = 1e-08 - #nl_abs_tol = 7.6e-5 #Commit out do to test falure on Mac - dtmin = 1e-14 - l_max_its = 20 - - scheme = bdf2 - dt = 1e-9 -[] - -[Outputs] - perf_graph = true - [out] - type = Exodus - [] -[] diff --git a/test/tests/accelerations/Acceleration_By_Shooting_Method_Shooting.i b/test/tests/accelerations/Acceleration_By_Shooting_Method_Shooting.i index 5a89b5ce9a0..1a385eadfd1 100644 --- a/test/tests/accelerations/Acceleration_By_Shooting_Method_Shooting.i +++ b/test/tests/accelerations/Acceleration_By_Shooting_Method_Shooting.i @@ -1,5 +1,12 @@ +dom0Scale=25.4e-3 + +# [GlobalParams] +# potential_units = kV +# use_moles = true +# [] + [Mesh] - [file] + [geo] type = FileMeshGenerator file = 'Lymberopoulos_paper.msh' [] @@ -7,7 +14,7 @@ type = SideSetsFromNormalsGenerator normals = '-1 0 0' new_boundary = 'left' - input = file + input = geo [] [right] type = SideSetsFromNormalsGenerator @@ -27,25 +34,23 @@ [] [AuxVariables] - [em] - [] - [Ar+] - [] - [mean_en] - [] - [potential] - [] [Ar*S] [] - [Ar*T] [] - [SMDeriv] - [] - [SMDerivReset] + [SM_Ar*] + [] + [SM_Ar*Reset] initial_condition = 1.0 [] + + [x_node] + [] + [x] + order = CONSTANT + family = MONOMIAL + [] [] [Kernels] @@ -54,85 +59,53 @@ variable = Ar* density_at_start_cycle = Ar*S density_at_end_cycle = Ar*T - sensitivity_variable = SMDeriv - growth_limit = 100.0 + sensitivity_variable = SM_Ar* + growth_limit = 100 [] [] -[BCs] - [Ar*_physical_right_diffusion] - type = LogDensityDirichletBC - variable = Ar* - boundary = 'right' - value = 1e-5 +[AuxKernels] + [Constant_SM_Ar*Reset] + type = ConstantAux + variable = SM_Ar*Reset + value = 1.0 + execute_on = 'TIMESTEP_BEGIN' [] - [Ar*_physical_left_diffusion] - type = LogDensityDirichletBC - variable = Ar* - boundary = 'left' - value = 1e-5 + + [x_ng] + type = Position + variable = x_node + position_units = ${dom0Scale} + [] + [x_g] + type = Position + variable = x + position_units = ${dom0Scale} [] [] -#MultiApp used to calculate the non-accelerated density for 1RF cycle. -#This is used to get A*T (density at end of cycle) and -##the sensitivity variable needed for the shoot method. -[MultiApps] - [SensitivityMatrix] - type = FullSolveMultiApp - input_files = 'Acceleration_By_Shooting_Method_SensitivityMatrix.i' - [] +[BCs] + #Boundary conditions for metastables + [Ar*_physical_right_value] + type = DirichletBC + variable = Ar* + boundary = 'right' + value = -50.0 + [] + [Ar*_physical_left_value] + type = DirichletBC + variable = Ar* + boundary = 'left' + value = -50.0 + [] [] -[Transfers] - [em_to_sub] - type = MultiAppCopyTransfer - to_multi_app = SensitivityMatrix - source_variable = em - variable = em - [] - [Ar+_to_sub] - type = MultiAppCopyTransfer - to_multi_app = SensitivityMatrix - source_variable = Ar+ - variable = Ar+ - [] - [mean_en_to_sub] - type = MultiAppCopyTransfer - to_multi_app = SensitivityMatrix - source_variable = mean_en - variable = mean_en - [] - [potential_to_sub] - type = MultiAppCopyTransfer - to_multi_app = SensitivityMatrix - source_variable = potential - variable = potential - [] - [Ar*_to_sub] - type = MultiAppCopyTransfer - to_multi_app = SensitivityMatrix - source_variable = Ar* +[Postprocessors] + [Meta_Relative_Diff] + type = RelativeElementL2Difference variable = Ar* - [] - [Deriv_to_sub] - type = MultiAppCopyTransfer - to_multi_app = SensitivityMatrix - source_variable = SMDerivReset - variable = SMDeriv - [] - - [Ar*T_from_sub] - type = MultiAppCopyTransfer - from_multi_app = SensitivityMatrix - source_variable = Ar* - variable = Ar*T - [] - [Deriv_from_sub] - type = MultiAppCopyTransfer - from_multi_app = SensitivityMatrix - source_variable = SMDeriv - variable = SMDeriv + other_variable = Ar*S + execute_on = 'TIMESTEP_END' [] [] @@ -154,12 +127,15 @@ petsc_options = '-snes_converged_reason -snes_linesearch_monitor' solve_type = NEWTON - petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type' - petsc_options_value = 'lu NONZERO 1.e-10 fgmres' + + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + # abort_on_solve_fail = true [] [Outputs] - perf_graph = true + print_perf_log = true [out] type = Exodus [] diff --git a/test/tests/accelerations/Argon_reactions_RateCoefficients/electron_moments.txt b/test/tests/accelerations/Argon_reactions_RateCoefficients/electron_moments.txt new file mode 100644 index 00000000000..12c7cc83108 --- /dev/null +++ b/test/tests/accelerations/Argon_reactions_RateCoefficients/electron_moments.txt @@ -0,0 +1,300 @@ +6.691000E-01 6.599379E+02 8.602484E+02 +6.793000E-01 6.437888E+02 8.509317E+02 +6.897000E-01 6.282609E+02 8.416149E+02 +7.004000E-01 6.127329E+02 8.326087E+02 +7.112000E-01 5.981366E+02 8.236025E+02 +7.223000E-01 5.835404E+02 8.145963E+02 +7.336000E-01 5.692547E+02 8.055901E+02 +7.452000E-01 5.555901E+02 7.968944E+02 +7.570000E-01 5.422360E+02 7.881988E+02 +7.690000E-01 5.291925E+02 7.795031E+02 +7.813000E-01 5.164596E+02 7.708075E+02 +7.939000E-01 5.040373E+02 7.624224E+02 +8.067000E-01 4.919255E+02 7.524845E+02 +8.199000E-01 4.801242E+02 7.440994E+02 +8.333000E-01 4.686335E+02 7.357143E+02 +8.469000E-01 4.574534E+02 7.276398E+02 +8.609000E-01 4.465839E+02 7.195652E+02 +8.752000E-01 4.360248E+02 7.114907E+02 +8.898000E-01 4.254658E+02 7.037267E+02 +9.047000E-01 4.155280E+02 6.959627E+02 +9.199000E-01 4.055901E+02 6.881988E+02 +9.354000E-01 3.959627E+02 6.804348E+02 +9.512000E-01 3.863354E+02 6.729814E+02 +9.673000E-01 3.770186E+02 6.636646E+02 +9.838000E-01 3.680124E+02 6.562112E+02 +1.001000E+00 3.593168E+02 6.490683E+02 +1.018000E+00 3.506211E+02 6.419255E+02 +1.035000E+00 3.422360E+02 6.347826E+02 +1.053000E+00 3.341615E+02 6.276398E+02 +1.071000E+00 3.260870E+02 6.208075E+02 +1.089000E+00 3.183230E+02 6.139752E+02 +1.108000E+00 3.104969E+02 6.074534E+02 +1.127000E+00 3.029814E+02 6.006211E+02 +1.146000E+00 2.956211E+02 5.940994E+02 +1.166000E+00 2.884161E+02 5.888199E+02 +1.186000E+00 2.813975E+02 5.826087E+02 +1.206000E+00 2.745031E+02 5.763975E+02 +1.227000E+00 2.677950E+02 5.701863E+02 +1.248000E+00 2.612112E+02 5.639752E+02 +1.269000E+00 2.547826E+02 5.580745E+02 +1.291000E+00 2.484783E+02 5.521739E+02 +1.313000E+00 2.423602E+02 5.462733E+02 +1.335000E+00 2.363354E+02 5.403727E+02 +1.358000E+00 2.304658E+02 5.347826E+02 +1.381000E+00 2.247516E+02 5.291925E+02 +1.404000E+00 2.191304E+02 5.273292E+02 +1.428000E+00 2.136646E+02 5.217391E+02 +1.452000E+00 2.083540E+02 5.161491E+02 +1.477000E+00 2.031366E+02 5.108696E+02 +1.501000E+00 1.980745E+02 5.055901E+02 +1.527000E+00 1.931056E+02 5.003106E+02 +1.552000E+00 1.882609E+02 4.953416E+02 +1.578000E+00 1.835714E+02 4.900621E+02 +1.605000E+00 1.789752E+02 4.850932E+02 +1.631000E+00 1.744720E+02 4.801242E+02 +1.659000E+00 1.700932E+02 4.720497E+02 +1.686000E+00 1.658385E+02 4.673913E+02 +1.714000E+00 1.617081E+02 4.627329E+02 +1.743000E+00 1.576398E+02 4.580745E+02 +1.772000E+00 1.536957E+02 4.534161E+02 +1.802000E+00 1.498758E+02 4.490683E+02 +1.832000E+00 1.461180E+02 4.444099E+02 +1.863000E+00 1.424845E+02 4.400621E+02 +1.894000E+00 1.389130E+02 4.357143E+02 +1.926000E+00 1.354658E+02 4.313665E+02 +1.958000E+00 1.320807E+02 4.270186E+02 +1.991000E+00 1.287888E+02 4.232919E+02 +2.024000E+00 1.255901E+02 4.192547E+02 +2.058000E+00 1.224534E+02 4.149068E+02 +2.093000E+00 1.194099E+02 4.108696E+02 +2.128000E+00 1.164596E+02 4.068323E+02 +2.164000E+00 1.135404E+02 4.027950E+02 +2.200000E+00 1.107453E+02 3.990683E+02 +2.237000E+00 1.079814E+02 3.950311E+02 +2.275000E+00 1.053106E+02 3.913043E+02 +2.314000E+00 1.027019E+02 3.872671E+02 +2.353000E+00 1.001553E+02 3.835404E+02 +2.393000E+00 9.767081E+01 3.810559E+02 +2.433000E+00 9.524845E+01 3.773292E+02 +2.474000E+00 9.285714E+01 3.739130E+02 +2.516000E+00 9.055901E+01 3.701863E+02 +2.559000E+00 8.832298E+01 3.667702E+02 +2.602000E+00 8.611801E+01 3.630435E+02 +2.647000E+00 8.397516E+01 3.596273E+02 +2.691000E+00 8.189441E+01 3.562112E+02 +2.737000E+00 7.984472E+01 3.527950E+02 +2.783000E+00 7.785714E+01 3.493789E+02 +2.831000E+00 7.593168E+01 3.459627E+02 +2.878000E+00 7.400621E+01 3.425466E+02 +2.927000E+00 7.217391E+01 3.394410E+02 +2.976000E+00 7.037267E+01 3.360248E+02 +3.027000E+00 6.860248E+01 3.329193E+02 +3.077000E+00 6.686335E+01 3.298137E+02 +3.129000E+00 6.518634E+01 3.267081E+02 +3.181000E+00 6.354037E+01 3.236025E+02 +3.235000E+00 6.192547E+01 3.204969E+02 +3.288000E+00 6.037267E+01 3.177019E+02 +3.343000E+00 5.885093E+01 3.145963E+02 +3.399000E+00 5.732919E+01 3.118012E+02 +3.455000E+00 5.586957E+01 3.087267E+02 +3.512000E+00 5.444099E+01 3.058385E+02 +3.569000E+00 5.304348E+01 3.030124E+02 +3.628000E+00 5.170807E+01 3.002174E+02 +3.687000E+00 5.037267E+01 2.974534E+02 +3.746000E+00 4.906832E+01 2.947205E+02 +3.807000E+00 4.779503E+01 2.919876E+02 +3.868000E+00 4.658385E+01 2.893168E+02 +3.931000E+00 4.537267E+01 2.866770E+02 +3.993000E+00 4.422360E+01 2.840683E+02 +4.057000E+00 4.307453E+01 2.814907E+02 +4.121000E+00 4.198758E+01 2.789441E+02 +4.185000E+00 4.093168E+01 2.764286E+02 +4.250000E+00 3.990683E+01 2.740062E+02 +4.315000E+00 3.894410E+01 2.716149E+02 +4.379000E+00 3.804348E+01 2.692857E+02 +4.443000E+00 3.717391E+01 2.670497E+02 +4.506000E+00 3.636646E+01 2.649068E+02 +4.568000E+00 3.562112E+01 2.628882E+02 +4.628000E+00 3.496894E+01 2.609627E+02 +4.686000E+00 3.437888E+01 2.591615E+02 +4.741000E+00 3.385093E+01 2.574845E+02 +4.793000E+00 3.338509E+01 2.559938E+02 +4.843000E+00 3.301242E+01 2.546273E+02 +4.889000E+00 3.270186E+01 2.533851E+02 +4.932000E+00 3.245342E+01 2.522981E+02 +4.972000E+00 3.226708E+01 2.513665E+02 +5.009000E+00 3.214286E+01 2.505280E+02 +5.042000E+00 3.204969E+01 2.498137E+02 +5.073000E+00 3.198758E+01 2.491925E+02 +5.101000E+00 3.195652E+01 2.486646E+02 +5.127000E+00 3.195652E+01 2.482298E+02 +5.150000E+00 3.198758E+01 2.478571E+02 +5.171000E+00 3.204969E+01 2.475466E+02 +5.191000E+00 3.208075E+01 2.472671E+02 +5.209000E+00 3.214286E+01 2.470497E+02 +5.226000E+00 3.223602E+01 2.468323E+02 +5.241000E+00 3.229814E+01 2.466770E+02 +5.256000E+00 3.236025E+01 2.465217E+02 +5.269000E+00 3.242236E+01 2.463975E+02 +5.282000E+00 3.248447E+01 2.462733E+02 +5.295000E+00 3.254658E+01 2.461491E+02 +5.307000E+00 3.257764E+01 2.460248E+02 +5.318000E+00 3.263975E+01 2.458385E+02 +5.330000E+00 3.267081E+01 2.457143E+02 +5.341000E+00 3.267081E+01 2.455901E+02 +5.352000E+00 3.270186E+01 2.454658E+02 +5.363000E+00 3.270186E+01 2.453106E+02 +5.374000E+00 3.270186E+01 2.451553E+02 +5.385000E+00 3.270186E+01 2.450000E+02 +5.396000E+00 3.267081E+01 2.448447E+02 +5.408000E+00 3.263975E+01 2.446584E+02 +5.419000E+00 3.260870E+01 2.444720E+02 +5.431000E+00 3.257764E+01 2.442547E+02 +5.442000E+00 3.251553E+01 2.440373E+02 +5.454000E+00 3.245342E+01 2.438199E+02 +5.467000E+00 3.239130E+01 2.435714E+02 +5.479000E+00 3.232919E+01 2.433230E+02 +5.492000E+00 3.223602E+01 2.430745E+02 +5.505000E+00 3.217391E+01 2.427950E+02 +5.519000E+00 3.208075E+01 2.425155E+02 +5.532000E+00 3.198758E+01 2.422360E+02 +5.546000E+00 3.186335E+01 2.419255E+02 +5.561000E+00 3.177019E+01 2.416149E+02 +5.576000E+00 3.164596E+01 2.412733E+02 +5.591000E+00 3.152174E+01 2.409317E+02 +5.606000E+00 3.142857E+01 2.405590E+02 +5.622000E+00 3.130435E+01 2.402174E+02 +5.638000E+00 3.114907E+01 2.398447E+02 +5.655000E+00 3.102795E+01 2.394720E+02 +5.672000E+00 3.089130E+01 2.390994E+02 +5.690000E+00 3.075466E+01 2.387267E+02 +5.708000E+00 3.061180E+01 2.383230E+02 +5.726000E+00 3.046894E+01 2.379193E+02 +5.745000E+00 3.031988E+01 2.374845E+02 +5.764000E+00 3.017391E+01 2.370807E+02 +5.783000E+00 3.002174E+01 2.366460E+02 +5.803000E+00 2.986957E+01 2.362112E+02 +5.824000E+00 2.971739E+01 2.357764E+02 +5.845000E+00 2.956211E+01 2.353416E+02 +5.866000E+00 2.940683E+01 2.348758E+02 +5.888000E+00 2.925155E+01 2.344410E+02 +5.910000E+00 2.909317E+01 2.339752E+02 +5.933000E+00 2.893789E+01 2.335093E+02 +5.956000E+00 2.878261E+01 2.330124E+02 +5.980000E+00 2.862733E+01 2.325466E+02 +6.004000E+00 2.847205E+01 2.320497E+02 +6.028000E+00 2.831677E+01 2.315839E+02 +6.053000E+00 2.816149E+01 2.310870E+02 +6.079000E+00 2.800932E+01 2.305901E+02 +6.105000E+00 2.785714E+01 2.300932E+02 +6.131000E+00 2.770807E+01 2.295963E+02 +6.158000E+00 2.755901E+01 2.290683E+02 +6.185000E+00 2.740994E+01 2.285714E+02 +6.212000E+00 2.726398E+01 2.280435E+02 +6.241000E+00 2.712112E+01 2.275155E+02 +6.269000E+00 2.697826E+01 2.269876E+02 +6.298000E+00 2.683540E+01 2.264907E+02 +6.327000E+00 2.669876E+01 2.259317E+02 +6.357000E+00 2.655901E+01 2.254037E+02 +6.388000E+00 2.642547E+01 2.248758E+02 +6.418000E+00 2.629193E+01 2.243168E+02 +6.450000E+00 2.615839E+01 2.237888E+02 +6.481000E+00 2.603106E+01 2.232298E+02 +6.514000E+00 2.590373E+01 2.226708E+02 +6.546000E+00 2.577640E+01 2.220807E+02 +6.579000E+00 2.565528E+01 2.215217E+02 +6.612000E+00 2.553106E+01 2.209317E+02 +6.647000E+00 2.541304E+01 2.203416E+02 +6.681000E+00 2.529503E+01 2.197516E+02 +6.716000E+00 2.518012E+01 2.191615E+02 +6.752000E+00 2.506522E+01 2.185404E+02 +6.788000E+00 2.495342E+01 2.179193E+02 +6.824000E+00 2.484161E+01 2.172981E+02 +6.861000E+00 2.473292E+01 2.166770E+02 +6.899000E+00 2.462733E+01 2.160559E+02 +6.937000E+00 2.451863E+01 2.154037E+02 +6.976000E+00 2.441615E+01 2.147516E+02 +7.016000E+00 2.431056E+01 2.140994E+02 +7.056000E+00 2.420807E+01 2.134161E+02 +7.097000E+00 2.410870E+01 2.127640E+02 +7.138000E+00 2.400932E+01 2.120807E+02 +7.180000E+00 2.390683E+01 2.114286E+02 +7.223000E+00 2.381056E+01 2.107453E+02 +7.267000E+00 2.371429E+01 2.100621E+02 +7.312000E+00 2.361801E+01 2.093478E+02 +7.357000E+00 2.352174E+01 2.086646E+02 +7.403000E+00 2.342857E+01 2.079814E+02 +7.451000E+00 2.333230E+01 2.072981E+02 +7.498000E+00 2.323913E+01 2.065839E+02 +7.548000E+00 2.314596E+01 2.059006E+02 +7.598000E+00 2.305590E+01 2.052174E+02 +7.649000E+00 2.296273E+01 2.045342E+02 +7.702000E+00 2.287267E+01 2.038509E+02 +7.755000E+00 2.278261E+01 2.031988E+02 +7.810000E+00 2.269255E+01 2.025155E+02 +7.866000E+00 2.260248E+01 2.018634E+02 +7.924000E+00 2.251242E+01 2.012112E+02 +7.983000E+00 2.242236E+01 2.005901E+02 +8.043000E+00 2.233230E+01 1.999689E+02 +8.105000E+00 2.224224E+01 1.993478E+02 +8.169000E+00 2.215217E+01 1.987578E+02 +8.234000E+00 2.206211E+01 1.981677E+02 +8.302000E+00 2.197205E+01 1.975776E+02 +8.371000E+00 2.188199E+01 1.970186E+02 +8.443000E+00 2.179193E+01 1.964907E+02 +8.516000E+00 2.170497E+01 1.959627E+02 +8.592000E+00 2.161491E+01 1.954658E+02 +8.671000E+00 2.152484E+01 1.949689E+02 +8.752000E+00 2.143478E+01 1.945031E+02 +8.835000E+00 2.134472E+01 1.940683E+02 +8.921000E+00 2.125776E+01 1.936335E+02 +9.011000E+00 2.116770E+01 1.932298E+02 +9.103000E+00 2.108075E+01 1.928882E+02 +9.199000E+00 2.099068E+01 1.925466E+02 +9.298000E+00 2.090062E+01 1.922360E+02 +9.400000E+00 2.080745E+01 1.919565E+02 +9.507000E+00 2.072050E+01 1.917081E+02 +9.618000E+00 2.063043E+01 1.915217E+02 +9.733000E+00 2.054037E+01 1.913354E+02 +9.853000E+00 2.045963E+01 1.912733E+02 +9.978000E+00 2.037267E+01 1.911801E+02 +1.011000E+01 2.028261E+01 1.911801E+02 +1.024000E+01 2.019565E+01 1.911801E+02 +1.038000E+01 2.010870E+01 1.912733E+02 +1.053000E+01 2.001553E+01 1.914286E+02 +1.068000E+01 1.992857E+01 1.916149E+02 +1.084000E+01 1.984161E+01 1.918944E+02 +1.101000E+01 1.975466E+01 1.922360E+02 +1.118000E+01 1.966770E+01 1.926398E+02 +1.136000E+01 1.958385E+01 1.931366E+02 +1.155000E+01 1.949689E+01 1.937267E+02 +1.175000E+01 1.941615E+01 1.944410E+02 +1.195000E+01 1.932919E+01 1.952174E+02 +1.217000E+01 1.924534E+01 1.960870E+02 +1.240000E+01 1.915839E+01 1.970807E+02 +1.263000E+01 1.907764E+01 1.982609E+02 +1.288000E+01 1.899379E+01 1.994720E+02 +1.314000E+01 1.890683E+01 2.008075E+02 +1.341000E+01 1.881988E+01 2.022671E+02 +1.370000E+01 1.873292E+01 2.038820E+02 +1.400000E+01 1.864596E+01 2.056211E+02 +1.431000E+01 1.855901E+01 2.075466E+02 +1.464000E+01 1.847826E+01 2.096894E+02 +1.498000E+01 1.838820E+01 2.119255E+02 +1.534000E+01 1.830124E+01 2.143478E+02 +1.572000E+01 1.821118E+01 2.169255E+02 +1.612000E+01 1.812112E+01 2.196584E+02 +1.654000E+01 1.802795E+01 2.226087E+02 +1.697000E+01 1.793789E+01 2.257764E+02 +1.743000E+01 1.784783E+01 2.293478E+02 +1.791000E+01 1.775466E+01 2.329503E+02 +1.841000E+01 1.765839E+01 2.367391E+02 +1.894000E+01 1.755590E+01 2.406832E+02 +1.949000E+01 1.745963E+01 2.449689E+02 +2.007000E+01 1.735714E+01 2.494720E+02 +2.067000E+01 1.725776E+01 2.542547E+02 +2.131000E+01 1.715528E+01 2.592547E+02 +2.198000E+01 1.705280E+01 2.645342E+02 +2.268000E+01 1.695652E+01 2.703727E+02 +2.341000E+01 1.685093E+01 2.761801E+02 diff --git a/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + Ar*.txt b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + Ar*.txt new file mode 100644 index 00000000000..499809308ad --- /dev/null +++ b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + Ar*.txt @@ -0,0 +1,96 @@ +0.000000E+00 1.336440E+02 +7.965000E-01 1.336440E+02 +1.111500E+00 1.649480E+02 +1.725000E+00 1.872220E+02 +2.430000E+00 2.426060E+02 +3.495000E+00 3.497620E+02 +5.040000E+00 4.966500E+05 +5.325000E+00 3.557820E+06 +5.640000E+00 1.414700E+07 +5.925000E+00 2.901640E+07 +6.165000E+00 4.761820E+07 +6.375000E+00 6.862800E+07 +6.600000E+00 9.090200E+07 +6.780000E+00 1.155840E+08 +6.960000E+00 1.408680E+08 +7.110000E+00 1.679580E+08 +7.260000E+00 1.950480E+08 +7.410000E+00 2.233420E+08 +7.545000E+00 2.522380E+08 +7.680000E+00 2.817360E+08 +7.815000E+00 3.118360E+08 +7.950000E+00 3.419360E+08 +8.070000E+00 3.726380E+08 +8.205000E+00 4.039420E+08 +8.325000E+00 4.352460E+08 +8.445000E+00 4.671520E+08 +8.565000E+00 4.990580E+08 +8.685000E+00 5.315660E+08 +8.805000E+00 5.640740E+08 +8.925000E+00 5.965820E+08 +9.045000E+00 6.321000E+08 +9.165000E+00 6.622000E+08 +9.285000E+00 6.983200E+08 +9.405000E+00 7.284200E+08 +9.525000E+00 7.645400E+08 +9.645000E+00 7.946400E+08 +9.765000E+00 8.307600E+08 +9.885000E+00 8.608600E+08 +1.000500E+01 8.969800E+08 +1.012500E+01 9.270800E+08 +1.024500E+01 9.571800E+08 +1.038000E+01 9.933000E+08 +1.050000E+01 1.023400E+09 +1.062000E+01 1.059520E+09 +1.074000E+01 1.089620E+09 +1.086000E+01 1.119720E+09 +1.098000E+01 1.149820E+09 +1.110000E+01 1.179920E+09 +1.122000E+01 1.210020E+09 +1.134000E+01 1.240120E+09 +1.146000E+01 1.270220E+09 +1.158000E+01 1.300320E+09 +1.170000E+01 1.330420E+09 +1.180500E+01 1.354500E+09 +1.192500E+01 1.384600E+09 +1.204500E+01 1.414700E+09 +1.215000E+01 1.438780E+09 +1.227000E+01 1.462860E+09 +1.237500E+01 1.492960E+09 +1.248000E+01 1.517040E+09 +1.260000E+01 1.541120E+09 +1.270500E+01 1.565200E+09 +1.281000E+01 1.589280E+09 +1.291500E+01 1.613360E+09 +1.302000E+01 1.631420E+09 +1.311000E+01 1.655500E+09 +1.321500E+01 1.679580E+09 +1.330500E+01 1.697640E+09 +1.341000E+01 1.721720E+09 +1.350000E+01 1.739780E+09 +1.359000E+01 1.757840E+09 +1.369500E+01 1.781920E+09 +1.378500E+01 1.799980E+09 +1.387500E+01 1.818040E+09 +1.395000E+01 1.836100E+09 +1.404000E+01 1.854160E+09 +1.413000E+01 1.872220E+09 +1.420500E+01 1.884260E+09 +1.429500E+01 1.902320E+09 +1.437000E+01 1.920380E+09 +1.444500E+01 1.932420E+09 +1.452000E+01 1.950480E+09 +1.459500E+01 1.962520E+09 +1.467000E+01 1.980580E+09 +1.474500E+01 1.992620E+09 +1.482000E+01 2.004660E+09 +1.488000E+01 2.022720E+09 +1.495500E+01 2.034760E+09 +1.500000E+01 2.046800E+09 +1.515000E+01 2.058840E+09 +1.530000E+01 2.100980E+09 +1.545000E+01 2.119040E+09 +1.560000E+01 2.149140E+09 +1.575000E+01 2.173220E+09 +1.590000E+01 2.203320E+09 +1.605000E+01 2.233420E+09 diff --git a/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + Ar.txt b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + Ar.txt new file mode 100644 index 00000000000..3d51fdc3f4a --- /dev/null +++ b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + Ar.txt @@ -0,0 +1,301 @@ +0.000000E+00 2.748732E+09 +6.691000E-01 2.748732E+09 +6.793000E-01 2.820972E+09 +6.897000E-01 2.895620E+09 +7.004000E-01 2.971472E+09 +7.112000E-01 3.049732E+09 +7.223000E-01 3.130400E+09 +7.336000E-01 3.212874E+09 +7.452000E-01 3.297154E+09 +7.570000E-01 3.384444E+09 +7.690000E-01 3.473540E+09 +7.813000E-01 3.565044E+09 +7.939000E-01 3.659558E+09 +8.067000E-01 3.756480E+09 +8.199000E-01 3.855208E+09 +8.333000E-01 3.956946E+09 +8.469000E-01 4.061092E+09 +8.609000E-01 4.168248E+09 +8.752000E-01 4.277812E+09 +8.898000E-01 4.390386E+09 +9.047000E-01 4.505970E+09 +9.199000E-01 4.624564E+09 +9.354000E-01 4.746168E+09 +9.512000E-01 4.870782E+09 +9.673000E-01 4.999008E+09 +9.838000E-01 5.129642E+09 +1.001000E+00 5.263888E+09 +1.018000E+00 5.401144E+09 +1.035000E+00 5.542012E+09 +1.053000E+00 5.686492E+09 +1.071000E+00 5.833982E+09 +1.089000E+00 5.985686E+09 +1.108000E+00 6.140400E+09 +1.127000E+00 6.296920E+09 +1.146000E+00 6.465480E+09 +1.166000E+00 6.628020E+09 +1.186000E+00 6.802600E+09 +1.206000E+00 6.977180E+09 +1.227000E+00 7.157780E+09 +1.248000E+00 7.338380E+09 +1.269000E+00 7.525000E+09 +1.291000E+00 7.717640E+09 +1.313000E+00 7.916300E+09 +1.335000E+00 8.120980E+09 +1.358000E+00 8.325660E+09 +1.381000E+00 8.536360E+09 +1.404000E+00 8.759100E+09 +1.428000E+00 8.981840E+09 +1.452000E+00 9.210600E+09 +1.477000E+00 9.439360E+09 +1.501000E+00 9.680160E+09 +1.527000E+00 9.926980E+09 +1.552000E+00 1.017982E+10 +1.578000E+00 1.043868E+10 +1.605000E+00 1.070356E+10 +1.631000E+00 1.097446E+10 +1.659000E+00 1.125740E+10 +1.686000E+00 1.154034E+10 +1.714000E+00 1.183532E+10 +1.743000E+00 1.213632E+10 +1.772000E+00 1.244334E+10 +1.802000E+00 1.276240E+10 +1.832000E+00 1.308748E+10 +1.863000E+00 1.341858E+10 +1.894000E+00 1.376172E+10 +1.926000E+00 1.411088E+10 +1.958000E+00 1.447208E+10 +1.991000E+00 1.484532E+10 +2.024000E+00 1.522458E+10 +2.058000E+00 1.560986E+10 +2.093000E+00 1.601320E+10 +2.128000E+00 1.642256E+10 +2.164000E+00 1.683794E+10 +2.200000E+00 1.727138E+10 +2.237000E+00 1.771084E+10 +2.275000E+00 1.816234E+10 +2.314000E+00 1.863190E+10 +2.353000E+00 1.910748E+10 +2.393000E+00 1.959510E+10 +2.433000E+00 2.010078E+10 +2.474000E+00 2.061248E+10 +2.516000E+00 2.114224E+10 +2.559000E+00 2.167802E+10 +2.602000E+00 2.223186E+10 +2.647000E+00 2.280376E+10 +2.691000E+00 2.338770E+10 +2.737000E+00 2.398368E+10 +2.783000E+00 2.459772E+10 +2.831000E+00 2.522380E+10 +2.878000E+00 2.587396E+10 +2.927000E+00 2.653014E+10 +2.976000E+00 2.721040E+10 +3.027000E+00 2.790270E+10 +3.077000E+00 2.861306E+10 +3.129000E+00 2.934148E+10 +3.181000E+00 3.008796E+10 +3.235000E+00 3.085250E+10 +3.288000E+00 3.164112E+10 +3.343000E+00 3.244178E+10 +3.399000E+00 3.326652E+10 +3.455000E+00 3.412136E+10 +3.512000E+00 3.498222E+10 +3.569000E+00 3.587318E+10 +3.628000E+00 3.678220E+10 +3.687000E+00 3.771530E+10 +3.746000E+00 3.867248E+10 +3.807000E+00 3.965374E+10 +3.868000E+00 4.065908E+10 +3.931000E+00 4.168850E+10 +3.993000E+00 4.274200E+10 +4.057000E+00 4.381958E+10 +4.121000E+00 4.492124E+10 +4.185000E+00 4.604096E+10 +4.250000E+00 4.717874E+10 +4.315000E+00 4.833458E+10 +4.379000E+00 4.949042E+10 +4.443000E+00 5.065830E+10 +4.506000E+00 5.181414E+10 +4.568000E+00 5.295794E+10 +4.628000E+00 5.407766E+10 +4.686000E+00 5.517330E+10 +4.741000E+00 5.623282E+10 +4.793000E+00 5.724418E+10 +4.843000E+00 5.820136E+10 +4.889000E+00 5.911038E+10 +4.932000E+00 5.996522E+10 +4.972000E+00 6.074180E+10 +5.009000E+00 6.152440E+10 +5.042000E+00 6.218660E+10 +5.073000E+00 6.278860E+10 +5.101000E+00 6.339060E+10 +5.127000E+00 6.393240E+10 +5.150000E+00 6.441400E+10 +5.171000E+00 6.483540E+10 +5.191000E+00 6.525680E+10 +5.209000E+00 6.561800E+10 +5.226000E+00 6.597920E+10 +5.241000E+00 6.634040E+10 +5.256000E+00 6.664140E+10 +5.269000E+00 6.694240E+10 +5.282000E+00 6.718320E+10 +5.295000E+00 6.748420E+10 +5.307000E+00 6.772500E+10 +5.318000E+00 6.796580E+10 +5.330000E+00 6.820660E+10 +5.341000E+00 6.844740E+10 +5.352000E+00 6.868820E+10 +5.363000E+00 6.886880E+10 +5.374000E+00 6.910960E+10 +5.385000E+00 6.935040E+10 +5.396000E+00 6.953100E+10 +5.408000E+00 6.977180E+10 +5.419000E+00 7.001260E+10 +5.431000E+00 7.019320E+10 +5.442000E+00 7.043400E+10 +5.454000E+00 7.067480E+10 +5.467000E+00 7.091560E+10 +5.479000E+00 7.115640E+10 +5.492000E+00 7.139720E+10 +5.505000E+00 7.163800E+10 +5.519000E+00 7.187880E+10 +5.532000E+00 7.211960E+10 +5.546000E+00 7.236040E+10 +5.561000E+00 7.260120E+10 +5.576000E+00 7.290220E+10 +5.591000E+00 7.314300E+10 +5.606000E+00 7.344400E+10 +5.622000E+00 7.374500E+10 +5.638000E+00 7.398580E+10 +5.655000E+00 7.428680E+10 +5.672000E+00 7.458780E+10 +5.690000E+00 7.488880E+10 +5.708000E+00 7.525000E+10 +5.726000E+00 7.555100E+10 +5.745000E+00 7.585200E+10 +5.764000E+00 7.621320E+10 +5.783000E+00 7.651420E+10 +5.803000E+00 7.687540E+10 +5.824000E+00 7.723660E+10 +5.845000E+00 7.759780E+10 +5.866000E+00 7.795900E+10 +5.888000E+00 7.832020E+10 +5.910000E+00 7.868140E+10 +5.933000E+00 7.904260E+10 +5.956000E+00 7.946400E+10 +5.980000E+00 7.982520E+10 +6.004000E+00 8.024660E+10 +6.028000E+00 8.060780E+10 +6.053000E+00 8.102920E+10 +6.079000E+00 8.145060E+10 +6.105000E+00 8.187200E+10 +6.131000E+00 8.229340E+10 +6.158000E+00 8.271480E+10 +6.185000E+00 8.313620E+10 +6.212000E+00 8.361780E+10 +6.241000E+00 8.403920E+10 +6.269000E+00 8.452080E+10 +6.298000E+00 8.494220E+10 +6.327000E+00 8.542380E+10 +6.357000E+00 8.584520E+10 +6.388000E+00 8.632680E+10 +6.418000E+00 8.680840E+10 +6.450000E+00 8.729000E+10 +6.481000E+00 8.777160E+10 +6.514000E+00 8.825320E+10 +6.546000E+00 8.873480E+10 +6.579000E+00 8.921640E+10 +6.612000E+00 8.969800E+10 +6.647000E+00 9.023980E+10 +6.681000E+00 9.072140E+10 +6.716000E+00 9.120300E+10 +6.752000E+00 9.174480E+10 +6.788000E+00 9.222640E+10 +6.824000E+00 9.276820E+10 +6.861000E+00 9.324980E+10 +6.899000E+00 9.379160E+10 +6.937000E+00 9.433340E+10 +6.976000E+00 9.481500E+10 +7.016000E+00 9.535680E+10 +7.056000E+00 9.589860E+10 +7.097000E+00 9.644040E+10 +7.138000E+00 9.698220E+10 +7.180000E+00 9.752400E+10 +7.223000E+00 9.806580E+10 +7.267000E+00 9.860760E+10 +7.312000E+00 9.914940E+10 +7.357000E+00 9.969120E+10 +7.403000E+00 1.002330E+11 +7.451000E+00 1.007748E+11 +7.498000E+00 1.013768E+11 +7.548000E+00 1.019186E+11 +7.598000E+00 1.025206E+11 +7.649000E+00 1.030624E+11 +7.702000E+00 1.036644E+11 +7.755000E+00 1.042062E+11 +7.810000E+00 1.048082E+11 +7.866000E+00 1.053500E+11 +7.924000E+00 1.059520E+11 +7.983000E+00 1.065540E+11 +8.043000E+00 1.071560E+11 +8.105000E+00 1.077580E+11 +8.169000E+00 1.083600E+11 +8.234000E+00 1.089620E+11 +8.302000E+00 1.095640E+11 +8.371000E+00 1.102262E+11 +8.443000E+00 1.108282E+11 +8.516000E+00 1.114904E+11 +8.592000E+00 1.120924E+11 +8.671000E+00 1.127546E+11 +8.752000E+00 1.134168E+11 +8.835000E+00 1.140188E+11 +8.921000E+00 1.147412E+11 +9.011000E+00 1.154034E+11 +9.103000E+00 1.160656E+11 +9.199000E+00 1.167278E+11 +9.298000E+00 1.173900E+11 +9.400000E+00 1.181124E+11 +9.507000E+00 1.188348E+11 +9.618000E+00 1.194970E+11 +9.733000E+00 1.202194E+11 +9.853000E+00 1.210020E+11 +9.978000E+00 1.217244E+11 +1.011000E+01 1.224468E+11 +1.024000E+01 1.232294E+11 +1.038000E+01 1.239518E+11 +1.053000E+01 1.247344E+11 +1.068000E+01 1.255170E+11 +1.084000E+01 1.262996E+11 +1.101000E+01 1.270822E+11 +1.118000E+01 1.278648E+11 +1.136000E+01 1.287076E+11 +1.155000E+01 1.294902E+11 +1.175000E+01 1.303330E+11 +1.195000E+01 1.311156E+11 +1.217000E+01 1.319584E+11 +1.240000E+01 1.328012E+11 +1.263000E+01 1.336440E+11 +1.288000E+01 1.344868E+11 +1.314000E+01 1.353296E+11 +1.341000E+01 1.361724E+11 +1.370000E+01 1.370152E+11 +1.400000E+01 1.379182E+11 +1.431000E+01 1.387610E+11 +1.464000E+01 1.396038E+11 +1.498000E+01 1.404466E+11 +1.534000E+01 1.413496E+11 +1.572000E+01 1.421924E+11 +1.612000E+01 1.430352E+11 +1.654000E+01 1.439382E+11 +1.697000E+01 1.447810E+11 +1.743000E+01 1.456840E+11 +1.791000E+01 1.465268E+11 +1.841000E+01 1.473696E+11 +1.894000E+01 1.482124E+11 +1.949000E+01 1.490552E+11 +2.007000E+01 1.498980E+11 +2.067000E+01 1.507408E+11 +2.131000E+01 1.515836E+11 +2.198000E+01 1.524264E+11 +2.268000E+01 1.532692E+11 +2.341000E+01 1.540518E+11 diff --git a/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + em + Ar+.txt b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + em + Ar+.txt new file mode 100644 index 00000000000..2e060c0cdaa --- /dev/null +++ b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar -> em + em + Ar+.txt @@ -0,0 +1,96 @@ +0.000000E+00 0.000000E+00 +7.965000E-01 0.000000E+00 +1.111500E+00 0.000000E+00 +1.725000E+00 0.000000E+00 +2.430000E+00 9.451400E+00 +3.495000E+00 9.993200E+01 +5.040000E+00 2.811340E+02 +5.325000E+00 4.984560E+02 +5.640000E+00 7.525000E+04 +5.925000E+00 8.307600E+05 +6.165000E+00 3.311000E+06 +6.375000E+00 8.367800E+06 +6.600000E+00 1.655500E+07 +6.780000E+00 2.835420E+07 +6.960000E+00 4.394600E+07 +7.110000E+00 6.321000E+07 +7.260000E+00 8.668800E+07 +7.410000E+00 1.143800E+08 +7.545000E+00 1.462860E+08 +7.680000E+00 1.818040E+08 +7.815000E+00 2.215360E+08 +7.950000E+00 2.654820E+08 +8.070000E+00 3.136420E+08 +8.205000E+00 3.660160E+08 +8.325000E+00 4.226040E+08 +8.445000E+00 4.834060E+08 +8.565000E+00 5.484220E+08 +8.685000E+00 6.200600E+08 +8.805000E+00 6.923000E+08 +8.925000E+00 7.705600E+08 +9.045000E+00 8.548400E+08 +9.165000E+00 9.391200E+08 +9.285000E+00 1.029420E+09 +9.405000E+00 1.125740E+09 +9.525000E+00 1.228080E+09 +9.645000E+00 1.330420E+09 +9.765000E+00 1.438780E+09 +9.885000E+00 1.547140E+09 +1.000500E+01 1.661520E+09 +1.012500E+01 1.781920E+09 +1.024500E+01 1.902320E+09 +1.038000E+01 2.028740E+09 +1.050000E+01 2.161180E+09 +1.062000E+01 2.287600E+09 +1.074000E+01 2.426060E+09 +1.086000E+01 2.558500E+09 +1.098000E+01 2.696960E+09 +1.110000E+01 2.841440E+09 +1.122000E+01 2.979900E+09 +1.134000E+01 3.124380E+09 +1.146000E+01 3.268860E+09 +1.158000E+01 3.413340E+09 +1.170000E+01 3.557820E+09 +1.180500E+01 3.708320E+09 +1.192500E+01 3.852800E+09 +1.204500E+01 3.997280E+09 +1.215000E+01 4.147780E+09 +1.227000E+01 4.292260E+09 +1.237500E+01 4.442760E+09 +1.248000E+01 4.587240E+09 +1.260000E+01 4.731720E+09 +1.270500E+01 4.876200E+09 +1.281000E+01 5.020680E+09 +1.291500E+01 5.165160E+09 +1.302000E+01 5.303620E+09 +1.311000E+01 5.448100E+09 +1.321500E+01 5.586560E+09 +1.330500E+01 5.725020E+09 +1.341000E+01 5.857460E+09 +1.350000E+01 5.995920E+09 +1.359000E+01 6.140400E+09 +1.369500E+01 6.260800E+09 +1.378500E+01 6.381200E+09 +1.387500E+01 6.501600E+09 +1.395000E+01 6.622000E+09 +1.404000E+01 6.742400E+09 +1.413000E+01 6.923000E+09 +1.420500E+01 7.043400E+09 +1.429500E+01 7.163800E+09 +1.437000E+01 7.224000E+09 +1.444500E+01 7.344400E+09 +1.452000E+01 7.464800E+09 +1.459500E+01 7.585200E+09 +1.467000E+01 7.705600E+09 +1.474500E+01 7.826000E+09 +1.482000E+01 7.946400E+09 +1.488000E+01 8.006600E+09 +1.495500E+01 8.127000E+09 +1.500000E+01 8.247400E+09 +1.515000E+01 8.307600E+09 +1.530000E+01 8.668800E+09 +1.545000E+01 8.789200E+09 +1.560000E+01 9.090200E+09 +1.575000E+01 9.270800E+09 +1.590000E+01 9.511600E+09 +1.605000E+01 9.812600E+09 diff --git a/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + Ar.txt b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + Ar.txt new file mode 100644 index 00000000000..028eb34df65 --- /dev/null +++ b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + Ar.txt @@ -0,0 +1,96 @@ +0.000000E+00 2.323720E+08 +7.965000E-01 2.323720E+08 +1.111500E+00 2.715020E+08 +1.725000E+00 3.347120E+08 +2.430000E+00 4.364500E+08 +3.495000E+00 6.441400E+08 +5.040000E+00 8.909600E+08 +5.325000E+00 9.150400E+08 +5.640000E+00 9.391200E+08 +5.925000E+00 9.632000E+08 +6.165000E+00 9.812600E+08 +6.375000E+00 9.993200E+08 +6.600000E+00 1.011360E+09 +6.780000E+00 1.023400E+09 +6.960000E+00 1.029420E+09 +7.110000E+00 1.041460E+09 +7.260000E+00 1.047480E+09 +7.410000E+00 1.053500E+09 +7.545000E+00 1.059520E+09 +7.680000E+00 1.065540E+09 +7.815000E+00 1.065540E+09 +7.950000E+00 1.071560E+09 +8.070000E+00 1.071560E+09 +8.205000E+00 1.077580E+09 +8.325000E+00 1.077580E+09 +8.445000E+00 1.083600E+09 +8.565000E+00 1.083600E+09 +8.685000E+00 1.083600E+09 +8.805000E+00 1.089620E+09 +8.925000E+00 1.089620E+09 +9.045000E+00 1.089620E+09 +9.165000E+00 1.089620E+09 +9.285000E+00 1.089620E+09 +9.405000E+00 1.089620E+09 +9.525000E+00 1.089620E+09 +9.645000E+00 1.089620E+09 +9.765000E+00 1.089620E+09 +9.885000E+00 1.089620E+09 +1.000500E+01 1.089620E+09 +1.012500E+01 1.089620E+09 +1.024500E+01 1.089620E+09 +1.038000E+01 1.089620E+09 +1.050000E+01 1.089620E+09 +1.062000E+01 1.089620E+09 +1.074000E+01 1.083600E+09 +1.086000E+01 1.083600E+09 +1.098000E+01 1.083600E+09 +1.110000E+01 1.083600E+09 +1.122000E+01 1.083600E+09 +1.134000E+01 1.077580E+09 +1.146000E+01 1.077580E+09 +1.158000E+01 1.077580E+09 +1.170000E+01 1.077580E+09 +1.180500E+01 1.071560E+09 +1.192500E+01 1.071560E+09 +1.204500E+01 1.071560E+09 +1.215000E+01 1.071560E+09 +1.227000E+01 1.065540E+09 +1.237500E+01 1.065540E+09 +1.248000E+01 1.065540E+09 +1.260000E+01 1.059520E+09 +1.270500E+01 1.059520E+09 +1.281000E+01 1.059520E+09 +1.291500E+01 1.053500E+09 +1.302000E+01 1.053500E+09 +1.311000E+01 1.053500E+09 +1.321500E+01 1.053500E+09 +1.330500E+01 1.047480E+09 +1.341000E+01 1.047480E+09 +1.350000E+01 1.047480E+09 +1.359000E+01 1.041460E+09 +1.369500E+01 1.041460E+09 +1.378500E+01 1.041460E+09 +1.387500E+01 1.041460E+09 +1.395000E+01 1.035440E+09 +1.404000E+01 1.035440E+09 +1.413000E+01 1.035440E+09 +1.420500E+01 1.029420E+09 +1.429500E+01 1.029420E+09 +1.437000E+01 1.029420E+09 +1.444500E+01 1.029420E+09 +1.452000E+01 1.023400E+09 +1.459500E+01 1.023400E+09 +1.467000E+01 1.023400E+09 +1.474500E+01 1.023400E+09 +1.482000E+01 1.017380E+09 +1.488000E+01 1.017380E+09 +1.495500E+01 1.017380E+09 +1.500000E+01 1.017380E+09 +1.515000E+01 1.011360E+09 +1.530000E+01 1.011360E+09 +1.545000E+01 1.005340E+09 +1.560000E+01 1.005340E+09 +1.575000E+01 9.993200E+08 +1.590000E+01 9.993200E+08 +1.605000E+01 9.933000E+08 diff --git a/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + em + Ar+.txt b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + em + Ar+.txt new file mode 100644 index 00000000000..5111542515e --- /dev/null +++ b/test/tests/accelerations/Argon_reactions_RateCoefficients/reaction_em + Ar* -> em + em + Ar+.txt @@ -0,0 +1,96 @@ +0.000000E+00 0.000000E+00 +7.965000E-01 0.000000E+00 +1.111500E+00 0.000000E+00 +1.725000E+00 2.715020E+06 +2.430000E+00 6.622000E+08 +3.495000E+00 7.826000E+09 +5.040000E+00 2.594620E+10 +5.325000E+00 2.961840E+10 +5.640000E+00 3.286920E+10 +5.925000E+00 3.575880E+10 +6.165000E+00 3.816680E+10 +6.375000E+00 4.021360E+10 +6.600000E+00 4.232060E+10 +6.780000E+00 4.394600E+10 +6.960000E+00 4.545100E+10 +7.110000E+00 4.683560E+10 +7.260000E+00 4.809980E+10 +7.410000E+00 4.924360E+10 +7.545000E+00 5.038740E+10 +7.680000E+00 5.141080E+10 +7.815000E+00 5.237400E+10 +7.950000E+00 5.333720E+10 +8.070000E+00 5.424020E+10 +8.205000E+00 5.514320E+10 +8.325000E+00 5.598600E+10 +8.445000E+00 5.676860E+10 +8.565000E+00 5.755120E+10 +8.685000E+00 5.827360E+10 +8.805000E+00 5.905620E+10 +8.925000E+00 5.971840E+10 +9.045000E+00 6.020000E+10 +9.165000E+00 6.140400E+10 +9.285000E+00 6.200600E+10 +9.405000E+00 6.260800E+10 +9.525000E+00 6.321000E+10 +9.645000E+00 6.381200E+10 +9.765000E+00 6.441400E+10 +9.885000E+00 6.501600E+10 +1.000500E+01 6.561800E+10 +1.012500E+01 6.622000E+10 +1.024500E+01 6.622000E+10 +1.038000E+01 6.682200E+10 +1.050000E+01 6.742400E+10 +1.062000E+01 6.802600E+10 +1.074000E+01 6.862800E+10 +1.086000E+01 6.923000E+10 +1.098000E+01 6.923000E+10 +1.110000E+01 6.983200E+10 +1.122000E+01 7.043400E+10 +1.134000E+01 7.103600E+10 +1.146000E+01 7.103600E+10 +1.158000E+01 7.163800E+10 +1.170000E+01 7.224000E+10 +1.180500E+01 7.224000E+10 +1.192500E+01 7.284200E+10 +1.204500E+01 7.344400E+10 +1.215000E+01 7.344400E+10 +1.227000E+01 7.404600E+10 +1.237500E+01 7.404600E+10 +1.248000E+01 7.464800E+10 +1.260000E+01 7.525000E+10 +1.270500E+01 7.525000E+10 +1.281000E+01 7.585200E+10 +1.291500E+01 7.585200E+10 +1.302000E+01 7.645400E+10 +1.311000E+01 7.645400E+10 +1.321500E+01 7.705600E+10 +1.330500E+01 7.705600E+10 +1.341000E+01 7.765800E+10 +1.350000E+01 7.765800E+10 +1.359000E+01 7.765800E+10 +1.369500E+01 7.826000E+10 +1.378500E+01 7.826000E+10 +1.387500E+01 7.886200E+10 +1.395000E+01 7.886200E+10 +1.404000E+01 7.886200E+10 +1.413000E+01 7.946400E+10 +1.420500E+01 7.946400E+10 +1.429500E+01 7.946400E+10 +1.437000E+01 8.006600E+10 +1.444500E+01 8.006600E+10 +1.452000E+01 8.006600E+10 +1.459500E+01 8.066800E+10 +1.467000E+01 8.066800E+10 +1.474500E+01 8.066800E+10 +1.482000E+01 8.127000E+10 +1.488000E+01 8.127000E+10 +1.495500E+01 8.127000E+10 +1.500000E+01 8.127000E+10 +1.515000E+01 8.187200E+10 +1.530000E+01 8.247400E+10 +1.545000E+01 8.247400E+10 +1.560000E+01 8.247400E+10 +1.575000E+01 8.307600E+10 +1.590000E+01 8.307600E+10 +1.605000E+01 8.367800E+10 diff --git a/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out.e b/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out.e index 3d1ea3def8c..fa5ecc74aca 100644 Binary files a/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out.e and b/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out.e differ diff --git a/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out_Shooting0_SensitivityMatrix0_out.e b/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out_Shooting0_SensitivityMatrix0_out.e deleted file mode 100644 index 74fc0e8a83a..00000000000 Binary files a/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out_Shooting0_SensitivityMatrix0_out.e and /dev/null differ diff --git a/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out_Shooting0_out.e b/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out_Shooting0_out.e index 92978c1e1b1..1cb4068477c 100644 Binary files a/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out_Shooting0_out.e and b/test/tests/accelerations/gold/Acceleration_By_Shooting_Method_out_Shooting0_out.e differ diff --git a/test/tests/accelerations/tests b/test/tests/accelerations/tests index 307b9fed9f2..cd2319c1de7 100644 --- a/test/tests/accelerations/tests +++ b/test/tests/accelerations/tests @@ -7,6 +7,6 @@ [Acceleration_By_Shooting_Method] type = 'Exodiff' input = 'Acceleration_By_Shooting_Method.i' - exodiff = 'Acceleration_By_Shooting_Method_out.e Acceleration_By_Shooting_Method_out_Shooting0_out.e Acceleration_By_Shooting_Method_out_Shooting0_SensitivityMatrix0_out.e' + exodiff = 'Acceleration_By_Shooting_Method_out.e Acceleration_By_Shooting_Method_out_Shooting0_out.e' [] [] diff --git a/test/tests/automatic_differentiation/ad_argon.i b/test/tests/automatic_differentiation/ad_argon.i index dd0e33000e2..5e2f52a56f8 100644 --- a/test/tests/automatic_differentiation/ad_argon.i +++ b/test/tests/automatic_differentiation/ad_argon.i @@ -105,7 +105,6 @@ dom0Scale = 1e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -155,7 +154,6 @@ dom0Scale = 1e-3 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -181,7 +179,6 @@ dom0Scale = 1e-3 [Ar2p_advection] type = EFieldAdvection variable = Ar2p - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -206,7 +203,6 @@ dom0Scale = 1e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -219,7 +215,6 @@ dom0Scale = 1e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -367,7 +362,6 @@ dom0Scale = 1e-3 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -377,7 +371,6 @@ dom0Scale = 1e-3 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -434,14 +427,12 @@ dom0Scale = 1e-3 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -450,7 +441,6 @@ dom0Scale = 1e-3 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -459,7 +449,6 @@ dom0Scale = 1e-3 [] [Current_Ar2p] type = ADCurrent - potential = potential density_log = Ar2p variable = Current_Ar2p art_diff = false @@ -468,7 +457,6 @@ dom0Scale = 1e-3 [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -488,7 +476,6 @@ dom0Scale = 1e-3 type = HagelaarEnergyBC variable = mean_en boundary = 'right' - potential = potential electrons = em r = 0.0 position_units = ${dom0Scale} @@ -497,7 +484,6 @@ dom0Scale = 1e-3 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -506,7 +492,6 @@ dom0Scale = 1e-3 type = SecondaryElectronEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em ions = 'Arp Ar2p' r = 0 @@ -539,7 +524,6 @@ dom0Scale = 1e-3 type = HagelaarElectronBC variable = em boundary = 'right' - potential = potential electron_energy = mean_en r = 0.0 position_units = ${dom0Scale} @@ -555,7 +539,6 @@ dom0Scale = 1e-3 type = HagelaarIonAdvectionBC variable = Arp boundary = 'right' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -570,7 +553,6 @@ dom0Scale = 1e-3 type = HagelaarIonAdvectionBC variable = Ar2p boundary = 'right' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -579,7 +561,6 @@ dom0Scale = 1e-3 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -588,7 +569,6 @@ dom0Scale = 1e-3 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -606,7 +586,6 @@ dom0Scale = 1e-3 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -621,7 +600,6 @@ dom0Scale = 1e-3 type = HagelaarIonAdvectionBC variable = Ar2p boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -697,6 +675,11 @@ dom0Scale = 1e-3 heavy_species_charge = 0.0 block = 0 [] + + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [] [Reactions] diff --git a/test/tests/crane_action/rate_units.i b/test/tests/crane_action/rate_units.i index e846f4805ad..230d7ba618f 100644 --- a/test/tests/crane_action/rate_units.i +++ b/test/tests/crane_action/rate_units.i @@ -58,7 +58,6 @@ dom0Scale = 25.4e-3 [em_advection] type = EFieldAdvection variable = em - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons @@ -78,7 +77,6 @@ dom0Scale = 25.4e-3 [Ar+_advection] type = EFieldAdvection variable = Ar+ - potential = potential position_units = ${dom0Scale} [] [Ar+_diffusion] @@ -129,7 +127,6 @@ dom0Scale = 25.4e-3 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential position_units = ${dom0Scale} [] #Diffusion term of electrons energy @@ -142,7 +139,6 @@ dom0Scale = 25.4e-3 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em position_units = ${dom0Scale} [] @@ -248,13 +244,11 @@ dom0Scale = 25.4e-3 [Efield_calc] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -263,7 +257,6 @@ dom0Scale = 25.4e-3 [] [Current_Ar] type = ADCurrent - potential = potential density_log = Ar+ variable = Current_Ar art_diff = false @@ -299,7 +292,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -311,7 +303,6 @@ dom0Scale = 25.4e-3 ks = 1.19e5 #ks = 0.0 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -319,14 +310,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -413,6 +402,10 @@ dom0Scale = 25.4e-3 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [GasBasics] type = GasElectronMoments interp_trans_coeffs = false @@ -420,7 +413,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/test/tests/crane_action/townsend_units.i b/test/tests/crane_action/townsend_units.i index e103f2061dd..1d969aea51d 100644 --- a/test/tests/crane_action/townsend_units.i +++ b/test/tests/crane_action/townsend_units.i @@ -108,7 +108,6 @@ dom1Scale = 1e-7 [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -133,7 +132,6 @@ dom1Scale = 1e-7 [emliq_advection] type = EFieldAdvection variable = emliq - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -195,7 +193,6 @@ dom1Scale = 1e-7 [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -220,7 +217,6 @@ dom1Scale = 1e-7 [OHm_advection] type = EFieldAdvection variable = OHm - potential = potential block = 1 position_units = ${dom1Scale} [] @@ -244,7 +240,6 @@ dom1Scale = 1e-7 [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -257,7 +252,6 @@ dom1Scale = 1e-7 [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -439,7 +433,6 @@ dom1Scale = 1e-7 [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -449,7 +442,6 @@ dom1Scale = 1e-7 [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -459,7 +451,6 @@ dom1Scale = 1e-7 #[ProcRate_el] # type = ProcRate # em = em - # potential = potential # proc = el # variable = ProcRate_el # position_units = ${dom0Scale} @@ -468,7 +459,6 @@ dom1Scale = 1e-7 #[ProcRate_ex] # type = ProcRate # em = em - # potential = potential # proc = ex # variable = ProcRate_ex # position_units = ${dom0Scale} @@ -477,7 +467,6 @@ dom1Scale = 1e-7 #[ProcRate_iz] # type = ProcRate # em = em - # potential = potential # proc = iz # variable = ProcRate_iz # position_units = ${dom0Scale} @@ -573,7 +562,6 @@ dom1Scale = 1e-7 [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 @@ -581,14 +569,12 @@ dom1Scale = 1e-7 [Efield_l] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom1Scale} block = 1 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -597,7 +583,6 @@ dom1Scale = 1e-7 [] [Current_emliq] type = ADCurrent - potential = potential density_log = emliq variable = Current_emliq art_diff = false @@ -606,7 +591,6 @@ dom1Scale = 1e-7 [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -616,7 +600,6 @@ dom1Scale = 1e-7 [Current_OHm] block = 1 type = ADCurrent - potential = potential density_log = OHm variable = Current_OHm art_diff = false @@ -625,13 +608,11 @@ dom1Scale = 1e-7 [tot_flux_OHm] block = 1 type = ADTotalFlux - potential = potential density_log = OHm variable = tot_flux_OHm [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -646,7 +627,6 @@ dom1Scale = 1e-7 [] [EFieldAdvAux_emliq] type = ADEFieldAdvAux - potential = potential density_log = emliq variable = EFieldAdvAux_emliq block = 1 @@ -665,7 +645,6 @@ dom1Scale = 1e-7 [em_advection] type = InterfaceAdvection mean_en_neighbor = mean_en - potential_neighbor = potential neighbor_var = em variable = emliq boundary = master1_interface @@ -688,7 +667,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'master0_interface' - potential = potential electrons = em r = 0.99 #r = 0.0 @@ -698,7 +676,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -707,7 +684,6 @@ dom1Scale = 1e-7 type = SecondaryElectronEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em ions = 'Arp' r = 0 @@ -739,7 +715,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'master0_interface' - potential = potential electron_energy = mean_en r = 0.99 #r = 0.0 @@ -756,7 +731,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'master0_interface' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -765,7 +739,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -774,7 +747,6 @@ dom1Scale = 1e-7 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -792,7 +764,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -801,14 +772,12 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = right - potential = potential position_units = ${dom1Scale} [] [OHm_physical] type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -864,10 +833,14 @@ dom1Scale = 1e-7 [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [water_block] type = Water block = 1 - potential = potential [] [test] @@ -878,7 +851,6 @@ dom1Scale = 1e-7 user_p_gas = 101325 user_se_coeff = 0.05 em = em - potential = potential mean_en = mean_en block = 0 property_tables_file = 'townsend_coefficients/moments.txt' diff --git a/test/tests/field_emission/field_emission.i b/test/tests/field_emission/field_emission.i index 4a5f867ce6e..a9ad7ccaa27 100644 --- a/test/tests/field_emission/field_emission.i +++ b/test/tests/field_emission/field_emission.i @@ -93,7 +93,6 @@ vhigh = -0.15 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -109,7 +108,6 @@ vhigh = -0.15 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -122,7 +120,6 @@ vhigh = -0.15 #kV # [em_advection_stabilization] # type = EFieldArtDiff # variable = em - # potential = potential # block = 0 # [] @@ -154,7 +151,6 @@ vhigh = -0.15 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -167,7 +163,6 @@ vhigh = -0.15 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -181,7 +176,6 @@ vhigh = -0.15 #kV # [Arp_advection_stabilization] # type = EFieldArtDiff # variable = Arp - # potential = potential # block = 0 # [] @@ -193,7 +187,6 @@ vhigh = -0.15 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -208,7 +201,6 @@ vhigh = -0.15 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -216,7 +208,6 @@ vhigh = -0.15 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -224,7 +215,6 @@ vhigh = -0.15 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -232,7 +222,6 @@ vhigh = -0.15 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -246,7 +235,6 @@ vhigh = -0.15 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] [] @@ -353,7 +341,6 @@ vhigh = -0.15 #kV [PowerDep_em] type = PowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -363,7 +350,6 @@ vhigh = -0.15 #kV [PowerDep_Arp] type = PowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -373,7 +359,6 @@ vhigh = -0.15 #kV [ProcRate_el] type = ProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -382,7 +367,6 @@ vhigh = -0.15 #kV [ProcRate_ex] type = ProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -391,7 +375,6 @@ vhigh = -0.15 #kV [ProcRate_iz] type = ProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -449,14 +432,12 @@ vhigh = -0.15 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = Current - potential = potential density_log = em variable = Current_em art_diff = false @@ -465,7 +446,6 @@ vhigh = -0.15 #kV [] [Current_Arp] type = Current - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -474,7 +454,6 @@ vhigh = -0.15 #kV [] [EFieldAdvAux_em] type = EFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -513,7 +492,6 @@ vhigh = -0.15 #kV type = HagelaarElectronBC variable = em boundary = right - potential = potential mean_en = mean_en r = 0.99 position_units = ${dom0Scale} @@ -530,7 +508,6 @@ vhigh = -0.15 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -538,7 +515,6 @@ vhigh = -0.15 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential em = em ip = Arp r = 0.99 @@ -548,7 +524,6 @@ vhigh = -0.15 #kV type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential mean_en = mean_en r = 0 position_units = ${dom0Scale} @@ -557,7 +532,6 @@ vhigh = -0.15 #kV # type = SecondaryElectronBC # variable = em # boundary = 'left' - # potential = potential # ip = Arp # mean_en = mean_en # r = 0 @@ -567,7 +541,6 @@ vhigh = -0.15 #kV type = FieldEmissionBC variable = em boundary = 'left' - potential = potential ip = Arp mean_en = mean_en r = 0 @@ -584,7 +557,6 @@ vhigh = -0.15 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -592,7 +564,6 @@ vhigh = -0.15 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential em = em ip = Arp r = 0 @@ -674,7 +645,6 @@ vhigh = -0.15 #kV interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.05 diff --git a/test/tests/field_solver/field_solver_material_electromagnetic.i b/test/tests/field_solver/field_solver_material_electromagnetic.i new file mode 100644 index 00000000000..e6945999e28 --- /dev/null +++ b/test/tests/field_solver/field_solver_material_electromagnetic.i @@ -0,0 +1,68 @@ +# Temporary electromagnetic test for FieldSolverMaterial object +# Domain: 2D square, x=[0,1], y=[0,1] +# Expected output: +# e_field = (1, 2, 0) +# field_output = (1, 2, 0) + +[Mesh] + [./generated] + type = GeneratedMeshGenerator + dim = 2 + nx = 50 + ny = 50 + elem_type = QUAD8 + [../] +[] + +[Problem] + solve = false +[] + +[AuxVariables] + [./field_output] + family = NEDELEC_ONE + order = FIRST + [../] + [./e_field] + family = LAGRANGE_VEC + order = FIRST + [../] +[] + +[ICs] + [./e_field_ic] + type = VectorConstantIC + x_value = 1 + y_value = 2 + variable = e_field + [../] +[] + +[AuxKernels] + [./field_output_aux] + type = ADVectorMaterialRealVectorValueAux + property = 'field_solver_interface_property' + variable = field_output + [../] +[] + +[Materials] + [./field_solver] + type = FieldSolverMaterial + electric_field = e_field + solver = electromagnetic + block = 0 + [../] +[] + +[Executioner] + type = Steady + solve_type = 'NEWTON' +[] + +[Outputs] + [./out] + type = Exodus + show = 'e_field field_output' + [../] +[] diff --git a/test/tests/field_solver/field_solver_material_electrostatic.i b/test/tests/field_solver/field_solver_material_electrostatic.i new file mode 100644 index 00000000000..8e938669c89 --- /dev/null +++ b/test/tests/field_solver/field_solver_material_electrostatic.i @@ -0,0 +1,89 @@ +# Electrostatic test for FieldSolverMaterial object +# Domain: 2D square, x=[0,1], y=[0,1] +# BCs: potential(0,y) = 2, potential(1,y) = 0 +# Expected output values: +# potential = -2*x + 2 +# field_output = (2, 0, 0) + +[Mesh] + [./generated] + type = GeneratedMeshGenerator + dim = 2 + nx = 50 + ny = 50 + elem_type = QUAD8 + [../] +[] + +[Variables] + [./potential] + [../] +[] + +[AuxVariables] + [./dummy_efield] + family = NEDELEC_ONE + order = FIRST + [../] + [./field_output] + family = NEDELEC_ONE + order = FIRST + [../] +[] + +[Kernels] + [./diff] + type = Diffusion + variable = potential + [../] +[] + +[AuxKernels] + [./field_output_aux] + type = ADVectorMaterialRealVectorValueAux + property = 'field_solver_interface_property' + variable = field_output + [../] +[] + +[BCs] + [./left] + type = DirichletBC + variable = potential + boundary = left + value = 2 + [../] + [./right] + type = DirichletBC + variable = potential + boundary = right + value = 0 + [../] +[] + +[Materials] + active = field_solver + [./field_solver] + type = FieldSolverMaterial + potential = potential + block = 0 + [../] + [./field_solver_error_check] + type = FieldSolverMaterial + block = 0 + [../] +[] + +[Executioner] + type = Steady + solve_type = 'NEWTON' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' +[] + +[Outputs] + [./out] + type = Exodus + show = 'potential field_output' + [../] +[] diff --git a/test/tests/field_solver/field_solver_material_electrostatic_out.cmp b/test/tests/field_solver/field_solver_material_electrostatic_out.cmp new file mode 100644 index 00000000000..86958c1b0aa --- /dev/null +++ b/test/tests/field_solver/field_solver_material_electrostatic_out.cmp @@ -0,0 +1,39 @@ + +# ***************************************************************** +# EXODIFF (Version: 2.90) Modified: 2018-02-15 +# Authors: Richard Drake, rrdrake@sandia.gov +# Greg Sjaardema, gdsjaar@sandia.gov +# Run on 2024/10/03 13:56:29 MDT +# ***************************************************************** + +# FILE 1: /Users/dechcs/projects-plasma-EM/zapdos/test/tests/field_solver/field_solver_material_electrostatic_out.e +# Title: field_solver_material_electrostatic_out.e +# Dim = 2, Blocks = 1, Nodes = 7701, Elements = 2500, Nodesets = 4, Sidesets = 4 +# Vars: Global = 0, Nodal = 3, Element = 0, Nodeset = 0, Sideset = 0, Times = 2 + + +# ============================================================== +# NOTE: All node and element ids are reported as global ids. + +# NOTES: - The min/max values are reporting the min/max in absolute value. +# - Time values (t) are 1-offset time step numbers. +# - Element block numbers are the block ids. +# - Node(n) and element(e) numbers are 1-offset. + +COORDINATES absolute 1.e-6 # min separation not calculated + +TIME STEPS relative 1.e-6 floor 0.0 # min: 0 @ t1 max: 1 @ t2 + + +# No GLOBAL VARIABLES + +NODAL VARIABLES relative 1.e-6 floor 0.0 + field_output_x # min: 0 @ t1,n1 max: 2 @ t2,n2991 + field_output_y relative 1.e-6 floor 1e-9 + potential # min: 0 @ t1,n1 max: 2 @ t2,n1 + +# No ELEMENT VARIABLES + +# No NODESET VARIABLES + +# No SIDESET VARIABLES diff --git a/test/tests/field_solver/gold/field_solver_material_electromagnetic_out.e b/test/tests/field_solver/gold/field_solver_material_electromagnetic_out.e new file mode 100644 index 00000000000..fc85ce02aa3 Binary files /dev/null and b/test/tests/field_solver/gold/field_solver_material_electromagnetic_out.e differ diff --git a/test/tests/field_solver/gold/field_solver_material_electrostatic_out.e b/test/tests/field_solver/gold/field_solver_material_electrostatic_out.e new file mode 100644 index 00000000000..5470db80454 Binary files /dev/null and b/test/tests/field_solver/gold/field_solver_material_electrostatic_out.e differ diff --git a/test/tests/field_solver/tests b/test/tests/field_solver/tests new file mode 100644 index 00000000000..361af35866c --- /dev/null +++ b/test/tests/field_solver/tests @@ -0,0 +1,41 @@ +[Tests] + [./electrostatic] + type = Exodiff + input = 'field_solver_material_electrostatic.i' + exodiff = 'field_solver_material_electrostatic_out.e' + custom_cmp = 'field_solver_material_electrostatic_out.cmp' + [../] + [./electromagnetic_temp] + type = Exodiff + input = 'field_solver_material_electromagnetic.i' + exodiff = 'field_solver_material_electromagnetic_out.e' + [../] + [./error_potential_when_em] + type = RunException + input = 'field_solver_material_electrostatic.i' + cli_args = 'Materials/field_solver/solver=electromagnetic' + expect_err = "Solver mode is electromagnetic, but potential was provided. Please either change the mode or provide an electric field variable." + prereq = electrostatic + [../] + [./error_efield_when_es] + type = RunException + input = 'field_solver_material_electrostatic.i' + cli_args = 'Materials/active=field_solver_error_check Materials/field_solver_error_check/electric_field=dummy_efield' + expect_err = "Solver mode is electrostatic, but electric field was provided. Please either change the mode or provide a potential variable." + prereq = electrostatic + [../] + [./error_efield_and_potential] + type = RunException + input = 'field_solver_material_electrostatic.i' + cli_args = 'Materials/field_solver/electric_field=dummy_efield' + expect_err = "Both electric field and potential variables have been provided. Please provide only one, consistent with the solver mode parameter." + prereq = electrostatic + [../] + [./error_no_field] + type = RunException + input = 'field_solver_material_electrostatic.i' + cli_args = 'Materials/active=field_solver_error_check' + expect_err = "Neither potential nor electric field variables are defined. Please provide a variable for field determination." + prereq = electrostatic + [../] +[] diff --git a/test/tests/mms/bcs/1D_LymberopoulosElectronBC.i b/test/tests/mms/bcs/1D_LymberopoulosElectronBC.i new file mode 100644 index 00000000000..339d6869dae --- /dev/null +++ b/test/tests/mms/bcs/1D_LymberopoulosElectronBC.i @@ -0,0 +1,449 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = 'LymberopoulosElectronBC_LeftBC_IC_out.e' + #file = 'LymberopoulosElectronBC_RightBC_IC_out.e' + use_for_exodus_restart = true + [] + [left] + type = SideSetsFromNormalsGenerator + normals = '-1 0 0' + new_boundary = 'left' + input = geo + [] + [right] + type = SideSetsFromNormalsGenerator + normals = '1 0 0' + new_boundary = 'right' + input = left + [] +[] + +[Outputs] + file_base = 'LymberopoulosElectronBC_LeftBC_out' + #file_base = 'LymberopoulosElectronBC_RightBC_out' + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + + [potential] + initial_from_file_var = potential + [] + [ion] + initial_from_file_var = ion + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EFieldAdvection + variable = ion + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + +#Potential Equations + [potential_diff] + type = CoeffDiffusionLin + variable = potential + position_units = 1.0 + [] + [potential_source] + type = BodyForce + variable = potential + function = 'potential_source' + [] +[] + +[AuxVariables] + [potential_sol] + [] + [ion_sol] + [] + + [em_sol] + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] +[] + +[Functions] +#Constants for the manufactured solutions + #The lenght between electrode + [l] + type = ConstantFunction + value = 1.0 + [] + #The frequency + [f] + type = ConstantFunction + value = 1.0 + [] + +#Material Variables + #Electron diffusion coeff. + [diffem] + type = ConstantFunction + value = '1.0' + [] + #Electron mobility coeff. + [muem] + type = ConstantFunction + value = 1.0 + [] + #Ion diffusion coeff. + [diffion] + type = ParsedFunction + vars = 'diffem' + vals = 'diffem' + value = 'diffem' + [] + #Ion mobility coeff. + [muion] + type = ParsedFunction + vars = 'muem' + vals = 'muem' + value = 'muem' + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 1.0 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'l f N_A' + vals = 'l f N_A' + value = 'log(((sin(2.*pi*f*t) + 2.) * ((x/l)*(1. - x/l) + 1.)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'em_fun' + vals = 'em_fun' + value = 'em_fun' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'l f' + vals = 'l f' + value = '-sin(2.*pi*f*t)*(x/l)^2. + (x/l)^2.' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'l f diffem muem N_A' + vals = 'l f diffem muem N_A' + value = '((2.*diffem*(sin(2.*pi*f*t) + 2.))/l^2. + (2.*f*pi*cos(2.*pi*f*t)*(l^2. + l*x - x^2.))/l^2. - + (2.*muem*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l^2. + l*x - x^2.))/l^4. - + (2.*muem*x*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l - 2.*x))/l^4.) / N_A' + [] + [ion_source] + type = ParsedFunction + vars = 'l f diffion muion N_A' + vals = 'l f diffion muion N_A' + value = '((2.*diffion*(sin(2.*pi*f*t) + 2.))/l^2. + (2.*f*pi*cos(2.*pi*f*t)*(l^2. + l*x - x^2.))/l^2. + + (2.*muion*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l^2. + l*x - x^2.))/l^4. + + (2.*muion*x*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l - 2.*x))/l^4.) / N_A' + [] + [potential_source] + type = ParsedFunction + vars = 'l f' + vals = 'l f' + value = 'sin(2.*pi*f*t)*(2./l^2.) - (2./l^2.)' + [] + + #The left BC dirichlet function + [em_left_BC] + type = ParsedFunction + vars = 'l f N_A' + vals = 'l f N_A' + value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' + [] + [ion_left_BC] + type = ParsedFunction + vars = 'l f N_A' + vals = 'l f N_A' + value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' + [] + [potential_left_BC] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = '0.0' + [] + #The right BC dirichlet function + [em_right_BC] + type = ParsedFunction + vars = 'l f N_A' + vals = 'l f N_A' + value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' + [] + [ion_right_BC] + type = ParsedFunction + vars = 'l f N_A' + vals = 'l f N_A' + value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' + [] + [potential_right_BC] + type = ParsedFunction + vars = 'f N_A' + vals = 'f N_A' + value = '1. - sin(2.*pi*f*t)' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((1.) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((1.) / N_A)' + [] +[] + +[BCs] + #active = 'potential_left_BC potential_right_BC + # ion_left_BC ion_right_BC + # em_left_BC em_right_BC' + + #active = 'potential_left_BC potential_right_BC + # ion_left_BC ion_right_BC + # em_left_Flux_BC em_right_BC' + + #active = 'potential_left_BC potential_right_BC + # ion_left_BC ion_right_BC + # em_left_BC em_right_Flux_BC' + + active = 'potential_left_BC potential_right_BC + ion_left_BC ion_right_BC + em_left_LymberopoulosElectronBC em_right_BC' + + #active = 'potential_left_BC potential_right_BC + # ion_left_BC ion_right_BC + # em_left_BC em_right_LymberopoulosElectronBC' + + + [potential_left_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = 'left' + [] + [potential_right_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = 'right' + [] + + [ion_left_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 'left' + [] + [ion_right_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 'right' + [] + + [em_left_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = 'left' + [] + [em_left_Flux_BC] + type = FunctionNeumannBC + variable = em + function = 'em_left_Flux_BC' + boundary = 'left' + [] + [em_left_LymberopoulosElectronBC] + type = LymberopoulosElectronBC + variable = em + boundary = 'left' + emission_coeffs = 1.0 + ks = 1.0 + ions = ion + position_units = 1.0 + [] + + [em_right_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = 'right' + [] + [em_right_Flux_BC] + type = FunctionNeumannBC + variable = em + function = 'em_right_Flux_BC' + boundary = 'right' + [] + [em_right_LymberopoulosElectronBC] + type = LymberopoulosElectronBC + variable = em + boundary = 'right' + emission_coeffs = 1.0 + ks = 1.0 + ions = ion + position_units = 1.0 + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff] + type = ADGenericFunctionMaterial + prop_names = 'diffpotential diffem muem diffion muion' + prop_values = 'diffpotential diffem muem diffion muion' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion' + prop_values = '-1.0 1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + # dt = 0.0075 + dt = 0.02 + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + nl_abs_tol = 1e-14 +[] diff --git a/test/tests/mms/bcs/1D_LymberopoulosIonBC.i b/test/tests/mms/bcs/1D_LymberopoulosIonBC.i new file mode 100644 index 00000000000..399d5226f6d --- /dev/null +++ b/test/tests/mms/bcs/1D_LymberopoulosIonBC.i @@ -0,0 +1,343 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = 'LymberopoulosIonBC_LeftBC_IC_out.e' + #file = 'LymberopoulosIonBC_RightBC_IC_out.e' + use_for_exodus_restart = true + [] + [left] + type = SideSetsFromNormalsGenerator + normals = '-1 0 0' + new_boundary = 'left' + input = geo + [] + [right] + type = SideSetsFromNormalsGenerator + normals = '1 0 0' + new_boundary = 'right' + input = left + [] +[] + +[Outputs] + file_base = 'LymberopoulosIonBC_LeftBC_out' + #file_base = 'LymberopoulosIonBC_RightBC_out' + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [ion] + initial_from_file_var = ion + [] + [potential] + initial_from_file_var = potential + [] +[] + +[Kernels] +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EFieldAdvection + variable = ion + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + +#Potential Equations + [potential_time_derivative] + type = TimeDerivative + variable = potential + [] + [potential_diff] + type = CoeffDiffusionLin + variable = potential + position_units = 1.0 + [] + [potential_source] + type = BodyForce + variable = potential + function = 'potential_source' + [] + +[] + +[AuxVariables] + [potential_sol] + [] + + [ion_sol] + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] +[] + +[Functions] +#Constants for the manufactured solutions + #The lenght between electrode + [l] + type = ConstantFunction + value = 1.0 + [] + #The frequency + [f] + type = ConstantFunction + value = 1.0 + [] + +#Material Variables + #Ion diffusion coeff. + [diffion] + type = ConstantFunction + value = 1.0 + [] + #Ion mobility coeff. + [muion] + type = ConstantFunction + value = 0.1 + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.01 + [] + + + +#Manufactured Solutions + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'l N_A' + vals = 'l N_A' + value = 'log((1.0 + x^2*(1 - x/l)^2/l^2) / N_A)' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'l f ee diffpotential' + vals = 'l f ee diffpotential' + value = '-(ee*l^2*sin((pi*x)/l)*sin(2*pi*f*t))/(5*diffpotential*pi^2)' + [] + +#Source Terms in moles + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'l f ee diffpotential diffion muion N_A' + vals = 'l f ee diffpotential diffion muion N_A' + value = '(-2*diffion/l^2 + + 12*diffion*x/l^3 - + 12*diffion*x^2/l^4 - + 0.2*ee*muion*sin(2*pi*f*t)*sin(pi*x/l)/diffpotential + + 2*ee*muion*x*sin(2*pi*f*t)*cos(pi*x/l)/(5*pi*diffpotential*l) - + ee*muion*x^2*sin(2*pi*f*t)*sin(pi*x/l)/(5*diffpotential*l^2) - + 6*ee*muion*x^2*sin(2*pi*f*t)*cos(pi*x/l)/(5*pi*diffpotential*l^2) + + 2*ee*muion*x^3*sin(2*pi*f*t)*sin(pi*x/l)/(5*diffpotential*l^3) + + 4*ee*muion*x^3*sin(2*pi*f*t)*cos(pi*x/l)/(5*pi*diffpotential*l^3) - + ee*muion*x^4*sin(2*pi*f*t)*sin(pi*x/l)/(5*diffpotential*l^4)) / N_A' + [] + [potential_source] + type = ParsedFunction + vars = 'l f ee diffpotential' + vals = 'l f ee diffpotential' + value = '-ee*sin(2*pi*f*t)*sin(pi*x/l)/5 - 2*ee*f*l^2*sin(pi*x/l)*cos(2*pi*f*t)/(5*pi*diffpotential)' + [] + + #The left Flux BC function + [ion_left_Flux_BC] + type = ParsedFunction + vars = 'l f ee diffpotential muion N_A' + vals = 'l f ee diffpotential muion N_A' + value = '(0.2*ee*l*muion*sin(2*pi*f*t)/(pi*diffpotential)) / N_A' + [] + #The right Flux BC function + [ion_right_Flux_BC] + type = ParsedFunction + vars = 'l f ee diffpotential muion N_A' + vals = 'l f ee diffpotential muion N_A' + value = '-1.0 * (-0.2*ee*l*muion*sin(2*pi*f*t)/(pi*diffpotential)) / N_A' + [] + + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = '(1.) / N_A' + [] +[] + +[BCs] + + #active = 'potential_left_BC potential_right_BC + # ion_left_BC ion_right_BC' + + #active = 'potential_left_BC potential_right_BC + # ion_left_Flux_BC ion_right_BC' + + #active = 'potential_left_BC potential_right_BC + # ion_left_BC ion_right_Flux_BC' + + active = 'potential_left_BC potential_right_BC + ion_left_LymberopoulosIonBC ion_right_BC' + + #active = 'potential_left_BC potential_right_BC + # ion_left_BC ion_right_LymberopoulosIonBC' + + [potential_left_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = 'left' + [] + [potential_right_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = 'right' + [] + + [ion_left_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 'left' + [] + [ion_left_Flux_BC] + type = FunctionNeumannBC + variable = ion + function = 'ion_left_Flux_BC' + boundary = 'left' + [] + [ion_left_LymberopoulosIonBC] + type = LymberopoulosIonBC + variable = ion + boundary = 'left' + position_units = 1.0 + [] + + + [ion_right_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 'right' + [] + [ion_right_Flux_BC] + type = FunctionNeumannBC + variable = ion + function = 'ion_right_Flux_BC' + boundary = 'right' + [] + [ion_right_LymberopoulosIonBC] + type = LymberopoulosIonBC + variable = ion + boundary = 'right' + position_units = 1.0 + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff] + type = ADGenericFunctionMaterial + prop_names = 'diffpotential diffion muion' + prop_values = 'diffpotential diffion muion' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnion' + prop_values = '1.0' + [] +[] + +[Postprocessors] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + # dt = 0.0075 + dt = 0.02 + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + nl_abs_tol = 1e-14 +[] diff --git a/test/tests/mms/bcs/2D_DielectricBCWithEffEfield.i b/test/tests/mms/bcs/2D_DielectricBCWithEffEfield.i new file mode 100644 index 00000000000..3457cf23700 --- /dev/null +++ b/test/tests/mms/bcs/2D_DielectricBCWithEffEfield.i @@ -0,0 +1,550 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_DielectricBCWithEffEfield_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] + + [potential] + initial_from_file_var = potential + [] +[] + +# [ICs] +# [em_IC] +# type = FunctionIC +# variable = em +# function = 'em_ICs' +# [] +# [ion_IC] +# type = FunctionIC +# variable = ion +# function = 'ion_ICs' +# [] +# [mean_en_IC] +# type = FunctionIC +# variable = mean_en +# function = 'mean_en_ICs' +# [] +# [] + +[Kernels] + #Electron Equations + [em_time_derivative] + type = ElectronTimeDerivative + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + + #Ion Equations + [ion_time_derivative] + type = ElectronTimeDerivative + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + + #Eff. Efield + [EffEfield_X_time_deriv] + type = ADTimeDerivative + variable = Ex + [] + [EffEfield_X_diffusion] + type = MatDiffusion + D_name = diffEx + variable = Ex + [] + [EffEfield_X_source] + type = BodyForce + variable = Ex + function = 'Ex_source' + [] + [EffEfield_Y_time_deriv] + type = ADTimeDerivative + variable = Ey + [] + [EffEfield_Y_diffusion] + type = MatDiffusion + D_name = diffEy + variable = Ey + [] + [EffEfield_Y_source] + type = BodyForce + variable = Ey + function = 'Ey_source' + [] + + #Potential + [Potential_time_deriv] + type = ADTimeDerivative + variable = potential + [] + [Potential_diffusion] + type = CoeffDiffusionLin + variable = potential + position_units = 1.0 + [] + [Potential_source] + type = BodyForce + variable = potential + function = 'potential_source' + [] + + #Electron Energy Equations + [mean_en_time_deriv] + type = ElectronTimeDerivative + variable = mean_en + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] + + [potential_sol] + [] +[] + +[AuxKernels] + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] + + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] +[] + +[Functions] + #Material Variables + [massem] + type = ConstantFunction + value = 2.0 + [] + #Electron diffusion coeff. + [diffem] + type = ConstantFunction + value = 0.05 + [] + [muem] + type = ConstantFunction + value = 0.01 + [] + #Electron energy mobility coeff. + [diffmean_en] + type = ConstantFunction + value = 0.05 + [] + #Ion diffusion coeff. + [diffion] + type = ParsedFunction + vars = diffem + vals = diffem + value = diffem + [] + [muion] + type = ParsedFunction + vars = muem + vals = muem + value = muem + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.05 + [] + + #Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 2.0 + sin(pi*x)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 2.0 + sin(pi*x)) / N_A)' + [] + #The manufactured electron energy solution + [mean_en_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = 'log(((3*massem*pi*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))^2)/(16*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))) / N_A)' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' + [] + #The manufactured potential solution + [potential_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '0.25*(sin(pi*t)/pi + 1.0)*(sin(pi*y) + sin(pi*x)) - t' + [] + + #Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(diffem*pi^2*sin(pi*x) + (diffem*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + (2*pi*cos(2*pi*t)*cos(pi*y))/5 - (muem*pi*(pi + sin(pi*t))*(10*sin(pi*x) + 10*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/20) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(diffion*pi^2*sin(pi*x) + (diffion*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (muion*pi^2*(sin(pi*t) + 1)*(10*sin(pi*x) + 10*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '((3*massem*pi*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))*(8*muion*pi^2*cos(pi*t)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) - (diffpotential*pi^2*sin(pi*t) - pi*sin(pi*t)*(sin(pi*x) + sin(pi*y)))/ee + (16*muion*pi^2*cos(2*pi*t)*cos(pi*y)*(sin(pi*t) + 1))/5))/(8*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) - diffmean_en*((3*massem*pi*((pi*cos(pi*t)*cos(pi*y))/ee - 8*muion*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(sin(pi*t) + 1))^2)/(8*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) + (3*massem*pi*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))^2*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5))/(16*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 2)^2) - (3*massem*pi*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))*(8*muion*pi*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(sin(pi*t) + 1) - (pi^2*cos(pi*t)*sin(pi*y))/ee))/(8*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) + (3*massem*pi*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))^2*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^2)/(8*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 2)^3) + (3*massem*pi*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))*((pi*cos(pi*t)*cos(pi*y))/ee - 8*muion*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(sin(pi*t) + 1))*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(4*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 2)^2)) - diffmean_en*((3*massem*pi*((pi*cos(pi*t)*cos(pi*x))/ee - 8*muion*pi^2*cos(pi*x)*(sin(pi*t) + 1))^2)/(8*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) + (3*massem*pi^3*cos(pi*x)^2*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))^2)/(8*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 2)^3) + (3*massem*pi^3*sin(pi*x)*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))^2)/(16*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 2)^2) - (3*massem*pi*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))*(8*muion*pi^3*sin(pi*x)*(sin(pi*t) + 1) - (pi^2*cos(pi*t)*sin(pi*x))/ee))/(8*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) + (3*massem*pi^2*cos(pi*x)*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))*((pi*cos(pi*t)*cos(pi*x))/ee - 8*muion*pi^2*cos(pi*x)*(sin(pi*t) + 1)))/(4*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 2)^2)) - (3*massem*pi^2*cos(2*pi*t)*cos(pi*y)*((diffpotential*pi*cos(pi*t) - cos(pi*t)*(sin(pi*x) + sin(pi*y)) + 4)/ee + 8*muion*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2))^2)/(40*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 2)^2)) / N_A' + [] + + #The Ex source term. + [Ex_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*x) - diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*y) - diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' + [] + + [potential_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(cos(pi*t)*(sin(pi*x) + sin(pi*y)))/4 + diffpotential*pi^2*sin(pi*x)*(sin(pi*t)/(4*pi) + 1/4) + diffpotential*pi^2*sin(pi*y)*(sin(pi*t)/(4*pi) + 1/4) - 1' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = 'log(1.0)' + [] + + [V_func_left_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-diffpotential*pi*cos(pi*x)*(sin(pi*t)/(4*pi) + 1/4)' + [] + [V_func_down_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-diffpotential*pi*cos(pi*y)*(sin(pi*t)/(4*pi) + 1/4)' + [] +[] + +[BCs] + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + [energy_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] + + [potential_left_BC] + type = DielectricBCWithEffEfield + variable = potential + em = em + mean_en = mean_en + ip = ion + Ex = Ex + Ey = Ey + dielectric_constant = 1.0 + thickness = 1.0 + users_gamma = 1.0 + potential_units = V + position_units = 1.0 + boundary = 3 + [] + + [potential_Dirichlet_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A massem NonAD_muion NonAD_diffpotential diffEx diffEy' + prop_values = 'ee N_A massem muion diffpotential diffpotential diffpotential ' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffion muion diffem muem diffmean_en diffpotential' + prop_values = 'diffion muion diffem muem diffmean_en diffpotential' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + # end_time = 50 + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/bcs/2D_DielectricBCWithEffEfield_IC_out.e b/test/tests/mms/bcs/2D_DielectricBCWithEffEfield_IC_out.e new file mode 100644 index 00000000000..116915bcf17 Binary files /dev/null and b/test/tests/mms/bcs/2D_DielectricBCWithEffEfield_IC_out.e differ diff --git a/test/tests/mms/bcs/2D_ElectronBC.i b/test/tests/mms/bcs/2D_ElectronBC.i new file mode 100644 index 00000000000..772d3671166 --- /dev/null +++ b/test/tests/mms/bcs/2D_ElectronBC.i @@ -0,0 +1,626 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_ElectronBC_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] + + [potential] + initial_from_file_var = potential + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + + +#Eff. Efield + [EffEfield_X_time_deriv] + type = TimeDerivative + variable = Ex + [] + [EffEfield_X_diffusion] + type = MatDiffusion + diffusivity = diffEx + variable = Ex + [] + [EffEfield_X_source] + type = BodyForce + variable = Ex + function = 'Ex_source' + [] + [EffEfield_Y_time_deriv] + type = TimeDerivative + variable = Ey + [] + [EffEfield_Y_diffusion] + type = MatDiffusion + diffusivity = diffEy + variable = Ey + [] + [EffEfield_Y_source] + type = BodyForce + variable = Ey + function = 'Ey_source' + [] + + #Potential + [Potential_time_deriv] + type = TimeDerivative + variable = potential + [] + [Potential_diffusion] + type = MatDiffusion + diffusivity = diffpotential + variable = potential + [] + [Potential_source] + type = BodyForce + variable = potential + function = 'potential_source' + [] + +#Electron Energy Equations + [mean_en_time_deriv] + type = TimeDerivativeLog + variable = mean_en + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] + + [potential_sol] + [] +[] + +[AuxKernels] + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] + + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] +[] + +[Functions] +#Material Variables + [massem] + type = ConstantFunction + value = 1.0 + [] + #Electron diffusion coeff. + [diffem] + type = ConstantFunction + value = 0.05 + [] + [muem] + type = ConstantFunction + value = 0.01 + [] + #Electron energy mobility coeff. + [diffmean_en] + type = ConstantFunction + value = 0.05 + [] + #Ion diffusion coeff. + [diffion] + type = ParsedFunction + vars = diffem + vals = diffem + value = diffem + [] + [muion] + type = ParsedFunction + vars = muem + vals = muem + value = muem + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.25 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured electron energy solution + [mean_en_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = 'log(((3*massem*pi*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' + [] + #The manufactured potential solution + [potential_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(diffem*pi^2*sin(pi*x) + (diffem*pi^2*(5*sin(pi*y) + + cos(pi*y)*sin(2*pi*t)))/5 + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + + (muem*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - + 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(diffion*pi^2*sin(pi*x) + (diffion*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (muion*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '((3*massem*pi*(8*muem*pi^2*cos(pi*t)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) + + (16*muem*pi^2*cos(2*pi*t)*cos(pi*y)*(sin(pi*t) + 1))/5)*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)))/(8*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - + diffmean_en*((3*massem*pi^3*sin(pi*x)*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) + + (3*massem*pi^3*cos(pi*x)^2*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(8*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) + + (24*massem*muem^2*pi^5*cos(pi*x)^2*(sin(pi*t) + 1)^2)/(ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - + (3*massem*muem*pi^4*sin(pi*x)*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - + (6*massem*muem*pi^4*cos(pi*x)^2*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) - + diffmean_en*((3*massem*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(4*pi*diffem + + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(8*ee*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) + (3*massem*pi*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(4*pi*diffem + + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) + (24*massem*muem^2*pi^3*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*t) + 1)^2)/(ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - + (6*massem*muem*pi^2*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) - + (3*massem*muem*pi^2*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(4*pi*diffem + + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(ee*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))) - (3*massem*pi^2*cos(2*pi*t)*cos(pi*y)*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(40*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) / N_A' + [] + + #The Ex source term. + [Ex_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*x) - diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*y) - diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' + [] + + [potential_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - + diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - + diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = 'log(3./2.) + em_ICs' + [] + + [em_left_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(-diffem*pi*cos(pi*x) - muem*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] + [em_down_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(-(diffem*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - + muem*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] +[] + +[BCs] + #[em_left_BC] + # type = FunctionDirichletBC + # variable = em + # function = 'em_fun' + # boundary = 3 + # preset = true + #[] + #[em_left_BC] + # type = FunctionNeumannBC + # variable = em + # function = 'em_left_Flux_BC' + # boundary = 3 + # preset = true + #[] + [em_physical_diffusion_left] + type = SakiyamaElectronDiffusionBC + variable = em + electron_energy = mean_en + boundary = 3 + position_units = 1.0 + [] + [em_Ar+_second_emissions_left] + type = SakiyamaSecondaryElectronWithEffEfieldBC + variable = em + Ex = Ex + Ey = Ey + ip = ion + users_gamma = 1.0 + boundary = 3 + position_units = 1.0 + [] + + [em_right_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = 1 + preset = true + [] + + #[em_down_BC] + # type = FunctionDirichletBC + # variable = em + # function = 'em_fun' + # boundary = 0 + # preset = true + #[] + #[em_down_BC] + # type = FunctionNeumannBC + # variable = em + # function = 'em_down_Flux_BC' + # boundary = 0 + # preset = true + #[] + [em_physical_diffusion_down] + type = SakiyamaElectronDiffusionBC + variable = em + electron_energy = mean_en + boundary = 0 + position_units = 1.0 + [] + [em_Ar+_second_emissions_down] + type = SakiyamaSecondaryElectronWithEffEfieldBC + variable = em + Ex = Ex + Ey = Ey + ip = ion + users_gamma = 1.0 + boundary = 0 + position_units = 1.0 + [] + + [em_up_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = 2 + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + [energy_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] + + [potential_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A massem diffpotential diffEx diffEy' + prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffion muion diffem muem diffmean_en' + prop_values = 'diffion muion diffem muem diffmean_en' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/bcs/2D_ElectronBC_IC_out.e b/test/tests/mms/bcs/2D_ElectronBC_IC_out.e new file mode 100644 index 00000000000..7258e74e293 Binary files /dev/null and b/test/tests/mms/bcs/2D_ElectronBC_IC_out.e differ diff --git a/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield.i b/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield.i new file mode 100644 index 00000000000..8e48140ec60 --- /dev/null +++ b/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield.i @@ -0,0 +1,637 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_ElectronBC_NegivateOutWardFacingEfield_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] + + [potential] + initial_from_file_var = potential + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + + +#Eff. Efield + [EffEfield_X_time_deriv] + type = TimeDerivative + variable = Ex + [] + [EffEfield_X_diffusion] + type = MatDiffusion + diffusivity = diffEx + variable = Ex + [] + [EffEfield_X_source] + type = BodyForce + variable = Ex + function = 'Ex_source' + [] + [EffEfield_Y_time_deriv] + type = TimeDerivative + variable = Ey + [] + [EffEfield_Y_diffusion] + type = MatDiffusion + diffusivity = diffEy + variable = Ey + [] + [EffEfield_Y_source] + type = BodyForce + variable = Ey + function = 'Ey_source' + [] + + #Potential + [Potential_time_deriv] + type = TimeDerivative + variable = potential + [] + [Potential_diffusion] + type = MatDiffusion + diffusivity = diffpotential + variable = potential + [] + [Potential_source] + type = BodyForce + variable = potential + function = 'potential_source' + [] + +#Electron Energy Equations + [mean_en_time_deriv] + type = TimeDerivativeLog + variable = mean_en + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] + + [potential_sol] + [] +[] + +[AuxKernels] + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] + + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] +[] + +[Functions] +#Material Variables + [massem] + type = ConstantFunction + value = 1.0 + [] + #Electron diffusion coeff. + [diffem] + type = ConstantFunction + value = 0.05 + [] + [muem] + type = ConstantFunction + value = 0.01 + [] + #Electron energy mobility coeff. + [diffmean_en] + type = ConstantFunction + value = 0.05 + [] + #Ion diffusion coeff. + [diffion] + type = ParsedFunction + vars = diffem + vals = diffem + value = diffem + [] + [muion] + type = ParsedFunction + vars = muem + vals = muem + value = muem + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.25 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured electron energy solution + [mean_en_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = 'log(((3*massem*pi*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' + [] + #The manufactured potential solution + [potential_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(diffem*pi^2*sin(pi*x) + (diffem*pi^2*(5*sin(pi*y) + + cos(pi*y)*sin(2*pi*t)))/5 + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + + (muem*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(diffion*pi^2*sin(pi*x) + (diffion*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 - (muion*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - + 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '((3*massem*pi*(4*muem*pi^2*cos(pi*t)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1) + (8*muem*pi^2*cos(2*pi*t)*cos(pi*y)*(sin(pi*t) + + 1))/5)*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)))/(8*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - + diffmean_en*((3*massem*pi^3*sin(pi*x)*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) + (3*massem*pi^3*cos(pi*x)^2*(4*pi*diffem + + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1))^2)/(8*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) + + (6*massem*muem^2*pi^5*cos(pi*x)^2*(sin(pi*t) + 1)^2)/(ee*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - (3*massem*muem*pi^4*sin(pi*x)*(4*pi*diffem + + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1))*(sin(pi*t) + 1))/(2*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - + (3*massem*muem*pi^4*cos(pi*x)^2*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(ee*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) - diffmean_en*((3*massem*pi*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(8*ee*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) + (3*massem*pi*(pi^2*sin(pi*y) + + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) + (6*massem*muem^2*pi^3*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*t) + 1)^2)/(ee*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - (3*massem*muem*pi^2*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(ee*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) - (3*massem*muem*pi^2*(pi^2*sin(pi*y) + + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(2*ee*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))) - + (3*massem*pi^2*cos(2*pi*t)*cos(pi*y)*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(40*ee*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) / N_A' + [] + + #The Ex source term. + [Ex_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = 'pi^2*cos(pi*t)*cos(pi*x) + diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = 'pi^2*cos(pi*t)*cos(pi*y) + diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' + [] + + [potential_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - + diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - + diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = 'log(32.) + em_ICs' + [] + + [em_left_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(-diffem*pi*cos(pi*x) - muem*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] + [em_down_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' + value = '(-(diffem*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - + muem*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] +[] + +[BCs] + #[em_left_BC] + # type = FunctionDirichletBC + # variable = em + # function = 'em_fun' + # boundary = 3 + # preset = true + #[] + #[em_left_BC] + # type = FunctionNeumannBC + # variable = em + # function = 'em_left_Flux_BC' + # boundary = 3 + # preset = true + #[] + [em_physical_diffusion_left] + type = SakiyamaElectronDiffusionBC + variable = em + electron_energy = mean_en + boundary = 3 + position_units = 1.0 + [] + [em_Ar+_second_emissions_left] + type = SakiyamaSecondaryElectronWithEffEfieldBC + variable = em + Ex = Ex + Ey = Ey + ip = ion + users_gamma = 1.0 + boundary = 3 + position_units = 1.0 + [] + + [em_right_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = 1 + preset = true + [] + + #[em_down_BC] + # type = FunctionDirichletBC + # variable = em + # function = 'em_fun' + # boundary = 0 + # preset = true + #[] + #[em_down_BC] + # type = FunctionNeumannBC + # variable = em + # function = 'em_down_Flux_BC' + # boundary = 0 + # preset = true + #[] + [em_physical_diffusion_down] + type = SakiyamaElectronDiffusionBC + variable = em + electron_energy = mean_en + boundary = 0 + position_units = 1.0 + [] + [em_Ar+_second_emissions_down] + type = SakiyamaSecondaryElectronWithEffEfieldBC + variable = em + Ex = Ex + Ey = Ey + ip = ion + users_gamma = 1.0 + boundary = 0 + position_units = 1.0 + [] + + [em_up_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = 2 + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + [energy_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] + + [potential_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A massem diffpotential diffEx diffEy' + prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffion muion diffem muem diffmean_en' + prop_values = 'diffion muion diffem muem diffmean_en' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield_IC_out.e b/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield_IC_out.e new file mode 100644 index 00000000000..d488b4287ce Binary files /dev/null and b/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield_IC_out.e differ diff --git a/test/tests/mms/bcs/2D_EnergyBC.i b/test/tests/mms/bcs/2D_EnergyBC.i new file mode 100644 index 00000000000..b9e16c8849e --- /dev/null +++ b/test/tests/mms/bcs/2D_EnergyBC.i @@ -0,0 +1,623 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_EnergyBC_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] + + [potential] + initial_from_file_var = potential + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + + +#Eff. Efield + [EffEfield_X_time_deriv] + type = TimeDerivative + variable = Ex + [] + [EffEfield_X_diffusion] + type = MatDiffusion + diffusivity = diffEx + variable = Ex + [] + [EffEfield_X_source] + type = BodyForce + variable = Ex + function = 'Ex_source' + [] + [EffEfield_Y_time_deriv] + type = TimeDerivative + variable = Ey + [] + [EffEfield_Y_diffusion] + type = MatDiffusion + diffusivity = diffEy + variable = Ey + [] + [EffEfield_Y_source] + type = BodyForce + variable = Ey + function = 'Ey_source' + [] + + #Potential + [Potential_time_deriv] + type = TimeDerivative + variable = potential + [] + [Potential_diffusion] + type = MatDiffusion + diffusivity = diffpotential + variable = potential + [] + [Potential_source] + type = BodyForce + variable = potential + function = 'potential_source' + [] + +#Electron Energy Equations + [mean_en_time_deriv] + type = TimeDerivativeLog + variable = mean_en + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_advection] + type = EFieldAdvection + variable = mean_en + position_units = 1.0 + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] + + [potential_sol] + [] +[] + +[AuxKernels] + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] + + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] +[] + +[Functions] +#Material Variables + [massem] + type = ConstantFunction + value = 1.0 + [] + #Electron diffusion coeff. + [diffem] + type = ConstantFunction + value = 0.05 + [] + [muem] + type = ConstantFunction + value = 0.01 + [] + #Electron energy mobility coeff. + [diffmean_en] + type = ConstantFunction + value = 0.05 + [] + [mumean_en] + type = ConstantFunction + value = 0.01 + [] + #Ion diffusion coeff. + [diffion] + type = ParsedFunction + vars = diffmean_en + vals = diffmean_en + value = diffmean_en + [] + [muion] + type = ParsedFunction + vars = mumean_en + vals = mumean_en + value = mumean_en + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.25 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'log(((16*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured electron energy solution + [mean_en_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' + [] + #The manufactured potential solution + [potential_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '((32*ee*cos(2*pi*t)*cos(pi*y)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(5*massem*((12*diffmean_en*pi)/5 + + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - + diffem*((32*ee*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(massem*pi*((12*diffmean_en*pi)/5 + + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - + (16*ee*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(massem*pi*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - (2048*ee*mumean_en*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(5*massem*((12*diffmean_en*pi)/5 + + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + (1024*ee*mumean_en*(pi^2*sin(pi*y) + + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(15*massem*((12*diffmean_en*pi)/5 + + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + (32768*ee*mumean_en^2*pi*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*t) + 1)^2*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1)^3)/(25*massem*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^4)) - + diffem*((32*ee*pi*cos(pi*x)^2*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(massem*((12*diffmean_en*pi)/5 + + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - (16*ee*pi*sin(pi*x)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(massem*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - (2048*ee*mumean_en*pi^2*cos(pi*x)^2*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(5*massem*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + (1024*ee*mumean_en*pi^2*sin(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(15*massem*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + (32768*ee*mumean_en^2*pi^3*cos(pi*x)^2*(sin(pi*t) + 1)^2*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(25*massem*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^4)) - (32*ee*((32*mumean_en*pi^2*cos(pi*t)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))/5 + (64*mumean_en*pi^2*cos(2*pi*t)*cos(pi*y)*(sin(pi*t) + 1))/25)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3)) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(diffion*pi^2*sin(pi*x) + (diffion*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (muion*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(diffmean_en*pi^2*sin(pi*x) + (diffmean_en*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (mumean_en*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + + #The Ex source term. + [Ex_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*x) - diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*y) - diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' + [] + + [potential_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - + diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - + diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = '4.0' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = '1.0' + [] + + [em_left_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(-diffmean_en*pi*cos(pi*x) - mumean_en*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] + [em_down_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(-(diffmean_en*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - + mumean_en*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] +[] + +[BCs] + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + #[energy_left_BC] + # type = FunctionDirichletBC + # variable = mean_en + # function = 'mean_en_fun' + # boundary = 3 + # preset = true + #[] + [energy_left_physical_diffusion] + type = SakiyamaEnergyDiffusionBC + variable = mean_en + electrons = em + boundary = 3 + position_units = 1.0 + [] + [energy_left_second_emissions] + type = SakiyamaEnergySecondaryElectronWithEffEfieldBC + variable = mean_en + em = em + ip = ion + Ex = Ex + Ey = Ey + Tse_equal_Te = false + user_se_energy = 1.0 + se_coeff = 1.0 + boundary = 3 + position_units = 1.0 + [] + + [energy_right_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = 1 + preset = true + [] + + #[energy_down_BC] + # type = FunctionDirichletBC + # variable = mean_en + # function = 'mean_en_fun' + # boundary = 0 + # preset = true + #[] + [energy_down_physical_diffusion] + type = SakiyamaEnergyDiffusionBC + variable = mean_en + electrons = em + boundary = 0 + position_units = 1.0 + [] + [energy_down_second_emissions] + type = SakiyamaEnergySecondaryElectronWithEffEfieldBC + variable = mean_en + em = em + ip = ion + Ex = Ex + Ey = Ey + Tse_equal_Te = false + user_se_energy = 1.0 + se_coeff = 1.0 + boundary = 0 + position_units = 1.0 + [] + + [energy_up_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = 2 + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] + + [potentialt_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A massem diffpotential diffEx diffEy' + prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffion muion diffem muem diffmean_en mumean_en' + prop_values = 'diffion muion diffem muem diffmean_en mumean_en' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/bcs/2D_EnergyBC_IC_out.e b/test/tests/mms/bcs/2D_EnergyBC_IC_out.e new file mode 100644 index 00000000000..3d95e5b1f40 Binary files /dev/null and b/test/tests/mms/bcs/2D_EnergyBC_IC_out.e differ diff --git a/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield.i b/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield.i new file mode 100644 index 00000000000..2f0784b63f3 --- /dev/null +++ b/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield.i @@ -0,0 +1,628 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_EnergyBC_NegivateOutWardFacingEfield_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] + + [potential] + initial_from_file_var = potential + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + + +#Eff. Efield + [EffEfield_X_time_deriv] + type = TimeDerivative + variable = Ex + [] + [EffEfield_X_diffusion] + type = MatDiffusion + diffusivity = diffEx + variable = Ex + [] + [EffEfield_X_source] + type = BodyForce + variable = Ex + function = 'Ex_source' + [] + [EffEfield_Y_time_deriv] + type = TimeDerivative + variable = Ey + [] + [EffEfield_Y_diffusion] + type = MatDiffusion + diffusivity = diffEy + variable = Ey + [] + [EffEfield_Y_source] + type = BodyForce + variable = Ey + function = 'Ey_source' + [] + + #Potential + [Potential_time_deriv] + type = TimeDerivative + variable = potential + [] + [Potential_diffusion] + type = MatDiffusion + diffusivity = diffpotential + variable = potential + [] + [Potential_source] + type = BodyForce + variable = potential + function = 'potential_source' + [] + +#Electron Energy Equations + [mean_en_time_deriv] + type = TimeDerivativeLog + variable = mean_en + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_advection] + type = EFieldAdvection + variable = mean_en + position_units = 1.0 + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] + + [potential_sol] + [] +[] + +[AuxKernels] + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] + + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] +[] + +[Functions] +#Material Variables + [massem] + type = ConstantFunction + value = 1.0 + [] + #Electron diffusion coeff. + [diffem] + type = ConstantFunction + value = 0.05 + [] + [muem] + type = ConstantFunction + value = 0.01 + [] + #Electron energy mobility coeff. + [diffmean_en] + type = ConstantFunction + value = 0.05 + [] + [mumean_en] + type = ConstantFunction + value = 0.01 + [] + #Ion diffusion coeff. + [diffion] + type = ParsedFunction + vars = diffmean_en + vals = diffmean_en + value = diffmean_en + [] + [muion] + type = ParsedFunction + vars = mumean_en + vals = mumean_en + value = mumean_en + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.25 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'log(((16*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured electron energy solution + [mean_en_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' + [] + #The manufactured potential solution + [potential_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '((32*ee*cos(2*pi*t)*cos(pi*y)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1)^2)/(5*massem*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - diffem*((32*ee*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1))/(massem*pi*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - (16*ee*(pi^2*sin(pi*y) + + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1)^2)/(massem*pi*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - (768*ee*mumean_en*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(5*massem*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + (128*ee*mumean_en*(pi^2*sin(pi*y) + + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1)^3)/(5*massem*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + (4608*ee*mumean_en^2*pi*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)^2*(sin(pi*t) + 1)^2*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1)^3)/(25*massem*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^4)) - diffem*((32*ee*pi*cos(pi*x)^2*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(massem*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - (16*ee*pi*sin(pi*x)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(massem*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2) - (768*ee*mumean_en*pi^2*cos(pi*x)^2*(sin(pi*t) + + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^2)/(5*massem*((12*diffmean_en*pi)/5 + + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + + (128*ee*mumean_en*pi^2*sin(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + + 1)^3)/(5*massem*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3) + (4608*ee*mumean_en^2*pi^3*cos(pi*x)^2*(sin(pi*t) + 1)^2*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(25*massem*((12*diffmean_en*pi)/5 + + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^4)) - + (32*ee*((12*mumean_en*pi^2*cos(pi*t)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/5 + + (24*mumean_en*pi^2*cos(2*pi*t)*cos(pi*y)*(sin(pi*t) + 1))/25)*(sin(pi*x) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3)) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(diffion*pi^2*sin(pi*x) + (diffion*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 - (muion*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(diffmean_en*pi^2*sin(pi*x) + (diffmean_en*pi^2*(5*sin(pi*y) + cos(pi*y)*sin(2*pi*t)))/5 + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (mumean_en*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' + [] + + #The Ex source term. + [Ex_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'pi^2*cos(pi*t)*cos(pi*x) + diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = 'pi^2*cos(pi*t)*cos(pi*y) + diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' + [] + + [potential_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - + diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = '4.0' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = '1.0' + [] + + [em_left_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(-diffmean_en*pi*cos(pi*x) - mumean_en*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] + [em_down_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' + value = '(-(diffmean_en*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - + mumean_en*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] +[] + +[BCs] + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + #[energy_left_BC] + # type = FunctionDirichletBC + # variable = mean_en + # function = 'mean_en_fun' + # boundary = 3 + # preset = true + #[] + [energy_left_physical_diffusion] + type = SakiyamaEnergyDiffusionBC + variable = mean_en + electrons = em + boundary = 3 + position_units = 1.0 + [] + [energy_left_second_emissions] + type = SakiyamaEnergySecondaryElectronWithEffEfieldBC + variable = mean_en + em = em + ip = ion + Ex = Ex + Ey = Ey + Tse_equal_Te = false + user_se_energy = 1.0 + se_coeff = 1.0 + boundary = 3 + position_units = 1.0 + [] + + [energy_right_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = 1 + preset = true + [] + + #[energy_down_BC] + # type = FunctionDirichletBC + # variable = mean_en + # function = 'mean_en_fun' + # boundary = 0 + # preset = true + #[] + [energy_down_physical_diffusion] + type = SakiyamaEnergyDiffusionBC + variable = mean_en + electrons = em + boundary = 0 + position_units = 1.0 + [] + [energy_down_second_emissions] + type = SakiyamaEnergySecondaryElectronWithEffEfieldBC + variable = mean_en + em = em + ip = ion + Ex = Ex + Ey = Ey + Tse_equal_Te = false + user_se_energy = 1.0 + se_coeff = 1.0 + boundary = 0 + position_units = 1.0 + [] + + [energy_up_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = 2 + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] + + [potential_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A massem diffpotential diffEx diffEy' + prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffion muion diffem muem diffmean_en mumean_en' + prop_values = 'diffion muion diffem muem diffmean_en mumean_en' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield_IC_out.e b/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield_IC_out.e new file mode 100644 index 00000000000..d2e00643cf3 Binary files /dev/null and b/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield_IC_out.e differ diff --git a/test/tests/mms/bcs/2D_IonBC.i b/test/tests/mms/bcs/2D_IonBC.i new file mode 100644 index 00000000000..8a07c9b6e23 --- /dev/null +++ b/test/tests/mms/bcs/2D_IonBC.i @@ -0,0 +1,355 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_IonBC_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [ion] + initial_from_file_var = ion + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] +[] + +[Kernels] +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + + +#Eff. Efield + [EffEfield_X_time_deriv] + type = TimeDerivative + variable = Ex + [] + [EffEfield_X_diffusion] + type = MatDiffusion + diffusivity = diffEx + variable = Ex + [] + [EffEfield_X_source] + type = BodyForce + variable = Ex + function = 'Ex_source' + [] + [EffEfield_Y_time_deriv] + type = TimeDerivative + variable = Ey + [] + [EffEfield_Y_diffusion] + type = MatDiffusion + diffusivity = diffEy + variable = Ey + [] + [EffEfield_Y_source] + type = BodyForce + variable = Ey + function = 'Ey_source' + [] +[] + +[AuxVariables] + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] +[] + +[AuxKernels] + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] +[] + +[Functions] +#Material Variables + #Ion diffusion coeff. + [diffion] + type = ConstantFunction + value = 0.05 + [] + [muion] + type = ConstantFunction + value = 0.01 + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.25 + [] + + +#Manufactured Solutions + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((cos(pi/2*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' + [] + +#Source Terms in moles + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '(diffion*((pi^2*cos((pi*y)/2))/4 + (pi^2*sin(2*pi*t)*(2*cos((pi*y)/2)^2 - 1))/5) + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (diffion*pi^2*cos((pi*x)/2))/4 + muion*pi^2*sin(pi*x)*(sin(pi*t) + 1)*(cos((pi*x)/2) + + cos((pi*y)/2) + (cos(pi*y)*sin(2*pi*t))/5 + 1) + muion*pi^2*sin(pi*y)*(sin(pi*t) + 1)*(cos((pi*x)/2) + cos((pi*y)/2) + + (cos(pi*y)*sin(2*pi*t))/5 + 1) + muion*pi*cos(pi*y)*((pi*sin((pi*y)/2))/2 + (pi*sin(2*pi*t)*sin(pi*y))/5)*(sin(pi*t) + 1) + + (muion*pi^2*cos(pi*x)*sin((pi*x)/2)*(sin(pi*t) + 1))/2) / N_A' + [] + + #The Ex source term. + [Ex_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*x) - diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' + [] + [Ey_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '-pi^2*cos(pi*t)*cos(pi*y) - diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' + [] + + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + + [ion_left_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '((diffion*pi*sin((pi*x)/2))/2 - muion*pi*(2*cos((pi*x)/2)^2 - 1)*(sin(pi*t) + 1)*(cos((pi*x)/2) + + cos((pi*y)/2) + (2*cos(pi*t)*sin(pi*t)*(2*cos((pi*y)/2)^2 - 1))/5 + 1)) / N_A' + [] + [ion_down_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '(diffion*((pi*sin((pi*y)/2))/2 + (pi*sin(2*pi*t)*sin(pi*y))/5) - + muion*pi*cos(pi*y)*(sin(pi*t) + 1)*(cos((pi*x)/2) + cos((pi*y)/2) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' + [] +[] + +[BCs] + #[ion_left_BC] + # type = FunctionDirichletBC + # variable = ion + # function = 'ion_left_BC' + # boundary = 3 + # preset = true + #[] + [ion_left_physical_advection] + type = SakiyamaIonAdvectionWithEffEfieldBC + variable = ion + Ex = Ex + Ey = Ey + boundary = 3 + position_units = 1.0 + [] + + [ion_right_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 1 + preset = true + [] + + #[ion_down_BC] + # type = FunctionDirichletBC + # variable = ion + # function = 'ion_down_BC' + # boundary = 0 + # preset = true + #[] + [ion_down_physical_advection] + type = SakiyamaIonAdvectionWithEffEfieldBC + variable = ion + Ex = Ex + Ey = Ey + boundary = 0 + position_units = 1.0 + [] + + [ion_up_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 2 + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A diffEx diffEy' + prop_values = 'ee N_A diffpotential diffpotential ' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffion muion' + prop_values = 'diffion muion' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnion' + prop_values = '1.0' + [] +[] + +[Postprocessors] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/bcs/2D_IonBC_IC_out.e b/test/tests/mms/bcs/2D_IonBC_IC_out.e new file mode 100644 index 00000000000..dd85884d47c Binary files /dev/null and b/test/tests/mms/bcs/2D_IonBC_IC_out.e differ diff --git a/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield.i b/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield.i new file mode 100644 index 00000000000..2cbf40003f1 --- /dev/null +++ b/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield.i @@ -0,0 +1,351 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_IonBC_NegivateOutWardFacingEfield_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [ion] + initial_from_file_var = ion + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] +[] + +[Kernels] +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + + +#Eff. Efield + [EffEfield_X_time_deriv] + type = TimeDerivative + variable = Ex + [] + [EffEfield_X_diffusion] + type = MatDiffusion + diffusivity = diffEx + variable = Ex + [] + [EffEfield_X_source] + type = BodyForce + variable = Ex + function = 'Ex_source' + [] + [EffEfield_Y_time_deriv] + type = TimeDerivative + variable = Ey + [] + [EffEfield_Y_diffusion] + type = MatDiffusion + diffusivity = diffEy + variable = Ey + [] + [EffEfield_Y_source] + type = BodyForce + variable = Ey + function = 'Ey_source' + [] +[] + +[AuxVariables] + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] +[] + +[AuxKernels] + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] +[] + +[Functions] +#Material Variables + #Ion diffusion coeff. + [diffion] + type = ConstantFunction + value = 0.05 + [] + [muion] + type = ConstantFunction + value = 0.01 + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.25 + [] + + +#Manufactured Solutions + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '(diffion*pi*cos(pi*x))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '(diffion*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' + [] + +#Source Terms in moles + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '((2*pi*cos(2*pi*t)*cos(pi*y))/5) / N_A' + [] + + #The Ex source term. + [Ex_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '-diffpotential*((2*diffion*pi^3*cos(pi*x)^3)/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (diffion*pi^3*cos(pi*x))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) + (3*diffion*pi^3*cos(pi*x)*sin(pi*x))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) - (2*diffion*diffpotential*pi*cos(pi*x)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^2)/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (2*diffion*pi^2*cos(2*pi*t)*cos(pi*x)*cos(pi*y))/(5*muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) - (diffion*diffpotential*pi*cos(pi*x)*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)' + [] + [Ey_source] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '-diffpotential*((2*diffion*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^3)/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (diffion*(pi^3*cos(pi*y) - (pi^3*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) + (3*diffion*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) - (2*diffion*pi^2*cos(2*pi*t)*sin(pi*y))/(5*muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - (diffion*diffpotential*pi^2*sin(pi*x)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) - (2*diffion*diffpotential*pi^2*cos(pi*x)^2*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (2*diffion*pi*cos(2*pi*t)*cos(pi*y)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(5*muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)' + [] + + + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + sin(pi/2*x)) / N_A)' + [] + + [ion_left_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '(0) / N_A' + [] + [ion_down_Flux_BC] + type = ParsedFunction + vars = 'ee N_A diffpotential diffion muion' + vals = 'ee N_A diffpotential diffion muion' + value = '(0) / N_A' + [] +[] + +[BCs] + #[ion_left_BC] + # type = FunctionDirichletBC + # variable = ion + # function = 'ion_fun' + # boundary = 3 + # preset = true + #[] + [ion_left_physical_advection] + type = SakiyamaIonAdvectionWithEffEfieldBC + variable = ion + Ex = Ex + Ey = Ey + boundary = 3 + position_units = 1.0 + [] + + [ion_right_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 1 + preset = true + [] + + #[ion_down_BC] + # type = FunctionDirichletBC + # variable = ion + # function = 'ion_down_BC' + # boundary = 0 + # preset = true + #[] + [ion_down_physical_advection] + type = SakiyamaIonAdvectionWithEffEfieldBC + variable = ion + Ex = Ex + Ey = Ey + boundary = 0 + position_units = 1.0 + [] + + [ion_up_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = 2 + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A diffEx diffEy' + prop_values = 'ee N_A diffpotential diffpotential ' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffion muion' + prop_values = 'diffion muion' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnion' + prop_values = '1.0' + [] +[] + +[Postprocessors] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield_IC_out.e b/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield_IC_out.e new file mode 100644 index 00000000000..a5b481b343d Binary files /dev/null and b/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield_IC_out.e differ diff --git a/test/tests/mms/bcs/LymberopoulosElectronBC_LeftBC_IC_out.e b/test/tests/mms/bcs/LymberopoulosElectronBC_LeftBC_IC_out.e new file mode 100644 index 00000000000..7a5db819c20 Binary files /dev/null and b/test/tests/mms/bcs/LymberopoulosElectronBC_LeftBC_IC_out.e differ diff --git a/test/tests/mms/bcs/LymberopoulosElectronBC_RightBC_IC_out.e b/test/tests/mms/bcs/LymberopoulosElectronBC_RightBC_IC_out.e new file mode 100644 index 00000000000..3c47a535d96 Binary files /dev/null and b/test/tests/mms/bcs/LymberopoulosElectronBC_RightBC_IC_out.e differ diff --git a/test/tests/mms/bcs/LymberopoulosIonBC_LeftBC_IC_out.e b/test/tests/mms/bcs/LymberopoulosIonBC_LeftBC_IC_out.e new file mode 100644 index 00000000000..aee2dc3b9ca Binary files /dev/null and b/test/tests/mms/bcs/LymberopoulosIonBC_LeftBC_IC_out.e differ diff --git a/test/tests/mms/bcs/LymberopoulosIonBC_RightBC_IC_out.e b/test/tests/mms/bcs/LymberopoulosIonBC_RightBC_IC_out.e new file mode 100644 index 00000000000..d0a1607d784 Binary files /dev/null and b/test/tests/mms/bcs/LymberopoulosIonBC_RightBC_IC_out.e differ diff --git a/test/tests/mms/bcs/gold/2D_DielectricBCWithEffEfield_out.e b/test/tests/mms/bcs/gold/2D_DielectricBCWithEffEfield_out.e new file mode 100644 index 00000000000..73b1f4bc4fe Binary files /dev/null and b/test/tests/mms/bcs/gold/2D_DielectricBCWithEffEfield_out.e differ diff --git a/test/tests/mms/bcs/gold/2D_ElectronBC_NegivateOutWardFacingEfield_out.e b/test/tests/mms/bcs/gold/2D_ElectronBC_NegivateOutWardFacingEfield_out.e new file mode 100644 index 00000000000..d6e82b1329d Binary files /dev/null and b/test/tests/mms/bcs/gold/2D_ElectronBC_NegivateOutWardFacingEfield_out.e differ diff --git a/test/tests/mms/bcs/gold/2D_ElectronBC_out.e b/test/tests/mms/bcs/gold/2D_ElectronBC_out.e new file mode 100644 index 00000000000..cd75c1b2c6a Binary files /dev/null and b/test/tests/mms/bcs/gold/2D_ElectronBC_out.e differ diff --git a/test/tests/mms/bcs/gold/2D_EnergyBC_NegivateOutWardFacingEfield_out.e b/test/tests/mms/bcs/gold/2D_EnergyBC_NegivateOutWardFacingEfield_out.e new file mode 100644 index 00000000000..59ab7a15f0e Binary files /dev/null and b/test/tests/mms/bcs/gold/2D_EnergyBC_NegivateOutWardFacingEfield_out.e differ diff --git a/test/tests/mms/bcs/gold/2D_EnergyBC_out.e b/test/tests/mms/bcs/gold/2D_EnergyBC_out.e new file mode 100644 index 00000000000..984ec11933d Binary files /dev/null and b/test/tests/mms/bcs/gold/2D_EnergyBC_out.e differ diff --git a/test/tests/mms/bcs/gold/2D_IonBC_NegivateOutWardFacingEfield_out.e b/test/tests/mms/bcs/gold/2D_IonBC_NegivateOutWardFacingEfield_out.e new file mode 100644 index 00000000000..d2179f9eaaf Binary files /dev/null and b/test/tests/mms/bcs/gold/2D_IonBC_NegivateOutWardFacingEfield_out.e differ diff --git a/test/tests/mms/bcs/gold/2D_IonBC_out.e b/test/tests/mms/bcs/gold/2D_IonBC_out.e new file mode 100644 index 00000000000..8a5572115d0 Binary files /dev/null and b/test/tests/mms/bcs/gold/2D_IonBC_out.e differ diff --git a/test/tests/mms/bcs/gold/LymberopoulosElectronBC_LeftBC_out.e b/test/tests/mms/bcs/gold/LymberopoulosElectronBC_LeftBC_out.e new file mode 100644 index 00000000000..8150a55376f Binary files /dev/null and b/test/tests/mms/bcs/gold/LymberopoulosElectronBC_LeftBC_out.e differ diff --git a/test/tests/mms/bcs/gold/LymberopoulosElectronBC_RightBC_out.e b/test/tests/mms/bcs/gold/LymberopoulosElectronBC_RightBC_out.e new file mode 100644 index 00000000000..2b1cb5cea2a Binary files /dev/null and b/test/tests/mms/bcs/gold/LymberopoulosElectronBC_RightBC_out.e differ diff --git a/test/tests/mms/bcs/gold/LymberopoulosIonBC_LeftBC_out.e b/test/tests/mms/bcs/gold/LymberopoulosIonBC_LeftBC_out.e new file mode 100644 index 00000000000..bd2ecc4e181 Binary files /dev/null and b/test/tests/mms/bcs/gold/LymberopoulosIonBC_LeftBC_out.e differ diff --git a/test/tests/mms/bcs/gold/LymberopoulosIonBC_RightBC_out.e b/test/tests/mms/bcs/gold/LymberopoulosIonBC_RightBC_out.e new file mode 100644 index 00000000000..ef2aaca78be Binary files /dev/null and b/test/tests/mms/bcs/gold/LymberopoulosIonBC_RightBC_out.e differ diff --git a/test/tests/mms/bcs/tests b/test/tests/mms/bcs/tests new file mode 100644 index 00000000000..f74f17b9eff --- /dev/null +++ b/test/tests/mms/bcs/tests @@ -0,0 +1,81 @@ +[Tests] + [2D_DielectricBCWithEffEfield] + type = 'Exodiff' + input = '2D_DielectricBCWithEffEfield.i' + exodiff = '2D_DielectricBCWithEffEfield_out.e' + heavy = True + max_time = 500 + [] + [2D_ElectronBC] + type = 'Exodiff' + input = '2D_ElectronBC.i' + exodiff = '2D_ElectronBC_out.e' + heavy = True + max_time = 500 + [] + [2D_ElectronBC_NegivateOutWardFacingEfield] + type = 'Exodiff' + input = '2D_ElectronBC_NegivateOutWardFacingEfield.i' + exodiff = '2D_ElectronBC_NegivateOutWardFacingEfield_out.e' + heavy = True + max_time = 500 + [] + [2D_EnergyBC] + type = 'Exodiff' + input = '2D_EnergyBC.i' + exodiff = '2D_EnergyBC_out.e' + heavy = True + max_time = 500 + [] + [2D_EnergyBC_NegivateOutWardFacingEfield] + type = 'Exodiff' + input = '2D_EnergyBC_NegivateOutWardFacingEfield.i' + exodiff = '2D_EnergyBC_NegivateOutWardFacingEfield_out.e' + heavy = True + max_time = 500 + [] + [2D_IonBC] + type = 'Exodiff' + input = '2D_IonBC.i' + exodiff = '2D_IonBC_out.e' + heavy = True + max_time = 500 + [] + [2D_IonBC_NegivateOutWardFacingEfield] + type = 'Exodiff' + input = '2D_IonBC_NegivateOutWardFacingEfield.i' + exodiff = '2D_IonBC_NegivateOutWardFacingEfield_out.e' + heavy = True + max_time = 500 + [] + [1D_LymberopoulosElectronBC_LeftBC] + type = 'Exodiff' + input = '1D_LymberopoulosElectronBC.i' + exodiff = 'LymberopoulosElectronBC_LeftBC_out.e' + heavy = True + max_time = 500 + [] + [1D_LymberopoulosElectronBC_RightBC] + type = 'Exodiff' + input = '1D_LymberopoulosElectronBC.i' + exodiff = 'LymberopoulosElectronBC_RightBC_out.e' + cli_args = "Mesh/geo/file='LymberopoulosElectronBC_RightBC_IC_out.e' Outputs/file_base='LymberopoulosElectronBC_RightBC_out' BCs/active='potential_left_BC potential_right_BC ion_left_BC ion_right_BC em_left_BC em_right_LymberopoulosElectronBC'" + heavy = True + max_time = 500 + [] + [1D_LymberopoulosIonBC_LeftBC] + type = 'Exodiff' + input = '1D_LymberopoulosIonBC.i' + exodiff = 'LymberopoulosIonBC_LeftBC_out.e' + heavy = True + max_time = 500 + [] + [1D_LymberopoulosIonBC_RightBC] + type = 'Exodiff' + input = '1D_LymberopoulosIonBC.i' + exodiff = 'LymberopoulosIonBC_RightBC_out.e' + cli_args = "Mesh/geo/file='LymberopoulosIonBC_RightBC_IC_out.e' Outputs/file_base='LymberopoulosIonBC_RightBC_out' BCs/active='potential_left_BC potential_right_BC ion_left_BC ion_right_LymberopoulosIonBC'" + heavy = True + max_time = 500 + [] +[] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions.i new file mode 100644 index 00000000000..0ed4a25130d --- /dev/null +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions.i @@ -0,0 +1,334 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_Coupling_Electons_Potential_Ions_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [potential] + initial_from_file_var = potential + [] + [ion] + initial_from_file_var = ion + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EFieldAdvection + variable = ion + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + +#Potential Equations + [potential_diffusion] + type = CoeffDiffusionLin + variable = potential + position_units = 1.0 + [] + [ion_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = ion + potential_units = V + [] + [em_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = em + potential_units = V + [] +[] + +[AuxVariables] + [potential_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] +[] + +[Functions] +#Material Variables + #Electron diffusion coeff. + [diffem_coeff] + type = ConstantFunction + value = 0.05 + [] + #Electron mobility coeff. + [muem_coeff] + type = ConstantFunction + value = 0.01 + [] + #Ion diffusion coeff. + [diffion] + type = ConstantFunction + value = 0.1 + [] + #Ion mobility coeff. + [muion] + type = ConstantFunction + value = 0.025 + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.01 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee diffpotential diffem_coeff muem_coeff N_A' + vals = 'ee diffpotential diffem_coeff muem_coeff N_A' + value = '(diffem_coeff*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5) + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (diffem_coeff*pi^2*cos((pi*x)/2))/4 + + (ee*muem_coeff*(5*cos((pi*x)/2) - 4*cos(2*pi*t)^2*cos(pi*y)^2 + + 10*cos(pi*y)*sin(2*pi*t) + 5*cos((pi*x)/2)*sin(pi*y) + 2*cos(2*pi*t)^2 + + 10*cos((pi*x)/2)^2 + 4*cos(pi*y)^2 + 11*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + + 20*cos(pi*y)*sin(2*pi*t)*sin(pi*y) - 7))/(50*diffpotential)) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee diffpotential diffion muion N_A' + vals = 'ee diffpotential diffion muion N_A' + value = '((diffion*pi^2*(9*cos((pi*x)/2) + 40*sin(pi*y)))/40 + + (9*ee*muion*sin((pi*x)/2)^2)/(100*diffpotential) - + (ee*muion*cos((pi*x)/2)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(10*diffpotential) - + (ee*muion*cos(pi*y)*sin(2*pi*t)*sin(pi*y))/(5*diffpotential) - + (ee*muion*cos(pi*y)*sin(2*pi*t)*((9*cos((pi*x)/2))/10 + + sin(pi*y) + 1))/(5*diffpotential)) / N_A' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + cos(pi/2*x)) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' + [] +[] + +[BCs] + [potential_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] + + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffpotential diffion muion' + prop_values = 'diffpotential diffion muion' + [] + [ADMaterial_Coeff_Set2] + type = ADGenericFunctionMaterial + prop_names = 'diffem muem' + prop_values = 'diffem_coeff muem_coeff' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion' + prop_values = '-1.0 1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_IC_out.e b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_IC_out.e new file mode 100644 index 00000000000..5f33196e730 Binary files /dev/null and b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_IC_out.e differ diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i new file mode 100644 index 00000000000..5e880d150ed --- /dev/null +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i @@ -0,0 +1,513 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [potential] + initial_from_file_var = potential + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EFieldAdvection + variable = ion + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + +#Potential Equations + [potential_diffusion] + type = CoeffDiffusionLin + variable = potential + position_units = 1.0 + [] + [ion_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = ion + potential_units = V + [] + [em_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = em + potential_units = V + [] + +#Electron Energy Equations + [mean_en_time_deriv] + type = TimeDerivativeLog + variable = mean_en + [] + [mean_en_advection] + type = EFieldAdvection + variable = mean_en + position_units = 1.0 + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_joule_heating] + type = JouleHeating + variable = mean_en + em = em + position_units = 1.0 + potential_units = V + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [potential_sol] + [] + + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] + + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] +[] + +[Functions] +#Material Variables + #Electron diffusion coeff. + [diffem_coeff] + type = ConstantFunction + value = 0.05 + [] + #Electron mobility coeff. + [muem_coeff] + type = ConstantFunction + value = 0.01 + [] + #Electron energy diffusion coeff. + [diffmean_en_coeff] + type = ParsedFunction + vars = 'diffem_coeff' + vals = 'diffem_coeff' + value = '5.0 / 3.0 * diffem_coeff' + [] + #Electron energy mobility coeff. + [mumean_en_coeff] + type = ParsedFunction + vars = 'muem_coeff' + vals = 'muem_coeff' + value = '5.0 / 3.0 * muem_coeff' + [] + #Ion diffusion coeff. + [diffion] + type = ConstantFunction + value = 0.1 + [] + #Ion mobility coeff. + [muion] + type = ConstantFunction + value = 0.025 + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.01 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' + [] + #The manufactured electron energy solution + [energy_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'sin(pi*y) + sin(2*pi*t)*cos(pi*y)*sin(pi*y) + 0.75 + cos(pi/2*x)' + [] + [mean_en_fun] + type = ParsedFunction + vars = 'energy_fun em_fun' + vals = 'energy_fun em_fun' + value = 'log(energy_fun) + em_fun' + [] + + #Electron diffusion coeff. + [diffem] + type = ParsedFunction + vars = 'diffem_coeff energy_fun' + vals = 'diffem_coeff energy_fun' + value = 'diffem_coeff * energy_fun' + [] + #Electron mobility coeff. + [muem] + type = ParsedFunction + vars = 'muem_coeff energy_fun' + vals = 'muem_coeff energy_fun' + value = 'muem_coeff * energy_fun' + [] + #Electron energy diffusion coeff. + [diffmean_en] + type = ParsedFunction + vars = 'diffmean_en_coeff energy_fun' + vals = 'diffmean_en_coeff energy_fun' + value = 'diffmean_en_coeff * energy_fun' + [] + #Electron energy mobility coeff. + [mumean_en] + type = ParsedFunction + vars = 'mumean_en_coeff energy_fun' + vals = 'mumean_en_coeff energy_fun' + value = 'mumean_en_coeff * energy_fun' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee diffpotential diffem_coeff muem_coeff N_A' + vals = 'ee diffpotential diffem_coeff muem_coeff N_A' + value = '((2*pi*cos(2*pi*t)*cos(pi*y))/5 - (diffem_coeff*pi^2*sin((pi*x)/2)^2)/4 - + diffem_coeff*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos(pi*y) - + sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t)) + + (diffem_coeff*pi^2*cos((pi*x)/2)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/4 + (diffem_coeff*pi^2*(5*sin(pi*y) + + cos(pi*y)*sin(2*pi*t))*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/5 - + (ee*muem_coeff*sin((pi*x)/2)^2*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(10*diffpotential) - (ee*muem_coeff*sin((pi*x)/2)^2*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(10*diffpotential) + (ee*muem_coeff*cos((pi*x)/2)*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(10*diffpotential) + + (ee*muem_coeff*cos(pi*y)*sin(2*pi*t)*(cos((pi*x)/2) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential) + + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(cos(pi*y) - sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t))*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(5*diffpotential) + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee diffpotential diffion muion N_A' + vals = 'ee diffpotential diffion muion N_A' + value = '((diffion*pi^2*(9*cos((pi*x)/2) + 40*sin(pi*y)))/40 + + (9*ee*muion*sin((pi*x)/2)^2)/(100*diffpotential) - + (ee*muion*cos((pi*x)/2)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(10*diffpotential) - + (ee*muion*cos(pi*y)*sin(2*pi*t)*sin(pi*y))/(5*diffpotential) - + (ee*muion*cos(pi*y)*sin(2*pi*t)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(5*diffpotential)) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee diffpotential diffem_coeff muem_coeff N_A' + vals = 'ee diffpotential diffem_coeff muem_coeff N_A' + value = '(((4*cos((pi*x)/2) + 4*sin(pi*y) + + 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(172*ee*muem_coeff*cos(2*pi*t)^2 - 282*ee*muem_coeff + + 180*ee*muem_coeff*cos((pi*x)/2)^2 + 160*ee*muem_coeff*cos((pi*x)/2)^3 + + 664*ee*muem_coeff*cos(pi*y)^2 - 480*ee*muem_coeff*cos(pi*y)^4 - 66*ee*muem_coeff*cos((pi*x)/2) - + 296*ee*muem_coeff*sin(pi*y) + 200*diffem_coeff*diffpotential*pi^2 - + 664*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^2 + 480*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^4 + + 364*ee*muem_coeff*cos(pi*y)*sin(2*pi*t) - 90*ee*muem_coeff*cos((pi*x)/2)*sin(pi*y) + + 75*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2) + 140*diffem_coeff*diffpotential*pi^2*sin(pi*y) + + 16*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2) - 8*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^2 + + 176*ee*muem_coeff*cos(2*pi*t)^2*sin(pi*y) - 320*ee*muem_coeff*cos(pi*y)^3*sin(2*pi*t) + + 200*ee*muem_coeff*cos((pi*x)/2)^2*sin(pi*y) + 464*ee*muem_coeff*cos(pi*y)^2*sin(pi*y) + + 300*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)^2 - 1200*diffem_coeff*diffpotential*pi^2*cos(pi*y)^2 + + 160*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*sin(pi*y) + + 104*ee*muem_coeff*cos((pi*x)/2)^2*cos(pi*y)*sin(2*pi*t) - + 40*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^3*sin(2*pi*t) + 408*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^2*sin(pi*y) + + 96*ee*muem_coeff*cos(pi*y)^3*sin(2*pi*t)*sin(pi*y) + 160*diffem_coeff*diffpotential*pi^2*cos(2*pi*t)^2*sin(pi*y) - + 2000*diffem_coeff*diffpotential*pi^2*cos(pi*y)^3*sin(2*pi*t) + + 400*diffem_coeff*diffpotential*pi^2*cos(pi*y)^2*sin(pi*y) - 32*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*cos(pi*y)^2 - + 464*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^2*sin(pi*y) + 186*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + + 272*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 1260*diffem_coeff*diffpotential*pi^2*cos(pi*y)*sin(2*pi*t) + + 500*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*sin(pi*y) - 408*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*cos(pi*y)^2*sin(pi*y) - + 96*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^3*sin(2*pi*t)*sin(pi*y) - + 400*diffem_coeff*diffpotential*pi^2*cos(2*pi*t)^2*cos(pi*y)^2*sin(pi*y) + + 448*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 80*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + + 240*diffem_coeff*diffpotential*pi^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 48*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 80*ee*muem_coeff*cos((pi*x)/2)^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 100*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t)*sin(pi*y)))/(960*diffpotential) + + (pi*cos(2*pi*t)*cos(pi*y)*(4*cos((pi*x)/2) + 24*sin(pi*y) + 20*cos((pi*x)/2)*sin(pi*y) + 20*sin(pi*y)^2 + + 8*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3))/10 - (5*diffem_coeff*pi^2*sin((pi*x)/2)^2*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/12 - (diffem_coeff*pi^2*sin((pi*x)/2)^2*((5*cos((pi*x)/2))/3 + + (5*sin(pi*y))/3 + (cos(pi*y)*sin(2*pi*t))/3 + 5/3))/4 - diffem_coeff*pi^2*(cos(pi*y) - sin(2*pi*t) + + 2*cos(pi*y)^2*sin(2*pi*t))^2*((5*cos((pi*x)/2))/3 + (5*sin(pi*y))/3 + (cos(pi*y)*sin(2*pi*t))/3 + 5/3) + + (diffem_coeff*pi^2*cos((pi*x)/2)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4)*((5*cos((pi*x)/2))/3 + + (5*sin(pi*y))/3 + (cos(pi*y)*sin(2*pi*t))/3 + 5/3))/4 - (diffem_coeff*pi^2*(5*cos(pi*y) - + sin(2*pi*t)*sin(pi*y))*(cos(pi*y) - sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t))*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/3 + (ee*sin(2*pi*t)*sin(pi*y)*(diffem_coeff*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4) - + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)))/(5*diffpotential*pi) + + diffem_coeff*pi^2*sin(pi*y)*(4*cos(pi*y)*sin(2*pi*t) + 1)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4)*((5*cos((pi*x)/2))/3 + (5*sin(pi*y))/3 + + (cos(pi*y)*sin(2*pi*t))/3 + 5/3) - (ee*sin((pi*x)/2)^2*(4*cos((pi*x)/2) + 4*sin(pi*y) + + 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(10*ee*muem_coeff + 10*ee*muem_coeff*cos((pi*x)/2) + + 10*ee*muem_coeff*sin(pi*y) + 25*diffem_coeff*diffpotential*pi^2 + + 2*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)))/(1000*diffpotential^2*pi^2)) / N_A' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + cos(pi/2*x)) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = 'log(32. + cos(pi/2*x)) + em_ICs' + [] +[] + +[BCs] + [potential_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] + + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + [energy_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffpotential diffion muion' + prop_values = 'diffpotential diffion muion' + [] + [Material_Coeff_Set2] + type = ADMMSEEDFRates + electrons = em + mean_energy = mean_en + prop_names = 'diffem muem diffmean_en mumean_en' + prop_values = 'diffem muem diffmean_en mumean_en' + d_prop_d_actual_mean_en = 'diffem_coeff muem_coeff diffmean_en_coeff mumean_en_coeff' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i new file mode 100644 index 00000000000..0553bc6cdac --- /dev/null +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i @@ -0,0 +1,523 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_IC_out.e' + use_for_exodus_restart = true + [] +[] +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [potential] + initial_from_file_var = potential + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EFieldAdvection + variable = ion + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + +#Potential Equations + [potential_diffusion] + type = CoeffDiffusionLin + variable = potential + position_units = 1.0 + [] + [ion_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = ion + potential_units = V + [] + [em_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = em + potential_units = V + [] + +#Electron Energy Equations + [mean_en_time_deriv] + type = TimeDerivativeLog + variable = mean_en + [] + [mean_en_advection] + type = EFieldAdvection + variable = mean_en + position_units = 1.0 + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_diffusion_correction] + type = ThermalConductivityDiffusion + variable = mean_en + em = em + position_units = 1.0 + [] + [mean_en_joule_heating] + type = JouleHeating + variable = mean_en + em = em + position_units = 1.0 + potential_units = V + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [potential_sol] + [] + + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] + + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] +[] + +[Functions] +#Material Variables + #Electron diffusion coeff. + [diffem_coeff] + type = ConstantFunction + value = 0.05 + [] + #Electron mobility coeff. + [muem_coeff] + type = ConstantFunction + value = 0.01 + [] + #Electron energy diffusion coeff. + [diffmean_en_coeff] + type = ParsedFunction + vars = 'diffem_coeff' + vals = 'diffem_coeff' + value = '5.0 / 3.0 * diffem_coeff' + [] + #Electron energy mobility coeff. + [mumean_en_coeff] + type = ParsedFunction + vars = 'muem_coeff' + vals = 'muem_coeff' + value = '5.0 / 3.0 * muem_coeff' + [] + #Ion diffusion coeff. + [diffion] + type = ConstantFunction + value = 0.1 + [] + #Ion mobility coeff. + [muion] + type = ConstantFunction + value = 0.025 + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.01 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' + [] + #The manufactured electron energy solution + [energy_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'sin(pi*y) + sin(2*pi*t)*cos(pi*y)*sin(pi*y) + 0.75 + cos(pi/2*x)' + [] + [mean_en_fun] + type = ParsedFunction + vars = 'energy_fun em_fun' + vals = 'energy_fun em_fun' + value = 'log(energy_fun) + em_fun' + [] + + #Electron diffusion coeff. + [diffem] + type = ParsedFunction + vars = 'diffem_coeff energy_fun' + vals = 'diffem_coeff energy_fun' + value = 'diffem_coeff * energy_fun' + [] + #Electron mobility coeff. + [muem] + type = ParsedFunction + vars = 'muem_coeff energy_fun' + vals = 'muem_coeff energy_fun' + value = 'muem_coeff * energy_fun' + [] + #Electron energy diffusion coeff. + [diffmean_en] + type = ParsedFunction + vars = 'diffmean_en_coeff energy_fun' + vals = 'diffmean_en_coeff energy_fun' + value = 'diffmean_en_coeff * energy_fun' + [] + #Electron energy mobility coeff. + [mumean_en] + type = ParsedFunction + vars = 'mumean_en_coeff energy_fun' + vals = 'mumean_en_coeff energy_fun' + value = 'mumean_en_coeff * energy_fun' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee diffpotential diffem_coeff muem_coeff N_A' + vals = 'ee diffpotential diffem_coeff muem_coeff N_A' + value = '((2*pi*cos(2*pi*t)*cos(pi*y))/5 - (diffem_coeff*pi^2*sin((pi*x)/2)^2)/4 - + diffem_coeff*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos(pi*y) - + sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t)) + + (diffem_coeff*pi^2*cos((pi*x)/2)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/4 + (diffem_coeff*pi^2*(5*sin(pi*y) + + cos(pi*y)*sin(2*pi*t))*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/5 - + (ee*muem_coeff*sin((pi*x)/2)^2*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(10*diffpotential) - (ee*muem_coeff*sin((pi*x)/2)^2*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(10*diffpotential) + (ee*muem_coeff*cos((pi*x)/2)*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(10*diffpotential) + + (ee*muem_coeff*cos(pi*y)*sin(2*pi*t)*(cos((pi*x)/2) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential) + + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(cos(pi*y) - sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t))*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(5*diffpotential) + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(pi*cos(pi*y) - + (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee diffpotential diffion muion N_A' + vals = 'ee diffpotential diffion muion N_A' + value = '((diffion*pi^2*(9*cos((pi*x)/2) + 40*sin(pi*y)))/40 + + (9*ee*muion*sin((pi*x)/2)^2)/(100*diffpotential) - + (ee*muion*cos((pi*x)/2)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(10*diffpotential) - + (ee*muion*cos(pi*y)*sin(2*pi*t)*sin(pi*y))/(5*diffpotential) - + (ee*muion*cos(pi*y)*sin(2*pi*t)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(5*diffpotential)) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee diffpotential diffem_coeff muem_coeff N_A' + vals = 'ee diffpotential diffem_coeff muem_coeff N_A' + value = '(((4*cos((pi*x)/2) + 4*sin(pi*y) + 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(172*ee*muem_coeff*cos(2*pi*t)^2 - + 282*ee*muem_coeff + 180*ee*muem_coeff*cos((pi*x)/2)^2 + 160*ee*muem_coeff*cos((pi*x)/2)^3 + + 664*ee*muem_coeff*cos(pi*y)^2 - 480*ee*muem_coeff*cos(pi*y)^4 - 66*ee*muem_coeff*cos((pi*x)/2) - + 296*ee*muem_coeff*sin(pi*y) + 200*diffem_coeff*diffpotential*pi^2 - + 664*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^2 + 480*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^4 + + 364*ee*muem_coeff*cos(pi*y)*sin(2*pi*t) - 90*ee*muem_coeff*cos((pi*x)/2)*sin(pi*y) + + 75*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2) + 140*diffem_coeff*diffpotential*pi^2*sin(pi*y) + + 16*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2) - 8*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^2 + + 176*ee*muem_coeff*cos(2*pi*t)^2*sin(pi*y) - 320*ee*muem_coeff*cos(pi*y)^3*sin(2*pi*t) + + 200*ee*muem_coeff*cos((pi*x)/2)^2*sin(pi*y) + 464*ee*muem_coeff*cos(pi*y)^2*sin(pi*y) + + 300*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)^2 - 1200*diffem_coeff*diffpotential*pi^2*cos(pi*y)^2 + + 160*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*sin(pi*y) + + 104*ee*muem_coeff*cos((pi*x)/2)^2*cos(pi*y)*sin(2*pi*t) - + 40*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^3*sin(2*pi*t) + + 408*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^2*sin(pi*y) + 96*ee*muem_coeff*cos(pi*y)^3*sin(2*pi*t)*sin(pi*y) + + 160*diffem_coeff*diffpotential*pi^2*cos(2*pi*t)^2*sin(pi*y) - + 2000*diffem_coeff*diffpotential*pi^2*cos(pi*y)^3*sin(2*pi*t) + + 400*diffem_coeff*diffpotential*pi^2*cos(pi*y)^2*sin(pi*y) - + 32*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*cos(pi*y)^2 - + 464*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^2*sin(pi*y) + + 186*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + 272*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 1260*diffem_coeff*diffpotential*pi^2*cos(pi*y)*sin(2*pi*t) + + 500*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*sin(pi*y) - + 408*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*cos(pi*y)^2*sin(pi*y) - + 96*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^3*sin(2*pi*t)*sin(pi*y) - + 400*diffem_coeff*diffpotential*pi^2*cos(2*pi*t)^2*cos(pi*y)^2*sin(pi*y) + + 448*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 80*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + + 240*diffem_coeff*diffpotential*pi^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 48*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 80*ee*muem_coeff*cos((pi*x)/2)^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 100*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t)*sin(pi*y)))/(960*diffpotential) + + (pi*cos(2*pi*t)*cos(pi*y)*(4*cos((pi*x)/2) + 24*sin(pi*y) + 20*cos((pi*x)/2)*sin(pi*y) + 20*sin(pi*y)^2 + + 8*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3))/10 - (diffem_coeff*pi^2*sin((pi*x)/2)^2*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/4 - (diffem_coeff*pi^2*sin((pi*x)/2)^2*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/4 - diffem_coeff*pi^2*(cos(pi*y) - sin(2*pi*t) + + 2*cos(pi*y)^2*sin(2*pi*t))^2*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) + + (diffem_coeff*pi^2*cos((pi*x)/2)*(cos((pi*x)/2) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/4 - + diffem_coeff*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos(pi*y) - sin(2*pi*t) + + 2*cos(pi*y)^2*sin(2*pi*t))*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4) + + (ee*sin(2*pi*t)*sin(pi*y)*(diffem_coeff*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4) - (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)))/(5*diffpotential*pi) + + diffem_coeff*pi^2*sin(pi*y)*(4*cos(pi*y)*sin(2*pi*t) + 1)*(cos((pi*x)/2) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4) - + (ee*sin((pi*x)/2)^2*(4*cos((pi*x)/2) + 4*sin(pi*y) + + 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(10*ee*muem_coeff + 10*ee*muem_coeff*cos((pi*x)/2) + + 10*ee*muem_coeff*sin(pi*y) + 25*diffem_coeff*diffpotential*pi^2 + + 2*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)))/(1000*diffpotential^2*pi^2)) / N_A' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + cos(pi/2*x)) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = 'log(32. + cos(pi/2*x)) + em_ICs' + [] +[] + +[BCs] + [potential_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] + + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + [energy_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffpotential diffion muion' + prop_values = 'diffpotential diffion muion' + [] + [Material_Coeff_Set2] + type = ADMMSEEDFRates + electrons = em + mean_energy = mean_en + prop_names = 'diffem muem diffmean_en mumean_en' + prop_values = 'diffem muem diffmean_en mumean_en' + d_prop_d_actual_mean_en = 'diffem_coeff muem_coeff diffmean_en_coeff mumean_en_coeff' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i new file mode 100644 index 00000000000..5defff72982 --- /dev/null +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i @@ -0,0 +1,607 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] + [potential] + initial_from_file_var = potential + [] + [ion] + initial_from_file_var = ion + [] + [mean_en] + initial_from_file_var = mean_en + [] + + [Ex] + initial_from_file_var = Ex + [] + [Ey] + initial_from_file_var = Ey + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] + +#Ion Equations + [ion_time_derivative] + type = TimeDerivativeLog + variable = ion + [] + [ion_diffusion] + type = CoeffDiffusion + variable = ion + position_units = 1.0 + [] + [ion_advection] + type = EffectiveEFieldAdvection + variable = ion + u = Ex + v = Ey + position_units = 1.0 + [] + [ion_source] + type = BodyForce + variable = ion + function = 'ion_source' + [] + +#Potential Equations + [potential_diffusion] + type = CoeffDiffusionLin + variable = potential + position_units = 1.0 + [] + [ion_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = ion + potential_units = V + [] + [em_charge_source] + type = ChargeSourceMoles_KV + variable = potential + charged = em + potential_units = V + [] + +#Eff. Efield + [EffEfield_X_time_deriv] + type = TimeDerivative + variable = Ex + [] + [EffEfield_X_ForceBody] + type = EffectiveEField + variable = Ex + nu = 5.0 + component = 0 + position_units = 1.0 + [] + [EffEfield_Y_time_deriv] + type = TimeDerivative + variable = Ey + [] + [EffEfield_Y_ForceBody] + type = EffectiveEField + variable = Ey + nu = 5.0 + component = 1 + position_units = 1.0 + [] + +#Electron Energy Equations + [mean_en_time_deriv] + type = TimeDerivativeLog + variable = mean_en + [] + [mean_en_advection] + type = EFieldAdvection + variable = mean_en + position_units = 1.0 + [] + [mean_en_diffusion] + type = CoeffDiffusion + variable = mean_en + position_units = 1.0 + [] + [mean_en_diffusion_correction] + type = ThermalConductivityDiffusion + variable = mean_en + em = em + position_units = 1.0 + [] + [mean_en_joule_heating] + type = JouleHeating + variable = mean_en + em = em + position_units = 1.0 + potential_units = V + [] + [mean_en_source] + type = BodyForce + variable = mean_en + function = 'energy_source' + [] +[] + +[AuxVariables] + [potential_sol] + [] + + [mean_en_sol] + [] + + [em_sol] + [] + + [ion_sol] + [] + + [Ex_sol] + [] + [Ey_sol] + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential_sol + function = potential_fun + [] + + [mean_en_sol] + type = FunctionAux + variable = mean_en_sol + function = mean_en_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [ion_sol] + type = FunctionAux + variable = ion_sol + function = ion_fun + [] + + [Ex_sol] + type = FunctionAux + variable = Ex_sol + function = Ex_fun + [] + [Ey_sol] + type = FunctionAux + variable = Ey_sol + function = Ey_fun + [] +[] + +[Functions] +#Material Variables + #Electron diffusion coeff. + [diffem_coeff] + type = ConstantFunction + value = 0.05 + [] + #Electron mobility coeff. + [muem_coeff] + type = ConstantFunction + value = 0.01 + [] + #Electron energy diffusion coeff. + [diffmean_en_coeff] + type = ParsedFunction + vars = 'diffem_coeff' + vals = 'diffem_coeff' + value = '5.0 / 3.0 * diffem_coeff' + [] + #Electron energy mobility coeff. + [mumean_en_coeff] + type = ParsedFunction + vars = 'muem_coeff' + vals = 'muem_coeff' + value = '5.0 / 3.0 * muem_coeff' + [] + #Ion diffusion coeff. + [diffion] + type = ConstantFunction + value = 0.1 + [] + #Ion mobility coeff. + [muion] + type = ConstantFunction + value = 0.025 + [] + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.01 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + #The manufactured ion density solution + [ion_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' + [] + #The manufactured electron energy solution + [energy_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'sin(pi*y) + sin(2*pi*t)*cos(pi*y)*sin(pi*y) + 0.75 + cos(pi/2*x)' + [] + [mean_en_fun] + type = ParsedFunction + vars = 'energy_fun em_fun' + vals = 'energy_fun em_fun' + value = 'log(energy_fun) + em_fun' + [] + #The manufactured eff. Efield solution + [Ex_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(ee*exp(-5*t)*sin((pi*x)/2)*(exp(5*t) - 1))/(5*diffpotential*pi)' + [] + [Ey_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(2*ee*exp(-5*t)*sin(pi*y))/(4*diffpotential*pi^2 + 25*diffpotential) - + (ee*sin(pi*y)*(5*sin(2*pi*t) - 2*pi*cos(2*pi*t)))/(diffpotential*pi*(4*pi^2 + 25))' + [] + + #Electron diffusion coeff. + [diffem] + type = ParsedFunction + vars = 'diffem_coeff energy_fun' + vals = 'diffem_coeff energy_fun' + value = 'diffem_coeff * energy_fun' + [] + #Electron mobility coeff. + [muem] + type = ParsedFunction + vars = 'muem_coeff energy_fun' + vals = 'muem_coeff energy_fun' + value = 'muem_coeff * energy_fun' + [] + #Electron energy diffusion coeff. + [diffmean_en] + type = ParsedFunction + vars = 'diffmean_en_coeff energy_fun' + vals = 'diffmean_en_coeff energy_fun' + value = 'diffmean_en_coeff * energy_fun' + [] + #Electron energy mobility coeff. + [mumean_en] + type = ParsedFunction + vars = 'mumean_en_coeff energy_fun' + vals = 'mumean_en_coeff energy_fun' + value = 'mumean_en_coeff * energy_fun' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee diffpotential diffem_coeff muem_coeff N_A' + vals = 'ee diffpotential diffem_coeff muem_coeff N_A' + value = '((2*pi*cos(2*pi*t)*cos(pi*y))/5 - (diffem_coeff*pi^2*sin((pi*x)/2)^2)/4 - + diffem_coeff*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos(pi*y) - + sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t)) + (diffem_coeff*pi^2*cos((pi*x)/2)*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/4 + (diffem_coeff*pi^2*(5*sin(pi*y) + + cos(pi*y)*sin(2*pi*t))*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/5 - + (ee*muem_coeff*sin((pi*x)/2)^2*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(10*diffpotential) - + (ee*muem_coeff*sin((pi*x)/2)^2*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(10*diffpotential) + + (ee*muem_coeff*cos((pi*x)/2)*(cos((pi*x)/2) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(10*diffpotential) + + (ee*muem_coeff*cos(pi*y)*sin(2*pi*t)*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential) + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(cos(pi*y) - + sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t))*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(5*diffpotential) + + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)) / N_A' + [] + #The ion source term. + [ion_source] + type = ParsedFunction + vars = 'ee diffpotential diffion muion N_A' + vals = 'ee diffpotential diffion muion N_A' + value = '((diffion*pi^2*(9*cos((pi*x)/2) + 40*sin(pi*y)))/40 + + (9*ee*muion*exp(-5*t)*sin((pi*x)/2)^2*(exp(5*t) - 1))/(100*diffpotential) - + (ee*muion*exp(-5*t)*cos((pi*x)/2)*(exp(5*t) - 1)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(10*diffpotential) - + (ee*muion*exp(-5*t)*cos(pi*y)*(2*pi + 5*exp(5*t)*sin(2*pi*t) - + 2*pi*exp(5*t)*cos(2*pi*t))*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(diffpotential*(4*pi^2 + 25)) - + (ee*muion*exp(-5*t)*cos(pi*y)*sin(pi*y)*(2*pi + 5*exp(5*t)*sin(2*pi*t) - + 2*pi*exp(5*t)*cos(2*pi*t)))/(diffpotential*(4*pi^2 + 25))) / N_A' + [] + [energy_source] + type = ParsedFunction + vars = 'ee diffpotential diffem_coeff muem_coeff N_A' + vals = 'ee diffpotential diffem_coeff muem_coeff N_A' + value = '(((4*cos((pi*x)/2) + 4*sin(pi*y) + 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(172*ee*muem_coeff*cos(2*pi*t)^2 - + 282*ee*muem_coeff + 180*ee*muem_coeff*cos((pi*x)/2)^2 + 160*ee*muem_coeff*cos((pi*x)/2)^3 + + 664*ee*muem_coeff*cos(pi*y)^2 - 480*ee*muem_coeff*cos(pi*y)^4 - + 66*ee*muem_coeff*cos((pi*x)/2) - 296*ee*muem_coeff*sin(pi*y) + + 200*diffem_coeff*diffpotential*pi^2 - 664*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^2 + + 480*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^4 + 364*ee*muem_coeff*cos(pi*y)*sin(2*pi*t) - + 90*ee*muem_coeff*cos((pi*x)/2)*sin(pi*y) + 75*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2) + + 140*diffem_coeff*diffpotential*pi^2*sin(pi*y) + 16*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2) - + 8*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^2 + 176*ee*muem_coeff*cos(2*pi*t)^2*sin(pi*y) - + 320*ee*muem_coeff*cos(pi*y)^3*sin(2*pi*t) + 200*ee*muem_coeff*cos((pi*x)/2)^2*sin(pi*y) + + 464*ee*muem_coeff*cos(pi*y)^2*sin(pi*y) + 300*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)^2 - + 1200*diffem_coeff*diffpotential*pi^2*cos(pi*y)^2 + 160*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*sin(pi*y) + + 104*ee*muem_coeff*cos((pi*x)/2)^2*cos(pi*y)*sin(2*pi*t) - 40*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^3*sin(2*pi*t) + + 408*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)^2*sin(pi*y) + 96*ee*muem_coeff*cos(pi*y)^3*sin(2*pi*t)*sin(pi*y) + + 160*diffem_coeff*diffpotential*pi^2*cos(2*pi*t)^2*sin(pi*y) - + 2000*diffem_coeff*diffpotential*pi^2*cos(pi*y)^3*sin(2*pi*t) + 400*diffem_coeff*diffpotential*pi^2*cos(pi*y)^2*sin(pi*y) - + 32*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*cos(pi*y)^2 - 464*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^2*sin(pi*y) + + 186*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + 272*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 1260*diffem_coeff*diffpotential*pi^2*cos(pi*y)*sin(2*pi*t) + 500*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*sin(pi*y) - + 408*ee*muem_coeff*cos(2*pi*t)^2*cos((pi*x)/2)*cos(pi*y)^2*sin(pi*y) - + 96*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)^3*sin(2*pi*t)*sin(pi*y) - + 400*diffem_coeff*diffpotential*pi^2*cos(2*pi*t)^2*cos(pi*y)^2*sin(pi*y) + + 448*ee*muem_coeff*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 80*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + + 240*diffem_coeff*diffpotential*pi^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 48*ee*muem_coeff*cos(2*pi*t)^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 80*ee*muem_coeff*cos((pi*x)/2)^2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + + 100*diffem_coeff*diffpotential*pi^2*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t)*sin(pi*y)))/(960*diffpotential) + + (pi*cos(2*pi*t)*cos(pi*y)*(4*cos((pi*x)/2) + 24*sin(pi*y) + 20*cos((pi*x)/2)*sin(pi*y) + 20*sin(pi*y)^2 + + 8*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3))/10 - (diffem_coeff*pi^2*sin((pi*x)/2)^2*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/4 - (diffem_coeff*pi^2*sin((pi*x)/2)^2*(cos((pi*x)/2) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1))/4 - diffem_coeff*pi^2*(cos(pi*y) - sin(2*pi*t) + + 2*cos(pi*y)^2*sin(2*pi*t))^2*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) + + (diffem_coeff*pi^2*cos((pi*x)/2)*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/4 - diffem_coeff*pi*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos(pi*y) - + sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t))*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4) + + (ee*sin(2*pi*t)*sin(pi*y)*(diffem_coeff*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4) - (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(cos((pi*x)/2) + + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)))/(5*diffpotential*pi) + + diffem_coeff*pi^2*sin(pi*y)*(4*cos(pi*y)*sin(2*pi*t) + 1)*(cos((pi*x)/2) + sin(pi*y) + + (cos(pi*y)*sin(2*pi*t))/5 + 1)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4) - + (ee*sin((pi*x)/2)^2*(4*cos((pi*x)/2) + 4*sin(pi*y) + + 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(10*ee*muem_coeff + 10*ee*muem_coeff*cos((pi*x)/2) + + 10*ee*muem_coeff*sin(pi*y) + 25*diffem_coeff*diffpotential*pi^2 + + 2*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)))/(1000*diffpotential^2*pi^2)) / N_A' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + cos(pi/2*x)) / N_A)' + [] + [ion_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' + [] + [mean_en_ICs] + type = ParsedFunction + vars = 'em_ICs' + vals = 'em_ICs' + value = 'log(32. + cos(pi/2*x)) + em_ICs' + [] +[] + +[BCs] + [potential_BC] + type = FunctionDirichletBC + variable = potential + function = 'potential_fun' + boundary = '0 1 2 3' + preset = true + [] + + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] + + [ion_BC] + type = FunctionDirichletBC + variable = ion + function = 'ion_fun' + boundary = '0 1 2 3' + preset = true + [] + + [energy_BC] + type = FunctionDirichletBC + variable = mean_en + function = 'mean_en_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ex_BC] + type = FunctionDirichletBC + variable = Ex + function = 'Ex_fun' + boundary = '0 1 2 3' + preset = true + [] + + [Ey_BC] + type = FunctionDirichletBC + variable = Ey + function = 'Ey_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff_Set1] + type = ADGenericFunctionMaterial + prop_names = 'diffpotential diffion muion' + prop_values = 'diffpotential diffion muion' + [] + [Material_Coeff_Set2] + type = ADMMSEEDFRates + electrons = em + mean_energy = mean_en + prop_names = 'diffem muem diffmean_en mumean_en' + prop_values = 'diffem muem diffmean_en mumean_en' + d_prop_d_actual_mean_en = 'diffem_coeff muem_coeff diffmean_en_coeff mumean_en_coeff' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem sgnion sgnmean_en' + prop_values = '-1.0 1.0 -1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + [ion_l2Error] + type = ElementL2Error + variable = ion + function = ion_fun + [] + [potential_l2Error] + type = ElementL2Error + variable = potential + function = potential_fun + [] + [mean_en_l2Error] + type = ElementL2Error + variable = mean_en + function = mean_en_fun + [] + + [Ex_l2Error] + type = ElementL2Error + variable = Ex + function = Ex_fun + [] + [Ey_l2Error] + type = ElementL2Error + variable = Ey + function = Ey_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_IC_out.e b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_IC_out.e new file mode 100644 index 00000000000..35ec8784ae9 Binary files /dev/null and b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_IC_out.e differ diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_IC_out.e b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_IC_out.e new file mode 100644 index 00000000000..69a2f567c5c Binary files /dev/null and b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_IC_out.e differ diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_IC_out.e b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_IC_out.e new file mode 100644 index 00000000000..a884a11e8f4 Binary files /dev/null and b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_IC_out.e differ diff --git a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion.i b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion.i new file mode 100644 index 00000000000..9669efd50d3 --- /dev/null +++ b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion.i @@ -0,0 +1,184 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_Single_Fluid_Diffusion_IC_out.e' + use_for_exodus_restart = true + [] +[] +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] +[] + +[AuxVariables] + [em_sol] + [] +[] + +[AuxKernels] + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] +[] + +[Functions] +#Material Variables + #Electron diffusion coeff. + [diffem_coeff] + type = ConstantFunction + value = 0.05 + [] + + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee diffem_coeff N_A' + vals = 'ee diffem_coeff N_A' + value = '(diffem_coeff*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5) + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + + (diffem_coeff*pi^2*cos((pi*x)/2))/4) / N_A' + [] + + #The left BC dirichlet function + [em_left_BC] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + cos(pi/2*x)) / N_A)' + [] +[] + +[BCs] + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff] + type = ADGenericFunctionMaterial + prop_names = 'diffem' + prop_values = 'diffem_coeff' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem' + prop_values = '-1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection.i b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection.i new file mode 100644 index 00000000000..9fcf271efe5 --- /dev/null +++ b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection.i @@ -0,0 +1,214 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_Single_Fluid_Diffusion_Advection_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] +[] + +[Kernels] +#Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] +[] + +[AuxVariables] + [potential] + [] + + [em_sol] + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential + function = potential_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] +[] + +[Functions] +#Material Variables + #Electron diffusion coeff. + [diffem_coeff] + type = ConstantFunction + value = 0.05 + [] + #Electron mobility coeff. + [muem_coeff] + type = ConstantFunction + value = 0.01 + [] + + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.01 + [] + + +#Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' + [] + +#Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee diffem_coeff muem_coeff diffpotential N_A' + vals = 'ee diffem_coeff muem_coeff diffpotential N_A' + value = '(diffem_coeff*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5) + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (diffem_coeff*pi^2*cos((pi*x)/2))/4 + + (ee*muem_coeff*(5*cos((pi*x)/2) - 4*cos(2*pi*t)^2*cos(pi*y)^2 + + 10*cos(pi*y)*sin(2*pi*t) + 5*cos((pi*x)/2)*sin(pi*y) + 2*cos(2*pi*t)^2 + + 10*cos((pi*x)/2)^2 + 4*cos(pi*y)^2 + 11*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + + 20*cos(pi*y)*sin(2*pi*t)*sin(pi*y) - 7))/(50*diffpotential)) / N_A' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + cos(pi/2*x)) / N_A)' + [] +[] + +[BCs] + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff] + type = ADGenericFunctionMaterial + prop_names = 'diffem muem diffpotential' + prop_values = 'diffem_coeff muem_coeff diffpotential' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem' + prop_values = '-1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + perf_graph = true + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection_IC_out.e b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection_IC_out.e new file mode 100644 index 00000000000..3c47e9dd03e Binary files /dev/null and b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection_IC_out.e differ diff --git a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_IC_out.e b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_IC_out.e new file mode 100644 index 00000000000..dfd16c25926 Binary files /dev/null and b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_IC_out.e differ diff --git a/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_out.e b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_out.e new file mode 100644 index 00000000000..9f06448e62c Binary files /dev/null and b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_out.e differ diff --git a/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_out.e b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_out.e new file mode 100644 index 00000000000..aeaa1f04721 Binary files /dev/null and b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_out.e differ diff --git a/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_out.e b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_out.e new file mode 100644 index 00000000000..23d9c002171 Binary files /dev/null and b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_MeanEnergy_out.e differ diff --git a/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_out.e b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_out.e new file mode 100644 index 00000000000..6aeb13b3080 Binary files /dev/null and b/test/tests/mms/continuity_equations/gold/2D_Coupling_Electons_Potential_Ions_out.e differ diff --git a/test/tests/mms/continuity_equations/gold/2D_Single_Fluid_Diffusion_Advection_out.e b/test/tests/mms/continuity_equations/gold/2D_Single_Fluid_Diffusion_Advection_out.e new file mode 100644 index 00000000000..1c1c93d7a9c Binary files /dev/null and b/test/tests/mms/continuity_equations/gold/2D_Single_Fluid_Diffusion_Advection_out.e differ diff --git a/test/tests/mms/continuity_equations/gold/2D_Single_Fluid_Diffusion_out.e b/test/tests/mms/continuity_equations/gold/2D_Single_Fluid_Diffusion_out.e new file mode 100644 index 00000000000..2bbac60c817 Binary files /dev/null and b/test/tests/mms/continuity_equations/gold/2D_Single_Fluid_Diffusion_out.e differ diff --git a/test/tests/mms/continuity_equations/tests b/test/tests/mms/continuity_equations/tests new file mode 100644 index 00000000000..44c6d27a676 --- /dev/null +++ b/test/tests/mms/continuity_equations/tests @@ -0,0 +1,44 @@ +[Tests] + [2D_Single_Fluid_Diffusion] + type = 'Exodiff' + input = '2D_Single_Fluid_Diffusion.i' + exodiff = '2D_Single_Fluid_Diffusion_out.e' + heavy = True + max_time = 500 + [] + [2D_Single_Fluid_Diffusion_Advection] + type = 'Exodiff' + input = '2D_Single_Fluid_Diffusion_Advection.i' + exodiff = '2D_Single_Fluid_Diffusion_Advection_out.e' + heavy = True + max_time = 500 + [] + [2D_Coupling_Electons_Potential_Ions] + type = 'Exodiff' + input = '2D_Coupling_Electons_Potential_Ions.i' + exodiff = '2D_Coupling_Electons_Potential_Ions_out.e' + heavy = True + max_time = 500 + [] + [2D_Coupling_Electons_Potential_Ions_MeanEnergy] + type = 'Exodiff' + input = '2D_Coupling_Electons_Potential_Ions_MeanEnergy.i' + exodiff = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_out.e' + heavy = True + max_time = 500 + [] + [2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation] + type = 'Exodiff' + input = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i' + exodiff = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_out.e' + heavy = True + max_time = 500 + [] + [2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield] + type = 'Exodiff' + input = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i' + exodiff = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_out.e' + heavy = True + max_time = 500 + [] +[] diff --git a/test/tests/mms/materials/2D_PlasmaDielectricConstant.i b/test/tests/mms/materials/2D_PlasmaDielectricConstant.i new file mode 100644 index 00000000000..f47ce6ab8be --- /dev/null +++ b/test/tests/mms/materials/2D_PlasmaDielectricConstant.i @@ -0,0 +1,395 @@ +[Mesh] + [geo] + type = FileMeshGenerator + file = '2D_PlasmaDielectricConstant_IC_out.e' + use_for_exodus_restart = true + [] +[] + +[Problem] + type = FEProblem +[] + +[Variables] + [em] + initial_from_file_var = em + [] +[] + +# [ICs] +# [em_IC] +# type = FunctionIC +# function = em_ICs +# variable = em +# [] +# [] + +[Kernels] + #Electron Equations + [em_time_derivative] + type = TimeDerivativeLog + variable = em + [] + [em_diffusion] + type = CoeffDiffusion + variable = em + position_units = 1.0 + [] + [em_advection] + type = EFieldAdvection + variable = em + position_units = 1.0 + [] + [em_source] + type = BodyForce + variable = em + function = 'em_source' + [] +[] + +[AuxVariables] + [potential] + [] + + [em_sol] + [] + + [dielectric_real] + family = MONOMIAL + order = FIRST + [] + [dielectric_image] + family = MONOMIAL + order = FIRST + [] + + [dielectric_real_grad] + family = MONOMIAL_VEC + order = FIRST + [] + [dielectric_image_grad] + family = MONOMIAL_VEC + order = FIRST + [] + + [d_dielectric_real_dt] + family = MONOMIAL + order = FIRST + [] + [d_dielectric_image_dt] + family = MONOMIAL + order = FIRST + [] +[] + +[AuxKernels] + [potential_sol] + type = FunctionAux + variable = potential + function = potential_fun + [] + + [em_sol] + type = FunctionAux + variable = em_sol + function = em_fun + [] + + [dielectric_real] + type = ADMaterialRealAux + variable = dielectric_real + property = plasma_dielectric_constant_real + [] + [dielectric_image] + type = ADMaterialRealAux + variable = dielectric_image + property = plasma_dielectric_constant_imag + [] + + [dielectric_real_grad] + type = ADVectorMaterialRealVectorValueAux + variable = dielectric_real_grad + property = plasma_dielectric_constant_real_grad + [] + [dielectric_image_grad] + type = ADVectorMaterialRealVectorValueAux + variable = dielectric_image_grad + property = plasma_dielectric_constant_imag_grad + [] + + [d_dielectric_real_dt] + type = ADMaterialRealAux + variable = d_dielectric_real_dt + property = plasma_dielectric_constant_real_dot + [] + [d_dielectric_image_dt] + type = ADMaterialRealAux + variable = d_dielectric_image_dt + property = plasma_dielectric_constant_imag_dot + [] +[] + +[Functions] + #Material Variables + #Electron diffusion coeff. + [diffem_coeff] + type = ConstantFunction + value = 0.05 + [] + #Electron mobility coeff. + [muem_coeff] + type = ConstantFunction + value = 0.01 + [] + + [N_A] + type = ConstantFunction + value = 1.0 + [] + [ee] + type = ConstantFunction + value = 1.0 + [] + [diffpotential] + type = ConstantFunction + value = 0.01 + [] + + #Manufactured Solutions + #The manufactured electron density solution + [em_fun] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' + [] + #The manufactured electron density solution + [potential_fun] + type = ParsedFunction + vars = 'ee diffpotential' + vals = 'ee diffpotential' + value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' + [] + + #Source Terms in moles + #The electron source term. + [em_source] + type = ParsedFunction + vars = 'ee diffem_coeff muem_coeff diffpotential N_A' + vals = 'ee diffem_coeff muem_coeff diffpotential N_A' + value = '(diffem_coeff*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5) + + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (diffem_coeff*pi^2*cos((pi*x)/2))/4 + + (ee*muem_coeff*(5*cos((pi*x)/2) - 4*cos(2*pi*t)^2*cos(pi*y)^2 + + 10*cos(pi*y)*sin(2*pi*t) + 5*cos((pi*x)/2)*sin(pi*y) + 2*cos(2*pi*t)^2 + + 10*cos((pi*x)/2)^2 + 4*cos(pi*y)^2 + 11*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + + 20*cos(pi*y)*sin(2*pi*t)*sin(pi*y) - 7))/(50*diffpotential)) / N_A' + [] + + [em_ICs] + type = ParsedFunction + vars = 'N_A' + vals = 'N_A' + value = 'log((3.0 + cos(pi/2*x)) / N_A)' + [] + + [omega] + type = ParsedFunction + expression = '2*pi*6.207' + [] + [nu] + type = ParsedFunction + expression = '2*pi*6.525' + [] + [epsilon_0] + type = ParsedFunction + expression = '8.8542e-12' + [] + [ec] + type = ParsedFunction + expression = '1.6022e-19' + [] + [m_e] + type = ParsedFunction + expression = '9.1095e-31' + [] + + [dielectric_real_fun] + type = ParsedFunction + expression = '-ec^2*(sin(y*pi) + 0.2*sin(2*pi*t)*cos(y*pi) + cos((1/2)*x*pi) + 1.0)/(epsilon_0*m_e*(nu^2 + omega^2)) + 1' + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + [] + [dielectric_image_fun] + type = ParsedFunction + expression = '-1.0*ec^2*nu*(sin(y*pi) + 0.2*sin(2*pi*t)*cos(y*pi) + cos((1/2)*x*pi) + 1.0)/(epsilon_0*m_e*(nu^2*omega + omega^3))' + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + [] + + [dielectric_real_grad_fun] + type = ParsedVectorFunction + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + expression_x = '(1/2)*pi*ec^2*sin((1/2)*x*pi)/(epsilon_0*m_e*(nu^2 + omega^2))' + expression_y = '-ec^2*(-0.2*pi*sin(y*pi)*sin(2*pi*t) + pi*cos(y*pi))/(epsilon_0*m_e*(nu^2 + omega^2))' + [] + [dielectric_image_grad_fun] + type = ParsedVectorFunction + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + expression_x = '0.5*pi*ec^2*nu*sin((1/2)*x*pi)/(epsilon_0*m_e*(nu^2*omega + omega^3))' + expression_y = '-1.0*ec^2*nu*(-0.2*pi*sin(y*pi)*sin(2*pi*t) + pi*cos(y*pi))/(epsilon_0*m_e*(nu^2*omega + omega^3))' + [] + + [d_dielectric_real_dt_fun] + type = ParsedFunction + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + expression = '-0.4*pi*ec^2*cos(y*pi)*cos(2*pi*t)/(epsilon_0*m_e*(nu^2 + omega^2))' + [] + [d_dielectric_image_dt_fun] + type = ParsedFunction + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + expression = '-0.4*pi*ec^2*nu*cos(y*pi)*cos(2*pi*t)/(epsilon_0*m_e*(nu^2*omega + omega^3))' + [] + + [d2_dielectric_real_dt2_fun] + type = ParsedFunction + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + expression = '0.8*pi^2*ec^2*sin(2*pi*t)*cos(y*pi)/(epsilon_0*m_e*(nu^2 + omega^2))' + [] + [d2_dielectric_image_dt2_fun] + type = ParsedFunction + symbol_names = 'omega m_e ec nu epsilon_0' + symbol_values = 'omega m_e ec nu epsilon_0' + expression = '0.8*pi^2*ec^2*nu*sin(2*pi*t)*cos(y*pi)/(epsilon_0*m_e*(nu^2*omega + omega^3))' + [] +[] + +[BCs] + [em_BC] + type = FunctionDirichletBC + variable = em + function = 'em_fun' + boundary = '0 1 2 3' + preset = true + [] +[] + +[Materials] + [Plasma_dielectric] + type = PlasmaDielectricConstant + driving_frequency = 6.207 + electron_neutral_collision_frequency = 6.525 + em = em + [] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] + [Material_Coeff] + type = GenericFunctionMaterial + prop_names = 'e N_A' + prop_values = 'ee N_A' + [] + [ADMaterial_Coeff] + type = ADGenericFunctionMaterial + prop_names = 'diffem muem diffpotential' + prop_values = 'diffem_coeff muem_coeff diffpotential' + [] + [Charge_Signs] + type = GenericConstantMaterial + prop_names = 'sgnem' + prop_values = '-1.0' + [] +[] + +[Postprocessors] + [em_l2Error] + type = ElementL2Error + variable = em + function = em_fun + [] + + [dielectric_real_Error] + type = ElementL2Error + variable = dielectric_real + function = dielectric_real_fun + [] + [dielectric_image_Error] + type = ElementL2Error + variable = dielectric_image + function = dielectric_image_fun + [] + + [dielectric_real_grad_Error] + type = ElementVectorL2Error + variable = dielectric_real_grad + function = dielectric_real_grad_fun + [] + [dielectric_image_grad_Error] + type = ElementVectorL2Error + variable = dielectric_image_grad + function = dielectric_image_grad_fun + [] + + [d_dielectric_real_dt_Error] + type = ElementL2Error + variable = d_dielectric_real_dt + function = d_dielectric_real_dt_fun + [] + [d_dielectric_image_dt_Error] + type = ElementL2Error + variable = d_dielectric_image_dt + function = d_dielectric_image_dt_fun + [] + + [h] + type = AverageElementSize + [] +[] + +[Preconditioning] + active = 'smp' + [smp] + type = SMP + full = true + [] + + [fdp] + type = FDP + full = true + [] +[] + +[Executioner] + type = Transient + # start_time = 0 + # end_time = 50 + start_time = 50 + end_time = 51 + + # dt = 0.008 + dt = 0.02 + + automatic_scaling = true + compute_scaling_once = false + petsc_options = '-snes_converged_reason -snes_linesearch_monitor' + solve_type = NEWTON + line_search = none + petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount' + petsc_options_value = 'lu NONZERO 1.e-10' + + scheme = bdf2 + + nl_abs_tol = 1e-13 +[] + +[Outputs] + [out] + type = Exodus + interval = 10 + [] +[] diff --git a/test/tests/mms/materials/2D_PlasmaDielectricConstant_IC_out.e b/test/tests/mms/materials/2D_PlasmaDielectricConstant_IC_out.e new file mode 100644 index 00000000000..d4b966e569a Binary files /dev/null and b/test/tests/mms/materials/2D_PlasmaDielectricConstant_IC_out.e differ diff --git a/test/tests/mms/materials/gold/2D_PlasmaDielectricConstant_out.e b/test/tests/mms/materials/gold/2D_PlasmaDielectricConstant_out.e new file mode 100644 index 00000000000..769c61726bc Binary files /dev/null and b/test/tests/mms/materials/gold/2D_PlasmaDielectricConstant_out.e differ diff --git a/test/tests/mms/materials/tests b/test/tests/mms/materials/tests new file mode 100644 index 00000000000..7e167b919cf --- /dev/null +++ b/test/tests/mms/materials/tests @@ -0,0 +1,9 @@ +[Tests] + [2D_PlasmaDielectricConstant] + type = 'Exodiff' + input = '2D_PlasmaDielectricConstant.i' + exodiff = '2D_PlasmaDielectricConstant_out.e' + heavy = True + max_time = 500 + [] +[] diff --git a/test/tests/reflections/Schottky/Input.i b/test/tests/reflections/Schottky/Input.i index 01e3e74c30d..109d4c53e52 100644 --- a/test/tests/reflections/Schottky/Input.i +++ b/test/tests/reflections/Schottky/Input.i @@ -97,7 +97,6 @@ vhigh = -150E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -111,7 +110,6 @@ vhigh = -150E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -151,7 +149,6 @@ vhigh = -150E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -164,7 +161,6 @@ vhigh = -150E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -185,7 +181,6 @@ vhigh = -150E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -198,7 +193,6 @@ vhigh = -150E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -206,7 +200,6 @@ vhigh = -150E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -214,7 +207,6 @@ vhigh = -150E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -222,7 +214,6 @@ vhigh = -150E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -236,7 +227,6 @@ vhigh = -150E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] [] @@ -343,7 +333,6 @@ vhigh = -150E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -353,7 +342,6 @@ vhigh = -150E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -363,7 +351,6 @@ vhigh = -150E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -372,7 +359,6 @@ vhigh = -150E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -381,7 +367,6 @@ vhigh = -150E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -439,14 +424,12 @@ vhigh = -150E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -455,7 +438,6 @@ vhigh = -150E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -464,7 +446,6 @@ vhigh = -150E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -508,7 +489,6 @@ vhigh = -150E-3 #kV # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -520,7 +500,6 @@ vhigh = -150E-3 #kV # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -530,7 +509,6 @@ vhigh = -150E-3 #kV type = HagelaarElectronBC variable = em boundary = right - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -548,7 +526,6 @@ vhigh = -150E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -564,7 +541,6 @@ vhigh = -150E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -574,7 +550,6 @@ vhigh = -150E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -584,7 +559,6 @@ vhigh = -150E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -634,13 +608,16 @@ vhigh = -150E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/reflections/Schottky_300_V_5_um/Input.i b/test/tests/reflections/Schottky_300_V_5_um/Input.i index 40de7f645b1..650f790c11d 100644 --- a/test/tests/reflections/Schottky_300_V_5_um/Input.i +++ b/test/tests/reflections/Schottky_300_V_5_um/Input.i @@ -114,7 +114,6 @@ vhigh = -400E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -126,7 +125,6 @@ vhigh = -400E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -140,7 +138,6 @@ vhigh = -400E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -174,7 +171,6 @@ vhigh = -400E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -187,7 +183,6 @@ vhigh = -400E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -202,7 +197,6 @@ vhigh = -400E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -215,7 +209,6 @@ vhigh = -400E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -223,7 +216,6 @@ vhigh = -400E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -231,7 +223,6 @@ vhigh = -400E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -239,7 +230,6 @@ vhigh = -400E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -348,7 +338,6 @@ vhigh = -400E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -358,7 +347,6 @@ vhigh = -400E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -368,7 +356,6 @@ vhigh = -400E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -377,7 +364,6 @@ vhigh = -400E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -386,7 +372,6 @@ vhigh = -400E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -444,14 +429,12 @@ vhigh = -400E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -460,7 +443,6 @@ vhigh = -400E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -469,7 +451,6 @@ vhigh = -400E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -513,7 +494,6 @@ vhigh = -400E-3 #kV # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -527,7 +507,6 @@ vhigh = -400E-3 #kV # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -537,7 +516,6 @@ vhigh = -400E-3 #kV type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -554,7 +532,6 @@ vhigh = -400E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -570,7 +547,6 @@ vhigh = -400E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -580,7 +556,6 @@ vhigh = -400E-3 #kV type = HagelaarEnergyAdvectionBC variable = mean_en boundary = 'left' - potential = potential ions = Arp r = 0 position_units = ${dom0Scale} @@ -592,7 +567,6 @@ vhigh = -400E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -642,13 +616,16 @@ vhigh = -400E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/reflections/Schottky_400_V_10_um/Input.i b/test/tests/reflections/Schottky_400_V_10_um/Input.i index 0db1b0fc266..15dbcd95745 100644 --- a/test/tests/reflections/Schottky_400_V_10_um/Input.i +++ b/test/tests/reflections/Schottky_400_V_10_um/Input.i @@ -111,7 +111,6 @@ vhigh = -175E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] @@ -123,7 +122,6 @@ vhigh = -175E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -137,7 +135,6 @@ vhigh = -175E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -171,7 +168,6 @@ vhigh = -175E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -184,7 +180,6 @@ vhigh = -175E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -199,7 +194,6 @@ vhigh = -175E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -212,7 +206,6 @@ vhigh = -175E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -220,7 +213,6 @@ vhigh = -175E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -228,7 +220,6 @@ vhigh = -175E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -236,7 +227,6 @@ vhigh = -175E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -345,7 +335,6 @@ vhigh = -175E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -355,7 +344,6 @@ vhigh = -175E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -365,7 +353,6 @@ vhigh = -175E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -374,7 +361,6 @@ vhigh = -175E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -383,7 +369,6 @@ vhigh = -175E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -441,14 +426,12 @@ vhigh = -175E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -457,7 +440,6 @@ vhigh = -175E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -466,7 +448,6 @@ vhigh = -175E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -510,7 +491,6 @@ vhigh = -175E-3 #kV # type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -522,7 +502,6 @@ vhigh = -175E-3 #kV # type = HagelaarElectronBC # variable = em # boundary = 'left' - # potential = potential # electron_energy = mean_en # r = 0 # position_units = ${dom0Scale} @@ -532,7 +511,6 @@ vhigh = -175E-3 #kV type = HagelaarElectronAdvectionBC variable = em boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -549,7 +527,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -565,7 +542,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -575,7 +551,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -585,7 +560,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -635,13 +609,16 @@ vhigh = -175E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.02 diff --git a/test/tests/reflections/base/Input.i b/test/tests/reflections/base/Input.i index 7a0b8f7d7c9..ca694f4b16f 100644 --- a/test/tests/reflections/base/Input.i +++ b/test/tests/reflections/base/Input.i @@ -96,7 +96,6 @@ vhigh = -175E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -110,7 +109,6 @@ vhigh = -175E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -149,7 +147,6 @@ vhigh = -175E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -162,7 +159,6 @@ vhigh = -175E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -182,7 +178,6 @@ vhigh = -175E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -195,7 +190,6 @@ vhigh = -175E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -203,7 +197,6 @@ vhigh = -175E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -211,7 +204,6 @@ vhigh = -175E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -219,7 +211,6 @@ vhigh = -175E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -233,7 +224,6 @@ vhigh = -175E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] [] @@ -340,7 +330,6 @@ vhigh = -175E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -350,7 +339,6 @@ vhigh = -175E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -360,7 +348,6 @@ vhigh = -175E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -369,7 +356,6 @@ vhigh = -175E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -378,7 +364,6 @@ vhigh = -175E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -436,14 +421,12 @@ vhigh = -175E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -452,7 +435,6 @@ vhigh = -175E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -461,7 +443,6 @@ vhigh = -175E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -504,7 +485,6 @@ vhigh = -175E-3 #kV type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -516,7 +496,6 @@ vhigh = -175E-3 #kV type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -526,7 +505,6 @@ vhigh = -175E-3 #kV type = HagelaarElectronBC variable = em boundary = right - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -544,7 +522,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -560,7 +537,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 1 position_units = ${dom0Scale} [] @@ -570,7 +546,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -580,7 +555,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -630,13 +604,16 @@ vhigh = -175E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.01 diff --git a/test/tests/reflections/high_initial/Input.i b/test/tests/reflections/high_initial/Input.i index fc1f8235cfd..50ec0883ea7 100644 --- a/test/tests/reflections/high_initial/Input.i +++ b/test/tests/reflections/high_initial/Input.i @@ -98,7 +98,6 @@ vhigh = -175E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -112,7 +111,6 @@ vhigh = -175E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -151,7 +149,6 @@ vhigh = -175E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -164,7 +161,6 @@ vhigh = -175E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -184,7 +180,6 @@ vhigh = -175E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -197,7 +192,6 @@ vhigh = -175E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -205,7 +199,6 @@ vhigh = -175E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -213,7 +206,6 @@ vhigh = -175E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -221,7 +213,6 @@ vhigh = -175E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -235,7 +226,6 @@ vhigh = -175E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] [] @@ -342,7 +332,6 @@ vhigh = -175E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -352,7 +341,6 @@ vhigh = -175E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -362,7 +350,6 @@ vhigh = -175E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -371,7 +358,6 @@ vhigh = -175E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -380,7 +366,6 @@ vhigh = -175E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -438,14 +423,12 @@ vhigh = -175E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -454,7 +437,6 @@ vhigh = -175E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -463,7 +445,6 @@ vhigh = -175E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -506,7 +487,6 @@ vhigh = -175E-3 #kV type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -518,7 +498,6 @@ vhigh = -175E-3 #kV type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -528,7 +507,6 @@ vhigh = -175E-3 #kV type = HagelaarElectronBC variable = em boundary = right - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -546,7 +524,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -562,7 +539,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -572,7 +548,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -582,7 +557,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -632,13 +606,16 @@ vhigh = -175E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.01 diff --git a/test/tests/reflections/low_initial/Input.i b/test/tests/reflections/low_initial/Input.i index 5bf7da6f014..2cc524e0b14 100644 --- a/test/tests/reflections/low_initial/Input.i +++ b/test/tests/reflections/low_initial/Input.i @@ -98,7 +98,6 @@ vhigh = -175E-3 #kV [em_advection] type = EFieldAdvection variable = em - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -112,7 +111,6 @@ vhigh = -175E-3 #kV type = ElectronsFromIonization em = em variable = em - potential = potential mean_en = mean_en block = 0 position_units = ${dom0Scale} @@ -151,7 +149,6 @@ vhigh = -175E-3 #kV [Arp_advection] type = EFieldAdvection variable = Arp - potential = potential position_units = ${dom0Scale} block = 0 [] @@ -164,7 +161,6 @@ vhigh = -175E-3 #kV [Arp_ionization] type = IonsFromIonization variable = Arp - potential = potential em = em mean_en = mean_en block = 0 @@ -184,7 +180,6 @@ vhigh = -175E-3 #kV [mean_en_advection] type = EFieldAdvection variable = mean_en - potential = potential block = 0 position_units = ${dom0Scale} [] @@ -197,7 +192,6 @@ vhigh = -175E-3 #kV [mean_en_joule_heating] type = JouleHeating variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -205,7 +199,6 @@ vhigh = -175E-3 #kV [mean_en_ionization] type = ElectronEnergyLossFromIonization variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -213,7 +206,6 @@ vhigh = -175E-3 #kV [mean_en_elastic] type = ElectronEnergyLossFromElastic variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -221,7 +213,6 @@ vhigh = -175E-3 #kV [mean_en_excitation] type = ElectronEnergyLossFromExcitation variable = mean_en - potential = potential em = em block = 0 position_units = ${dom0Scale} @@ -235,7 +226,6 @@ vhigh = -175E-3 #kV # [mean_en_advection_stabilization] # type = EFieldArtDiff # variable = mean_en - # potential = potential # block = 0 # [] [] @@ -342,7 +332,6 @@ vhigh = -175E-3 #kV [PowerDep_em] type = ADPowerDep density_log = em - potential = potential art_diff = false potential_units = kV variable = PowerDep_em @@ -352,7 +341,6 @@ vhigh = -175E-3 #kV [PowerDep_Arp] type = ADPowerDep density_log = Arp - potential = potential art_diff = false potential_units = kV variable = PowerDep_Arp @@ -362,7 +350,6 @@ vhigh = -175E-3 #kV [ProcRate_el] type = ADProcRate em = em - potential = potential proc = el variable = ProcRate_el position_units = ${dom0Scale} @@ -371,7 +358,6 @@ vhigh = -175E-3 #kV [ProcRate_ex] type = ADProcRate em = em - potential = potential proc = ex variable = ProcRate_ex position_units = ${dom0Scale} @@ -380,7 +366,6 @@ vhigh = -175E-3 #kV [ProcRate_iz] type = ADProcRate em = em - potential = potential proc = iz variable = ProcRate_iz position_units = ${dom0Scale} @@ -438,14 +423,12 @@ vhigh = -175E-3 #kV [Efield_g] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom0Scale} block = 0 [] [Current_em] type = ADCurrent - potential = potential density_log = em variable = Current_em art_diff = false @@ -454,7 +437,6 @@ vhigh = -175E-3 #kV [] [Current_Arp] type = ADCurrent - potential = potential density_log = Arp variable = Current_Arp art_diff = false @@ -463,7 +445,6 @@ vhigh = -175E-3 #kV [] [EFieldAdvAux_em] type = ADEFieldAdvAux - potential = potential density_log = em variable = EFieldAdvAux_em block = 0 @@ -506,7 +487,6 @@ vhigh = -175E-3 #kV type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 1 @@ -518,7 +498,6 @@ vhigh = -175E-3 #kV type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -528,7 +507,6 @@ vhigh = -175E-3 #kV type = HagelaarElectronBC variable = em boundary = right - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -546,7 +524,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -562,7 +539,6 @@ vhigh = -175E-3 #kV type = HagelaarIonAdvectionBC variable = Arp boundary = right - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -572,7 +548,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -582,7 +557,6 @@ vhigh = -175E-3 #kV type = HagelaarEnergyBC variable = mean_en boundary = right - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -632,13 +606,16 @@ vhigh = -175E-3 #kV [] [Materials] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [gas_block] type = Gas interp_trans_coeffs = true interp_elastic_coeff = true ramp_trans_coeffs = false em = em - potential = potential ip = Arp mean_en = mean_en user_se_coeff = 0.01 diff --git a/test/tests/surface_charge/dbd_test.i b/test/tests/surface_charge/dbd_test.i index 24187f3cfed..5c6b7c9eff2 100644 --- a/test/tests/surface_charge/dbd_test.i +++ b/test/tests/surface_charge/dbd_test.i @@ -182,7 +182,6 @@ dom1Scale = 1e-4 [Efield_g] type = Efield component = 0 - potential = potential_dom0 variable = Efield position_units = ${dom0Scale} block = 0 @@ -190,7 +189,6 @@ dom1Scale = 1e-4 [Efield_l] type = Efield component = 0 - potential = potential_dom1 variable = Efield position_units = ${dom1Scale} block = 1 @@ -256,7 +254,6 @@ dom1Scale = 1e-4 [neg_advection] type = EFieldAdvection variable = neg - potential = potential_dom0 position_units = ${dom0Scale} block = 0 [] @@ -270,7 +267,6 @@ dom1Scale = 1e-4 [pos_advection] type = EFieldAdvection variable = pos - potential = potential_dom0 position_units = ${dom0Scale} block = 0 [] @@ -481,7 +477,6 @@ dom1Scale = 1e-4 # (negatively charged). [surface_charge_material] type = ADSurfaceCharge - potential = potential_dom0 species = 'neg pos' position_units = ${dom0Scale} boundary = 'plasma_right' @@ -534,4 +529,16 @@ dom1Scale = 1e-4 diffusivity = 1.6897e-5 block = 0 [] + + [field_solver0] + type = FieldSolverMaterial + potential = potential_dom0 + block = 0 + [] + + [field_solver1] + type = FieldSolverMaterial + potential = potential_dom1 + block = 1 + [] [] diff --git a/test/tests/surface_charge/interface_test.i b/test/tests/surface_charge/interface_test.i index d0a6811e60d..f03fe5df73b 100644 --- a/test/tests/surface_charge/interface_test.i +++ b/test/tests/surface_charge/interface_test.i @@ -220,4 +220,16 @@ dom1Scale = 1e-4 prop_values = '8.85e-11' block = 1 [] + + [field_solver0] + type = FieldSolverMaterial + potential = potential_dom0 + block = 0 + [] + + [field_solver1] + type = FieldSolverMaterial + potential = potential_dom1 + block = 1 + [] [] diff --git a/test/tests/water_only/water_only.i b/test/tests/water_only/water_only.i index de761f42c3d..aab2f2f09b2 100644 --- a/test/tests/water_only/water_only.i +++ b/test/tests/water_only/water_only.i @@ -74,7 +74,6 @@ dom1Scale = 1e-7 [emliq_advection] type = EFieldAdvection variable = emliq - potential = potential position_units = ${dom1Scale} [] [emliq_diffusion] @@ -114,7 +113,6 @@ dom1Scale = 1e-7 [OHm_advection] type = EFieldAdvection variable = OHm - potential = potential position_units = ${dom1Scale} [] [OHm_diffusion] @@ -219,13 +217,11 @@ dom1Scale = 1e-7 [Efield_l] type = Efield component = 0 - potential = potential variable = Efield position_units = ${dom1Scale} [] [Current_emliq] type = ADCurrent - potential = potential density_log = emliq variable = Current_emliq art_diff = false @@ -233,7 +229,6 @@ dom1Scale = 1e-7 [] [Current_OHm] type = ADCurrent - potential = potential density_log = OHm variable = Current_OHm art_diff = false @@ -241,13 +236,11 @@ dom1Scale = 1e-7 [] [tot_flux_OHm] type = ADTotalFlux - potential = potential density_log = OHm variable = tot_flux_OHm [] [EFieldAdvAux_emliq] type = ADEFieldAdvAux - potential = potential density_log = emliq variable = EFieldAdvAux_emliq position_units = ${dom1Scale} @@ -283,14 +276,12 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = right - potential = potential position_units = ${dom1Scale} [] [OHm_physical] type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -309,8 +300,11 @@ dom1Scale = 1e-7 [] [Materials] - [water_block] - type = Water - potential = potential - [] + [water_block] + type = Water + [] + [field_solver] + type = FieldSolverMaterial + potential = potential + [] [] diff --git a/tutorial/tutorial01-Diffusion/gold/diffusion-only_out.e b/tutorial/tutorial01-Diffusion/gold/diffusion-only_out.e new file mode 100644 index 00000000000..fa6378f1a61 Binary files /dev/null and b/tutorial/tutorial01-Diffusion/gold/diffusion-only_out.e differ diff --git a/tutorial/tutorial01-Diffusion/tests b/tutorial/tutorial01-Diffusion/tests index a47f193d450..40efd23f206 100644 --- a/tutorial/tutorial01-Diffusion/tests +++ b/tutorial/tutorial01-Diffusion/tests @@ -1,9 +1,8 @@ [Tests] - [tutorial01-Diffusion_syntax] - type = RunApp + [tutorial01-Diffusion] + type = Exodiff input = 'diffusion-only.i' - check_input = True - method = opt + exodiff = 'diffusion-only_out.e' group = 'tutorial' [] [] diff --git a/tutorial/tutorial02-ReactionNetwork/gold/transient-kinetics_out.e b/tutorial/tutorial02-ReactionNetwork/gold/transient-kinetics_out.e new file mode 100644 index 00000000000..01b1959fec6 Binary files /dev/null and b/tutorial/tutorial02-ReactionNetwork/gold/transient-kinetics_out.e differ diff --git a/tutorial/tutorial02-ReactionNetwork/tests b/tutorial/tutorial02-ReactionNetwork/tests index 750ceb3c68a..c9cc44cd777 100644 --- a/tutorial/tutorial02-ReactionNetwork/tests +++ b/tutorial/tutorial02-ReactionNetwork/tests @@ -1,9 +1,8 @@ [Tests] - [tutorial02-ReactionNetwork_syntax] - type = RunApp + [tutorial02-ReactionNetwork] + type = Exodiff input = 'transient-kinetics.i' - check_input = True - method = opt + exodiff = 'transient-kinetics_out.e' group = 'tutorial' [] [] diff --git a/tutorial/tutorial03-PotentialWithIonLoss/gold/ion-loss-for-IonOnlyPlasma_out.e b/tutorial/tutorial03-PotentialWithIonLoss/gold/ion-loss-for-IonOnlyPlasma_out.e new file mode 100644 index 00000000000..d0a6a22edf0 Binary files /dev/null and b/tutorial/tutorial03-PotentialWithIonLoss/gold/ion-loss-for-IonOnlyPlasma_out.e differ diff --git a/tutorial/tutorial03-PotentialWithIonLoss/ion-loss-for-IonOnlyPlasma.i b/tutorial/tutorial03-PotentialWithIonLoss/ion-loss-for-IonOnlyPlasma.i index 5e85940601b..151944f06c3 100644 --- a/tutorial/tutorial03-PotentialWithIonLoss/ion-loss-for-IonOnlyPlasma.i +++ b/tutorial/tutorial03-PotentialWithIonLoss/ion-loss-for-IonOnlyPlasma.i @@ -51,9 +51,9 @@ dom0Scale = 1.0 #User define name for ions charged_particle = Ar+ #User define name for potential (usually 'potential') - potential = potential + field = potential #Defines if this potential exist in only one block/material (set 'true' for single gases) - Is_potential_unique = true + Is_field_unique = true #The position scaling for the mesh, define at top of input file position_units = ${dom0Scale} [] @@ -96,7 +96,6 @@ dom0Scale = 1.0 type = HagelaarIonAdvectionBC variable = Ar+ boundary = 'right left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -128,7 +127,6 @@ dom0Scale = 1.0 ramp_trans_coeffs = false user_p_gas = 13.3322 #user_p_gas = 1.33322 - potential = potential property_tables_file = rate_coefficients/electron_moments.txt [] #The material properties of the ion diff --git a/tutorial/tutorial03-PotentialWithIonLoss/tests b/tutorial/tutorial03-PotentialWithIonLoss/tests index 7985b8b6eaf..fd20701ea62 100644 --- a/tutorial/tutorial03-PotentialWithIonLoss/tests +++ b/tutorial/tutorial03-PotentialWithIonLoss/tests @@ -1,9 +1,8 @@ [Tests] - [tutorial03-PotentialWithIonLoss_syntax] - type = RunApp + [tutorial03-PotentialWithIonLoss] + type = Exodiff input = 'ion-loss-for-IonOnlyPlasma.i' - check_input = True - method = opt + exodiff = 'ion-loss-for-IonOnlyPlasma_out.e' group = 'tutorial' [] [] diff --git a/tutorial/tutorial04-PressureVsTe/RF_Plasma_WithOut_Metastables-1Torr.i b/tutorial/tutorial04-PressureVsTe/RF_Plasma_WithOut_Metastables-1Torr.i index f6bdb863d54..b7dd797ad6c 100644 --- a/tutorial/tutorial04-PressureVsTe/RF_Plasma_WithOut_Metastables-1Torr.i +++ b/tutorial/tutorial04-PressureVsTe/RF_Plasma_WithOut_Metastables-1Torr.i @@ -68,9 +68,9 @@ dom0Scale = 1.0 #User define name for ions charged_particle = Ar+ #User define name for potential (usually 'potential') - potential = potential + field = potential #Defines if this potential exist in only one block/material (set 'true' for single gases) - Is_potential_unique = true + Is_field_unique = true #User define name for the electron mean energy density (usually 'mean_en') mean_energy = mean_en #The position scaling for the mesh, define at top of input file @@ -184,7 +184,6 @@ dom0Scale = 1.0 [em_Ar+_second_emissions] type = SakiyamaSecondaryElectronBC variable = em - potential = potential ions = Ar+ emission_coeffs = 0.01 boundary = 'left right' @@ -195,7 +194,6 @@ dom0Scale = 1.0 [Ar+_physical_advection] type = SakiyamaIonAdvectionBC variable = Ar+ - potential = potential boundary = 'left right' position_units = ${dom0Scale} [] @@ -213,7 +211,6 @@ dom0Scale = 1.0 variable = mean_en electrons = em ions = Ar+ - potential = potential Tse_equal_Te = false secondary_electron_energy = 1 emission_coeffs = 0.01 @@ -235,8 +232,6 @@ dom0Scale = 1.0 ramp_trans_coeffs = false #Name for electrons (usually 'em') em = em - #Name for potential (usually 'potential') - potential = potential #Name for the electron mean energy density (usually 'mean_en') mean_en = mean_en #User difine pressure in pa diff --git a/tutorial/tutorial04-PressureVsTe/gold/RF_Plasma_WithOut_Metastables-1Torr_out.e b/tutorial/tutorial04-PressureVsTe/gold/RF_Plasma_WithOut_Metastables-1Torr_out.e new file mode 100644 index 00000000000..d7e28dddc84 Binary files /dev/null and b/tutorial/tutorial04-PressureVsTe/gold/RF_Plasma_WithOut_Metastables-1Torr_out.e differ diff --git a/tutorial/tutorial04-PressureVsTe/tests b/tutorial/tutorial04-PressureVsTe/tests index f6c5e799460..ba75c489819 100644 --- a/tutorial/tutorial04-PressureVsTe/tests +++ b/tutorial/tutorial04-PressureVsTe/tests @@ -1,9 +1,9 @@ [Tests] - [tutorial04-PressureVsTe_syntax] - type = RunApp + [tutorial04-PressureVsTe] + type = Exodiff input = 'RF_Plasma_WithOut_Metastables-1Torr.i' - check_input = True - method = opt + exodiff = 'RF_Plasma_WithOut_Metastables-1Torr_out.e' + cli_args = 'Executioner/end_time=1e+30 Executioner/num_steps=200' group = 'tutorial' [] [] diff --git a/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i b/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i index f45463de315..7f3d973b11d 100644 --- a/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i +++ b/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i @@ -76,9 +76,9 @@ dom1Scale = 1e-7 #User define name for ions charged_particle = Arp #User define name for potential (usually 'potential') - potential = potential + field = potential #Set False becuase both areas use the same potential - Is_potential_unique = false + Is_field_unique = false #User define name for the electron mean energy density (usually 'mean_en') mean_energy = mean_en #Helps prevent the log(0) @@ -93,8 +93,8 @@ dom1Scale = 1e-7 # treats water as a dense plasma [Water] charged_particle = 'emliq OHm' - potential = potential - Is_potential_unique = false + field = potential + Is_field_unique = false using_offset = true position_units = ${dom1Scale} #Name of material block for water @@ -175,7 +175,6 @@ dom1Scale = 1e-7 [em_advection] type = InterfaceAdvection mean_en_neighbor = mean_en - potential_neighbor = potential neighbor_var = em #the main variable being affected. The em is going into the water so em -> emliq @@ -234,7 +233,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'left' - potential = potential electron_energy = mean_en r = 0 position_units = ${dom0Scale} @@ -243,7 +241,6 @@ dom1Scale = 1e-7 type = SecondaryElectronBC variable = em boundary = 'left' - potential = potential ions = Arp electron_energy = mean_en r = 0 @@ -256,7 +253,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em r = 0 position_units = ${dom0Scale} @@ -265,7 +261,6 @@ dom1Scale = 1e-7 type = SecondaryElectronEnergyBC variable = mean_en boundary = 'left' - potential = potential electrons = em ions = 'Arp' r = 0 @@ -286,7 +281,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'left' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -296,7 +290,6 @@ dom1Scale = 1e-7 type = HagelaarElectronBC variable = em boundary = 'master0_interface' - potential = potential electron_energy = mean_en r = 0.00 position_units = ${dom0Scale} @@ -313,7 +306,6 @@ dom1Scale = 1e-7 type = HagelaarEnergyBC variable = mean_en boundary = 'master0_interface' - potential = potential electrons = em r = 0.00 position_units = ${dom0Scale} @@ -324,7 +316,6 @@ dom1Scale = 1e-7 type = HagelaarIonAdvectionBC variable = Arp boundary = 'master0_interface' - potential = potential r = 0 position_units = ${dom0Scale} [] @@ -334,7 +325,6 @@ dom1Scale = 1e-7 type = DCIonBC variable = emliq boundary = 'right' - potential = potential position_units = ${dom1Scale} [] #OH- on the ground electrode @@ -342,7 +332,6 @@ dom1Scale = 1e-7 type = DCIonBC variable = OHm boundary = 'right' - potential = potential position_units = ${dom1Scale} [] [] @@ -405,7 +394,6 @@ dom1Scale = 1e-7 [water_block] type = Water block = 1 - potential = potential [] #The material properties for electrons in plasma @@ -418,7 +406,6 @@ dom1Scale = 1e-7 user_p_gas = 101325 user_se_coeff = 0.05 em = em - potential = potential mean_en = mean_en block = 0 property_tables_file = 'townsend_coefficients/moments.txt' diff --git a/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water_out.cmp b/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water_out.cmp new file mode 100644 index 00000000000..b52b7e34377 --- /dev/null +++ b/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water_out.cmp @@ -0,0 +1,56 @@ +# ***************************************************************** +# EXODIFF (Version: 2.90) Modified: 2018-02-15 +# Authors: Richard Drake, rrdrake@sandia.gov +# Greg Sjaardema, gdsjaar@sandia.gov +# Run on 2024/10/03 14:05:10 MDT +# ***************************************************************** + +# FILE 1: /Users/dechcs/projects-plasma-EM/zapdos/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water_out.e +# Title: DC_argon-With-Water_out.e +# Dim = 3, Blocks = 2, Nodes = 275, Elements = 274, Nodesets = 4, Sidesets = 4 +# Vars: Global = 0, Nodal = 6, Element = 15, Nodeset = 0, Sideset = 0, Times = 1 + + +# ============================================================== +# NOTE: All node and element ids are reported as global ids. + +# NOTES: - The min/max values are reporting the min/max in absolute value. +# - Time values (t) are 1-offset time step numbers. +# - Element block numbers are the block ids. +# - Node(n) and element(e) numbers are 1-offset. + +COORDINATES absolute 1.e-6 # min separation not calculated + +TIME STEPS relative 1.e-6 floor 0.0 # min: 0.1 @ t1 max: 0.1 @ t1 + + +# No GLOBAL VARIABLES + +NODAL VARIABLES relative 1.e-6 floor 0.0 + Arp # min: 0 @ t1,n213 max: 21.595687 @ t1,n212 + OHm # min: 0 @ t1,n1 max: 2.8391219 @ t1,n274 + em # min: 0 @ t1,n213 max: 20.006448 @ t1,n1 + emliq # min: 0 @ t1,n1 max: 5.5470029 @ t1,n275 + mean_en # min: 0 @ t1,n213 max: 18.647559 @ t1,n1 + potential # min: 0 @ t1,n275 max: 0.57237498 @ t1,n1 + +ELEMENT VARIABLES relative 9.9e-6 floor 0.0 + Ar # min: 3.70109 @ t1,b0,e2 max: 3.70109 @ t1,b0,e22 + Arp_density # min: 2.6165522e+14 @ t1,b0,e211 max: 6.8642755e+18 @ t1,b0,e70 + Current_Arp # min: 0.00044689888 @ t1,b0,e198 max: 1308.159 @ t1,b0,e1 + Current_OHm relative 9.6e-5 floor 0.0 + Current_em # min: 46.466347 @ t1,b0,e1 max: 1355.2903 @ t1,b0,e211 + Current_emliq # min: 77.497342 @ t1,b1,e274 max: 1353.7056 @ t1,b1,e212 + EFieldx0 relative 9.6e-5 floor 0.0 + EFieldx1 relative 9.6e-5 floor 0.0 + H2O # min: 10.92252 @ t1,b1,e226 max: 10.92252 @ t1,b1,e214 + OHm_density # min: 3.5225897e+22 @ t1,b1,e274 max: 6.1236462e+22 @ t1,b1,e212 + e_temp # min: 2.5965979 @ t1,b0,e1 max: 5.5044032 @ t1,b0,e57 + em_density # min: 1.2333335e+15 @ t1,b0,e1 max: 8.5396492e+17 @ t1,b0,e103 + emliq_density # min: 2.3738376e+21 @ t1,b1,e274 max: 2.7532382e+22 @ t1,b1,e212 + position0 # min: 1.0438044e-09 @ t1,b0,e1 max: 0.00099999948 @ t1,b0,e211 + position1 # min: 1.0000005e-07 @ t1,b1,e212 max: 1.95e-07 @ t1,b1,e274 + +# No NODESET VARIABLES + +# No SIDESET VARIABLES diff --git a/tutorial/tutorial05-PlasmaWaterInterface/gold/DC_argon-With-Water_out.e b/tutorial/tutorial05-PlasmaWaterInterface/gold/DC_argon-With-Water_out.e new file mode 100644 index 00000000000..3a0eecae77b Binary files /dev/null and b/tutorial/tutorial05-PlasmaWaterInterface/gold/DC_argon-With-Water_out.e differ diff --git a/tutorial/tutorial05-PlasmaWaterInterface/tests b/tutorial/tutorial05-PlasmaWaterInterface/tests index 1d86588ee36..b3f6825144b 100644 --- a/tutorial/tutorial05-PlasmaWaterInterface/tests +++ b/tutorial/tutorial05-PlasmaWaterInterface/tests @@ -1,9 +1,9 @@ [Tests] - [tutorial05-PlasmaWaterInterface_syntax] - type = RunApp + [tutorial05-PlasmaWaterInterface] + type = Exodiff input = 'DC_argon-With-Water.i' - check_input = True - method = opt + exodiff = 'DC_argon-With-Water_out.e' group = 'tutorial' + custom_cmp = 'DC_argon-With-Water_out.cmp' [] [] diff --git a/tutorial/tutorial06-Building-InputFile/RF_Plasma_Blank.i b/tutorial/tutorial06-Building-InputFile/RF_Plasma_Blank.i index ac3d3855280..6642732f223 100644 --- a/tutorial/tutorial06-Building-InputFile/RF_Plasma_Blank.i +++ b/tutorial/tutorial06-Building-InputFile/RF_Plasma_Blank.i @@ -150,7 +150,6 @@ dom0Scale=25.4e-3 emission_coeffs = 0.01 #Secondary electron coeff. ks = 1.19e5 #Thermal electron velocity ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -158,7 +157,6 @@ dom0Scale=25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right left' position_units = ${dom0Scale} [] @@ -233,8 +231,6 @@ dom0Scale=25.4e-3 user_p_gas = 133.322 #Name for electrons (usually 'em') em = em - #Name for potential (usually 'potential') - potential = potential #Name for the electron mean energy density (usually 'mean_en') mean_en = mean_en #User define electron mobility coeff. (define as 0.0 if not used) diff --git a/tutorial/tutorial06-Building-InputFile/RF_Plasma_WithOut_Metastables.i b/tutorial/tutorial06-Building-InputFile/RF_Plasma_WithOut_Metastables.i index 78417820370..c940583330b 100644 --- a/tutorial/tutorial06-Building-InputFile/RF_Plasma_WithOut_Metastables.i +++ b/tutorial/tutorial06-Building-InputFile/RF_Plasma_WithOut_Metastables.i @@ -32,8 +32,8 @@ dom0Scale = 25.4e-3 [Plasma] electrons = em charged_particle = Ar+ - potential = potential - Is_potential_unique = true + field = potential + Is_field_unique = true mean_energy = mean_en position_units = ${dom0Scale} Additional_Outputs = 'ElectronTemperature Current EField' @@ -108,7 +108,6 @@ dom0Scale = 25.4e-3 emission_coeffs = 0.01 ks = 1.19e5 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] [em_physical_left] @@ -118,7 +117,6 @@ dom0Scale = 25.4e-3 emission_coeffs = 0.01 ks = 1.19e5 ions = Ar+ - potential = potential position_units = ${dom0Scale} [] @@ -126,14 +124,12 @@ dom0Scale = 25.4e-3 [Ar+_physical_right_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'right' position_units = ${dom0Scale} [] [Ar+_physical_left_advection] type = LymberopoulosIonBC variable = Ar+ - potential = potential boundary = 'left' position_units = ${dom0Scale} [] @@ -208,7 +204,6 @@ dom0Scale = 25.4e-3 ramp_trans_coeffs = false user_p_gas = 133.322 em = em - potential = potential mean_en = mean_en user_electron_mobility = 30.0 user_electron_diffusion_coeff = 119.8757763975 diff --git a/tutorial/tutorial06-Building-InputFile/gold/RF_Plasma_WithOut_Metastables_out.e b/tutorial/tutorial06-Building-InputFile/gold/RF_Plasma_WithOut_Metastables_out.e new file mode 100644 index 00000000000..16c09da8308 Binary files /dev/null and b/tutorial/tutorial06-Building-InputFile/gold/RF_Plasma_WithOut_Metastables_out.e differ diff --git a/tutorial/tutorial06-Building-InputFile/tests b/tutorial/tutorial06-Building-InputFile/tests index 57f39d93029..1c20bbf3815 100644 --- a/tutorial/tutorial06-Building-InputFile/tests +++ b/tutorial/tutorial06-Building-InputFile/tests @@ -1,9 +1,9 @@ [Tests] - [tutorial06-Building-InputFile_syntax] - type = RunApp + [tutorial06-Building-InputFile] + type = Exodiff input = 'RF_Plasma_WithOut_Metastables.i' - check_input = True - method = opt + cli_args = 'Executioner/end_time=1e+30 Executioner/num_steps=200' + exodiff = 'RF_Plasma_WithOut_Metastables_out.e' group = 'tutorial' [] [] diff --git a/unit/Makefile b/unit/Makefile index b4d73962e17..bb1afea0258 100644 --- a/unit/Makefile +++ b/unit/Makefile @@ -26,21 +26,8 @@ include $(FRAMEWORK_DIR)/moose.mk ################################## MODULES #################################### # set desired physics modules equal to 'yes' to enable them -CHEMICAL_REACTIONS := no -CONTACT := no -FLUID_PROPERTIES := no -HEAT_CONDUCTION := no -MISC := no -NAVIER_STOKES := no -PHASE_FIELD := no -RDG := no -RICHARDS := no -SOLID_MECHANICS := no -STOCHASTIC_TOOLS := no -TENSOR_MECHANICS := no -XFEM := no -POROUS_FLOW := no -LEVEL_SET := no +ELECTROMAGNETICS := yes + include $(MOOSE_DIR)/modules/modules.mk ###############################################################################