Skip to content

Commit

Permalink
Adding test for DielectricBCWithEffEfield and PlasmaDielectricConstan…
Browse files Browse the repository at this point in the history
…t, and make mms test heavy
  • Loading branch information
csdechant committed Nov 22, 2024
1 parent f95709b commit 0635d00
Show file tree
Hide file tree
Showing 17 changed files with 1,059 additions and 121 deletions.
8 changes: 1 addition & 7 deletions doc/content/source/bcs/DielectricBCWithEffEfield.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# DielectricBCWithEffEfield

!alert construction title=Undocumented Class
The DielectricBCWithEffEfield has not been documented. The content listed below should be used as a starting point for
documenting the class, which includes the typical automatic documentation associated with a
MooseObject; however, what is contained is ultimately determined by what is necessary to make the
documentation clear for users.

!syntax description /BCs/DielectricBCWithEffEfield

## Overview
Expand Down Expand Up @@ -67,7 +61,7 @@ Lastly, the electrostatics approximation is applied to the electric field normal

## Example Input File Syntax

!! Describe and include an example of how to use the DielectricBCWithEffEfield object.
!listing test/tests/mms/bcs/2D_DielectricBCWithEffEfield.i block=BCs/potential_left_BC

!syntax parameters /BCs/DielectricBCWithEffEfield

Expand Down
10 changes: 2 additions & 8 deletions doc/content/source/materials/PlasmaDielectricConstant.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# PlasmaDielectricConstant

!alert construction title=Undocumented Class
The PlasmaDielectricConstant has not been documented. The content listed below should be used as a starting point for
documenting the class, which includes the typical automatic documentation associated with a
MooseObject; however, what is contained is ultimately determined by what is necessary to make the
documentation clear for users.

!syntax description /Materials/PlasmaDielectricConstant

## Overview

`PlasmaDielectricConstant` provides the real and complex components of the plasma dielectric coefficient, along with the spatial gradient, the first time derivative, and second time derivative of the plasma dielectric coefficient.
`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:

Expand All @@ -32,7 +26,7 @@ where

## Example Input File Syntax

!! Describe and include an example of how to use the PlasmaDielectricConstant object.
!listing test/tests/mms/materials/2D_PlasmaDielectricConstant.i block=Materials/Plasma_dielectric

!syntax parameters /Materials/PlasmaDielectricConstant

Expand Down
16 changes: 13 additions & 3 deletions src/materials/PlasmaDielectricConstant.C
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ PlasmaDielectricConstant::validParams()
"The electron-neutral collision frequency (in Hz).");
params.addRequiredParam<Real>("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, the first time derivative, "
"and second time derivative of the plasma dielectric.");
params.addClassDescription("Provides the real and complex components, the spatial gradient and "
"the first time derivative of the plasma dielectric.");
return params;
}

Expand Down Expand Up @@ -72,6 +71,16 @@ PlasmaDielectricConstant::computeQpProperties()
-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]);
Expand All @@ -82,5 +91,6 @@ PlasmaDielectricConstant::computeQpProperties()
_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));
*/
}
}
7 changes: 0 additions & 7 deletions test/tests/mms/bcs/1D_LymberopoulosElectronBC.i
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#Need to Edit

#This MMS test was designed to test the log version of LymberopoulosElectronBC,
#when coupled with an "ion" and "potential" variable. This test is done twice with
#mixed BCs, once where the left is the LymberopoulosElectronBC while the right
#is a DirichletBC and vice-versa.

[Mesh]
[./geo]
type = FileMeshGenerator
Expand Down
7 changes: 0 additions & 7 deletions test/tests/mms/bcs/1D_LymberopoulosIonBC.i
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#Need to Edit

#This MMS test was designed to test the log version of LymberopoulosIonBC,
#when coupled with a "potential" variable. This test is done twice with
#mixed BCs, once where the left is the LymberopoulosIonBC while the right
#is a DirichletBC and vice-versa.

[Mesh]
[./geo]
type = FileMeshGenerator
Expand Down
Loading

0 comments on commit 0635d00

Please sign in to comment.