Skip to content

Commit

Permalink
Updating docstring for new objects and cleaning up mms test input files
Browse files Browse the repository at this point in the history
closes #257
  • Loading branch information
csdechant committed Nov 22, 2024
1 parent 0635d00 commit a8a7474
Show file tree
Hide file tree
Showing 27 changed files with 2,094 additions and 4,262 deletions.
53 changes: 46 additions & 7 deletions include/bcs/DielectricBCWithEffEfield.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//* This file is part of Zapdos, an open-source
//* application for the simulation of plasmas
//* https://github.com/shannon-lab/zapdos
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//* 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
Expand All @@ -12,8 +13,7 @@
#include "ADIntegratedBC.h"

/**
* Implements a simple constant Neumann BC where grad(u)=value on the boundary.
* Uses the term produced from integrating the diffusion operator by parts.
* Time integrated dielectric boundary condition
*/
class DielectricBCWithEffEfield : public ADIntegratedBC
{
Expand All @@ -25,51 +25,90 @@ class DielectricBCWithEffEfield : public ADIntegratedBC
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<Real> & _e;
/// Permittivity of free space
const ADMaterialProperty<Real> & _epsilon_0;
/// Avogadro's number
const MaterialProperty<Real> & _N_A;

/// Charge sign of the ions
const MaterialProperty<Real> & _sgnip;
/// Mobility coefficient of the ions
const ADMaterialProperty<Real> & _muip;
/// Mass of electrons
const MaterialProperty<Real> & _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;
};
28 changes: 20 additions & 8 deletions include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

#include "ADIntegratedBC.h"

/**
* Kinetic secondary electron for mean electron energy boundary condition
* with an effective electric field for ions
*/
class SakiyamaEnergySecondaryElectronWithEffEfieldBC : public ADIntegratedBC
{
public:
Expand All @@ -22,28 +26,36 @@ class SakiyamaEnergySecondaryElectronWithEffEfieldBC : public ADIntegratedBC
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;

// Coupled variables
/// 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<MooseVariable *> _ip_var;
/// Ion density values
std::vector<const ADVariableValue *> _ip;

/// Charge sign of the ions
std::vector<const MaterialProperty<Real> *> _sgnip;
/// Mobility coefficient of the ions
std::vector<const ADMaterialProperty<Real> *> _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;
unsigned int _ip_index;
std::vector<unsigned int>::iterator _iter;
};
16 changes: 11 additions & 5 deletions include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

#include "ADIntegratedBC.h"

/**
* Kinetic advective ion boundary condition
* with an effective electric field for ions
*/
class SakiyamaIonAdvectionWithEffEfieldBC : public ADIntegratedBC
{
public:
Expand All @@ -22,16 +26,18 @@ class SakiyamaIonAdvectionWithEffEfieldBC : public ADIntegratedBC
protected:
virtual ADReal computeQpResidual() override;

/// Scaling units for the position
Real _r_units;

// Coupled variables

/// 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<Real> & _mu;
/// Charge sign of the species
const MaterialProperty<Real> & _sgn;

/// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise
Real _a;
};
21 changes: 15 additions & 6 deletions include/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

#include "ADIntegratedBC.h"

/**
* Kinetic secondary electron boundary condition
* with an effective electric field for ions
*/
class SakiyamaSecondaryElectronWithEffEfieldBC : public ADIntegratedBC
{
public:
Expand All @@ -22,21 +26,26 @@ class SakiyamaSecondaryElectronWithEffEfieldBC : public ADIntegratedBC
protected:
virtual ADReal computeQpResidual() override;

/// Scaling units for the position
Real _r_units;

// Coupled variables

/// 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<const ADVariableValue *> _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<const MaterialProperty<Real> *> _sgnip;
/// Mobility coefficient of the ions
std::vector<const ADMaterialProperty<Real> *> _muip;

/// Number of ions defined
unsigned int _num_ions;
};
9 changes: 6 additions & 3 deletions include/kernels/EffectiveEField.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

#include "ADKernel.h"

/**
* Supplies the source term of the time derivative calculation of the effective electric field for ions
*/
class EffectiveEField : public ADKernel
{
public:
Expand All @@ -20,15 +23,15 @@ class EffectiveEField : public ADKernel
EffectiveEField(const InputParameters & parameters);

protected:
// virtual ADRealVectorValue precomputeQpResidual() override;
virtual ADReal computeQpResidual();

// // using ADKernelGrad::getPostprocessorValue;

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<RealVectorValue> & _electric_field;
};
14 changes: 9 additions & 5 deletions include/kernels/EffectiveEFieldAdvection.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

#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:
Expand All @@ -20,20 +24,20 @@ class EffectiveEFieldAdvection : public ADKernel
EffectiveEFieldAdvection(const InputParameters & parameters);

protected:
// virtual ADRealVectorValue precomputeQpResidual() override;
virtual ADReal computeQpResidual();

// // using ADKernelGrad::getPostprocessorValue;

private:
/// Position units
const Real _r_units;

/// The diffusion coefficient (either constant or mixture-averaged)
/// Mobility coefficient
const ADMaterialProperty<Real> & _mu;
/// Charge sign of the species
const MaterialProperty<Real> & _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;
};
13 changes: 11 additions & 2 deletions include/kernels/ThermalConductivityDiffusion.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

#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:
Expand All @@ -23,11 +28,15 @@ class ThermalConductivityDiffusion : public ADKernel
virtual ADReal computeQpResidual() override;

private:

/// Position units
Real _r_units;
/// Coefficient relating diffusion coefficient * density to thermal conductivity
Real _coeff;

/// Diffusion coefficient
const ADMaterialProperty<Real> & _diffem;

/// Electron density
const ADVariableValue & _em;
/// Gradient of electron density
const ADVariableGradient & _grad_em;
};
Loading

0 comments on commit a8a7474

Please sign in to comment.