-
Notifications
You must be signed in to change notification settings - Fork 41
Add Verification cases ver-1n and ver-1o #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
78f8757
Add Verification case ver-1n and ver-1o
lin-yang-ly 554e2df
update python format
lin-yang-ly 3c2debc
update scripts for documentation
lin-yang-ly 10ef7ea
solve the test checks issue
lin-yang-ly d681243
Apply suggestions from code review
lin-yang-ly 6676f7d
update scripts and documentation with comments
lin-yang-ly ae94322
update python format
lin-yang-ly 494d205
Apply suggestions from code review
lin-yang-ly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
doc/content/verification_and_validation/figures/comparison_ver-1n.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../../test/tests/ver-1n/comparison_ver-1n.py |
1 change: 1 addition & 0 deletions
1
doc/content/verification_and_validation/figures/comparison_ver-1o.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../../test/tests/ver-1o/comparison_ver-1o.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # ver-1n | ||
|
|
||
| # Diffusion Problem under Applied Voltage with Constant Source Boundary Condition | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Case Description | ||
|
|
||
| This verification case considers one-dimensional deuterium diffusion under an applied voltage through a semi-infinite proton-conducting ceramic (PCC) layer with a constant source at one boundary. PCC materials selectively transport hydrogen isotopes (protium, deuterium, and tritium) at temperatures around 600 $^\circ$C through ionic conduction of hydroxyl defects. This proton-hopping mechanism can be substantially enhanced by applying an electric field, enabling active pumping of hydrogen isotopes across the membrane, even without pressure gradients. | ||
|
|
||
| The purpose of this case is to isolate and verify the voltage-assisted migration term in the Nernst--Planck equation. Trapping is excluded, and the Sieverts's boundary conditions are imposed on upstream and downstream surfaces to simplified the comparison with the analytical solution. | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Case Set Up | ||
|
|
||
| This verification case models a one-dimensional PCC membrane with a thickness of 10 mm. | ||
| The upstream deuterium pressure is held constant, and the corresponding boundary concentration is described by Sieverts' law, | ||
|
|
||
| \begin{equation} | ||
| \label{eq:p_c_relation} | ||
| C_0 = K_s \sqrt{P}, | ||
| \end{equation} | ||
|
|
||
| where $C_0$ is the concentration on the upstream side, $K_s$ is the Sieverts' solubility, and $P$ is the upstream deuterium pressure. The downstream concentration is set to 0. | ||
|
|
||
| In the PCC membrane, deuterium occupy charged hydroxyl defects. For the voltage-assisted transport verification, the transported deuterium species is treated as a positively charged mobile species with charge number $z=1$. The one-dimensional Nernst--Planck governing equation is | ||
|
|
||
| \begin{equation} | ||
| \label{eq:Nernst_Plank} | ||
| \frac{\partial C}{\partial t} | ||
| = | ||
| \frac{\partial}{\partial x}\left(D\frac{\partial C}{\partial x}\right) | ||
| + | ||
| \frac{\partial}{\partial x}\left(\frac{CDF}{RT}\frac{\partial \phi}{\partial x}\right), | ||
| \end{equation} | ||
|
simopier marked this conversation as resolved.
|
||
|
|
||
| where $C$ is the concentration of deuterium in the sample, $D$ is the deuterium diffusivity, $F$ is the Faraday constant, $R$ is the ideal gas constant, $T$ is the temperature, $\phi$ is the electric potential applied across the sample, $x$ is the distance from the source boundary, and $t$ is time. | ||
|
|
||
| The model parameters used in the verification case are shown in [ver-1n_set_up_values]. The deuterium solubility and diffusivity are taken from [!cite](hossain2020evaluation). The applied voltage is 20 V across the 10 mm membrane. | ||
|
|
||
| !table id=ver-1n_set_up_values caption=Values of model properties for the Nernst--Planck verification problem. | ||
| | Parameter | Description | Value | Units | Reference | | ||
| | --------- | ------------------------------------ | ----------------------------------------------------------- | --------------------- | --------------------- | | ||
| | $R$ | gas constant | 8.31446261815324 | J/mol/K | [PhysicalConstants.h](https://physics.nist.gov/cgi-bin/cuu/Value?r) | | ||
| | $T$ | temperature | 773 | K | -- | | ||
| | $K_{s}$ | deuterium solubility in PCC | 6.38$\times 10^{23} \exp(-7726.21 / RT)$ | atom/m$^3$/Pa$^{0.5}$ | [!cite](hossain2020evaluation) | | ||
| | $P$ | upstream pressure | 100 | Pa | -- | | ||
| | $D$ | deuterium diffusivity in PCC | 2.44$\times 10^{-6} \exp(-71399.15 / RT)$ | m$^2$/s | [!cite](hossain2020evaluation) | | ||
| | $l$ | thickness of PCC sample | 10$\times 10^{-3}$ | m | [!cite](hossain2020evaluation) | | ||
| | $F$ | Faraday constant | 96485.33 | C/mol | -- | | ||
| | $\phi$ | voltage applied across PCC sample | 20 | V | -- | | ||
|
|
||
| The verification focuses on two aspects of the solution: (1) the temporal evolution of deuterium concentration at fixed locations, and (2) the spatial concentration profile at fixed times. | ||
|
|
||
| ## Analytical Solution | ||
|
|
||
| [!cite](luping1993rapid) provides the analytical solution for a semi-infinite slab as: | ||
|
|
||
| \begin{equation} | ||
| \label{eq:Nernst_Plank_analytical} | ||
| C = \frac{C_0}{2}\left[ | ||
| \exp(ax)\,\text{erfc}\left(\frac{x + aDt}{2\sqrt{Dt}}\right) | ||
| + | ||
| \text{erfc}\left(\frac{x - aDt}{2\sqrt{Dt}}\right) | ||
| \right], | ||
| \end{equation} | ||
|
|
||
| where | ||
|
|
||
| \begin{equation} | ||
| \label{eq:Nernst_Plank_analytical_constant_a} | ||
| a = \frac{zF}{RT}\frac{\partial \phi}{\partial x}. | ||
| \end{equation} | ||
|
|
||
| Here, $z=1$ is the charge number of the mobile hydroxyl defect carrying the hydrogen isotope. The semi-infinite approximation is valid over the simulated time range because the characteristic diffusion length $\sqrt{Dt}\approx 0.14$~mm remains much smaller than the 10 mm membrane thickness. | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Results | ||
|
|
||
| [ver-1n_comparison_time] compares the TMAP8 results and the analytical solution as a function of time at $x = 0.1$ mm and $x = 0.5$ mm. The TMAP8 calculations closely match the analytical solution at both locations, with RMSPE values of 0.14% and 0.51%, respectively. | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| !media comparison_ver-1n.py | ||
| image_name=ver-1n_comparison_time.png | ||
| style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto | ||
| id=ver-1n_comparison_time | ||
| caption=Comparison of deuterium concentration as a function of time at $x = 0.1$ mm and $x = 0.5$ mm calculated by TMAP8 and by the analytical solution. | ||
| As a second check, [ver-1n_comparison_location] compares the concentration as a function of distance from the source at $t = 30$ s and $t = 500$ s. The TMAP8 calculations are in good agreement with the analytical solution, with RMSPE values of 0.86% and 0.11%, respectively. | ||
|
|
||
| !media comparison_ver-1n.py | ||
|
simopier marked this conversation as resolved.
|
||
| image_name=ver-1n_comparison_location.png | ||
| style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto | ||
| id=ver-1n_comparison_location | ||
| caption=Comparison of deuterium concentration as a function of distance from the source at $t = 30$ s and $t = 500$ s calculated by TMAP8 and by the analytical solution. | ||
|
|
||
| ## Input Files | ||
|
|
||
| !style halign=left | ||
| The input file for this case can be found at [/ver-1n.i]. More information about the changes can be found in the test specification file for this case [/ver-1n/tests]. | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| !bibtex bibliography | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # ver-1o | ||
|
|
||
| # Joule Heating in a Proton-Conducting Ceramic Slab under Applied Voltage | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Case Description | ||
|
|
||
| This verification case isolates the temperature response caused by Joule heating in a one-dimensional proton-conducting ceramic (PCC) slab under an applied voltage. In PCC membranes, the electrical current induced by an applied voltage generates Joule heating, which can increase the local temperature and influence hydrogen-isotope transport. This case verifies the thermal part of the voltage-assisted PCC model independently against an analytical solution for a slab with a uniform volumetric heat source. | ||
|
|
||
| This verification case use a 5 mm half-domain that represents one half of the original 10 mm membrane. The left boundary is held at a prescribed wall temperature, and the right boundary is adiabatic to represent the symmetry plane at the slab centerline. The same electric field as the original full-domain configuration is retained by using a 20 V drop across the full 10 mm membrane. | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Case Set Up | ||
|
|
||
| The heat equation with a Joule heating source is | ||
|
|
||
| \begin{equation} | ||
| \label{eq:ver-1o_heat} | ||
| \rho c_p \frac{\partial T}{\partial t} | ||
| = \kappa \frac{\partial^2 T}{\partial x^2} + \dot{q}_J, | ||
| \end{equation} | ||
|
simopier marked this conversation as resolved.
|
||
|
|
||
| where $\rho$ is the density, $c_p$ is the specific heat capacity, $\kappa$ is the thermal conductivity, and $\dot{q}_J$ is the volumetric Joule heating rate. The Joule heating is computed from a constant electrical conductivity and a constant applied electric field, | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| \begin{equation} | ||
| \label{eq:ver-1o_joule} | ||
| \dot{q}_J = \sigma E^2 = \sigma \left(\frac{V_{\mathrm{full}}}{L_{\mathrm{full}}}\right)^2, | ||
| \end{equation} | ||
|
|
||
| where $\sigma$ is the electrical conductivity, $V_{\mathrm{full}}$ is the voltage drop across the full slab, and $L_{\mathrm{full}}$ is the full slab thickness. The half-domain solved in TMAP8 has thickness $L = L_{\mathrm{full}}/2$, with boundary conditions | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| \begin{equation} | ||
| \label{eq:ver-1o_bcs} | ||
| T(0,t) = T_{\mathrm{wall}}, | ||
| \qquad | ||
| \left.\frac{\partial T}{\partial x}\right|_{x=L} = 0. | ||
| \end{equation} | ||
|
|
||
| The imposed voltage profile in the input file is | ||
|
|
||
| \begin{equation} | ||
| \label{eq:ver-1o_voltage_profile} | ||
| \phi(x) = V_{\mathrm{left}} - \left(\frac{V_{\mathrm{full}}}{L_{\mathrm{full}}}\right)x, | ||
| \end{equation} | ||
|
|
||
| so the electric field magnitude is constant across the domain. Because the conductivity and electric field are both constant, $\dot{q}_J$ is uniform in space. | ||
|
|
||
| The model parameters used in this case are listed in [ver-1o_set_up_values]. The thermal properties of the BCY20 membrane are taken from [!cite](yamanaka2003thermophysical). The remaining parameters are selected to simplify the verification problem. The electrical conductivity is set to a constant reference value, and the thermal conductivity $\kappa$ is deliberately set lower than the physical BCY20 value to produce a meaningful temperature rise for verification purposes. | ||
|
|
||
| !table id=ver-1o_set_up_values caption=Values of model properties for the Joule heating verification problem. | ||
| | Parameter | Description | Value | Units | Reference | | ||
| | --------- | ----------- | ----- | ----- | --------- | | ||
| | $T_{\mathrm{wall}}$ | wall temperature | 773 | K | -- | | ||
| | $L_{\mathrm{full}}$ | full PCC slab thickness | 10$\times 10^{-3}$ | m | -- | | ||
| | $L$ | simulated half-slab thickness | 5$\times 10^{-3}$ | m | -- | | ||
| | $V_{\mathrm{full}}$ | voltage applied across the full PCC slab | 20 | V | -- | | ||
| | $\sigma$ | electrical conductivity | 1$\times 10^{-3}$ | S/m | -- | | ||
| | $\kappa$ | thermal conductivity | 0.014 | W/(m$\cdot$K) | -- | | ||
| | $c_p$ | specific heat capacity | 120 | J/(mol$\cdot$K) | [!cite](yamanaka2003thermophysical) | | ||
| | $\rho$ | density | 6.154 | g/cm$^3$ | -- | | ||
|
|
||
| The verification focuses on two aspects of the thermal solution: (1) the transient maximum temperature rise at the insulated symmetry plane, and (2) the transient spatial temperature profile at selected times. | ||
|
|
||
| ## Analytical Solution | ||
|
|
||
| [!cite](miller1967transient) provides the analytical solution for the transient temperature solution under a constant volumetric heat source as: | ||
|
|
||
| \begin{equation} | ||
| \label{eq:ver1o_transient} | ||
| T(x,t) = T_{\mathrm{wall}} + \frac{\dot{q}_J \ell^2}{\kappa} | ||
| \left[ | ||
| \frac{x}{\ell} - \frac{1}{2}\!\left(\frac{x}{\ell}\right)^{\!2} | ||
| - 2 \sum_{n=0}^{\infty} | ||
| \frac{\sin\!\left(\lambda_n x/\ell\right)}{\lambda_n^3} | ||
| \exp\!\left(-\lambda_n^2 \frac{\alpha t}{\ell^2}\right) | ||
| \right], | ||
| \end{equation} | ||
|
|
||
| where $\alpha = \kappa/(\rho c_p)$ is the thermal diffusivity, and the eigenvalues $\lambda_n$ are described as | ||
|
|
||
| \begin{equation} | ||
| \label{eq:ver1o_lambda} | ||
| \lambda_n = \left(n + \tfrac{1}{2}\right)\pi, \qquad n = 0,\, 1,\, 2,\, \ldots, | ||
| \end{equation} | ||
|
|
||
| where $n$ is the integer mode number in the Fourier series. As $t \to \infty$, \cref{eq:ver1o_transient} reduces to the steady-state parabolic profile | ||
|
|
||
| \begin{equation} | ||
| \label{eq:ver1o_ss} | ||
| T(x) = T_{\mathrm{wall}} + \frac{\dot{q}_J}{\kappa}\!\left(\ell x - \frac{x^2}{2}\right). | ||
| \end{equation} | ||
|
|
||
|
|
||
| ## Results | ||
|
|
||
| [ver-1o_comparison_temperature_history] compares the maximum temperature rise history, $\Delta T_{\max}(t)$, predicted by TMAP8 against the analytical solution evaluated at the insulated face $x = L$. The TMAP8 result closely matches the analytical solution, with an RMSPE of 0.50%. | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| !media comparison_ver-1o.py | ||
| image_name=ver-1o_comparison_temperature_history.png | ||
| style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto | ||
| id=ver-1o_comparison_temperature_history | ||
| caption=Comparison of the TMAP8 transient maximum temperature rise history with the analytical half-slab solution for a constant Joule-heating source, prescribed surface temperature at $x = 0$, and insulated symmetry plane at $x = L$. | ||
|
|
||
| [ver-1o_comparison_temperature_profiles] compares the transient temperature profiles at $t = 1000$ s and $t = 20000$ s with the analytical solution. The simulated profiles show excellent agreement with the analytical solution, with RMSPE values below 0.01% at both times. | ||
|
|
||
| !media comparison_ver-1o.py | ||
| image_name=ver-1o_comparison_temperature_profiles.png | ||
| style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto | ||
| id=ver-1o_comparison_temperature_profiles | ||
| caption=Comparison of the TMAP8 transient temperature profiles at $t = 1000$ s and $t = 20000$ s with the analytical half-slab solution. | ||
|
|
||
| ## Input Files | ||
|
|
||
| !style halign=left | ||
| The input file for this case can be found at [/ver-1o.i]. More information about the changes can be found in the test specification file for this case [/ver-1o/tests]. | ||
|
lin-yang-ly marked this conversation as resolved.
Outdated
|
||
|
|
||
| !bibtex bibliography | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.