From 5d5ea3174c732904f1f1bb0e8470baa433fcd8c5 Mon Sep 17 00:00:00 2001 From: csdechant Date: Tue, 12 Nov 2024 17:07:09 -0700 Subject: [PATCH 01/10] Updating docsting in Zapdos and minor edits Updating the docstings in Zapdos is in progress with the following objects completed: - Actions - Auxkernels - bcs - constraits - indicators - interfacekernels - postprocessors - userobjects Also minor edits of head and body files were done, which involved removing out dated parameters --- include/actions/AddDriftDiffusionAction.h | 25 +++++++++++ include/actions/AddPeriodicControllers.h | 29 +++++++++++- .../AddPeriodicRelativeNodalDifference.h | 21 +++++++++ include/auxkernels/AbsValueAux.h | 5 +++ include/auxkernels/Current.h | 15 ++++++- include/auxkernels/DensityMoles.h | 6 +++ include/auxkernels/DensityNormalization.h | 12 ++++- include/auxkernels/DiffusiveFlux.h | 16 +++++-- include/auxkernels/DriftDiffusionFluxAux.h | 8 ++++ include/auxkernels/EFieldAdvAux.h | 16 ++++--- include/auxkernels/Efield.h | 14 +++--- include/auxkernels/ElectronTemperature.h | 5 +++ .../auxkernels/LinearCombinationAuxKernel.h | 5 ++- include/auxkernels/Position.h | 11 ++--- include/auxkernels/PowerDep.h | 12 +++++ include/auxkernels/ProcRate.h | 15 ++++++- include/auxkernels/ProcRateForRateCoeff.h | 7 +++ .../ProcRateForRateCoeffThreeBody.h | 9 ++++ include/auxkernels/Sigma.h | 7 +++ include/auxkernels/TM0CylindricalErAux.h | 8 +++- include/auxkernels/TM0CylindricalEzAux.h | 9 +++- include/auxkernels/TotalFlux.h | 8 ++++ include/bcs/CircuitDirichletPotential.h | 18 ++++++-- include/bcs/DCIonBC.h | 13 +++--- include/bcs/DriftDiffusionDoNothingBC.h | 18 +++++--- include/bcs/EconomouDielectricBC.h | 30 ++++++++++++- include/bcs/ElectronAdvectionDoNothingBC.h | 11 +++-- include/bcs/ElectronDiffusionDoNothingBC.h | 9 ++-- include/bcs/ElectronTemperatureDirichletBC.h | 5 ++- include/bcs/FieldEmissionBC.h | 44 +++++++++++++++--- include/bcs/HagelaarElectronAdvectionBC.h | 9 +++- include/bcs/HagelaarElectronBC.h | 14 +++++- include/bcs/HagelaarEnergyAdvectionBC.h | 25 ++++++++++- include/bcs/HagelaarEnergyBC.h | 13 +++++- include/bcs/HagelaarIonAdvectionBC.h | 13 ++++-- include/bcs/HagelaarIonDiffusionBC.h | 12 ++++- include/bcs/LogDensityDirichletBC.h | 4 +- include/bcs/LymberopoulosElectronBC.h | 13 +++++- include/bcs/LymberopoulosIonBC.h | 7 ++- include/bcs/MatchedValueLogBC.h | 6 ++- include/bcs/NeumannCircuitVoltageMoles_KV.h | 40 +++++++++++++++-- include/bcs/PenaltyCircuitPotential.h | 32 +++++++++++-- include/bcs/PotentialDriftOutflowBC.h | 7 ++- include/bcs/SakiyamaElectronDiffusionBC.h | 12 +++-- include/bcs/SakiyamaEnergyDiffusionBC.h | 12 +++-- .../bcs/SakiyamaEnergySecondaryElectronBC.h | 22 +++++++-- include/bcs/SakiyamaIonAdvectionBC.h | 11 +++-- include/bcs/SakiyamaSecondaryElectronBC.h | 17 +++++-- include/bcs/SchottkyEmissionBC.h | 39 ++++++++++++++-- include/bcs/SecondaryElectronBC.h | 27 ++++++++++- include/bcs/SecondaryElectronEnergyBC.h | 30 ++++++++++++- include/bcs/TM0AntennaVertBC.h | 7 +++ include/bcs/TM0PECVertBC.h | 3 ++ .../ArbitrarilyTiedValueConstraint.h | 4 ++ include/indicators/AnalyticalDiffIndicator.h | 5 +++ .../interfacekernels/HphiRadialInterface.h | 6 ++- include/interfacekernels/InterfaceAdvection.h | 8 +++- .../InterfaceLogDiffusionElectrons.h | 8 ++-- .../interfacekernels/PotentialSurfaceCharge.h | 9 +++- include/kernels/AccelerationByAveraging.h | 7 +++ include/kernels/AxisymmetricCurlZ.h | 3 ++ include/kernels/ChargeSourceMoles_KV.h | 13 ++++-- include/kernels/CoeffDiffusion.h | 3 +- .../kernels/CoeffDiffusionForShootMethod.h | 9 +++- include/kernels/CoeffDiffusionLin.h | 3 +- include/kernels/DriftDiffusion.h | 17 +++++-- .../kernels/EEDFReactionLogForShootMethod.h | 9 +++- include/kernels/EFieldAdvection.h | 7 ++- include/kernels/EFieldArtDiff.h | 10 ++++- include/kernels/EFieldMagnitudeSource.h | 4 ++ .../kernels/ElectronEnergyLossFromElastic.h | 10 +++++ .../ElectronEnergyLossFromExcitation.h | 15 ++++++- .../ElectronEnergyLossFromIonization.h | 13 ++++++ .../kernels/ElectronEnergyTermElasticRate.h | 13 ++++-- include/kernels/ElectronEnergyTermRate.h | 16 ++++++- include/kernels/ElectronTimeDerivative.h | 4 ++ include/kernels/ElectronsFromIonization.h | 16 +++++++ include/kernels/ExcitationReaction.h | 15 ++++++- include/kernels/IonsFromIonization.h | 12 +++++ include/kernels/JouleHeating.h | 11 ++++- include/kernels/LogStabilizationMoles.h | 5 +++ include/kernels/ProductAABBRxn.h | 9 +++- include/kernels/ProductFirstOrderRxn.h | 8 +++- include/kernels/ReactantAARxn.h | 7 ++- include/kernels/ReactantFirstOrderRxn.h | 6 ++- .../ReactionSecondOrderLogForShootMethod.h | 11 ++++- .../ReactionThirdOrderLogForShootMethod.h | 13 +++++- include/kernels/ScaledReaction.h | 5 +++ include/kernels/ShootMethodLog.h | 8 ++++ include/kernels/TM0Cylindrical.h | 7 +++ include/kernels/TM0CylindricalEr.h | 9 ++++ include/kernels/TM0CylindricalEz.h | 9 ++++ include/kernels/UserSource.h | 4 ++ include/materials/ADGasElectronMoments.h | 24 +++++++--- include/materials/ADSurfaceCharge.h | 37 +++++++++++---- include/postprocessors/AverageNodalDensity.h | 6 +++ .../postprocessors/AverageNodalDifference.h | 8 ++++ include/postprocessors/MultiPeriodAverager.h | 3 ++ .../PeriodicAmplitudeRegulator.h | 4 ++ .../PeriodicComparisonCounter.h | 11 +++++ .../PeriodicTimeIntegratedPostprocessor.h | 3 ++ .../postprocessors/PlasmaFrequencyInverse.h | 14 +++--- include/postprocessors/SideCurrent.h | 31 ++++++++++--- include/postprocessors/SideTotFluxIntegral.h | 16 +++++-- .../CurrentDensityShapeSideUserObject.h | 45 +++++++++++++++++++ include/userobjects/ProvideMobility.h | 22 ++++++++- .../AddPeriodicRelativeNodalDifference.C | 2 +- src/auxkernels/LinearCombinationAuxKernel.C | 2 - src/bcs/NeumannCircuitVoltageMoles_KV.C | 2 - src/interfacekernels/HphiRadialInterface.C | 3 ++ src/interfacekernels/InterfaceAdvection.C | 13 +----- .../InterfaceLogDiffusionElectrons.C | 8 +--- src/kernels/EEDFReactionLogForShootMethod.C | 1 - src/postprocessors/SideCurrent.C | 22 +-------- src/postprocessors/SideTotFluxIntegral.C | 7 --- test/tests/1d_dc/densities_mean_en.i | 2 - test/tests/1d_dc/mean_en.i | 2 - test/tests/1d_dc/mean_en_multi.i | 2 - .../DriftDiffusionAction/mean_en_actions.i | 2 - .../DriftDiffusionAction/mean_en_no_actions.i | 2 - test/tests/crane_action/townsend_units.i | 2 - .../DC_argon-With-Water.i | 2 - 122 files changed, 1188 insertions(+), 247 deletions(-) diff --git a/include/actions/AddDriftDiffusionAction.h b/include/actions/AddDriftDiffusionAction.h index d1593657429..15c1a9695df 100644 --- a/include/actions/AddDriftDiffusionAction.h +++ b/include/actions/AddDriftDiffusionAction.h @@ -13,6 +13,17 @@ #include "AddVariableAction.h" #include "Action.h" +/** + * This class allows us to have a section of the input file like the + * following which automatically adds variables, kernels, aux kernels, bcs + * for setting up the drift-diffusion equation for multiple plasma species + * and automatically adds the Poisson's equation for electrostatic cases. + * + * [DriftDiffusionAction] + * [Plasma] + * [] + * [] + */ class AddDriftDiffusionAction : public Action { public: @@ -23,17 +34,31 @@ class AddDriftDiffusionAction : public Action virtual void act(); protected: + /// Helper function that supplies the potentials charge sources virtual void addChargeSourceKernels(const std::string & potential_name, const std::string & charged_particle_name); + + /* + * Helper function that supplies the Kernels for drift-diffusion for the electrons, + * energy independent charged particles, neutral particles, and + * electron mean energy depending + */ virtual void addADKernels(const std::string & name, const std::string & potential_name, const bool & Using_offset, const bool & charged, const bool & energy); + + /// Helper function that supplies the Aux kernels to convert scaled position units virtual void addPosition(const std::string & position_name, const int & component); + /// Helper function that supplies the Aux kernels to convert densities from log form virtual void addDensityLog(const std::string & particle_name); + + /// Helper function that supplies the Aux kernels for current virtual void addCurrent(const std::string & particle_name, const std::string & potential_name); + + /// Helper function that supplies the Aux kernels for the electric field virtual void addEfield(const std::string & Efield_name, const std::string & potential_name, const int & component); diff --git a/include/actions/AddPeriodicControllers.h b/include/actions/AddPeriodicControllers.h index 025c63a1486..9f1503274b2 100644 --- a/include/actions/AddPeriodicControllers.h +++ b/include/actions/AddPeriodicControllers.h @@ -12,7 +12,10 @@ #include "Action.h" -// class AddPeriodicControllers : public AddControlAction +/* + * This Action automatically adds multiply 'TimePeriod' controllers for + * the purpose of enabling and disabling multiple objects during multiple cycles. + */ class AddPeriodicControllers : public Action { public: @@ -23,6 +26,7 @@ class AddPeriodicControllers : public Action virtual void act(); protected: + /// Function that adds a 'TimePeriod' controller virtual void AddTimePeriod(const std::string & enableORdisable, const std::vector & objects, const std::vector & start_times, @@ -30,35 +34,58 @@ class AddPeriodicControllers : public Action const std::string & name_num, const bool & first_controller); + /// A list of objects names to enable at the start of the cycle std::vector _enable_start; + /// A list of objects names to enable during the cycle std::vector _enable_during; + /// A list of objects names to enable at the end of the cycle std::vector _enable_end; + /// A list of objects names to disable at the start of the cycle std::vector _disable_start; + /// A list of objects names to disable during the cycle std::vector _disable_during; + /// A list of objects names to disable at the end of the cycle std::vector _disable_end; + /// The starting time to begin adding 'TimePeriod' controllers Real _start_time; + /// The period of the cycle Real _period; + /// The number of cycles between enabling and disabling objects Real _cycles_per_controls; + /// Total number of 'TimePeriod' controllers to add Real _num_controller_set; + /// Name of the 'TimePeriod' controllers std::string _name; + /// The array that holds the start times for objects that are enable at the start of the cycle std::vector _enable_start_start_time_index; + /// The array that holds the end times for objects that are enable at the start of the cycle std::vector _enable_start_end_time_index; + /// The array that holds the start times for objects that are enable at during the cycle std::vector _enable_during_start_time_index; + /// The array that holds the end times for objects that are enable at during the cycle std::vector _enable_during_end_time_index; + /// The array that holds the start times for objects that are enable at the end of the cycle std::vector _enable_end_start_time_index; + /// The array that holds the end times for objects that are enable at the end of the cycle std::vector _enable_end_end_time_index; + /// The array that holds the start times for objects that are disable at the start of the cycle std::vector _disable_start_start_time_index; + /// The array that holds the end times for objects that are disable at the start of the cycle std::vector _disable_start_end_time_index; + /// The array that holds the start times for objects that are disable at during the cycle std::vector _disable_during_start_time_index; + /// The array that holds the end times for objects that are disable at during the cycle std::vector _disable_during_end_time_index; + /// The array that holds the start times for objects that are disable at the end of the cycle std::vector _disable_end_start_time_index; + /// The array that holds the end times for objects that are disable at the end of the cycle std::vector _disable_end_end_time_index; }; diff --git a/include/actions/AddPeriodicRelativeNodalDifference.h b/include/actions/AddPeriodicRelativeNodalDifference.h index 043e043edb5..04aa7e51251 100644 --- a/include/actions/AddPeriodicRelativeNodalDifference.h +++ b/include/actions/AddPeriodicRelativeNodalDifference.h @@ -13,6 +13,11 @@ #include "AddVariableAction.h" #include "Action.h" +/* + * This Action automatically adds the necessary objects to calculate the relative + * periodic difference. Relative Difference will be outputted as a Postprocessor named: + * 'var'_periodic_difference + */ class AddPeriodicRelativeNodalDifference : public Action { public: @@ -23,31 +28,47 @@ class AddPeriodicRelativeNodalDifference : public Action virtual void act(); protected: + /// Function for setting ICs for the previous and sudo previous solutions virtual void addPerviousSolutionsIC(const std::string & variable_name, const Real & initial); + /// Function for setting AuxKernels for the previous and sudo previous solutions virtual void addPerviousSolutionsKernels(const std::string & variable_name, const std::string & var_old_name); + /// Function for setting AuxKernels to normalize solutions virtual void addNormalizationKernels(const std::string & variable_name, const std::string & source, const std::string & averaged, const bool & log); + /// Function for setting Postprocessor to take to nodal average virtual void addAverageNodalPP(const std::string & variable_name, const bool & log); + /// Function for setting Postprocessor to take to average nodal difference virtual void addRelativePeriodicDiffPP(const std::string & variable_name, const std::string & var_old_name, const std::string & name); + /// Function that adds a 'TimePeriod' controller to begin calculating the relative periodic difference virtual void AddTimePeriod(const std::vector & objects, const std::vector & start_times, const std::vector & end_times, const std::string & name_num, const bool & first_controller); + /// The starting time to begin calculating the relative periodic difference Real _start_time; + /// The period of the cycle Real _period; + /// The number of cycles to calculate the difference Real _num_controller_set; + /// The name of objects to enable at the start of the cycle std::vector _enable_start; + /// The name of objects to enable at the end of the cycle std::vector _enable_end; + + /// The array that holds the start times for objects that are enable at the start of the cycle std::vector _enable_start_start_time_index; + /// The array that holds the end times for objects that are enable at the start of the cycle std::vector _enable_start_end_time_index; + /// The array that holds the start times for objects that are enable at the end of the cycle std::vector _enable_end_start_time_index; + /// The array that holds the end times for objects that are enable at the end of the cycle std::vector _enable_end_end_time_index; }; diff --git a/include/auxkernels/AbsValueAux.h b/include/auxkernels/AbsValueAux.h index 806a7dce2b3..1b218a415f5 100644 --- a/include/auxkernels/AbsValueAux.h +++ b/include/auxkernels/AbsValueAux.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Returns the absolute value of the specified variable. + */ class AbsValueAux : public AuxKernel { public: @@ -23,5 +26,7 @@ class AbsValueAux : public AuxKernel virtual Real computeValue() override; private: + + /// The coupled variable in which to take to absolute value const VariableValue & _u; }; diff --git a/include/auxkernels/Current.h b/include/auxkernels/Current.h index abe73c852ba..4958132f127 100644 --- a/include/auxkernels/Current.h +++ b/include/auxkernels/Current.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Returns the electric current associated with the flux of the specified species + */ template class CurrentTempl : public AuxKernel { @@ -24,16 +27,26 @@ class CurrentTempl : public AuxKernel virtual Real computeValue() override; protected: + + /// The component of the current const int _component; + /// The scaling units for the position const Real _r_units; - + /// The coupled density variable const MooseVariable & _density_var; + /// The value of the coupled density variable const VariableValue & _density_log; + /// The gradient of the coupled density variable const VariableGradient & _grad_density_log; + /// The gradient of the coupled potential const VariableGradient & _grad_potential; + /// The mobility coefficient const GenericMaterialProperty & _mu; + /// The charge sign of the coupled species const MaterialProperty & _sgn; + /// The diffusion coefficient const GenericMaterialProperty & _diff; + /// True if an artifical diffusion term is needed bool _art_diff; }; diff --git a/include/auxkernels/DensityMoles.h b/include/auxkernels/DensityMoles.h index ccb5d8a8933..01857212c5a 100644 --- a/include/auxkernels/DensityMoles.h +++ b/include/auxkernels/DensityMoles.h @@ -12,6 +12,9 @@ #include "Density.h" +/** + * Returns physical densities in units of #/m^3 + */ class DensityMoles : public Density { public: @@ -24,6 +27,9 @@ class DensityMoles : public Density protected: virtual Real computeValue() override; + /// True if molar density is used bool _convert_moles; + + /// Avogadro's number const MaterialProperty & _N_A; }; diff --git a/include/auxkernels/DensityNormalization.h b/include/auxkernels/DensityNormalization.h index d94b8ae98d6..600dce6799a 100644 --- a/include/auxkernels/DensityNormalization.h +++ b/include/auxkernels/DensityNormalization.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Normalize variables expressed in log form + */ class DensityNormalization : public AuxKernel { public: @@ -22,8 +25,15 @@ class DensityNormalization : public AuxKernel protected: virtual Real computeValue() override; + /// Coupled density value const VariableValue & _density; - const Real * _pp_on_source; + + /// Denominator to normalize to + const Real * _pp_on_source; + + /// A factor to shift the normilization by const Real * _shift; + + /// A factor to multiple the normilization by Real _normal_factor; }; diff --git a/include/auxkernels/DiffusiveFlux.h b/include/auxkernels/DiffusiveFlux.h index aec0e26461e..15050a429c5 100644 --- a/include/auxkernels/DiffusiveFlux.h +++ b/include/auxkernels/DiffusiveFlux.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Returns the diffusive flux of the specified species + */ template class DiffusiveFluxTempl : public AuxKernel { @@ -23,17 +26,22 @@ class DiffusiveFluxTempl : public AuxKernel protected: virtual Real computeValue() override; + /// component of the flux const int _component; - const Real _r_units; - // Coupled variables + /// The scaling units for the position + const Real _r_units; + /// Gradient of the coupled density variable const VariableGradient & _grad_density_log; + + /// Coupled density variable MooseVariable & _density_var; + + /// Value of the coupled density variable const VariableValue & _density_log; - // Material properties - + /// Diffusion coefficient const GenericMaterialProperty & _diff; }; diff --git a/include/auxkernels/DriftDiffusionFluxAux.h b/include/auxkernels/DriftDiffusionFluxAux.h index 52e4e324dac..59d437a3579 100644 --- a/include/auxkernels/DriftDiffusionFluxAux.h +++ b/include/auxkernels/DriftDiffusionFluxAux.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Returns the drift-diffusion flux of the specified species + */ class DriftDiffusionFluxAux : public AuxKernel { public: @@ -23,9 +26,14 @@ class DriftDiffusionFluxAux : public AuxKernel virtual Real computeValue() override; private: + /// Charge sign of the coupled species const Real _sgn; + /// Gradient of the coupled potential const VariableGradient & _grad_potential; + /// Value of the coupled density variable const VariableValue & _u; + /// Gradient of the coupled density variable const VariableGradient & _grad_u; + /// Component of the flux const int _component; }; diff --git a/include/auxkernels/EFieldAdvAux.h b/include/auxkernels/EFieldAdvAux.h index a46335c3575..4c9eba17c2e 100644 --- a/include/auxkernels/EFieldAdvAux.h +++ b/include/auxkernels/EFieldAdvAux.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Returns the electric field driven advective flux of the specified species + */ template class EFieldAdvAuxTempl : public AuxKernel { @@ -23,18 +26,19 @@ class EFieldAdvAuxTempl : public AuxKernel protected: virtual Real computeValue() override; + /// Component of the flux const int _component; + /// Scaling units for the position const Real _r_units; - - // Coupled variables - + /// Coupled density variable MooseVariable & _density_var; + /// Value of the coupled density variable const VariableValue & _density_log; + /// Gradient of coupled potential const VariableGradient & _grad_potential; - - // Material properties - + /// Mobility coefficient const GenericMaterialProperty & _mu; + /// Charge sign of the coupled species const MaterialProperty & _sgn; }; diff --git a/include/auxkernels/Efield.h b/include/auxkernels/Efield.h index 4ba26a5c0ff..5886a8aeb82 100644 --- a/include/auxkernels/Efield.h +++ b/include/auxkernels/Efield.h @@ -13,7 +13,7 @@ #include "AuxKernel.h" /** - * Constant auxiliary value + * Returns the defined component of the electric field */ class Efield : public AuxKernel { @@ -25,18 +25,16 @@ class Efield : public AuxKernel virtual ~Efield() {} protected: - /** - * AuxKernels MUST override computeValue. computeValue() is called on - * every quadrature point. For Nodal Auxiliary variables those quadrature - * points coincide with the nodes. - */ virtual Real computeValue() override; + /// Component of the electric field int _component; + /// Scaling units for the position Real _r_units; + /// Scaling units for the potential (V or kV) std::string _potential_units; - - /// The gradient of a coupled variable + /// Gradient of a coupled potential const VariableGradient & _grad_potential; + /// Scaling value for the potential Real _voltage_scaling; }; diff --git a/include/auxkernels/ElectronTemperature.h b/include/auxkernels/ElectronTemperature.h index 6095da4e61e..b22356c9bc7 100644 --- a/include/auxkernels/ElectronTemperature.h +++ b/include/auxkernels/ElectronTemperature.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Returns the electron temperature + */ class ElectronTemperature : public AuxKernel { public: @@ -24,6 +27,8 @@ class ElectronTemperature : public AuxKernel protected: virtual Real computeValue() override; + /// Coupled electron density const VariableValue & _electron_density; + /// Coupled electron mean energy density const VariableValue & _mean_en; }; diff --git a/include/auxkernels/LinearCombinationAuxKernel.h b/include/auxkernels/LinearCombinationAuxKernel.h index 5b1b833674e..1996861e6ac 100644 --- a/include/auxkernels/LinearCombinationAuxKernel.h +++ b/include/auxkernels/LinearCombinationAuxKernel.h @@ -22,9 +22,12 @@ class LinearCombinationAuxKernel : public AuxKernel virtual Real computeValue() override; protected: + /// Weighting term for each coupled variable const std::vector _weights; + /// Number of coupled variables const unsigned int _num_vars; + /// A bias term to shift the wieghted sum const Real _bias; - std::vector _vars; + /// Value of coupled variables std::vector _var_vals; }; diff --git a/include/auxkernels/Position.h b/include/auxkernels/Position.h index af9292580a5..3d6cf5e91b6 100644 --- a/include/auxkernels/Position.h +++ b/include/auxkernels/Position.h @@ -13,15 +13,14 @@ #include "AuxKernel.h" /** - * Function auxiliary value + * Produces an elemental auxiliary variable useful for plotting against other + * elemental auxiliary variables. Mesh points automatically output by Zapdos only work + * for plotting nodal variables. Since almost all auxiliary variables are elemental, this + * AuxKernel is very important. */ class Position : public AuxKernel { public: - /** - * Factory constructor, takes parameters so that all derived classes can be built using the same - * constructor. - */ Position(const InputParameters & parameters); static InputParameters validParams(); @@ -29,7 +28,9 @@ class Position : public AuxKernel virtual ~Position() {} protected: + /// Component of the position int _component; + /// Scaling units for the position Real _r_units; virtual Real computeValue() override; diff --git a/include/auxkernels/PowerDep.h b/include/auxkernels/PowerDep.h index 6262763d15c..c19a2e4fc38 100644 --- a/include/auxkernels/PowerDep.h +++ b/include/auxkernels/PowerDep.h @@ -24,18 +24,30 @@ class PowerDepTempl : public AuxKernel virtual Real computeValue() override; protected: + /// Scaling units for the position Real _r_units; + /// Coupled density variable MooseVariable & _density_var; + /// Value of the coupled density variable const VariableValue & _density_log; + /// Gradient of the coupled density variable const VariableGradient & _grad_density_log; + /// Gradient of coupled potential const VariableGradient & _grad_potential; + /// Mobility coefficient const GenericMaterialProperty & _mu; + /// Charge sign of the coupled species const MaterialProperty & _sgn; + /// Diffusion coefficient const GenericMaterialProperty & _diff; + /// True if an artifical diffusion term is needed bool _art_diff; + /// Scaling units for the potential (V or kV) std::string _potential_units; + /// Term for the current RealVectorValue _current; + /// Scaling value for the potential Real _voltage_scaling; }; diff --git a/include/auxkernels/ProcRate.h b/include/auxkernels/ProcRate.h index a68612a7ccf..fc8e17c4206 100644 --- a/include/auxkernels/ProcRate.h +++ b/include/auxkernels/ProcRate.h @@ -12,6 +12,10 @@ #include "AuxKernel.h" +/** + * Reaction rate for electron impact collisions in units of #/m^{3}s. User can pass + * choice of elastic, excitation, or ionization Townsend coefficients + */ template class ProcRateTempl : public AuxKernel { @@ -23,16 +27,23 @@ class ProcRateTempl : public AuxKernel virtual Real computeValue() override; protected: + /// The scaling units for the position Real _r_units; - + /// Electron density const VariableValue & _em; + /// Gradient of the electron density const VariableGradient & _grad_em; + /// Gradient of the coupled potential const VariableGradient & _grad_potential; + /// Electron mobility coefficient const GenericMaterialProperty & _muem; + /// Charge sign of electrons const MaterialProperty & _sgnem; + /// Electron diffusion coefficient const GenericMaterialProperty & _diffem; + /// Townsend coefficient const GenericMaterialProperty & _alpha; - + /// Term for the electron current RealVectorValue _em_current; }; diff --git a/include/auxkernels/ProcRateForRateCoeff.h b/include/auxkernels/ProcRateForRateCoeff.h index b3067b344ff..7148dc80491 100644 --- a/include/auxkernels/ProcRateForRateCoeff.h +++ b/include/auxkernels/ProcRateForRateCoeff.h @@ -12,6 +12,10 @@ #include "AuxKernel.h" +/** + * Reaction rate for two body collisions in units of #/m^{3}s. User can pass + * choice of elastic, excitation, or ionization reaction rate coefficients + */ template class ProcRateForRateCoeffTempl : public AuxKernel { @@ -23,8 +27,11 @@ class ProcRateForRateCoeffTempl : public AuxKernel virtual Real computeValue() override; protected: + /// First body variable const VariableValue & _v; + /// Second body variable const VariableValue & _w; + /// Reaction rate coefficient const GenericMaterialProperty & _reaction_coeff; }; diff --git a/include/auxkernels/ProcRateForRateCoeffThreeBody.h b/include/auxkernels/ProcRateForRateCoeffThreeBody.h index 930d18f8806..d7b849a2357 100644 --- a/include/auxkernels/ProcRateForRateCoeffThreeBody.h +++ b/include/auxkernels/ProcRateForRateCoeffThreeBody.h @@ -12,6 +12,10 @@ #include "AuxKernel.h" +/** + * Reaction rate for two body collisions in units of #/m^{3}s. User can pass + * choice of elastic, excitation, or ionization reaction rate coefficients + */ template class ProcRateForRateCoeffThreeBodyTempl : public AuxKernel { @@ -23,9 +27,14 @@ class ProcRateForRateCoeffThreeBodyTempl : public AuxKernel virtual Real computeValue() override; protected: + + /// First body variable const VariableValue & _v; + /// Second body variable const VariableValue & _w; + /// Third body variable const VariableValue & _x; + /// Reaction rate coefficient const GenericMaterialProperty & _reaction_coeff; }; diff --git a/include/auxkernels/Sigma.h b/include/auxkernels/Sigma.h index 1734fb02d08..396f0c28e85 100644 --- a/include/auxkernels/Sigma.h +++ b/include/auxkernels/Sigma.h @@ -12,6 +12,10 @@ #include "AuxKernel.h" +/** + * Calculates the surface charge due to a simplified version of the ion flux + * to a boundary + */ class Sigma : public AuxKernel { public: @@ -23,7 +27,10 @@ class Sigma : public AuxKernel virtual Real computeValue() override; protected: + /// Variable value during previous time step const VariableValue & _u_old; + /// Coupled ion density const VariableValue & _n; + /// Gradient of the coupled potential const VariableGradient & _grad_potential; }; diff --git a/include/auxkernels/TM0CylindricalErAux.h b/include/auxkernels/TM0CylindricalErAux.h index e9b8ed403bc..c7afb64ec2e 100644 --- a/include/auxkernels/TM0CylindricalErAux.h +++ b/include/auxkernels/TM0CylindricalErAux.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Calculates the radial E-field for an axisymmetric TM_0 wave + */ class TM0CylindricalErAux : public AuxKernel { public: @@ -23,9 +26,12 @@ class TM0CylindricalErAux : public AuxKernel virtual Real computeValue() override; private: + /// Gradient of the azimuthal component of the magnetic field const VariableGradient & _grad_Hphi; - + /// Angular frequency of the wave Real _omega; + /// Relative permittivity of the medium Real _eps_r; + /// Permittivity of free space Real _eps0; }; diff --git a/include/auxkernels/TM0CylindricalEzAux.h b/include/auxkernels/TM0CylindricalEzAux.h index b3b03144689..2b1460dc60b 100644 --- a/include/auxkernels/TM0CylindricalEzAux.h +++ b/include/auxkernels/TM0CylindricalEzAux.h @@ -12,6 +12,9 @@ #include "AuxKernel.h" +/** + * Calculates the axial E-field for an axisymmetric TM_0 wave + */ class TM0CylindricalEzAux : public AuxKernel { public: @@ -23,10 +26,14 @@ class TM0CylindricalEzAux : public AuxKernel virtual Real computeValue() override; private: + /// Gradient of the azimuthal component of the magnetic field const VariableGradient & _grad_Hphi; + /// Azimuthal component of the magnetic field const VariableValue & _Hphi; - + /// Angular frequency of the wave Real _omega; + /// Relative permittivity of the medium Real _eps_r; + /// Permittivity of free space Real _eps0; }; diff --git a/include/auxkernels/TotalFlux.h b/include/auxkernels/TotalFlux.h index 8120cdd3222..a5bf757de47 100644 --- a/include/auxkernels/TotalFlux.h +++ b/include/auxkernels/TotalFlux.h @@ -23,13 +23,21 @@ class TotalFluxTempl : public AuxKernel virtual Real computeValue() override; protected: + /// Component of the flux const int _component; + /// Coupled density variable const MooseVariable & _density_var; + /// Value of the coupled density variable const VariableValue & _density_log; + /// Gradient of the coupled density variable const VariableGradient & _grad_density_log; + /// Gradient of coupled potential const VariableGradient & _grad_potential; + /// Mobility coefficient const GenericMaterialProperty & _mu; + /// Charge sign of the coupled species const MaterialProperty & _sgn; + /// Diffusion coefficient const GenericMaterialProperty & _diff; }; diff --git a/include/bcs/CircuitDirichletPotential.h b/include/bcs/CircuitDirichletPotential.h index e3cb58e3d1a..86561839855 100644 --- a/include/bcs/CircuitDirichletPotential.h +++ b/include/bcs/CircuitDirichletPotential.h @@ -13,9 +13,8 @@ #include "ADNodalBC.h" /** - * Boundary condition of a Dirichlet type - * - * Sets the value at the node to the value of a Postprocessor + * Dirichlet circuit boundary condition for potential + * (The current is given through an UserObject) */ class CircuitDirichletPotential : public ADNodalBC { @@ -27,18 +26,29 @@ class CircuitDirichletPotential : public ADNodalBC protected: virtual ADReal computeQpResidual() override; - /// The value for this BC + /// Current provided as a postprocessor const PostprocessorValue & _current; + /// Potential applied to the surface const Function & _surface_potential; + /// Is the surface a anode or cathode const std::string _surface; + /// The ballast resistance const Real _resist; + /// Elementary charge being 1.6e-19 C const Real _coulomb_charge; + /// Avogadro's number const Real _N_A; + /// Scaling units for the potential (V or kV) const std::string _potential_units; + /// Scaling units for the position const Real _r_units; + /// True if molar density is used const bool _convert_moles; + /// Area of surface const Real _A; + /// Sign based on anode or cathode surface Real _current_sign; + /// Scaling value for the potential Real _voltage_scaling; }; diff --git a/include/bcs/DCIonBC.h b/include/bcs/DCIonBC.h index 3ff7faa11a5..a17a3a06403 100644 --- a/include/bcs/DCIonBC.h +++ b/include/bcs/DCIonBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Electric field driven outflow boundary condition + */ class DCIonBC : public ADIntegratedBC { public: @@ -22,14 +25,14 @@ class DCIonBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; - - /// Coupled variables + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; - - /// Material properties + /// 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/DriftDiffusionDoNothingBC.h b/include/bcs/DriftDiffusionDoNothingBC.h index 96694f06a6a..274dfe469cd 100644 --- a/include/bcs/DriftDiffusionDoNothingBC.h +++ b/include/bcs/DriftDiffusionDoNothingBC.h @@ -12,8 +12,10 @@ #include "ADIntegratedBC.h" -// This diffusion kernel should only be used with species whose values are in the logarithmic form. - +/** + * Boundary condition where the flux at the boundary is equal to the + * bulk dift-diffusion equation + */ class DriftDiffusionDoNothingBC : public ADIntegratedBC { public: @@ -24,16 +26,22 @@ class DriftDiffusionDoNothingBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; - + /// Mobility coefficient const ADMaterialProperty & _mu; + /// Charge sign of the species const MaterialProperty & _sign; + /// User input for the a custom mobility coefficient ADMaterialProperty _user_mu; + /// User input for the a custom charge sign of the species MaterialProperty _user_sign; - + /// Diffusion coefficient const ADMaterialProperty & _diffusivity; + /// User input for the a custom diffusion coefficient ADMaterialProperty _user_diff; - + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// The user-defined 1-D electric field with a sign correction ADVariableGradient _minus_e_field; }; diff --git a/include/bcs/EconomouDielectricBC.h b/include/bcs/EconomouDielectricBC.h index 4cb911dd28e..0cee639b862 100644 --- a/include/bcs/EconomouDielectricBC.h +++ b/include/bcs/EconomouDielectricBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Dielectric boundary condition + */ class EconomouDielectricBC : public ADIntegratedBC { public: @@ -22,34 +25,57 @@ class EconomouDielectricBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Electron mean energy density value const ADVariableValue & _mean_en; + /// Electron density value const ADVariableValue & _em; + /// Ion density variables std::vector _ip_var; + /// Ion density values std::vector _ip; + /// Effective ion potential, if needed std::vector _potential_ion; + /// Gradient of effective ion potential, if needed std::vector _grad_potential_ion; + /// Time derivative of the gradient of the variable const VariableGradient & _grad_u_dot; // TODO: fix this up + /// Time derivative of the variable const ADVariableValue & _u_dot; + /// Elementary charge const MaterialProperty & _e; + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Mass of electrons const MaterialProperty & _massem; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _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 total ion flux ADRealVectorValue _ion_flux; + /// Value of a single ion flux ADRealVectorValue _temp_flux; + /// Electron thermal velocity ADReal _v_thermal; + /// Electron flux ADRealVectorValue _em_flux; + /// Scaling units for the potential (V or kV) std::string _potential_units; - + /// Scaling value for the potential Real _voltage_scaling; - + /// Number of ions defined const unsigned int _num_ions; }; diff --git a/include/bcs/ElectronAdvectionDoNothingBC.h b/include/bcs/ElectronAdvectionDoNothingBC.h index 22037e12d20..96ecd0af073 100644 --- a/include/bcs/ElectronAdvectionDoNothingBC.h +++ b/include/bcs/ElectronAdvectionDoNothingBC.h @@ -12,6 +12,10 @@ #include "ADIntegratedBC.h" +/** + * Boundary condition where the election advection flux at the boundary + * is equal to the bulk election advection equation + */ class ElectronAdvectionDoNothingBC : public ADIntegratedBC { public: @@ -22,14 +26,15 @@ class ElectronAdvectionDoNothingBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _position_units; - // Material properties - + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Charge sign of electrons const MaterialProperty & _sign; private: - // Coupled variables + // Gradient of the coupled potential const ADVariableGradient & _grad_potential; }; diff --git a/include/bcs/ElectronDiffusionDoNothingBC.h b/include/bcs/ElectronDiffusionDoNothingBC.h index ee323321c81..65f4505006b 100644 --- a/include/bcs/ElectronDiffusionDoNothingBC.h +++ b/include/bcs/ElectronDiffusionDoNothingBC.h @@ -12,8 +12,10 @@ #include "ADIntegratedBC.h" -// This diffusion kernel should only be used with species whose values are in the logarithmic form. - +/** + * Boundary condition where the election diffusion flux at the boundary + * is equal to the bulk election diffusion equation + */ class ElectronDiffusionDoNothingBC : public ADIntegratedBC { public: @@ -24,7 +26,8 @@ class ElectronDiffusionDoNothingBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; - + /// Diffusion coefficient electrons const ADMaterialProperty & _diffem; }; diff --git a/include/bcs/ElectronTemperatureDirichletBC.h b/include/bcs/ElectronTemperatureDirichletBC.h index 1e289f02839..9a81eda7cd4 100644 --- a/include/bcs/ElectronTemperatureDirichletBC.h +++ b/include/bcs/ElectronTemperatureDirichletBC.h @@ -13,7 +13,7 @@ #include "ADNodalBC.h" /** - * Implements a simple coupled boundary condition where u=v on the boundary. + * Electron temperature boundary condition */ class ElectronTemperatureDirichletBC : public ADNodalBC { @@ -25,7 +25,10 @@ class ElectronTemperatureDirichletBC : public ADNodalBC protected: virtual ADReal computeQpResidual() override; + /// Electron density const ADVariableValue & _em; + /// Value of electron temperature const Real _value; + /// Penalty value const Real _penalty_value; }; diff --git a/include/bcs/FieldEmissionBC.h b/include/bcs/FieldEmissionBC.h index 6b480d68e4e..88ca82e8193 100644 --- a/include/bcs/FieldEmissionBC.h +++ b/include/bcs/FieldEmissionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * The electron flux boundary condition due to field emission + */ class FieldEmissionBC : public ADIntegratedBC { public: @@ -22,45 +25,74 @@ class FieldEmissionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real _r; + /// Number of ions defined const unsigned int _num_ions; - // Coupled variables - + + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Ion density variables std::vector _ip_var; + /// Ion density values std::vector _ip; + /// Gradient of ion density values std::vector _grad_ip; + + /// Mobility coefficient of the electrons const ADMaterialProperty & _muem; + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Diffusion coefficient of the ions std::vector *> _Dip; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; + /// Work function of material const MaterialProperty & _work_function; + /// Field enhancement factor of surface const MaterialProperty & _field_enhancement; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Value of total ion flux ADRealVectorValue _ion_flux; + /// Time constant for ramping the boundary condition const Real _tau; + /// If true use "_tau" to ramp the boundary condition bool _relax; + /// Scaling units for the potential (V or kV) const std::string _potential_units; - - // Unique variables - + /// Scaling value for the potential Real _voltage_scaling; + + /// First constant of simplified standard Fowler–Nordheim-type equation Real FE_a; + /// Second constant of simplified standard Fowler–Nordheim-type equation Real FE_b; + /// Third constant of simplified standard Fowler–Nordheim-type equation Real FE_c; - + /// correction factor for simplified standard Fowler–Nordheim-type equation ADReal v; + /// Scaled barrier field ADReal f; + /// Current density from field emission ADReal jFE; + /// Current density from secondary electrons ADReal jSE; + /// Local field ADReal F; + /// Ramping coefficient Real _relaxation_Expr; }; diff --git a/include/bcs/HagelaarElectronAdvectionBC.h b/include/bcs/HagelaarElectronAdvectionBC.h index 109f7f021bd..f03a6a1a006 100644 --- a/include/bcs/HagelaarElectronAdvectionBC.h +++ b/include/bcs/HagelaarElectronAdvectionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic advective electron boundary condition + */ class HagelaarElectronAdvectionBC : public ADIntegratedBC { public: @@ -22,12 +25,16 @@ class HagelaarElectronAdvectionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real _r; - // Coupled variables + // Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; }; diff --git a/include/bcs/HagelaarElectronBC.h b/include/bcs/HagelaarElectronBC.h index 36970c17e65..9720292abd3 100644 --- a/include/bcs/HagelaarElectronBC.h +++ b/include/bcs/HagelaarElectronBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic electron boundary condition + */ class HagelaarElectronBC : public ADIntegratedBC { public: @@ -22,18 +25,25 @@ class HagelaarElectronBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real & _r; - /// Coupled variables + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Electron mean energy density const ADVariableValue & _mean_en; - /// Material properties + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Electron thermal velocity ADReal _v_thermal; }; diff --git a/include/bcs/HagelaarEnergyAdvectionBC.h b/include/bcs/HagelaarEnergyAdvectionBC.h index 6acb16c7a5d..fd29bfa6072 100644 --- a/include/bcs/HagelaarEnergyAdvectionBC.h +++ b/include/bcs/HagelaarEnergyAdvectionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic advective electron energy boundary condition + */ class HagelaarEnergyAdvectionBC : public ADIntegratedBC { public: @@ -22,27 +25,45 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real _r; + /// Number of ions defined const unsigned int _num_ions; - // Coupled variables + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Ion density variables std::vector _ip_var; + /// Ion density values std::vector _ip; + /// Gradient of ion density values std::vector _grad_ip; + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Diffusion coefficient of the ions std::vector *> _Dip; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; + /// Energy of the secondary electrons const Real _se_energy; + /// Mobility coefficient of the electron mean energy density const ADMaterialProperty & _mumean_en; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Ion flux ADRealVectorValue _ion_flux; + /// Electron thermal velocity Real _v_thermal; - Real _n_gamma; + /// Gamma electron density (electrons emitted by the surface) + Real _n_gamma; /// TODO: currently '_n_gamma' is fixed at 0 + /// Total flux form secondary electrons ADReal _bc_val; }; diff --git a/include/bcs/HagelaarEnergyBC.h b/include/bcs/HagelaarEnergyBC.h index 62945a22db5..04c0db5c8bb 100644 --- a/include/bcs/HagelaarEnergyBC.h +++ b/include/bcs/HagelaarEnergyBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic electron mean energy boundary condition + */ class HagelaarEnergyBC : public ADIntegratedBC { public: @@ -22,16 +25,24 @@ class HagelaarEnergyBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real & _r; + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; - + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; + /// Mobility coefficient of electron mean energy density const ADMaterialProperty & _mumean_en; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Electron thermal velocity ADReal _v_thermal; }; diff --git a/include/bcs/HagelaarIonAdvectionBC.h b/include/bcs/HagelaarIonAdvectionBC.h index 27089df06cd..cd03c13ebfc 100644 --- a/include/bcs/HagelaarIonAdvectionBC.h +++ b/include/bcs/HagelaarIonAdvectionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic advective ion boundary condition + */ class HagelaarIonAdvectionBC : public ADIntegratedBC { public: @@ -22,16 +25,20 @@ class HagelaarIonAdvectionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real & _r; - // Coupled variables - + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Mobility coefficient of ions const ADMaterialProperty & _mu; + /// Elementary charge const MaterialProperty & _e; + /// Charge sign of the ions 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/HagelaarIonDiffusionBC.h b/include/bcs/HagelaarIonDiffusionBC.h index 7aef056361c..57a454153ed 100644 --- a/include/bcs/HagelaarIonDiffusionBC.h +++ b/include/bcs/HagelaarIonDiffusionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Ion thermal diffusion boundary condition + */ class HagelaarIonDiffusionBC : public ADIntegratedBC { public: @@ -22,13 +25,18 @@ class HagelaarIonDiffusionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real & _r; - + /// Boltzmann constant const MaterialProperty & _kb; + /// Ion temperature const ADMaterialProperty & _T; + /// Mass of ions const MaterialProperty & _mass; - + /// Ion thermal velocity ADReal _v_thermal; + /// Custom ion thermal velocity, if needed const Real & _user_velocity; }; diff --git a/include/bcs/LogDensityDirichletBC.h b/include/bcs/LogDensityDirichletBC.h index 7f9702d3ac4..3473a12aff3 100644 --- a/include/bcs/LogDensityDirichletBC.h +++ b/include/bcs/LogDensityDirichletBC.h @@ -13,7 +13,8 @@ #include "ADNodalBC.h" /** - * Implements a simple coupled boundary condition where u=v on the boundary. + * Density Dirichlet boundary condition + * (Densities must be in log form and in moles/m^3) */ class LogDensityDirichletBC : public ADNodalBC { @@ -25,5 +26,6 @@ class LogDensityDirichletBC : public ADNodalBC protected: virtual ADReal computeQpResidual() override; + /// Value of the density on the boundary (in units of #/m^3) const Real _value; }; diff --git a/include/bcs/LymberopoulosElectronBC.h b/include/bcs/LymberopoulosElectronBC.h index 51a4cfa2fdf..1eeeba79347 100644 --- a/include/bcs/LymberopoulosElectronBC.h +++ b/include/bcs/LymberopoulosElectronBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Simpified kinetic electron boundary condition + */ class LymberopoulosElectronBC : public ADIntegratedBC { public: @@ -22,18 +25,26 @@ class LymberopoulosElectronBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Recombination coefficient (in units of m/s) const Real _ks; + /// secondary electron coefficients const std::vector _gamma; + /// Number of ions defined const unsigned int _num_ions; // Coupled variables const ADVariableGradient & _grad_potential; + /// Ion density variables std::vector _ion_var; + /// Ion density values std::vector _ion; + /// Charge sign of the ions std::vector *> _sgnion; + /// Mobility coefficient of the ions std::vector *> _muion; - + /// Ion flux ADRealVectorValue _ion_flux; }; diff --git a/include/bcs/LymberopoulosIonBC.h b/include/bcs/LymberopoulosIonBC.h index fe226823c93..cce626b1c28 100644 --- a/include/bcs/LymberopoulosIonBC.h +++ b/include/bcs/LymberopoulosIonBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Simpified kinetic ion boundary condition + */ class LymberopoulosIonBC : public ADIntegratedBC { public: @@ -22,10 +25,12 @@ class LymberopoulosIonBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; - // Coupled variables + // Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Mobility coefficient const ADMaterialProperty & _mu; }; diff --git a/include/bcs/MatchedValueLogBC.h b/include/bcs/MatchedValueLogBC.h index 12ee11706c0..8950e3c17cb 100644 --- a/include/bcs/MatchedValueLogBC.h +++ b/include/bcs/MatchedValueLogBC.h @@ -13,7 +13,8 @@ #include "ADNodalBC.h" /** - * Implements a simple coupled boundary condition where u=v on the boundary. + * Henry’s Law like thermodynamic boundary condition for specifying a specie + * concentration ratio at the gas-liquid interface */ class MatchedValueLogBC : public ADNodalBC { @@ -25,7 +26,8 @@ class MatchedValueLogBC : public ADNodalBC protected: virtual ADReal computeQpResidual() override; + /// Couple variable to match at the boundary const ADVariableValue & _v; - + /// Ratio of liquid phase density to gas phase density const Real _H; }; diff --git a/include/bcs/NeumannCircuitVoltageMoles_KV.h b/include/bcs/NeumannCircuitVoltageMoles_KV.h index 961da52a1df..a8ac9360bce 100644 --- a/include/bcs/NeumannCircuitVoltageMoles_KV.h +++ b/include/bcs/NeumannCircuitVoltageMoles_KV.h @@ -13,6 +13,9 @@ #include "ADIntegratedBC.h" #include "ProvideMobility.h" +/** + * A Neumann boundary condition based on Kirchhoff's law of voltage + */ class NeumannCircuitVoltageMoles_KV : public ADIntegratedBC { public: @@ -23,46 +26,75 @@ class NeumannCircuitVoltageMoles_KV : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; - /// The function being used for setting the value + /// Scaling units for the position const Real _r_units; + /// Voltage of the applied circuit const Function & _V_bat; + /// The ProvideMobility UserObject that provides the Coulomb charge, electrode area, and ballast resistance const ProvideMobility & _data; + /// Ion density values std::vector _ip; + /// Gradient of ion density values std::vector _grad_ip; - std::vector _ip_id; + /// Electron mean energy density const ADVariableValue & _mean_en; + /// Electron density const ADVariableValue & _em; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Permittivity of free space const MaterialProperty & _eps; + /// Avogadro's number const MaterialProperty & _N_A; + /// Charge sign of the ions std::vector *> _sgnip; + /// Diffusion coefficient of the ions std::vector *> _Dip; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Elementary charge const MaterialProperty & _e; + /// Mass of electrons const MaterialProperty & _massem; + /// Temperature of ions std::vector *> _T_heavy; + /// Boltzmann constant const MaterialProperty & _kb; + /// Mass of ions std::vector *> _mass; + /// Scaling units for the potential (V or kV) const std::string & _potential_units; + /// Reflection coefficient const Real & _r; + /// Ion flux ADRealVectorValue _ion_flux; + /// Gamma electron density (electrons emitted by the surface) ADReal _n_gamma; + /// Electron mean energy (in units of eV) ADReal _actual_mean_en; + /// Electron thermal velocity ADReal _v_e_th; + /// Ion thermal velocity ADReal _v_i_th; + /// Equal to 1 when the electron drift velocity is direct towards the wall and zero otherwise Real _a; + /// Equal to 1 when the ion drift velocity is direct towards the wall and zero otherwise Real _b; - ADReal _numerator; - ADReal _denominator; + /// Scaling value for the potential Real _voltage_scaling; + /// Ion thermal diffusion flux ADReal _ion_drift; + /// Ion drift velocity for secondary electron production ADReal _secondary_ion; + /// Number of ions defined const unsigned int _num_ions; }; diff --git a/include/bcs/PenaltyCircuitPotential.h b/include/bcs/PenaltyCircuitPotential.h index 5512f03d82a..f1ba9fe9795 100644 --- a/include/bcs/PenaltyCircuitPotential.h +++ b/include/bcs/PenaltyCircuitPotential.h @@ -15,9 +15,7 @@ #include "ProvideMobility.h" /** - * Boundary condition of a Dirichlet type - * - * Sets the value at the node to the value of a Postprocessor + * Circuit boundary condition for potential multiplied by a penalty term */ class PenaltyCircuitPotential : public NonlocalIntegratedBC { @@ -33,32 +31,58 @@ class PenaltyCircuitPotential : public NonlocalIntegratedBC virtual Real computeQpNonlocalJacobian(dof_id_type dof_index) override; virtual Real computeQpNonlocalOffDiagJacobian(unsigned int jvar, dof_id_type dof_index) override; + /// UserObject that provides the current const CurrentDensityShapeSideUserObject & _current_uo; + /// Current on the surface const Real & _current; + /// Jacobian of the current from the UserObject const std::vector & _current_jac; + /// Applied potential on the surface const Real _surface_potential; + /// Is the surface a anode or cathode const std::string _surface; + /// Sign based on anode or cathode surface Real _current_sign; + /// Penalty value const Real _p; + /// The ProvideMobility UserObject that provides the Coulomb charge, electrode area, and ballast resistance const ProvideMobility & _data; + /// Degree of freedoms for the variable const std::vector & _var_dofs; + /// Electron variable unsigned int _em_id; + /// Degree of freedoms for electron variable const std::vector & _em_dofs; + /// Electron mean energy density variable unsigned int _mean_en_id; + /// Degree of freedoms for electron mean energy density variable const std::vector & _mean_en_dofs; + /// Scaling units for the position const Real _r_units; + /// Ballast resistance const Real _resistance; + /// Number of ions defined const unsigned int _num_ions; + /// Area of surface, for 1D simulations Real _area; + /// True for 1D simulations bool _use_area; + /// Scaling value for the potential Real _voltage_scaling; + /// Term for current * resistance Real curr_times_resist; + /// Term for derivative of (current * resistance) wrt potential Real d_curr_times_resist_d_potential; + /// Term for derivative of (current * resistance) wrt electron density Real d_curr_times_resist_d_em; + /// Term for derivative of (current * resistance) wrt ion density Real d_curr_times_resist_d_ip; + /// Term for derivative of (current * resistance) wrt electron mean energy density Real d_curr_times_resist_d_mean_en; + /// Term for derivative of (current * resistance) wrt a coupled variable Real d_curr_times_resist_d_coupled_var; - + /// Ion variable std::vector _ip_ids; + /// Degree of freedoms for ion variable std::vector *> _ip_dofs; }; diff --git a/include/bcs/PotentialDriftOutflowBC.h b/include/bcs/PotentialDriftOutflowBC.h index 6301a62ae6d..a6433839da4 100644 --- a/include/bcs/PotentialDriftOutflowBC.h +++ b/include/bcs/PotentialDriftOutflowBC.h @@ -12,8 +12,9 @@ #include "ADIntegratedBC.h" -// This diffusion kernel should only be used with species whose values are in the logarithmic form. - +/** + * The drift flux boundary conditions + */ class PotentialDriftOutflowBC : public ADIntegratedBC { public: @@ -24,6 +25,8 @@ class PotentialDriftOutflowBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Charge sign of the species const int _charge_sign; + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; }; diff --git a/include/bcs/SakiyamaElectronDiffusionBC.h b/include/bcs/SakiyamaElectronDiffusionBC.h index e237f23d334..837e150378e 100644 --- a/include/bcs/SakiyamaElectronDiffusionBC.h +++ b/include/bcs/SakiyamaElectronDiffusionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic electron boundary condition + */ class SakiyamaElectronDiffusionBC : public ADIntegratedBC { public: @@ -22,13 +25,14 @@ class SakiyamaElectronDiffusionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; - - // Coupled variables + /// Electron mean energy density const ADVariableValue & _mean_en; - + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; - + /// Electron thermal velocity ADReal _v_thermal; }; diff --git a/include/bcs/SakiyamaEnergyDiffusionBC.h b/include/bcs/SakiyamaEnergyDiffusionBC.h index a6b1842e50e..b6584904103 100644 --- a/include/bcs/SakiyamaEnergyDiffusionBC.h +++ b/include/bcs/SakiyamaEnergyDiffusionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic advective electron energy boundary condition + */ class SakiyamaEnergyDiffusionBC : public ADIntegratedBC { public: @@ -22,13 +25,14 @@ class SakiyamaEnergyDiffusionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; - - // Coupled variables + /// Electron density const ADVariableValue & _em; - + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; - + /// Electron thermal velocity ADReal _v_thermal; }; diff --git a/include/bcs/SakiyamaEnergySecondaryElectronBC.h b/include/bcs/SakiyamaEnergySecondaryElectronBC.h index cb36433d561..35c7bdf19cb 100644 --- a/include/bcs/SakiyamaEnergySecondaryElectronBC.h +++ b/include/bcs/SakiyamaEnergySecondaryElectronBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic secondary electron for mean electron energy boundary condition + */ class SakiyamaEnergySecondaryElectronBC : public ADIntegratedBC { public: @@ -22,23 +25,36 @@ class SakiyamaEnergySecondaryElectronBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// If true, secondary electron energy is equal to electron energy const bool Te_dependent; + /// Number of ions defined const unsigned int _num_ions; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; - // Coupled variables + + // Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// 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; - + /// Custom secondary electron energy const 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; }; diff --git a/include/bcs/SakiyamaIonAdvectionBC.h b/include/bcs/SakiyamaIonAdvectionBC.h index e2bde6d3cc5..3cfd5c9a72f 100644 --- a/include/bcs/SakiyamaIonAdvectionBC.h +++ b/include/bcs/SakiyamaIonAdvectionBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic advective ion boundary condition + */ class SakiyamaIonAdvectionBC : public ADIntegratedBC { public: @@ -22,14 +25,16 @@ class SakiyamaIonAdvectionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; - // Coupled variables - + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// 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..9318e1b8123 100644 --- a/include/bcs/SakiyamaSecondaryElectronBC.h +++ b/include/bcs/SakiyamaSecondaryElectronBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic secondary electron boundary condition + */ class SakiyamaSecondaryElectronBC : public ADIntegratedBC { public: @@ -22,18 +25,24 @@ class SakiyamaSecondaryElectronBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Number of ions defined const unsigned int _num_ions; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; - // Coupled variables - + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// 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; - + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; }; diff --git a/include/bcs/SchottkyEmissionBC.h b/include/bcs/SchottkyEmissionBC.h index ece6d050b9f..603fe4ecbb6 100644 --- a/include/bcs/SchottkyEmissionBC.h +++ b/include/bcs/SchottkyEmissionBC.h @@ -22,46 +22,77 @@ class SchottkyEmissionBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient const Real _r; + /// Number of ions defined const unsigned int _num_ions; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; - // Coupled variables + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Electron mean energy density const ADVariableValue & _mean_en; + /// Ion density variables std::vector _ip_var; + /// Ion density values std::vector _ip; + /// Gradient of ion density values std::vector _grad_ip; + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Diffusion coefficient of the ions std::vector *> _Dip; + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; + /// Work function of material const MaterialProperty & _work_function; + /// Field enhancement factor of surface const MaterialProperty & _field_enhancement; + /// Richardson coefficient const MaterialProperty & _Richardson_coefficient; + /// Temperature of surface const MaterialProperty & _cathode_temperature; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Electron thermal velocity ADReal _v_thermal; + /// Ion flux ADRealVectorValue _ion_flux; + /// Time constant for ramping the boundary condition const Real _tau; + /// If true use "_tau" to ramp the boundary condition bool _relax; - std::string _potential_units; - - // Unique variables + /// Scaling units for the potential (V or kV) + std::string _potential_units; + /// Scaling value for the potential Real _voltage_scaling; + + /// Term for 'dPhi' divided by the local field squared Real _dPhi_over_F; + /// The different in the work funtion due to the electric field ADReal dPhi; + /// Boltzmann constant Real kB; + /// Current density from Schottky emission ADReal jRD; + /// Current density from secondary electrons ADReal jSE; + /// Local field ADReal F; + /// Ramping coefficient Real _relaxation_Expr; }; diff --git a/include/bcs/SecondaryElectronBC.h b/include/bcs/SecondaryElectronBC.h index 66dde8de5fe..8ea7cd3e1ee 100644 --- a/include/bcs/SecondaryElectronBC.h +++ b/include/bcs/SecondaryElectronBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic secondary electron boundary condition + */ class SecondaryElectronBC : public ADIntegratedBC { public: @@ -22,31 +25,53 @@ class SecondaryElectronBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient for electrons const Real & _r; + /// Reflection coefficient for ions const Real & _r_ion; + /// Boltzmann constant const MaterialProperty & _kb; + /// Number of ions defined const unsigned int _num_ions; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; - // Coupled variables + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Electron mean energy density const ADVariableValue & _mean_en; + /// Ion density values std::vector _ip; + /// Gradient of ion density values std::vector _grad_ip; + /// Mobility coefficient of the electrons const ADMaterialProperty & _muem; + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Temperature of ions std::vector *> _Tip; + /// Mass of ions std::vector *> _massip; + /// Equal to 1 when the electron drift velocity is direct towards the wall and zero otherwise Real _a; + /// Equal to 1 when the ion drift velocity is direct towards the wall and zero otherwise Real _b; + /// Electron thermal velocity ADReal _v_thermal; + /// Ion flux ADReal _ion_flux; + /// Gamma electron density (electrons emitted by the surface) ADReal _n_gamma; }; diff --git a/include/bcs/SecondaryElectronEnergyBC.h b/include/bcs/SecondaryElectronEnergyBC.h index c5085ed997e..080516d5335 100644 --- a/include/bcs/SecondaryElectronEnergyBC.h +++ b/include/bcs/SecondaryElectronEnergyBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/** + * Kinetic secondary electron for mean electron energy boundary condition + */ class SecondaryElectronEnergyBC : public ADIntegratedBC { public: @@ -22,34 +25,57 @@ class SecondaryElectronEnergyBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position const Real _r_units; + /// Reflection coefficient for electrons const Real & _r; + /// Reflection coefficient for ions const Real & _r_ion; + /// Boltzmann constant const MaterialProperty & _kb; + /// Number of ions defined const unsigned int _num_ions; + /// Material name of secondary electron coefficients const std::vector _se_coeff_names; + /// Material value of secondary electron coefficient std::vector *> _se_coeff; - // Coupled variables + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; + /// Ion density values std::vector _ip; + /// Gradient of ion density values std::vector _grad_ip; + /// Mobility coefficient of the electrons const ADMaterialProperty & _muem; + /// Mass of electrons const MaterialProperty & _massem; + /// Elementary charge const MaterialProperty & _e; + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Temperature of ions std::vector *> _Tip; + /// Mass of ions std::vector *> _massip; - + /// Secondary electron energy const Real & _se_energy; + /// Mobility coefficient of the electron mean energy density const ADMaterialProperty & _mumean_en; + /// Equal to 1 when the electron drift velocity is direct towards the wall and zero otherwise Real _a; + /// Equal to 1 when the ion drift velocity is direct towards the wall and zero otherwise Real _b; + /// Electron thermal velocity ADReal _v_thermal; + /// Ion flux ADReal _ion_flux; + /// Gamma electron density (electrons emitted by the surface) ADReal _n_gamma; }; diff --git a/include/bcs/TM0AntennaVertBC.h b/include/bcs/TM0AntennaVertBC.h index 720b5662d14..ff65c2f0d7b 100644 --- a/include/bcs/TM0AntennaVertBC.h +++ b/include/bcs/TM0AntennaVertBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/* + * A simple vertical antenna BC of the azimuthal component of the magnetizing field. + */ class TM0AntennaVertBC : public ADIntegratedBC { public: @@ -22,8 +25,12 @@ class TM0AntennaVertBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Angular frequency const Real _omega; + /// Relative permittivity const Real _eps_r; + /// Permittivity of free space const Real _eps0; + /// True if the antenna oscillates in time const bool _time_dependent; }; diff --git a/include/bcs/TM0PECVertBC.h b/include/bcs/TM0PECVertBC.h index f81c7408b8e..6b1a0c63339 100644 --- a/include/bcs/TM0PECVertBC.h +++ b/include/bcs/TM0PECVertBC.h @@ -12,6 +12,9 @@ #include "ADIntegratedBC.h" +/* + * A perfect electric conductor BC of the azimuthal component of the magnetizing field. + */ class TM0PECVertBC : public ADIntegratedBC { public: diff --git a/include/constraints/ArbitrarilyTiedValueConstraint.h b/include/constraints/ArbitrarilyTiedValueConstraint.h index 7dd0dad969c..88565d126d7 100644 --- a/include/constraints/ArbitrarilyTiedValueConstraint.h +++ b/include/constraints/ArbitrarilyTiedValueConstraint.h @@ -33,7 +33,11 @@ class ArbitrarilyTiedValueConstraint : public NodeFaceConstraint virtual Real computeQpJacobian(Moose::ConstraintJacobianType type); protected: + + /// Scaling factor const Real _scaling; + /// Ratio of secondary to primary variable const Real _H; + /// Copy of residual NumericVector & _residual_copy; }; diff --git a/include/indicators/AnalyticalDiffIndicator.h b/include/indicators/AnalyticalDiffIndicator.h index 0145865bbee..06de8560d21 100644 --- a/include/indicators/AnalyticalDiffIndicator.h +++ b/include/indicators/AnalyticalDiffIndicator.h @@ -12,6 +12,10 @@ #include "ElementIntegralIndicator.h" +/** + * Returns the difference between the function of the analytic solution + * vs the computed solution + */ class AnalyticalDiffIndicator : public ElementIntegralIndicator { public: @@ -24,5 +28,6 @@ class AnalyticalDiffIndicator : public ElementIntegralIndicator protected: virtual Real computeQpIntegral(); + /// Analytic solution to compare against const Function & _func; }; diff --git a/include/interfacekernels/HphiRadialInterface.h b/include/interfacekernels/HphiRadialInterface.h index 31881bbbc8b..0a51b6dbed1 100644 --- a/include/interfacekernels/HphiRadialInterface.h +++ b/include/interfacekernels/HphiRadialInterface.h @@ -13,7 +13,9 @@ #include "ADInterfaceKernel.h" /** - * DG kernel for interfacing diffusion between two variables on adjacent blocks + * DG kernel for interfacing of the axial electic field on adjacent blocks. + * The axial electic field is relate to the azmithal magnetic flux + * through using Ampère–Maxwell law. */ class HphiRadialInterface : public ADInterfaceKernel { @@ -25,6 +27,8 @@ class HphiRadialInterface : public ADInterfaceKernel protected: virtual ADReal computeQpResidual(Moose::DGResidualType type) override; + /// The relative permittivity of the neighboring domain const ADMaterialProperty & _eps_r_neighbor; + /// The relative permittivity of the main domain const ADMaterialProperty & _eps_r; }; diff --git a/include/interfacekernels/InterfaceAdvection.h b/include/interfacekernels/InterfaceAdvection.h index 23c050cb5e1..c14f58b63e8 100644 --- a/include/interfacekernels/InterfaceAdvection.h +++ b/include/interfacekernels/InterfaceAdvection.h @@ -25,14 +25,18 @@ class InterfaceAdvection : public ADInterfaceKernel protected: virtual ADReal computeQpResidual(Moose::DGResidualType type) override; + /// Scaling units for the position Real _r_units; + /// Scaling units for the position for the neighbor variable Real _r_neighbor_units; + /// Potential acting on the neighbor variable MooseVariable & _potential_neighbor_var; + /// Gradient of the potential acting on the neighbor variable const ADVariableGradient & _grad_potential_neighbor; - MooseVariable & _mean_en_neighbor_var; - const ADVariableValue & _mean_en_neighbor; + /// Mobility coefficient of the neighbor variable const ADMaterialProperty & _mu_neighbor; + /// Charge sign of the neighbor variable const MaterialProperty & _sgn_neighbor; }; diff --git a/include/interfacekernels/InterfaceLogDiffusionElectrons.h b/include/interfacekernels/InterfaceLogDiffusionElectrons.h index d8e3583d08f..16c17861976 100644 --- a/include/interfacekernels/InterfaceLogDiffusionElectrons.h +++ b/include/interfacekernels/InterfaceLogDiffusionElectrons.h @@ -23,11 +23,11 @@ class InterfaceLogDiffusionElectrons : public ADInterfaceKernel protected: virtual ADReal computeQpResidual(Moose::DGResidualType type) override; + /// Scaling units for the position Real _r_units; + /// Scaling units for the position for the neighbor variable Real _r_neighbor_units; - + + /// Diffusion coefficient of the neighbor variable const ADMaterialProperty & _diffem; - - MooseVariable & _mean_en_neighbor_var; - const ADVariableValue & _mean_en_neighbor; }; diff --git a/include/interfacekernels/PotentialSurfaceCharge.h b/include/interfacekernels/PotentialSurfaceCharge.h index 232622cd0d2..1c0f9bac615 100644 --- a/include/interfacekernels/PotentialSurfaceCharge.h +++ b/include/interfacekernels/PotentialSurfaceCharge.h @@ -28,9 +28,14 @@ class PotentialSurfaceCharge : public ADInterfaceKernel protected: virtual ADReal computeQpResidual(Moose::DGResidualType type) override; - const Real _r_units; - const Real _r_neighbor_units; + /// Scaling units for the position + Real _r_units; + /// Scaling units for the position for the neighbor variable + Real _r_neighbor_units; + /// The dielectric coefficient of the main domain const ADMaterialProperty & _D; + /// The dielectric coefficient of the neighboring domain const ADMaterialProperty & _D_neighbor; + /// The surface charge supplied as a material property const ADMaterialProperty & _sigma; }; diff --git a/include/kernels/AccelerationByAveraging.h b/include/kernels/AccelerationByAveraging.h index 7c95725543e..e3d681c301c 100644 --- a/include/kernels/AccelerationByAveraging.h +++ b/include/kernels/AccelerationByAveraging.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * An acceleration scheme based on averaging a density over a periodic cycle + */ class AccelerationByAveraging : public ADKernel { public: @@ -21,8 +24,12 @@ class AccelerationByAveraging : public ADKernel protected: virtual ADReal computeQpResidual(); + /// Density value at the start of a periodic cycle const ADVariableValue & _density_at_start_cycle; + /// Density value at the end of a periodic cycle const ADVariableValue & _density_at_end_cycle; + /// The time of the period (units in s) const Real & _time_average; + /// The time period of acceleration const Real & _time_acceleration; }; diff --git a/include/kernels/AxisymmetricCurlZ.h b/include/kernels/AxisymmetricCurlZ.h index 6923915261b..a5c93326f48 100644 --- a/include/kernels/AxisymmetricCurlZ.h +++ b/include/kernels/AxisymmetricCurlZ.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * The Z-component of an axisymmetric curl + */ class AxisymmetricCurlZ : public ADKernel { public: diff --git a/include/kernels/ChargeSourceMoles_KV.h b/include/kernels/ChargeSourceMoles_KV.h index b3faca50bf2..6e7be8743d0 100644 --- a/include/kernels/ChargeSourceMoles_KV.h +++ b/include/kernels/ChargeSourceMoles_KV.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * Kernel for adding charged sources to Poisson’s equation + */ class ChargeSourceMoles_KV : public ADKernel { public: @@ -22,16 +25,20 @@ class ChargeSourceMoles_KV : public ADKernel protected: virtual ADReal computeQpResidual() override; - /// Coupled variable + /// Coupled charge density variable MooseVariable & _charged_var; + /// Coupled charge density value const ADVariableValue & _charged; - /// Material properties (regular because these are constants) + /// Elementary charge const MaterialProperty & _e; + /// Charge sign of the species const MaterialProperty & _sgn; + /// Avogadro's number const MaterialProperty & _N_A; - /// Units scaling + /// Scaling units for the potential (V or kV) const std::string & _potential_units; + /// Scaling value for the potential Real _voltage_scaling; }; diff --git a/include/kernels/CoeffDiffusion.h b/include/kernels/CoeffDiffusion.h index 6971f292171..71896e54599 100644 --- a/include/kernels/CoeffDiffusion.h +++ b/include/kernels/CoeffDiffusion.h @@ -16,7 +16,6 @@ * This diffusion kernel should only be used with species whose values are in * the logarithmic form. */ - class CoeffDiffusion : public ADKernel { public: @@ -31,6 +30,6 @@ class CoeffDiffusion : public ADKernel /// Position units const Real _r_units; - /// The diffusion coefficient (either constant or mixture-averaged) + /// The diffusion coefficient const ADMaterialProperty & _diffusivity; }; diff --git a/include/kernels/CoeffDiffusionForShootMethod.h b/include/kernels/CoeffDiffusionForShootMethod.h index 79bdd8207d2..2355792a911 100644 --- a/include/kernels/CoeffDiffusionForShootMethod.h +++ b/include/kernels/CoeffDiffusionForShootMethod.h @@ -12,8 +12,10 @@ #include "ADKernel.h" -// This diffusion kernel should only be used with species whose values are in the logarithmic form. - +/** + * The derivative of the generic diffusion term used to calculate the + * sensitivity value for the shoothing method + */ class CoeffDiffusionForShootMethod : public ADKernel { public: @@ -24,8 +26,11 @@ class CoeffDiffusionForShootMethod : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Density variable to be accelerated MooseVariable & _density_var; + /// Diffusion coefficient const ADMaterialProperty & _diffusivity; }; diff --git a/include/kernels/CoeffDiffusionLin.h b/include/kernels/CoeffDiffusionLin.h index 6e1c0496344..bf6d3cb288a 100644 --- a/include/kernels/CoeffDiffusionLin.h +++ b/include/kernels/CoeffDiffusionLin.h @@ -16,7 +16,6 @@ * This diffusion kernel should only be used with species whose values are in * the linear form. */ - class CoeffDiffusionLin : public ADKernel { public: @@ -31,6 +30,6 @@ class CoeffDiffusionLin : public ADKernel /// Position units const Real _r_units; - /// The diffusion coefficient (either constant or mixture-averaged) + /// The diffusion coefficient const ADMaterialProperty & _diffusivity; }; diff --git a/include/kernels/DriftDiffusion.h b/include/kernels/DriftDiffusion.h index ebfa4519e60..c00f6e3aff8 100644 --- a/include/kernels/DriftDiffusion.h +++ b/include/kernels/DriftDiffusion.h @@ -12,8 +12,10 @@ #include "ADKernel.h" -// This diffusion kernel should only be used with species whose values are in the logarithmic form. - +/** + * Generic drift-diffusion equation that contains both + * an electric field driven advection term and a diffusion term + */ class DriftDiffusion : public ADKernel { public: @@ -24,17 +26,26 @@ class DriftDiffusion : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Mobility coefficient const ADMaterialProperty & _mu; + /// Charge sign of the species const MaterialProperty & _sign; + /// Custom mobility coefficient, if needed ADMaterialProperty _user_mu; + /// Custom charge sign of the species, if need MaterialProperty _user_sign; - + /// Diffusion coefficient const ADMaterialProperty & _diffusivity; + /// Custom diffusion coefficient ADMaterialProperty _user_diff; + /// Potential variable unsigned int _potential_id; + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// The user-defined 1-D electric field with a sign correction ADVariableGradient _minus_e_field; }; diff --git a/include/kernels/EEDFReactionLogForShootMethod.h b/include/kernels/EEDFReactionLogForShootMethod.h index bb2c1ccd9b6..b4bbd868500 100644 --- a/include/kernels/EEDFReactionLogForShootMethod.h +++ b/include/kernels/EEDFReactionLogForShootMethod.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * The derivative of an EEDF reaction term used to calculate the + * sensitivity variable for the shoothing method + */ class EEDFReactionLogForShootMethod : public ADKernel { public: @@ -22,10 +26,13 @@ class EEDFReactionLogForShootMethod : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Electron density const ADVariableValue & _electron; + /// Density to be accelerated const ADVariableValue & _density; - const ADVariableValue & _energy; + /// Reaction coefficient const ADMaterialProperty & _reaction_coeff; + /// Stoichiometric coefficient const Real & _stoichiometric_coeff; }; diff --git a/include/kernels/EFieldAdvection.h b/include/kernels/EFieldAdvection.h index f3f1db3a7d4..a0f28e36a9e 100644 --- a/include/kernels/EFieldAdvection.h +++ b/include/kernels/EFieldAdvection.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * Generic electric field driven advection term. (Densities must be in logarithmic form) + */ class EFieldAdvection : public ADKernel { public: @@ -26,9 +29,11 @@ class EFieldAdvection : public ADKernel /// Position units const Real _r_units; - /// The diffusion coefficient (either constant or mixture-averaged) + /// Mobility coefficient const ADMaterialProperty & _mu; + /// Charge sign of the species const MaterialProperty & _sign; + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; }; diff --git a/include/kernels/EFieldArtDiff.h b/include/kernels/EFieldArtDiff.h index f6e6e211acc..060fbfd6051 100644 --- a/include/kernels/EFieldArtDiff.h +++ b/include/kernels/EFieldArtDiff.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Generic artificial electric field driven advection term + * (Densities must be in logarithmic form) + */ class EFieldArtDiff : public ADKernel { public: @@ -22,12 +26,14 @@ class EFieldArtDiff : public ADKernel protected: virtual ADReal computeQpResidual() override; - /// Coupled variables + /// Gradient of the coupled gradient const ADVariableGradient & _grad_potential; + /// Scaling factor for the artificial diffusion const Real & _scale; + /// Position units const Real _r_units; - /// Material Properties + /// Mobility coefficient const ADMaterialProperty & _mu; }; diff --git a/include/kernels/EFieldMagnitudeSource.h b/include/kernels/EFieldMagnitudeSource.h index dfcd84e1b4b..2124a1ffca1 100644 --- a/include/kernels/EFieldMagnitudeSource.h +++ b/include/kernels/EFieldMagnitudeSource.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * Electric field magnitude source term + */ class EFieldMagnitudeSource : public ADKernel { public: @@ -22,5 +25,6 @@ class EFieldMagnitudeSource : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Gradient of coupled gradient const ADVariableGradient & _grad_potential; }; diff --git a/include/kernels/ElectronEnergyLossFromElastic.h b/include/kernels/ElectronEnergyLossFromElastic.h index 3fdbd16b4ef..3a083da1d7d 100644 --- a/include/kernels/ElectronEnergyLossFromElastic.h +++ b/include/kernels/ElectronEnergyLossFromElastic.h @@ -22,16 +22,26 @@ class ElectronEnergyLossFromElastic : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Diffusion coefficient of electrons const ADMaterialProperty & _diffem; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Townsend coefficient for ionization const ADMaterialProperty & _alpha_iz; + /// Mass of electrons const MaterialProperty & _massem; + /// Mass of neutral gas const MaterialProperty & _massGas; + /// Townsend coefficient for elastic collisions const ADMaterialProperty & _alpha_el; + /// Gradient of the coupled gradient const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; + /// Gradient of the electron density const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ElectronEnergyLossFromExcitation.h b/include/kernels/ElectronEnergyLossFromExcitation.h index 22a449d1c92..855e6bf22db 100644 --- a/include/kernels/ElectronEnergyLossFromExcitation.h +++ b/include/kernels/ElectronEnergyLossFromExcitation.h @@ -12,6 +12,11 @@ #include "ADKernel.h" +/** + * 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) + */ class ElectronEnergyLossFromExcitation : public ADKernel { public: @@ -22,14 +27,22 @@ class ElectronEnergyLossFromExcitation : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Diffusion coefficient of electrons const ADMaterialProperty & _diffem; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Townsend coefficient for excitation const ADMaterialProperty & _alpha_ex; + /// Energy threshold for excitation const MaterialProperty & _Eex; - + + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; + /// Gradient of the electron density const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ElectronEnergyLossFromIonization.h b/include/kernels/ElectronEnergyLossFromIonization.h index 56b5b059a16..e4c7d0de6e8 100644 --- a/include/kernels/ElectronEnergyLossFromIonization.h +++ b/include/kernels/ElectronEnergyLossFromIonization.h @@ -12,6 +12,11 @@ #include "ADKernel.h" +/** + * 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) + */ class ElectronEnergyLossFromIonization : public ADKernel { public: @@ -22,14 +27,22 @@ class ElectronEnergyLossFromIonization : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Diffusion coefficient of electrons const ADMaterialProperty & _diffem; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Townsend coefficient for ionization const ADMaterialProperty & _alpha_iz; + /// Energy threshold for ionization const MaterialProperty & _Eiz; + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; + /// Gradient of the electron density const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ElectronEnergyTermElasticRate.h b/include/kernels/ElectronEnergyTermElasticRate.h index 877fbe6f3a6..9471707ae94 100644 --- a/include/kernels/ElectronEnergyTermElasticRate.h +++ b/include/kernels/ElectronEnergyTermElasticRate.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Electron energy loss term for elastic collisions using reaction rate coefficients + * (Densities must be in logarithmic form) + */ class ElectronEnergyTermElasticRate : public ADKernel { public: @@ -22,13 +26,16 @@ class ElectronEnergyTermElasticRate : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; - + /// Reaction coefficient const ADMaterialProperty & _rate_coefficient; - + /// Electron density const ADVariableValue & _electron; + /// Density of colliding species const ADVariableValue & _target; - + /// Mass of electrons const ADMaterialProperty & _massIncident; + /// Mass of colliding species const ADMaterialProperty & _massTarget; }; diff --git a/include/kernels/ElectronEnergyTermRate.h b/include/kernels/ElectronEnergyTermRate.h index 6c32ca190d0..5e967e77847 100644 --- a/include/kernels/ElectronEnergyTermRate.h +++ b/include/kernels/ElectronEnergyTermRate.h @@ -12,6 +12,11 @@ #include "ADKernel.h" +/** + * Electron energy loss term for inelastic collisions + * using reaction rate coefficients. Threshold energy is the energy lost in Volts in a single + * collision (Densities must be in logarithmic form) + */ class ElectronEnergyTermRate : public ADKernel { public: @@ -22,15 +27,22 @@ class ElectronEnergyTermRate : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// True for elastic collisions const bool & _elastic; + /// Threshold energy of reaction, if needed const Real & _threshold_energy; + /// Energy exchange during collision Real _energy_change; - + /// Density of background gas const ADMaterialProperty & _n_gas; + /// Reaction coefficient const ADMaterialProperty & _rate_coefficient; - + /// Electron density const ADVariableValue & _em; + /// Density of colliding gas const ADVariableValue & _v; + /// Gradient of electron density const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ElectronTimeDerivative.h b/include/kernels/ElectronTimeDerivative.h index 01edcdde0ab..1b1d2abf547 100644 --- a/include/kernels/ElectronTimeDerivative.h +++ b/include/kernels/ElectronTimeDerivative.h @@ -12,6 +12,9 @@ #include "ADTimeKernel.h" +/** + * Generic accumulation term for variables in logarithmic form + */ class ElectronTimeDerivative : public ADTimeKernel { public: @@ -22,5 +25,6 @@ class ElectronTimeDerivative : public ADTimeKernel protected: virtual ADReal computeQpResidual() override; + /// True for mass matrix lumping const bool & _lumping; }; diff --git a/include/kernels/ElectronsFromIonization.h b/include/kernels/ElectronsFromIonization.h index e7599bdc410..de5d97c8d33 100644 --- a/include/kernels/ElectronsFromIonization.h +++ b/include/kernels/ElectronsFromIonization.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Rate of production of electrons from ionization using Townsend coefficients + * (Electron density must be in logarithmic form) + */ class ElectronsFromIonization : public ADKernel { public: @@ -22,18 +26,30 @@ class ElectronsFromIonization : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Diffusion coefficient of electrons const ADMaterialProperty & _diffem; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Townsend coefficient for ionization const ADMaterialProperty & _alpha_iz; + /// Custom diffusion coefficient ADMaterialProperty _user_diffem; + /// Custom mobility coefficient ADMaterialProperty _user_muem; + /// Custom Townsend coefficient for ionization ADMaterialProperty _user_alpha_iz; + /// Electron mean energy density const ADVariableValue & _mean_en; + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// The user-defined 1-D electric field with a sign correction ADVariableGradient _minus_e_field; + /// Electron density const ADVariableValue & _em; + /// Gradient of the electron density const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/ExcitationReaction.h b/include/kernels/ExcitationReaction.h index 42f7620e8f7..16114775c10 100644 --- a/include/kernels/ExcitationReaction.h +++ b/include/kernels/ExcitationReaction.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Rate of production of metastables from excitation using Townsend coefficients + * (Densities must be in logarithmic form) + */ class ExcitationReaction : public ADKernel { public: @@ -22,17 +26,26 @@ class ExcitationReaction : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Background gas density const MaterialProperty & _n_gas; + /// Diffusion coefficient of electrons const ADMaterialProperty & _diffem; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Townsend coefficient for excitation const ADMaterialProperty & _alpha_source; + /// Electron mean energy density const ADVariableValue & _mean_en; + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; + /// Gradient of the electron density const ADVariableGradient & _grad_em; - + /// True if the variable is the reactant const bool & _reactant; }; diff --git a/include/kernels/IonsFromIonization.h b/include/kernels/IonsFromIonization.h index 9f597751bef..18dd8faca01 100644 --- a/include/kernels/IonsFromIonization.h +++ b/include/kernels/IonsFromIonization.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Rate of production of ions from ionization using Townsend coefficients + * (Ion density must be in logarithmic form) + */ class IonsFromIonization : public ADKernel { public: @@ -22,14 +26,22 @@ class IonsFromIonization : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Position units const Real _r_units; + /// Diffusion coefficient of electrons const ADMaterialProperty & _diffem; + /// Mobility coefficient of electrons const ADMaterialProperty & _muem; + /// Townsend coefficient for ionization const ADMaterialProperty & _alpha_iz; + /// Electron mean energy density const ADVariableValue & _mean_en; + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; + /// Gradient of the electron density const ADVariableGradient & _grad_em; }; diff --git a/include/kernels/JouleHeating.h b/include/kernels/JouleHeating.h index 64e4a2f1984..210f7823038 100644 --- a/include/kernels/JouleHeating.h +++ b/include/kernels/JouleHeating.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * Joule heating term for electrons (densities must be in logarithmic form) + */ class JouleHeating : public ADKernel { public: @@ -25,14 +28,20 @@ class JouleHeating : public ADKernel private: /// Position units const Real _r_units; + /// Scaling units for the potential (V or kV) const std::string & _potential_units; - /// The diffusion coefficient (either constant or mixture-averaged) + /// Diffusion coefficient const ADMaterialProperty & _diff; + /// Mobility coefficient const ADMaterialProperty & _mu; + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Electron density const ADVariableValue & _em; + /// Gradient of electron density const ADVariableGradient & _grad_em; + /// Scaling value for the potential Real _voltage_scaling; }; diff --git a/include/kernels/LogStabilizationMoles.h b/include/kernels/LogStabilizationMoles.h index 647f6c81b43..42df4e1ef2c 100644 --- a/include/kernels/LogStabilizationMoles.h +++ b/include/kernels/LogStabilizationMoles.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Kernel stabilizes solution variable u in places where u → 0; b is the offset value + * specified by the user. A typical value for b is 20. + */ class LogStabilizationMoles : public ADKernel { public: @@ -22,5 +26,6 @@ class LogStabilizationMoles : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Offset parameter that goes into the exponential function const Real & _offset; }; diff --git a/include/kernels/ProductAABBRxn.h b/include/kernels/ProductAABBRxn.h index 60acd5d6e27..9b012c1edf4 100644 --- a/include/kernels/ProductAABBRxn.h +++ b/include/kernels/ProductAABBRxn.h @@ -12,6 +12,11 @@ #include "ADKernel.h" +/** + * Generic second order reaction source term in which two molecules of + * v are produced from two molecules of u + * (Densities must be in logarithmic form) + */ class ProductAABBRxn : public ADKernel { public: @@ -22,9 +27,11 @@ class ProductAABBRxn : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Coupled species density variable MooseVariable & _coupled_var; + /// Coupled species density value const ADVariableValue & _v; - /// The reaction coefficient + /// Reaction coefficient const ADMaterialProperty & _reaction_coeff; }; diff --git a/include/kernels/ProductFirstOrderRxn.h b/include/kernels/ProductFirstOrderRxn.h index ce1e97bed37..1fea743d251 100644 --- a/include/kernels/ProductFirstOrderRxn.h +++ b/include/kernels/ProductFirstOrderRxn.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Generic first order reaction source term for u (v is the reactant + * and densities must be in logarithmic form) + */ class ProductFirstOrderRxn : public ADKernel { public: @@ -22,9 +26,11 @@ class ProductFirstOrderRxn : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Coupled species density variable MooseVariable & _coupled_var; + /// Coupled species density value const ADVariableValue & _v; - /// The reaction coefficient + /// Reaction coefficient const ADMaterialProperty & _reaction_coeff; }; diff --git a/include/kernels/ReactantAARxn.h b/include/kernels/ReactantAARxn.h index d45e3e2df8e..9a3eb2a9d60 100644 --- a/include/kernels/ReactantAARxn.h +++ b/include/kernels/ReactantAARxn.h @@ -12,6 +12,11 @@ #include "ADKernel.h" +/** + * Generic second order reaction sink term for u in which two + * molecules of u are consumed + * (Densities must be in logarithmic form) + */ class ReactantAARxn : public ADKernel { public: @@ -22,6 +27,6 @@ class ReactantAARxn : public ADKernel protected: virtual ADReal computeQpResidual() override; - /// The reaction coefficient + /// Reaction coefficient const ADMaterialProperty & _reaction_coeff; }; diff --git a/include/kernels/ReactantFirstOrderRxn.h b/include/kernels/ReactantFirstOrderRxn.h index 6fc04f3db0a..b71d22dbaf0 100644 --- a/include/kernels/ReactantFirstOrderRxn.h +++ b/include/kernels/ReactantFirstOrderRxn.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * Generic first order reaction sink term for u (u is the reactant) + * (Densities must be in logarithmic form) + */ class ReactantFirstOrderRxn : public ADKernel { public: @@ -22,6 +26,6 @@ class ReactantFirstOrderRxn : public ADKernel protected: virtual ADReal computeQpResidual() override; - /// The reaction coefficient + /// Reaction coefficient const ADMaterialProperty & _reaction_coeff; }; diff --git a/include/kernels/ReactionSecondOrderLogForShootMethod.h b/include/kernels/ReactionSecondOrderLogForShootMethod.h index 6a982301c69..7b199b5e751 100644 --- a/include/kernels/ReactionSecondOrderLogForShootMethod.h +++ b/include/kernels/ReactionSecondOrderLogForShootMethod.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * The derivative of a second order reaction term used to calculate + * the sensitivity variable for the shoothing method. + */ class ReactionSecondOrderLogForShootMethod : public ADKernel { public: @@ -22,12 +26,17 @@ class ReactionSecondOrderLogForShootMethod : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Reaction coefficient const ADMaterialProperty & _reaction_coeff; + /// Accelerated density value const ADVariableValue & _density; + /// Accelerated density variable unsigned int _density_id; + /// Coupled density value const ADVariableValue & _v; + /// Coupled density variable unsigned int _v_id; - + /// Stoichiometric coefficient const Real & _stoichiometric_coeff; }; diff --git a/include/kernels/ReactionThirdOrderLogForShootMethod.h b/include/kernels/ReactionThirdOrderLogForShootMethod.h index c01f802e824..dce5884cf8d 100644 --- a/include/kernels/ReactionThirdOrderLogForShootMethod.h +++ b/include/kernels/ReactionThirdOrderLogForShootMethod.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * The derivative of a third order reaction term used to calculate the + * sensitivity variable for the shoothing method. + */ class ReactionThirdOrderLogForShootMethod : public ADKernel { public: @@ -22,14 +26,21 @@ class ReactionThirdOrderLogForShootMethod : public ADKernel protected: virtual ADReal computeQpResidual(); + /// Reaction coefficient const ADMaterialProperty & _reaction_coeff; + /// Accelerated density value const ADVariableValue & _density; + /// Accelerated density variable unsigned int _density_id; + /// First coupled density value const ADVariableValue & _v; + /// First coupled density variable unsigned int _v_id; + /// Second coupled density value const ADVariableValue & _w; + /// Second coupled density variable unsigned int _w_id; - + /// Stoichiometric coefficient const Real & _stoichiometric_coeff; }; diff --git a/include/kernels/ScaledReaction.h b/include/kernels/ScaledReaction.h index 6d3f871d067..06afb3d573e 100644 --- a/include/kernels/ScaledReaction.h +++ b/include/kernels/ScaledReaction.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/** + * The multiple of a given variable + * (Used for calculating the effective ion potential for a given collision frequency) + */ class ScaledReaction : public ADKernel { public: @@ -22,5 +26,6 @@ class ScaledReaction : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Momentum-transfer frequency of ions const Real & _nu; }; diff --git a/include/kernels/ShootMethodLog.h b/include/kernels/ShootMethodLog.h index 0f8addd8238..b9d8ab25930 100644 --- a/include/kernels/ShootMethodLog.h +++ b/include/kernels/ShootMethodLog.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * An acceleration scheme based on the shooting method + */ class ShootMethodLog : public ADKernel { public: @@ -22,9 +25,14 @@ class ShootMethodLog : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Density value at the start of a periodic cycle const ADVariableValue & _density_at_start_cycle; + /// Density value at the end of a periodic cycle const ADVariableValue & _density_at_end_cycle; + /// The sensitivity of the density variable to acceleration const ADVariableValue & _sensitivity; + /// Growth limit for acceleration const Real & _limit; + /// The acceleration term ADReal _acceleration; }; diff --git a/include/kernels/TM0Cylindrical.h b/include/kernels/TM0Cylindrical.h index 791deb3e1be..1f736287946 100644 --- a/include/kernels/TM0Cylindrical.h +++ b/include/kernels/TM0Cylindrical.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * The axisymmetric wave equation for the azimuthal component of the magnetizing field. + */ class TM0Cylindrical : public ADKernel { public: @@ -22,8 +25,12 @@ class TM0Cylindrical : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Angular frequency const Real _omega; + /// Relative permittivity const ADMaterialProperty & _eps_r; + /// Permeability of free space const Real _mu0; + /// Permittivity of free space const Real _eps0; }; diff --git a/include/kernels/TM0CylindricalEr.h b/include/kernels/TM0CylindricalEr.h index f06147d6b88..b54b47b8b3d 100644 --- a/include/kernels/TM0CylindricalEr.h +++ b/include/kernels/TM0CylindricalEr.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * The axisymmetric wave equation for the radial component of the electric field + */ class TM0CylindricalEr : public ADKernel { public: @@ -22,10 +25,16 @@ class TM0CylindricalEr : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Angular frequency const Real _omega; + /// Relative permittivity const ADMaterialProperty & _eps_r; + /// Permeability of free space const Real _mu0; + /// Permittivity of free space const Real _eps0; + /// Azimuthal component of magnetic field const ADVariableValue & _Hphi; + /// Gradient of azimuthal component of magnetic field const ADVariableGradient & _grad_Hphi; }; diff --git a/include/kernels/TM0CylindricalEz.h b/include/kernels/TM0CylindricalEz.h index 10c655f9e41..f4a6df778c6 100644 --- a/include/kernels/TM0CylindricalEz.h +++ b/include/kernels/TM0CylindricalEz.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * The axisymmetric wave equation for the axial component of the electric field + */ class TM0CylindricalEz : public ADKernel { public: @@ -22,10 +25,16 @@ class TM0CylindricalEz : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Angular frequency const Real _omega; + /// Relative permittivity const ADMaterialProperty & _eps_r; + /// Permeability of free space const Real _mu0; + /// Permittivity of free space const Real _eps0; + /// Azimuthal component of magnetic field const ADVariableValue & _Hphi; + /// Gradient of azimuthal component of magnetic field const ADVariableGradient & _grad_Hphi; }; diff --git a/include/kernels/UserSource.h b/include/kernels/UserSource.h index b8af1c951d2..473a1c47a3c 100644 --- a/include/kernels/UserSource.h +++ b/include/kernels/UserSource.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * User defined source term + */ class UserSource : public ADKernel { public: @@ -22,5 +25,6 @@ class UserSource : public ADKernel protected: virtual ADReal computeQpResidual() override; + /// Custom source term value const Real & _source; }; diff --git a/include/materials/ADGasElectronMoments.h b/include/materials/ADGasElectronMoments.h index 5b6436c38aa..fd65039184e 100644 --- a/include/materials/ADGasElectronMoments.h +++ b/include/materials/ADGasElectronMoments.h @@ -15,6 +15,10 @@ #include "SplineInterpolation.h" #include "DerivativeMaterialPropertyNameInterface.h" +/** + * Material properties of electrons + * (Defines reaction properties with rate coefficients) + */ class ADGasElectronMoments : public ADMaterial, public DerivativeMaterialPropertyNameInterface { public: @@ -24,28 +28,38 @@ class ADGasElectronMoments : public ADMaterial, public DerivativeMaterialPropert protected: virtual void computeQpProperties() override; + /// Spline Interpolation fuction for electron mobility coefficient SplineInterpolation _mu_interpolation; + /// Spline Interpolation fuction for diffusion mobility coefficient SplineInterpolation _diff_interpolation; - /* bool _townsend; */ + /// Scaling units for the potential (V or kV) std::string _potential_units; + /// Scaling value for the potential Real _voltage_scaling; + /// Time units Real _time_units; - Real _charge_units; + /// True if molar density is used bool _use_moles; + /// Electron mobility coefficient ADMaterialProperty & _muem; + /// Electron diffusion coefficient ADMaterialProperty & _diffem; + /// Electron mean energy mobility coefficient ADMaterialProperty & _mumean_en; - + /// Electron mean energy diffusion coefficient ADMaterialProperty & _diffmean_en; + /// Charge sign of electron mean energy density MaterialProperty & _sgnmean_en; + /// Charge sign of electrons MaterialProperty & _sgnem; - + /// Electron density const ADVariableValue & _em; + /// Electron mean energy density const ADVariableValue & _mean_en; - + /// Electron mean energy Real actual_mean_en; }; diff --git a/include/materials/ADSurfaceCharge.h b/include/materials/ADSurfaceCharge.h index bd174510d1a..d8756c1ea5f 100644 --- a/include/materials/ADSurfaceCharge.h +++ b/include/materials/ADSurfaceCharge.h @@ -13,6 +13,10 @@ #include "ADMaterial.h" #include "DerivativeMaterialPropertyNameInterface.h" +/** + * 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.) + */ class ADSurfaceCharge : public ADMaterial, public DerivativeMaterialPropertyNameInterface { public: @@ -23,35 +27,50 @@ class ADSurfaceCharge : public ADMaterial, public DerivativeMaterialPropertyName virtual void computeQpProperties() override; virtual void initQpStatefulProperties() override; + /** + * TODO: Add options for different forms of the surface flux + */ void computeChargeFlux(); + /// Recombination coefficient for Lymberopoulos-style BCs + Real _ks; + /// Ion reflection coefficient for Hagelaar-style BCS + Real _r_factor_ion; + /// Electron reflection coefficient for Hagelaar-style BCS + Real _r_factor_electron; - int _bc_type; + /// Surface charge value ADMaterialProperty & _sigma; + /// Surface charge value during previous time step const MaterialProperty & _sigma_old; + /// The plasma current on the surface MaterialProperty & _plasma_current; + /// Position units Real _r_units; + /// Scaling units for the potential (V or kV) const std::string _potential_units; + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; + /// Number of charged species unsigned int _num_species; + /// Charged species variables std::vector _species; + /// Gradient of charge species std::vector _grad_species; + /// Mobility coefficient std::vector *> _mu; + /// Diffusion coefficient std::vector *> _diff; + /// Charge sign of the coupled species std::vector *> _sgn; - // Recombination coefficient for Lymberopoulos-style BCs - Real _ks; - + /// Charge flux on the surface ADReal _charge_flux; - ADReal _actual_mean_energy; - ADReal _electron_flux; - + /// Scaling value for the potential Real _voltage_scaling; + /// Elementary charge times Avogadro's number Real _q_times_NA; - Real _r_factor_ion; - Real _r_factor_electron; }; diff --git a/include/postprocessors/AverageNodalDensity.h b/include/postprocessors/AverageNodalDensity.h index 02131db340e..c3b33e47348 100644 --- a/include/postprocessors/AverageNodalDensity.h +++ b/include/postprocessors/AverageNodalDensity.h @@ -12,6 +12,10 @@ #include "NodalVariablePostprocessor.h" +/* + * Similar to AverageNodalVariableValue except meant to + * average variables expressed in logarithmic form + */ class AverageNodalDensity : public NodalVariablePostprocessor { public: @@ -27,6 +31,8 @@ class AverageNodalDensity : public NodalVariablePostprocessor virtual void threadJoin(const UserObject & y) override; protected: + /// Sum of the exponential value of the variable Real _sum; + /// The sample size unsigned int _n; }; diff --git a/include/postprocessors/AverageNodalDifference.h b/include/postprocessors/AverageNodalDifference.h index 47d290a0d1f..ec9a2057d91 100644 --- a/include/postprocessors/AverageNodalDifference.h +++ b/include/postprocessors/AverageNodalDifference.h @@ -12,6 +12,9 @@ #include "NodalVariablePostprocessor.h" +/* + * Returns the average nodal differences between two variables + */ class AverageNodalDifference : public NodalVariablePostprocessor { public: @@ -27,8 +30,13 @@ class AverageNodalDifference : public NodalVariablePostprocessor virtual void threadJoin(const UserObject & y) override; protected: + + /// The coupled variable used to determined the difference const VariableValue & _other_var; + /// The sum of the square of the difference Real _sum_of_squared_diff; + /// The simple size Real _n; + /// The root mean squared of the difference Real _value; }; diff --git a/include/postprocessors/MultiPeriodAverager.h b/include/postprocessors/MultiPeriodAverager.h index 28dd13df806..43502443a34 100644 --- a/include/postprocessors/MultiPeriodAverager.h +++ b/include/postprocessors/MultiPeriodAverager.h @@ -12,6 +12,9 @@ #include "GeneralPostprocessor.h" +/* + * Calculate the average value of a post processor over multiple periods + */ class MultiPeriodAverager : public GeneralPostprocessor { public: diff --git a/include/postprocessors/PeriodicAmplitudeRegulator.h b/include/postprocessors/PeriodicAmplitudeRegulator.h index ade5e81495f..38ca8ab1565 100644 --- a/include/postprocessors/PeriodicAmplitudeRegulator.h +++ b/include/postprocessors/PeriodicAmplitudeRegulator.h @@ -12,6 +12,10 @@ #include "GeneralPostprocessor.h" +/* + * Postprocessor that will modify its value by the ratio of another + * postprocessor to the provided reference value + */ class PeriodicAmplitudeRegulator : public GeneralPostprocessor { public: diff --git a/include/postprocessors/PeriodicComparisonCounter.h b/include/postprocessors/PeriodicComparisonCounter.h index 86c09b9f08b..28d52c66765 100644 --- a/include/postprocessors/PeriodicComparisonCounter.h +++ b/include/postprocessors/PeriodicComparisonCounter.h @@ -12,6 +12,10 @@ #include "GeneralPostprocessor.h" +/* + * Compares two Postprocessors or values and keeps count + * of how many cycles in a row that comparision is true. + */ class PeriodicComparisonCounter : public GeneralPostprocessor { public: @@ -36,11 +40,18 @@ class PeriodicComparisonCounter : public GeneralPostprocessor LESS_THAN }; + /// First variable for comparison const PostprocessorValue & _value1; + /// Second variable for comparison const PostprocessorValue & _value2; + /// The type of comparions to perform const ComparisonType _comparison_type; + /// The period of the sample space Real _period; + /// The FE problem base that stores the current simulation time FEProblemBase & _feproblem; + /// The number of consecutive periods where the comparions type was true Real _counter; + /// Total number of periods Real _period_counter; }; diff --git a/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h b/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h index c8a9c0196d7..4d158cad256 100644 --- a/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h +++ b/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h @@ -12,6 +12,9 @@ #include "MultipliedTimeIntegratedPostprocessor.h" +/* + * Integrate a Postprocessor value over a period in time using trapezoidal rule. + */ class PeriodicTimeIntegratedPostprocessor : public MultipliedTimeIntegratedPostprocessor { public: diff --git a/include/postprocessors/PlasmaFrequencyInverse.h b/include/postprocessors/PlasmaFrequencyInverse.h index 65281aa0afe..3f40798d383 100644 --- a/include/postprocessors/PlasmaFrequencyInverse.h +++ b/include/postprocessors/PlasmaFrequencyInverse.h @@ -12,14 +12,12 @@ #include "ElementVariablePostprocessor.h" -/// A postprocessor for collecting the nodal min or max value +/* + * Returns the inverse of the peak electron frequency + */ class PlasmaFrequencyInverse : public ElementVariablePostprocessor { public: - /** - * Class constructor - * @param parameters The input parameters - */ PlasmaFrequencyInverse(const InputParameters & parameters); static InputParameters validParams(); @@ -31,12 +29,14 @@ class PlasmaFrequencyInverse : public ElementVariablePostprocessor virtual void threadJoin(const UserObject & y) override; protected: - /// Get the extreme value at each quadrature point virtual void computeQpValue() override; - /// The extreme value + /// Value of the electron density in units of #/m^3 Real _value; + /// Coupled electron density variable Real _em_density; + /// True if molar density is used bool _use_moles; + /// The inverse of the plasma frequency Real _inverse; }; diff --git a/include/postprocessors/SideCurrent.h b/include/postprocessors/SideCurrent.h index 8be8c21954c..e7bd697b2ac 100644 --- a/include/postprocessors/SideCurrent.h +++ b/include/postprocessors/SideCurrent.h @@ -27,34 +27,53 @@ class SideCurrent : public SideIntegralVariablePostprocessor protected: virtual Real computeQpIntegral(); + /// Name of the mobility coefficient for electrons std::string _mobility; + /// Mobility coefficient for electrons const MaterialProperty & _mobility_coef; + /// Scaling units for the position Real _r_units; + /// Reflection coefficient Real _r; + /// Boltzmann constant const MaterialProperty & _kb; - const MaterialProperty & _T_heavy; - const MaterialProperty & _mass; - Real _v_thermal; + /// Thermal velocity of the electrons Real _ve_thermal; - Real _user_velocity; + /// elementary charge const MaterialProperty & _e; + /* + * Charge sign of the ions + * TODO: This variable calls the material property labeled + * "sgnArp". This term is outdated as Zapdos no longer + * assumes only argon plasmas + */ const MaterialProperty & _sgn; + /// Equal to 1 when the electron drift velocity is direct towards the wall and zero otherwise Real _a; + /// Equal to 1 when the ion drift velocity is direct towards the wall and zero otherwise Real _b; + /// Gradient of the coupled potential const VariableGradient & _grad_potential; + /// Electron energy density const VariableValue & _mean_en; - const VariableValue & _Arp; - const MaterialProperty & _muArp; + /// Number of ions defined unsigned int _num_ions; + /// Ion density values std::vector _ions; + /// Gradient of ion density values std::vector _grad_ions; + /// Mobility coefficient of the ions std::vector *> _mu_ions; + /// Charge sign of the ions std::vector *> _sgn_ions; + /// Mass of ions std::vector *> _mass_ions; + /// Temperature of ions std::vector *> _T_ions; + /// Ion flux Real _ion_flux; }; diff --git a/include/postprocessors/SideTotFluxIntegral.h b/include/postprocessors/SideTotFluxIntegral.h index 42ee90b5efc..80489339ff8 100644 --- a/include/postprocessors/SideTotFluxIntegral.h +++ b/include/postprocessors/SideTotFluxIntegral.h @@ -26,21 +26,31 @@ class SideTotFluxIntegral : public SideIntegralVariablePostprocessor protected: virtual Real computeQpIntegral(); - /* std::string _diffusivity; */ - /* const MaterialProperty & _diffusion_coef; */ + /// Name of the mobility coefficient for electrons std::string _mobility; + /// Mobility coefficient for electrons const MaterialProperty & _mobility_coef; + /// Scaling units for the position Real _r_units; + /// Reflection coefficient Real _r; + /// Boltzmann constant const MaterialProperty & _kb; + /// Temperature of ions const MaterialProperty & _T_heavy; + /// Mass of ions const MaterialProperty & _mass; + /// Thermal velocity of ions Real _v_thermal; + /// User defined thermal velocity of ions Real _user_velocity; + /// Elementary charge const MaterialProperty & _e; + /// Charge sign of the ions const MaterialProperty & _sgn; + /// Equal to 1 when the ion drift velocity is direct towards the wall and zero otherwise Real _a; - + /// Gradient of the potential const VariableGradient & _grad_potential; }; diff --git a/include/userobjects/CurrentDensityShapeSideUserObject.h b/include/userobjects/CurrentDensityShapeSideUserObject.h index d1392e71661..513990a6378 100644 --- a/include/userobjects/CurrentDensityShapeSideUserObject.h +++ b/include/userobjects/CurrentDensityShapeSideUserObject.h @@ -12,6 +12,9 @@ #include "ShapeSideUserObject.h" +/* + * Calculates the total current at a boundary + */ class CurrentDensityShapeSideUserObject : public ShapeSideUserObject { public: @@ -21,10 +24,30 @@ class CurrentDensityShapeSideUserObject : public ShapeSideUserObject virtual ~CurrentDensityShapeSideUserObject() {} + /** + * This is called before execute so you can reset any internal data. + */ virtual void initialize(); + /** + * Called on every "object" (like every element or node). + * In this case, it is called at every quadrature point on every element. + */ virtual void execute(); + + /** + * Implement this function to compute Jacobian terms for this UserObject. The + * shape function index _j and its corrsponding global DOF index _j_global + * will be provided. + */ virtual void executeJacobian(unsigned int jvar); + /** + * Called _once_ after execute has been called all all "objects". + */ virtual void finalize(); + /** + * Called when using threading. You need to combine the data from "y" + * into _this_ object. + */ virtual void threadJoin(const UserObject & y); ///@{ custom UserObject interface functions @@ -33,25 +56,47 @@ class CurrentDensityShapeSideUserObject : public ShapeSideUserObject ///@} protected: + + /// Term that represents the value of the side integral Real _integral; + /// Term that represents the Jacobian std::vector _jacobian_storage; + /// Value of the electron density variable const VariableValue & _em; + /// ID of the electron density variable unsigned int _em_id; + /// Gradient of the electron density const VariableGradient & _grad_em; + + /// Ion density variable const MooseVariable & _ip_var; + /// Value of the ion density variable const VariableValue & _ip; + /// ID of the ion density variable unsigned int _ip_id; + /// Gradient of the ion density const VariableGradient & _grad_ip; + /// Gradient of the potential const VariableGradient & _grad_potential; + /// ID of the potential variable unsigned int _potential_id; + /// Value of the electron energy density variable const VariableValue & _mean_en; + /// ID of the electron energy density variable unsigned int _mean_en_id; + /// Mobility coefficient of the ions const ADMaterialProperty & _muip; + /// Diffusion coefficient of the ions const ADMaterialProperty & _diffip; + /// Mobility coefficient of the electrons const ADMaterialProperty & _muem; + /// Diffusion coefficient of the electrons const ADMaterialProperty & _diffem; + /// Elementary charge Real _e; + /// True if molar density is used bool _use_moles; + /// Avogadro's number Real _avogadro; }; diff --git a/include/userobjects/ProvideMobility.h b/include/userobjects/ProvideMobility.h index 31131bc50d1..e11e87d5dfe 100644 --- a/include/userobjects/ProvideMobility.h +++ b/include/userobjects/ProvideMobility.h @@ -12,6 +12,10 @@ #include "GeneralUserObject.h" +/* + * Defines ballast resistance and the area of + * an electrode (Used with Circuit BCs) + */ class ProvideMobility : public GeneralUserObject { public: @@ -19,18 +23,32 @@ class ProvideMobility : public GeneralUserObject static InputParameters validParams(); + /// Function that returns the area of the electrode Real electrode_area() const; + /// Function that returns the value of the ballast resistor Real ballast_resist() const; + /// Function that returns the value of the coulombic charge Real coulomb_charge() const; + /** + * This is called before execute so you can reset any internal data. + */ virtual void initialize(); - + /** + * Called on every "object" (like every element or node). + * In this case, it is called at every quadrature point on every element. + */ virtual void execute(); - + /** + * Called _once_ after execute has been called all all "objects". + */ virtual void finalize(); protected: + /// Electrode area Real _electrode_area; + /// Ballast resistor Real _ballast_resist; + /// Coulombic charge Real _e; }; diff --git a/src/actions/AddPeriodicRelativeNodalDifference.C b/src/actions/AddPeriodicRelativeNodalDifference.C index 69114a5c697..62ea067f754 100644 --- a/src/actions/AddPeriodicRelativeNodalDifference.C +++ b/src/actions/AddPeriodicRelativeNodalDifference.C @@ -62,7 +62,7 @@ AddPeriodicRelativeNodalDifference::validParams() "block", {}, "The subdomain that this action applies to."); params.addClassDescription( "This Action automatically adds the necessary objects to calculate the relative" - " periodic difference. Relative Difference will be outputted as an Postprocessor named: " + " periodic difference. Relative Difference will be outputted as a Postprocessor named: " "'var'_periodic_difference"); return params; diff --git a/src/auxkernels/LinearCombinationAuxKernel.C b/src/auxkernels/LinearCombinationAuxKernel.C index 7b54c241e0e..00d07d69cef 100644 --- a/src/auxkernels/LinearCombinationAuxKernel.C +++ b/src/auxkernels/LinearCombinationAuxKernel.C @@ -32,12 +32,10 @@ LinearCombinationAuxKernel::LinearCombinationAuxKernel(const InputParameters & p _num_vars(coupledComponents("coupled_variables")), _bias(getParam("bias")) { - _vars.resize(_num_vars); _var_vals.resize(_num_vars); for (unsigned int i = 0; i < _num_vars; ++i) { - _vars[i] = getVar("coupled_variables", i); _var_vals[i] = &coupledValue("coupled_variables", i); } } diff --git a/src/bcs/NeumannCircuitVoltageMoles_KV.C b/src/bcs/NeumannCircuitVoltageMoles_KV.C index c8a544128e8..87b35dc049e 100644 --- a/src/bcs/NeumannCircuitVoltageMoles_KV.C +++ b/src/bcs/NeumannCircuitVoltageMoles_KV.C @@ -64,8 +64,6 @@ NeumannCircuitVoltageMoles_KV::NeumannCircuitVoltageMoles_KV(const InputParamete _v_i_th = 0.0; _a = 0.0; _b = 0.0; - _numerator = 0.0; - _denominator = 0.0; if (_potential_units.compare("V") == 0) _voltage_scaling = 1.; else if (_potential_units.compare("kV") == 0) diff --git a/src/interfacekernels/HphiRadialInterface.C b/src/interfacekernels/HphiRadialInterface.C index 29fa9df550d..8f72b08b9b4 100644 --- a/src/interfacekernels/HphiRadialInterface.C +++ b/src/interfacekernels/HphiRadialInterface.C @@ -16,6 +16,9 @@ InputParameters HphiRadialInterface::validParams() { InputParameters params = ADInterfaceKernel::validParams(); + params.addClassDescription( + "Used to include the electric field into or out of a neighboring subdomain. This is done " + "using Ampère–Maxwell law to relate the azmithal magnetic flux to the axial electric field."); return params; } diff --git a/src/interfacekernels/InterfaceAdvection.C b/src/interfacekernels/InterfaceAdvection.C index e5bf0f6a1e9..527188b99fa 100644 --- a/src/interfacekernels/InterfaceAdvection.C +++ b/src/interfacekernels/InterfaceAdvection.C @@ -17,20 +17,13 @@ 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 " - "interface."); + "The potential on the neighboring side of the interface."); params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("neighbor_position_units", "The units of position in the neighboring domain."); params.addClassDescription( "Used to include the electric field driven advective flux of species" - "into or out of a neighboring subdomain. Currently this interface kernel" - "is specific to electrons because the transport coefficients are assumed" - "to be a function of the mean electron energy. A generic interface" - "kernel with constant transport coefficients will have a much simpler Jacobian"); + "into or out of a neighboring subdomain."); return params; } @@ -41,8 +34,6 @@ InterfaceAdvection::InterfaceAdvection(const InputParameters & parameters) _potential_neighbor_var(*getVar("potential_neighbor", 0)), _grad_potential_neighbor(_potential_neighbor_var.adGradSlnNeighbor()), - _mean_en_neighbor_var(*getVar("mean_en_neighbor", 0)), - _mean_en_neighbor(_mean_en_neighbor_var.adSlnNeighbor()), _mu_neighbor(getNeighborADMaterialProperty("mu" + _neighbor_var.name())), _sgn_neighbor(getNeighborMaterialProperty("sgn" + _neighbor_var.name())) diff --git a/src/interfacekernels/InterfaceLogDiffusionElectrons.C b/src/interfacekernels/InterfaceLogDiffusionElectrons.C index 51d77e63ba9..4ee8842f2dc 100644 --- a/src/interfacekernels/InterfaceLogDiffusionElectrons.C +++ b/src/interfacekernels/InterfaceLogDiffusionElectrons.C @@ -16,10 +16,6 @@ InputParameters InterfaceLogDiffusionElectrons::validParams() { InputParameters params = ADInterfaceKernel::validParams(); - params.addRequiredCoupledVar("mean_en_neighbor", - "The log of the product of the mean energy and " - "electron density on the slave side of the " - "interface."); params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("neighbor_position_units", "The units of position in the neighboring domain."); @@ -34,9 +30,7 @@ InterfaceLogDiffusionElectrons::InterfaceLogDiffusionElectrons(const InputParame _r_units(1. / getParam("position_units")), _r_neighbor_units(1. / getParam("neighbor_position_units")), - _diffem(getNeighborADMaterialProperty("diffem")), - _mean_en_neighbor_var(*getVar("mean_en_neighbor", 0)), - _mean_en_neighbor(_mean_en_neighbor_var.adSlnNeighbor()) + _diffem(getNeighborADMaterialProperty("diffem")) { if (!parameters.isParamValid("boundary")) { diff --git a/src/kernels/EEDFReactionLogForShootMethod.C b/src/kernels/EEDFReactionLogForShootMethod.C index e53ac150668..328d1e3031f 100644 --- a/src/kernels/EEDFReactionLogForShootMethod.C +++ b/src/kernels/EEDFReactionLogForShootMethod.C @@ -38,7 +38,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")) diff --git a/src/postprocessors/SideCurrent.C b/src/postprocessors/SideCurrent.C index 2aacd260ac4..bb835ae7ff1 100644 --- a/src/postprocessors/SideCurrent.C +++ b/src/postprocessors/SideCurrent.C @@ -19,8 +19,6 @@ InputParameters SideCurrent::validParams() { InputParameters params = SideIntegralVariablePostprocessor::validParams(); - // params.addRequiredParam("diffusivity", "The name of the diffusivity material - // property that will be used in the flux computation."); params.addRequiredParam( "mobility", "The name of the mobility material property that will be used in the flux computation."); @@ -29,7 +27,7 @@ SideCurrent::validParams() 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.addClassDescription("Computes a side integral of current density"); return params; } @@ -40,15 +38,11 @@ SideCurrent::SideCurrent(const InputParameters & parameters) _r_units(1. / getParam("position_units")), _r(getParam("r")), _kb(getMaterialProperty("k_boltz")), - _T_heavy(getMaterialProperty("TArp")), - _mass(getMaterialProperty("massArp")), _e(getMaterialProperty("e")), _sgn(getMaterialProperty("sgnArp")), _a(0.5), _grad_potential(coupledGradient("potential")), - _mean_en(coupledValue("mean_en")), - _Arp(coupledValue("Arp")), - _muArp(getMaterialProperty("muArp")) + _mean_en(coupledValue("mean_en")) { _num_ions = coupledComponents("ions"); @@ -75,7 +69,6 @@ Real 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) { @@ -106,15 +99,4 @@ SideCurrent::computeQpIntegral() 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 * - std::exp(_Arp[_qp]) * _normals[_qp]) + - (1. - _r) / (1. + _r) * - (-(2 * _b - 1) * _mobility_coef[_qp] * -_grad_potential[_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..d2a78431b8e 100644 --- a/src/postprocessors/SideTotFluxIntegral.C +++ b/src/postprocessors/SideTotFluxIntegral.C @@ -19,8 +19,6 @@ InputParameters SideTotFluxIntegral::validParams() { InputParameters params = SideIntegralVariablePostprocessor::validParams(); - // params.addRequiredParam("diffusivity", "The name of the diffusivity material - // property that will be used in the flux computation."); params.addRequiredParam( "mobility", "The name of the mobility material property that will be used in the flux computation."); @@ -35,8 +33,6 @@ SideTotFluxIntegral::validParams() SideTotFluxIntegral::SideTotFluxIntegral(const InputParameters & parameters) : SideIntegralVariablePostprocessor(parameters), - // _diffusivity(parameters.get("diffusivity")), - // _diffusion_coef(getMaterialProperty(_diffusivity)), _mobility(parameters.get("mobility")), _mobility_coef(getMaterialProperty(_mobility)), _r_units(1. / getParam("position_units")), @@ -70,9 +66,6 @@ SideTotFluxIntegral::computeQpIntegral() else _a = 0.0; - // return -_mobility_coef[_qp] * _grad_potential[_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 * diff --git a/test/tests/1d_dc/densities_mean_en.i b/test/tests/1d_dc/densities_mean_en.i index 13fd391b241..23cc6759aff 100644 --- a/test/tests/1d_dc/densities_mean_en.i +++ b/test/tests/1d_dc/densities_mean_en.i @@ -722,7 +722,6 @@ dom1Scale = 1e-7 [InterfaceKernels] [em_advection] type = InterfaceAdvection - mean_en_neighbor = mean_en potential_neighbor = potential neighbor_var = em variable = emliq @@ -732,7 +731,6 @@ dom1Scale = 1e-7 [] [em_diffusion] type = InterfaceLogDiffusionElectrons - mean_en_neighbor = mean_en neighbor_var = em variable = emliq boundary = master1_interface diff --git a/test/tests/1d_dc/mean_en.i b/test/tests/1d_dc/mean_en.i index e857453aa69..65df5189597 100644 --- a/test/tests/1d_dc/mean_en.i +++ b/test/tests/1d_dc/mean_en.i @@ -724,7 +724,6 @@ dom1Scale = 1e-7 [InterfaceKernels] [em_advection] type = InterfaceAdvection - mean_en_neighbor = mean_en potential_neighbor = potential neighbor_var = em variable = emliq @@ -734,7 +733,6 @@ dom1Scale = 1e-7 [] [em_diffusion] type = InterfaceLogDiffusionElectrons - mean_en_neighbor = mean_en neighbor_var = em variable = emliq boundary = master1_interface diff --git a/test/tests/1d_dc/mean_en_multi.i b/test/tests/1d_dc/mean_en_multi.i index 76ec170e52a..03a589857c8 100644 --- a/test/tests/1d_dc/mean_en_multi.i +++ b/test/tests/1d_dc/mean_en_multi.i @@ -808,7 +808,6 @@ dom1Scale = 1e-7 [InterfaceKernels] [em_advection] type = InterfaceAdvection - mean_en_neighbor = mean_en potential_neighbor = potential neighbor_var = em variable = emliq @@ -818,7 +817,6 @@ dom1Scale = 1e-7 [] [em_diffusion] type = InterfaceLogDiffusionElectrons - mean_en_neighbor = mean_en neighbor_var = em variable = emliq boundary = master1_interface diff --git a/test/tests/DriftDiffusionAction/mean_en_actions.i b/test/tests/DriftDiffusionAction/mean_en_actions.i index b419e687890..38c2b11706e 100644 --- a/test/tests/DriftDiffusionAction/mean_en_actions.i +++ b/test/tests/DriftDiffusionAction/mean_en_actions.i @@ -422,7 +422,6 @@ dom1Scale = 1e-7 [InterfaceKernels] [em_advection] type = InterfaceAdvection - mean_en_neighbor = mean_en potential_neighbor = potential neighbor_var = em variable = emliq @@ -432,7 +431,6 @@ dom1Scale = 1e-7 [] [em_diffusion] type = InterfaceLogDiffusionElectrons - mean_en_neighbor = mean_en neighbor_var = em variable = emliq boundary = master1_interface diff --git a/test/tests/DriftDiffusionAction/mean_en_no_actions.i b/test/tests/DriftDiffusionAction/mean_en_no_actions.i index 4c81fc0a821..325423bce4b 100644 --- a/test/tests/DriftDiffusionAction/mean_en_no_actions.i +++ b/test/tests/DriftDiffusionAction/mean_en_no_actions.i @@ -797,7 +797,6 @@ dom1Scale = 1e-7 [InterfaceKernels] [em_advection] type = InterfaceAdvection - mean_en_neighbor = mean_en potential_neighbor = potential neighbor_var = em variable = emliq @@ -807,7 +806,6 @@ dom1Scale = 1e-7 [] [em_diffusion] type = InterfaceLogDiffusionElectrons - mean_en_neighbor = mean_en neighbor_var = em variable = emliq boundary = master1_interface diff --git a/test/tests/crane_action/townsend_units.i b/test/tests/crane_action/townsend_units.i index e103f2061dd..610dbeadb2f 100644 --- a/test/tests/crane_action/townsend_units.i +++ b/test/tests/crane_action/townsend_units.i @@ -664,7 +664,6 @@ dom1Scale = 1e-7 [InterfaceKernels] [em_advection] type = InterfaceAdvection - mean_en_neighbor = mean_en potential_neighbor = potential neighbor_var = em variable = emliq @@ -674,7 +673,6 @@ dom1Scale = 1e-7 [] [em_diffusion] type = InterfaceLogDiffusionElectrons - mean_en_neighbor = mean_en neighbor_var = em variable = emliq boundary = master1_interface diff --git a/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i b/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i index f45463de315..31ba786a266 100644 --- a/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i +++ b/tutorial/tutorial05-PlasmaWaterInterface/DC_argon-With-Water.i @@ -174,7 +174,6 @@ dom1Scale = 1e-7 # if you want to account for electrons going out of the water into the air then you would need there to be interface conditions for master interface 0 [em_advection] type = InterfaceAdvection - mean_en_neighbor = mean_en potential_neighbor = potential neighbor_var = em @@ -187,7 +186,6 @@ dom1Scale = 1e-7 [] [em_diffusion] type = InterfaceLogDiffusionElectrons - mean_en_neighbor = mean_en neighbor_var = em variable = emliq boundary = master1_interface From 09f89296beeaf979f4f0f207603e63528ff291c3 Mon Sep 17 00:00:00 2001 From: csdechant Date: Wed, 13 Nov 2024 11:51:54 -0700 Subject: [PATCH 02/10] Adding remaining docstrings which closes #258 --- include/dgkernels/DGCoeffDiffusion.h | 8 + include/dgkernels/DGEFieldAdvection.h | 11 + include/materials/Gas.h | 91 +++++- include/materials/GasBase.h | 94 +++++-- include/materials/GasElectronMoments.h | 89 ++++-- include/materials/HeavySpecies.h | 34 ++- include/materials/Water.h | 260 +++++++++++++++++- .../AddPeriodicRelativeNodalDifference.C | 2 +- src/materials/Gas.C | 4 - src/materials/GasBase.C | 19 +- src/materials/GasElectronMoments.C | 29 +- src/materials/HeavySpecies.C | 32 +-- src/materials/Water.C | 3 +- 13 files changed, 522 insertions(+), 154 deletions(-) diff --git a/include/dgkernels/DGCoeffDiffusion.h b/include/dgkernels/DGCoeffDiffusion.h index b06176bd8cb..346ae9d9ce0 100644 --- a/include/dgkernels/DGCoeffDiffusion.h +++ b/include/dgkernels/DGCoeffDiffusion.h @@ -32,8 +32,16 @@ class DGCoeffDiffusion : public ADDGKernel protected: virtual ADReal computeQpResidual(Moose::DGResidualType type) override; + /* + * _epsilon and _sigma (as described above) are used to penalize the jumps + * in discontinuity between cells. More information can be found in "Discontinuous + * Galerkin Methods for Solving Elliptic and Parabolic Equations: Theory + * and Implementation" by B. Rivière + */ Real _epsilon; Real _sigma; + /// Diffusion coefficient of current cell const ADMaterialProperty & _diff; + /// Diffusion coefficient of neighboring cell const ADMaterialProperty & _diff_neighbor; }; diff --git a/include/dgkernels/DGEFieldAdvection.h b/include/dgkernels/DGEFieldAdvection.h index 34e6476d44e..e7390909749 100644 --- a/include/dgkernels/DGEFieldAdvection.h +++ b/include/dgkernels/DGEFieldAdvection.h @@ -10,6 +10,10 @@ #include "ADDGKernel.h" +/** + * The discontinuous Galerkin form of the generic electric + * field driven advection term + */ class DGEFieldAdvection : public ADDGKernel { public: @@ -20,12 +24,19 @@ class DGEFieldAdvection : public ADDGKernel protected: virtual ADReal computeQpResidual(Moose::DGResidualType type) override; + /// Mobility coefficient of current cell const ADMaterialProperty & _mu; + /// Charge sign of the species in current cell const MaterialProperty & _sgn; + /// Mobility coefficient of neighboring cell const ADMaterialProperty & _mu_neighbor; + /// Charge sign of the species in neighboring cell const MaterialProperty & _sgn_neighbor; + /// Coupled Potential variable MooseVariable & _potential_var; + /// Gradient of coupled potential in current cell const ADVariableGradient & _grad_potential; + /// Gradient of coupled potential in neighboring cell const ADVariableGradient & _grad_potential_neighbor; }; diff --git a/include/materials/Gas.h b/include/materials/Gas.h index 81786612322..202330fd238 100644 --- a/include/materials/Gas.h +++ b/include/materials/Gas.h @@ -14,6 +14,10 @@ #include "LinearInterpolation.h" #include "SplineInterpolation.h" +/* + * Material properties of electron and ions for argon gas + * (Defines reaction properties with Townsend coefficients) + */ class Gas : public ADMaterial { public: @@ -23,89 +27,150 @@ class Gas : public ADMaterial protected: virtual void computeQpProperties() override; + /// Spline Interpolation fuction for ionization Townsend coefficient SplineInterpolation _alpha_interpolation; + /// Spline Interpolation fuction for excitation Townsend coefficient SplineInterpolation _alphaEx_interpolation; + /// Spline Interpolation fuction for elastic Townsend coefficient SplineInterpolation _alphaEl_interpolation; + /// Spline Interpolation fuction for electron mobility coefficient SplineInterpolation _mu_interpolation; + /// Spline Interpolation fuction for diffusion mobility coefficient SplineInterpolation _diff_interpolation; - /* - LinearInterpolation _alpha_interpolation; - LinearInterpolation _alphaEx_interpolation; - LinearInterpolation _alphaEl_interpolation; - LinearInterpolation _mu_interpolation; - LinearInterpolation _diff_interpolation; - */ - - /* LinearInterpolation _d_alpha_d_actual_mean_energy_interpolation; */ - - /* bool _townsend; */ + + /// True if interpolating transport coefficients as a function of the mean energy bool _interp_trans_coeffs; + /// True if interpolating the elastic collision townsend coefficient as a function of the mean energy bool _interp_elastic_coeff; + /// True if ramping the non-linearity of coming from the electron energy dependence of the transport coefficients bool _ramp_trans_coeffs; + /// Scaling units for the potential (V or kV) std::string _potential_units; + /// Scaling value for the potential Real _voltage_scaling; + /// User defined secondary electron coefficient Real _user_se_coeff; + /// User defined work function Real _user_work_function; + /// User defined field enhancement factor Real _user_field_enhancement; + /// User defined Richardson coefficient Real _user_Richardson_coefficient; + /// User defined cathode temperature Real _user_cathode_temperature; + /// User defined neutral gase and ion temperature Real _user_T_gas; + /// User defined neutral gase pressure Real _user_p_gas; + /// True if molar density is used bool _use_moles; + /// AD electron mobility coefficient ADMaterialProperty & _muem; + /// AD electron diffusion coefficient ADMaterialProperty & _diffem; + /// AD argon ion mobility coefficient ADMaterialProperty & _muArp; + /// AD argon ion diffusion coefficient ADMaterialProperty & _diffArp; + /// Energy threshold for argon ionization MaterialProperty & _Eiz; + /// Energy threshold for argon excitation MaterialProperty & _Eex; + /// Argon density at atmospheric pressure MaterialProperty & _Ar; + /// AD electron energy mobility coefficient ADMaterialProperty & _mumean_en; + /// AD electron energy diffusion coefficient ADMaterialProperty & _diffmean_en; + /// Constant elastic collision rate coefficient MaterialProperty & _rate_coeff_elastic; + /// Mass of electrons MaterialProperty & _massem; + /// Mass of argon neutrals MaterialProperty & _massGas; + /// Mass of argon ions MaterialProperty & _massArp; + /// Secondary electron coefficient MaterialProperty & _se_coeff; + /// Work function MaterialProperty & _work_function; + /// Field enhancement coefficient MaterialProperty & _field_enhancement; + /// Richardson coefficient MaterialProperty & _Richardson_coefficient; + /// Cathode termperature MaterialProperty & _cathode_temperature; + /// Secondary electron energy MaterialProperty & _se_energy; + /// Elementary charge MaterialProperty & _e; + /// Permittivity of free space MaterialProperty & _eps; + /// Boltzmann constant MaterialProperty & _k_boltz; + /// Avogadro's number MaterialProperty & _Avogadro; - MaterialProperty & _vthermal_em; - MaterialProperty & _vthermal_ip; + /* + * Curve fitting for ionization coefficients dependent + * on the electric field based on bolos simulations + */ MaterialProperty & _iz_coeff_efield_a; MaterialProperty & _iz_coeff_efield_b; MaterialProperty & _iz_coeff_efield_c; + /* + * Curve fitting for ionization coefficients dependent + * on the electron energy based on bolos simulations + */ MaterialProperty & _iz_coeff_energy_a; MaterialProperty & _iz_coeff_energy_b; MaterialProperty & _iz_coeff_energy_c; + /// Avogadro's number MaterialProperty & _N_A; + /* + * Curve fitting for elastic coefficients dependent + * on the electron energy based on bolos simulations + */ MaterialProperty & _el_coeff_energy_a; MaterialProperty & _el_coeff_energy_b; MaterialProperty & _el_coeff_energy_c; + /// AD Ionization Townsend coefficient ADMaterialProperty & _alpha_iz; + /// AD Excitation Townsend coefficient ADMaterialProperty & _alpha_ex; + /// AD Elastic Townsend coefficient ADMaterialProperty & _alpha_el; + /// Charge sign of electrons MaterialProperty & _sgnem; + /// Charge sign of electron energy density MaterialProperty & _sgnmean_en; + /// Charge sign of argon ions MaterialProperty & _sgnArp; + /// Potential diffusion coefficient (material permittivity) ADMaterialProperty & _diffpotential; + /// Electron energy ADMaterialProperty & _actual_mean_energy; + /// Argon ion temperature ADMaterialProperty & _TArp; + /// Electron temperature ADMaterialProperty & _Tem; + /// Argon neutral gas temperature MaterialProperty & _T_gas; + /// Argon neutral gas pressure MaterialProperty & _p_gas; + /// Argon neutral gas density MaterialProperty & _n_gas; + /// Argon ionization rate coefficient ADMaterialProperty & _kiz; + /// Argon excitation rate coefficient ADMaterialProperty & _kex; + /// Argon elastic rate coefficient ADMaterialProperty & _kel; + /// Electron temperatuer in eV ADMaterialProperty & _TemVolts; + /// Coupled electron density const ADVariableValue & _em; + /// Coupled electron energy density const ADVariableValue & _mean_en; }; diff --git a/include/materials/GasBase.h b/include/materials/GasBase.h index 54fa27c73cf..6aa50637533 100644 --- a/include/materials/GasBase.h +++ b/include/materials/GasBase.h @@ -23,91 +23,151 @@ class GasBase : public ADMaterial protected: virtual void computeQpProperties() override; + /// Spline Interpolation fuction for ionization Townsend coefficient SplineInterpolation _alpha_interpolation; + /// Spline Interpolation fuction for excitation Townsend coefficient SplineInterpolation _alphaEx_interpolation; + /// Spline Interpolation fuction for elastic Townsend coefficient SplineInterpolation _alphaEl_interpolation; + /// Spline Interpolation fuction for electron mobility coefficient SplineInterpolation _mu_interpolation; + /// Spline Interpolation fuction for diffusion mobility coefficient SplineInterpolation _diff_interpolation; + /// Position units Real _r_units; + /// True if interpolating transport coefficients as a function of the mean energy bool _interp_trans_coeffs; + /// True if interpolating the elastic collision townsend coefficient as a function of the mean energy bool _interp_elastic_coeff; + /// True if ramping the non-linearity of coming from the electron energy dependence of the transport coefficients bool _ramp_trans_coeffs; + /// Scaling units for the potential (V or kV) std::string _potential_units; + /// Scaling value for the potential Real _voltage_scaling; + /// User defined secondary electron coefficient Real _user_se_coeff; + /// User defined work function Real _user_work_function; + /// User defined field enhancement factor Real _user_field_enhancement; + /// User defined Richardson coefficient Real _user_Richardson_coefficient; + /// User defined cathode temperature Real _user_cathode_temperature; + /// User defined neutral gase and ion temperature Real _user_T_gas; + /// User defined neutral gase pressure Real _user_p_gas; + /// True if molar density is used bool _use_moles; + /// AD electron mobility coefficient ADMaterialProperty & _muem; + /// AD electron diffusion coefficient ADMaterialProperty & _diffem; - MaterialProperty & _rate_coeff_ion; + /// Energy threshold for argon ionization MaterialProperty & _Eiz; + /// Energy threshold for argon excitation MaterialProperty & _Eex; + /// AD electron energy mobility coefficient ADMaterialProperty & _mumean_en; + /// AD electron energy diffusion coefficient ADMaterialProperty & _diffmean_en; + /// Constant elastic collision rate coefficient MaterialProperty & _rate_coeff_elastic; + /// Mass of electrons MaterialProperty & _massem; + /// Mass of argon neutrals MaterialProperty & _massGas; + /// Secondary electron coefficient MaterialProperty & _se_coeff; + /// Work function MaterialProperty & _work_function; + /// Field enhancement coefficient MaterialProperty & _field_enhancement; + /// Richardson coefficient MaterialProperty & _Richardson_coefficient; + /// Cathode termperature MaterialProperty & _cathode_temperature; + /// Secondary electron energy MaterialProperty & _se_energy; - MaterialProperty & _ElectronTotalFluxMag; - MaterialProperty & _ElectronTotalFluxMagSizeForm; - MaterialProperty & _ElectronTotalFlux; - MaterialProperty & _ElectronAdvectiveFlux; - MaterialProperty & _ElectronDiffusiveFlux; - MaterialProperty & _IonTotalFlux; - MaterialProperty & _IonAdvectiveFlux; - MaterialProperty & _IonDiffusiveFlux; - MaterialProperty & _Source_term; - MaterialProperty & _Source_term_coeff; + + /// Elementary charge MaterialProperty & _e; + /// Permittivity of free space MaterialProperty & _eps; - MaterialProperty & _Tem_lfa; - MaterialProperty & _Tip_lfa; + + /// Boltzmann constant MaterialProperty & _k_boltz; + /// Avogadro's number MaterialProperty & _Avogadro; - MaterialProperty & _vthermal_em; - MaterialProperty & _vthermal_ip; + /* + * Curve fitting for ionization coefficients dependent + * on the electric field based on bolos simulations + */ MaterialProperty & _iz_coeff_efield_a; MaterialProperty & _iz_coeff_efield_b; MaterialProperty & _iz_coeff_efield_c; + /* + * Curve fitting for ionization coefficients dependent + * on the electron energy based on bolos simulations + */ MaterialProperty & _iz_coeff_energy_a; MaterialProperty & _iz_coeff_energy_b; MaterialProperty & _iz_coeff_energy_c; + /// Avogadro's number MaterialProperty & _N_A; + /* + * Curve fitting for elastic coefficients dependent + * on the electron energy based on bolos simulations + */ MaterialProperty & _el_coeff_energy_a; MaterialProperty & _el_coeff_energy_b; MaterialProperty & _el_coeff_energy_c; + /// AD Ionization Townsend coefficient ADMaterialProperty & _alpha_iz; + /// AD Excitation Townsend coefficient ADMaterialProperty & _alpha_ex; + /// AD Elastic Townsend coefficient ADMaterialProperty & _alpha_el; + /// Charge sign of electrons MaterialProperty & _sgnem; + /// Charge sign of electron energy density MaterialProperty & _sgnmean_en; + /// Potential diffusion coefficient (material permittivity) ADMaterialProperty & _diffpotential; + /// Electron energy ADMaterialProperty & _actual_mean_energy; + /// Electron temperature ADMaterialProperty & _Tem; - MaterialProperty & _diffu; - MaterialProperty & _sgnu; + /// Argon neutral gas temperature MaterialProperty & _T_gas; + /// Argon neutral gas pressure MaterialProperty & _p_gas; + /// Argon neutral gas density MaterialProperty & _n_gas; + /// Argon ionization rate coefficient ADMaterialProperty & _kiz; + /// Argon excitation rate coefficient ADMaterialProperty & _kex; + /* + * Argon excitation rate coefficient + * TODO: _kArp is defined the same as _kex. + * These material properties should be + * consolidated. + */ ADMaterialProperty & _kArp; + /// Argon elastic rate coefficient ADMaterialProperty & _kel; + /// Electron temperatuer in eV ADMaterialProperty & _TemVolts; + /// Coupled electron density const ADVariableValue & _em; + /// Coupled electron energy density const ADVariableValue & _mean_en; + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; }; diff --git a/include/materials/GasElectronMoments.h b/include/materials/GasElectronMoments.h index 8133bfc41a7..74708748b04 100644 --- a/include/materials/GasElectronMoments.h +++ b/include/materials/GasElectronMoments.h @@ -13,6 +13,9 @@ #include "ADMaterial.h" #include "SplineInterpolation.h" +/* + * Material properties of electrons and universal constants + */ class GasElectronMoments : public ADMaterial { public: @@ -23,93 +26,127 @@ class GasElectronMoments : public ADMaterial protected: virtual void computeQpProperties() override; + /// Spline Interpolation fuction for ionization Townsend coefficient SplineInterpolation _alpha_interpolation; + /// Spline Interpolation fuction for excitation Townsend coefficient SplineInterpolation _alphaEx_interpolation; + /// Spline Interpolation fuction for elastic Townsend coefficient SplineInterpolation _alphaEl_interpolation; + /// Spline Interpolation fuction for electron mobility coefficient SplineInterpolation _mu_interpolation; + /// Spline Interpolation fuction for diffusion mobility coefficient SplineInterpolation _diff_interpolation; + /// True if interpolating transport coefficients as a function of the mean energy bool _interp_trans_coeffs; + /// True if interpolating the elastic collision townsend coefficient as a function of the mean energy bool _interp_elastic_coeff; + /// True if ramping the non-linearity of coming from the electron energy dependence of the transport coefficients bool _ramp_trans_coeffs; + /// Scaling units for the potential (V or kV) std::string _potential_units; + /// Scaling value for the potential Real _voltage_scaling; - // adding + /// Time units Real _time_units; - Real _charge_units; + /// User defined secondary electron coefficient Real _user_se_coeff; + /// User defined work function Real _user_work_function; + /// User defined field enhancement factor Real _user_field_enhancement; + /// User defined Richardson coefficient Real _user_Richardson_coefficient; + /// User defined cathode temperature Real _user_cathode_temperature; + /// User defined neutral gase and ion temperature Real _user_T_gas; + /// Coupled pressure variable const VariableValue & _user_p_gas; + /// True if molar density is used bool _use_moles; + /// User defined electron mobility coefficient Real _user_muem; + /// User defined electron diffusion coefficient Real _user_diffem; + /// True is electron transport coefficients are pressure dependent bool _pressure_dependent; + /// AD electron mobility coefficient ADMaterialProperty & _muem; + /// AD electron diffusion coefficient ADMaterialProperty & _diffem; - MaterialProperty & _rate_coeff_ion; + /// Energy threshold for helium ionization MaterialProperty & _Eiz; + /// Energy threshold for helium excitation MaterialProperty & _Eex; + /// Argon density at atmospheric pressure MaterialProperty & _Ar; + /// AD electron energy mobility coefficient ADMaterialProperty & _mumean_en; + /// AD electron energy diffusion coefficient ADMaterialProperty & _diffmean_en; + /// Constant elastic collision rate coefficient MaterialProperty & _rate_coeff_elastic; + /// Mass of electrons MaterialProperty & _massem; + /// Mass of argon neutrals MaterialProperty & _massGas; + /// Secondary electron coefficient MaterialProperty & _se_coeff; + /// Work function MaterialProperty & _work_function; + /// Field enhancement coefficient MaterialProperty & _field_enhancement; + /// Richardson coefficient MaterialProperty & _Richardson_coefficient; + /// Cathode termperature MaterialProperty & _cathode_temperature; + /// Secondary electron energy MaterialProperty & _se_energy; - MaterialProperty & _ElectronTotalFluxMag; - MaterialProperty & _ElectronTotalFluxMagSizeForm; - MaterialProperty & _ElectronTotalFlux; - MaterialProperty & _ElectronAdvectiveFlux; - MaterialProperty & _ElectronDiffusiveFlux; - MaterialProperty & _IonTotalFlux; - MaterialProperty & _IonAdvectiveFlux; - MaterialProperty & _IonDiffusiveFlux; - MaterialProperty & _Source_term; - MaterialProperty & _Source_term_coeff; + + /// Elementary charge MaterialProperty & _e; + /// Permittivity of free space MaterialProperty & _eps; - MaterialProperty & _Tem_lfa; - MaterialProperty & _Tip_lfa; + + /// Boltzmann constant MaterialProperty & _k_boltz; + /// Avogadro's number MaterialProperty & _Avogadro; - MaterialProperty & _vthermal_em; - MaterialProperty & _vthermal_ip; - MaterialProperty & _iz_coeff_efield_a; - MaterialProperty & _iz_coeff_efield_b; - MaterialProperty & _iz_coeff_efield_c; - MaterialProperty & _iz_coeff_energy_a; - MaterialProperty & _iz_coeff_energy_b; - MaterialProperty & _iz_coeff_energy_c; + /// Avogadro's number (reduced significant figures) MaterialProperty & _N_A; - MaterialProperty & _el_coeff_energy_a; - MaterialProperty & _el_coeff_energy_b; - MaterialProperty & _el_coeff_energy_c; + + /// Charge sign of electrons MaterialProperty & _sgnem; + /// Charge sign of electron energy density MaterialProperty & _sgnmean_en; + /// Potential diffusion coefficient (material permittivity) ADMaterialProperty & _diffpotential; + /// Electron energy ADMaterialProperty & _actual_mean_energy; + /// Electron temperature ADMaterialProperty & _Tem; + /// Argon neutral gas temperature MaterialProperty & _T_gas; + /// Argon neutral gas pressure MaterialProperty & _p_gas; + /// Argon neutral gas density MaterialProperty & _n_gas; + /// Argon ionization rate coefficient ADMaterialProperty & _kiz; + /// Argon excitation rate coefficient ADMaterialProperty & _kex; + /// Argon elastic rate coefficient ADMaterialProperty & _kel; + /// Electron temperatuer in eV ADMaterialProperty & _TemVolts; + /// Coupled electron density const ADVariableValue & _em; + /// Coupled electron energy density const ADVariableValue & _mean_en; }; diff --git a/include/materials/HeavySpecies.h b/include/materials/HeavySpecies.h index aac90ed86b6..92fa0da654a 100644 --- a/include/materials/HeavySpecies.h +++ b/include/materials/HeavySpecies.h @@ -11,9 +11,11 @@ #pragma once #include "Material.h" -/* #include "LinearInterpolation.h" */ #include "SplineInterpolation.h" +/* + * Material properties of ions + */ template class HeavySpeciesTempl : public Material { @@ -25,29 +27,37 @@ class HeavySpeciesTempl : public Material protected: virtual void computeQpProperties() override; + /// User defined ion mass Real _user_massHeavy; + /// User defined charge sign of ion Real _user_sgnHeavy; - // Real _user_T_gas; - // Real _user_p_gas; + /// Scaling units for the potential (V or kV) std::string _potential_units; + /// Scaling value for the potential Real _voltage_scaling; - MaterialProperty & _massHeavy; // Replaces _massArp - GenericMaterialProperty & _temperatureHeavy; // Replaces _tempArp - MaterialProperty & _sgnHeavy; // Replaces _sgnArp (unused though) - GenericMaterialProperty & _muHeavy; // Replaces _muArp - GenericMaterialProperty & _diffHeavy; // Replaces _diffArp + /// Ion mass + MaterialProperty & _massHeavy; + /// Ion temperature + GenericMaterialProperty & _temperatureHeavy; + /// Charge sign of ion + MaterialProperty & _sgnHeavy; + /// Ion mobility coefficient + GenericMaterialProperty & _muHeavy; + /// Ion diffusion coefficient + GenericMaterialProperty & _diffHeavy; + /// Neutal gas temperature const MaterialProperty & _T_gas; + /// Neutal gas density const MaterialProperty & _p_gas; + /// Time units Real _time_units; + /// If true, calculate mobility coefficient assuming argon ions bool _calc_mobility; + /// If true, calculate diffusion coefficient assuming argon ions bool _calc_diffusivity; - - // MaterialProperty & _T_gas; - // MaterialProperty & _p_gas; // Replace with gas fraction? - // MaterialProperty & _n_gas; }; typedef HeavySpeciesTempl HeavySpecies; diff --git a/include/materials/Water.h b/include/materials/Water.h index 18f8c158d4f..1d507be49c2 100644 --- a/include/materials/Water.h +++ b/include/materials/Water.h @@ -12,6 +12,9 @@ #include "ADMaterial.h" +/* + * Material properties of water species + */ class Water : public ADMaterial { public: @@ -22,151 +25,398 @@ class Water : public ADMaterial protected: virtual void computeQpProperties() override; - // Input Parameters - + /// User defined relative permittivity of the medium const Real & _user_relative_permittivity; + /// User defined scaling for the potential const Real & _user_potential_mult; + /// User defined scaling for the electrons const Real & _user_electron_mult; - // Material Properties - + /// Scaling factor for e+H2O and 2e + 2H2O reactions MaterialProperty & _cw; + /// Scaling for the electrons MaterialProperty & _electron_mult; + /// Scaling for the potential MaterialProperty & _potential_mult; + /// Avogadro's number MaterialProperty & _N_A; + /// Relative permittivity of the medium MaterialProperty & _eps_r; + /// Permittivity of free space MaterialProperty & _eps_0; + /// Elementary charge MaterialProperty & _e; + /// Boltzmann constant MaterialProperty & _k; + /// Room temperature (300 K) MaterialProperty & _T; + /* + * Reaction coefficient for: + * e + H2O-->H + OH- + */ ADMaterialProperty & _kemliq; + /// Defined the same as _kemliq ADMaterialProperty & _kem; + /* + * Reaction coefficient for: + * 2e + 2H2O-->H2 + 2OH- + */ ADMaterialProperty & _kemliqemliq; + /// Defined the same as _kemliqemliq ADMaterialProperty & _kemem; - MaterialProperty & _k3; + /* + * Reaction coefficient for: + * e + H + H2O-->H2 + OH- + */ MaterialProperty & _k4; + /* + * Reaction coefficient for: + * e + OH-->OH- + */ MaterialProperty & _k5; + /* + * Reaction coefficient for: + * e + O- + H2O --> 2OH- + */ MaterialProperty & _k6; + /* + * Reaction coefficient for: + * e + H3O+ --> H2 + H2O + */ MaterialProperty & _k7; + /* + * Reaction coefficient for: + * e + H2O2 --> OH + OH- + */ MaterialProperty & _k8; + /* + * Reaction coefficient for: + * e + HO2- + H2O --> OH + 2OH- + */ MaterialProperty & _k9; + /* + * Reaction coefficient for: + * e + O2 --> O2- + */ MaterialProperty & _k10; + /* + * Reaction coefficient for: + * e + O --> O- + */ MaterialProperty & _k11; + /* + * Reaction coefficient for: + * H + H2O --> H2 + OH + */ MaterialProperty & _k12; + /* + * Reaction coefficient for: + * 2H --> H2 + */ MaterialProperty & _k13; + /* + * Reaction coefficient for: + * H + OH --> H2O + */ MaterialProperty & _k14; + /* + * Reaction coefficient for: + * H + OH- --> H2O + e + */ MaterialProperty & _k15; + /* + * Reaction coefficient for: + * H + H2O2 --> OH + H2O + */ MaterialProperty & _k16; + /* + * Reaction coefficient for: + * H2 + H2O2 --> H + OH + H2O + */ MaterialProperty & _k17; + /* + * Reaction coefficient for: + * H + O2 --> HO2 + */ MaterialProperty & _k18; + /* + * Reaction coefficient for: + * H + HO2 --> H2O2 + */ MaterialProperty & _k19; + /* + * Reaction coefficient for: + * O + H2O --> 2OH + */ MaterialProperty & _k20; + /* + * Reaction coefficient for: + * O + O2 --> O3 + */ MaterialProperty & _k21; + /* + * Reaction coefficient for: + * 2OH --> H2O2 + */ MaterialProperty & _k22; + /* + * Reaction coefficient for: + * OH + O- --> HO2- + */ MaterialProperty & _k23; + /* + * Reaction coefficient for: + * OH + H2 --> H + H2O + */ MaterialProperty & _k24; + /* + * Reaction coefficient for: + * OH + OH- --> O- + H2O + */ MaterialProperty & _k25; + /* + * Reaction coefficient for: + * OH + HO2 --> H2O + O2 + */ MaterialProperty & _k26; + /* + * Reaction coefficient for: + * OH + O2- --> OH- + O2 + */ MaterialProperty & _k27; + /* + * Reaction coefficient for: + * O- + H2O --> OH- + OH + */ MaterialProperty & _k28; + /* + * Reaction coefficient for: + * O- + H2 --> OH- + H + */ MaterialProperty & _k29; + /* + * Reaction coefficient for: + * O- + H2O2 --> O2- + H2O + */ MaterialProperty & _k30; + /* + * Reaction coefficient for: + * O- + HO2- --> O2- + OH- + */ MaterialProperty & _k31; + /* + * Reaction coefficient for: + * O- + O2- --> O3- + */ MaterialProperty & _k32; + /* + * Reaction coefficient for: + * O- + O2- + H2O --> 2OH- + O2 + */ MaterialProperty & _k33; + /* + * Reaction coefficient for: + * OH + H2O2 --> H2O + HO2 + */ MaterialProperty & _k34; + /* + * Reaction coefficient for: + * OH + HO2- --> OH- + HO2 + */ MaterialProperty & _k35; + /* + * Reaction coefficient for: + * H2O+ + H2O --> H3O+ + OH + */ MaterialProperty & _k36; + /* + * Reaction coefficient for: + * H3O+ + OH- --> H + OH + H2O + */ MaterialProperty & _k37; + /* + * Reaction coefficient for: + * HO2 + H2O --> H3O+ + O2- + */ MaterialProperty & _k38; + /* + * Reaction coefficient for: + * H3O+ O2- --> HO2 + H2O + */ MaterialProperty & _k39; + /// Diffusion coefficient for hydrated electron ADMaterialProperty & _diffemliq; + /// Diffusion coefficient for electron (defined the same as _diffemliq) ADMaterialProperty & _diffem; + /// Diffusion coefficient for potential in water (defined as the permittivity of the medium) ADMaterialProperty & _diffpotentialliq; + /// Diffusion coefficient for potential (defined the same as _diffpotentialliq) ADMaterialProperty & _diffpotential; + /// Diffusion coefficient for H radical MaterialProperty & _DH; + /// Diffusion coefficient for OH- ion ADMaterialProperty & _diffOHm; + /// Diffusion coefficient for H2O+ ion MaterialProperty & _DH2Op; + /// Diffusion coefficient for OH radical MaterialProperty & _DOH; + /// Diffusion coefficient for H2 molecule MaterialProperty & _DH2; + /// Diffusion coefficient for O- ion MaterialProperty & _DOm; + /// Diffusion coefficient for H3O+ ion ADMaterialProperty & _diffH3Op; + /// Diffusion coefficient for H2O2 molecule MaterialProperty & _DH2O2; + /// Diffusion coefficient for HO2- ion MaterialProperty & _DHO2m; + /// Diffusion coefficient for O2 molecule MaterialProperty & _DO2; + /// Diffusion coefficient for O2- ion MaterialProperty & _DO2m; + /// Diffusion coefficient for O radical MaterialProperty & _DO; + /// Diffusion coefficient for HO2 radical MaterialProperty & _DHO2; + /// Diffusion coefficient for O3 molecule MaterialProperty & _DO3; + /// Diffusion coefficient for O3- ion MaterialProperty & _DO3m; + /// Charge of hydrated electron MaterialProperty & _zem; + /// Charge of H radical MaterialProperty & _zH; + /// Charge of OH- ion MaterialProperty & _zOHm; + /// Charge of H2O+ ion MaterialProperty & _zH2Op; + /// Charge of OH radical MaterialProperty & _zOH; + /// Charge of H2 molecule MaterialProperty & _zH2; + /// Charge of O- ion MaterialProperty & _zOm; + /// Charge of H3O+ ion MaterialProperty & _zH3Op; + /// Charge of H2O2 molecule MaterialProperty & _zH2O2; + /// Charge of HO2- ion MaterialProperty & _zHO2m; + /// Charge of O2 molecule MaterialProperty & _zO2; + /// Charge of O2- ion MaterialProperty & _zO2m; + /// Charge of O radical MaterialProperty & _zO; + /// Charge of HO2 radical MaterialProperty & _zHO2; + /// Charge of O3 molecule MaterialProperty & _zO3; + /// Charge of O3- ion MaterialProperty & _zO3m; + /// Mobility coefficient for hydrated electron ADMaterialProperty & _muemliq; + /// Mobility coefficient for electron (defined the same as _diffemliq) ADMaterialProperty & _muem; + /// Mobility coefficient for H radical ADMaterialProperty & _muH; + /// Mobility coefficient for OH- ion ADMaterialProperty & _muOHm; + /// Mobility coefficient for H2O+ ion ADMaterialProperty & _muH2Op; + /// Mobility coefficient for OH radical ADMaterialProperty & _muOH; + /// Mobility coefficient for H2 molecule ADMaterialProperty & _muH2; + /// Mobility coefficient for O- ion ADMaterialProperty & _muOm; + /// Mobility coefficient for H3O+ ion ADMaterialProperty & _muH3Op; + /// Mobility coefficient for H2O2 molecule ADMaterialProperty & _muH2O2; + /// Mobility coefficient for HO2- ion ADMaterialProperty & _muHO2m; + /// Mobility coefficient for O2 molecule ADMaterialProperty & _muO2; + /// Mobility coefficient for O2- ion ADMaterialProperty & _muO2m; + /// Mobility coefficient for O radical ADMaterialProperty & _muO; + /// Mobility coefficient for HO2 radical ADMaterialProperty & _muHO2; + /// Mobility coefficient for O3 molecule ADMaterialProperty & _muO3; + /// Mobility coefficient for O3- ion ADMaterialProperty & _muO3m; + /// Diffusion coefficient of unity MaterialProperty & _Dunity; + /// Mobility coefficient of unity MaterialProperty & _muunity; + /// Negative charge sign of unity MaterialProperty & _munegunity; + /// Permittivity of the medium MaterialProperty & _eps; + /// Charge of hydrated electron MaterialProperty & _sgnemliq; + /// Charge of electrons MaterialProperty & _sgnem; + /// Charge of OH- ion MaterialProperty & _sgnOHm; + /// Charge of H3O+ ion MaterialProperty & _sgnH3Op; + /// Defined the same as _sgnH3Op MaterialProperty & _sgnNap; + /// Defined the same as _sgnOHm MaterialProperty & _sgnClm; + /// Defined the same as _muH3Op ADMaterialProperty & _muNap; + /// Defined the same as _muOHm ADMaterialProperty & _muClm; + /// Defined the same as _diffH3Op ADMaterialProperty & _diffNap; + /// Defined the same as _diffOHm ADMaterialProperty & _diffClm; + /// Electrostatic electric field ADMaterialProperty & _EField; + /// Converting logarithmic form of OH- ion into mol/m^3 ADMaterialProperty & _OHm_lin; + /// Converting logarithmic form of H3O+ ion ion into mol/m^3 ADMaterialProperty & _H3Op_lin; private: + /// Coupled hydrated electron const ADVariableValue & _emliq; + /// Coupled H radical const ADVariableValue & _H; + /// Coupled OH- ion const ADVariableValue & _OHm; + /// Coupled H2O+ ion const ADVariableValue & _H2Op; + /// Coupled OH radical const ADVariableValue & _OH; + /// Coupled H2 molecule const ADVariableValue & _H2; + /// Coupled O- ion const ADVariableValue & _Om; + /// Coupled H3O+ ion const ADVariableValue & _H3Op; + /// Coupled H2O2 molecule const ADVariableValue & _H2O2; + /// Coupled HO2- ion const ADVariableValue & _HO2m; + /// Coupled O2 molecule const ADVariableValue & _O2; + /// Coupled O2- ion const ADVariableValue & _O2m; + /// Coupled O radical const ADVariableValue & _O; + /// Coupled HO2 radical const ADVariableValue & _HO2; + /// Coupled O3 molecule const ADVariableValue & _O3; + /// Coupled O3- ion const ADVariableValue & _O3m; + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; }; diff --git a/src/actions/AddPeriodicRelativeNodalDifference.C b/src/actions/AddPeriodicRelativeNodalDifference.C index 62ea067f754..6516283a925 100644 --- a/src/actions/AddPeriodicRelativeNodalDifference.C +++ b/src/actions/AddPeriodicRelativeNodalDifference.C @@ -57,7 +57,7 @@ AddPeriodicRelativeNodalDifference::validParams() "starting_cycle", 0.0, "The number of the cycles before starting the difference calculation"); params.addRequiredParam("cycle_frequency", "The cycle's frequency in Hz"); params.addParam( - "num_cycles", 2000.0, "The number of cycles to calculation the difference for."); + "num_cycles", 2000.0, "The number of cycles to calculate the difference."); params.addParam>( "block", {}, "The subdomain that this action applies to."); params.addClassDescription( diff --git a/src/materials/Gas.C b/src/materials/Gas.C index 4748ae2e4aa..30cc7f40e5e 100644 --- a/src/materials/Gas.C +++ b/src/materials/Gas.C @@ -20,8 +20,6 @@ Gas::validParams() params.addParam( "user_relative_permittivity", 1.0, "Multiplies the permittivity of free space."); - // params.addRequiredParam("townsend","Whether to use the townsend formulation for the rate - // terms."); params.addRequiredParam("interp_trans_coeffs", "Whether to interpolate transport " "coefficients as a function of the mean " @@ -102,8 +100,6 @@ Gas::Gas(const InputParameters & parameters) _eps(declareProperty("eps")), _k_boltz(declareProperty("k_boltz")), _Avogadro(declareProperty("Avogadro")), - _vthermal_em(declareProperty("vthermal_em")), - _vthermal_ip(declareProperty("vthermal_ip")), _iz_coeff_efield_a(declareProperty("iz_coeff_efield_a")), _iz_coeff_efield_b(declareProperty("iz_coeff_efield_b")), _iz_coeff_efield_c(declareProperty("iz_coeff_efield_c")), diff --git a/src/materials/GasBase.C b/src/materials/GasBase.C index e8b92d3e79a..1ced169f1fc 100644 --- a/src/materials/GasBase.C +++ b/src/materials/GasBase.C @@ -80,7 +80,6 @@ GasBase::GasBase(const InputParameters & parameters) _muem(declareADProperty("muem")), _diffem(declareADProperty("diffem")), - _rate_coeff_ion(declareProperty("rate_coeff_ion")), _Eiz(declareProperty("Eiz")), _Eex(declareProperty("Eex")), _mumean_en(declareADProperty("mumean_en")), @@ -97,24 +96,11 @@ GasBase::GasBase(const InputParameters & parameters) _se_energy(declareProperty("se_energy")), - _ElectronTotalFluxMag(declareProperty("ElectronTotalFluxMag")), - _ElectronTotalFluxMagSizeForm(declareProperty("ElectronTotalFluxMagSizeForm")), - _ElectronTotalFlux(declareProperty("ElectronTotalFlux")), - _ElectronAdvectiveFlux(declareProperty("ElectronAdvectiveFlux")), - _ElectronDiffusiveFlux(declareProperty("ElectronDiffusiveFlux")), - _IonTotalFlux(declareProperty("IonTotalFlux")), - _IonAdvectiveFlux(declareProperty("IonAdvectiveFlux")), - _IonDiffusiveFlux(declareProperty("IonDiffusiveFlux")), - _Source_term(declareProperty("Source_term")), - _Source_term_coeff(declareProperty("Source_term_coeff")), _e(declareProperty("e")), _eps(declareProperty("eps")), - _Tem_lfa(declareProperty("Tem_lfa")), - _Tip_lfa(declareProperty("Tip_lfa")), + _k_boltz(declareProperty("k_boltz")), _Avogadro(declareProperty("Avogadro")), - _vthermal_em(declareProperty("vthermal_em")), - _vthermal_ip(declareProperty("vthermal_ip")), _iz_coeff_efield_a(declareProperty("iz_coeff_efield_a")), _iz_coeff_efield_b(declareProperty("iz_coeff_efield_b")), _iz_coeff_efield_c(declareProperty("iz_coeff_efield_c")), @@ -133,8 +119,7 @@ GasBase::GasBase(const InputParameters & parameters) _diffpotential(declareADProperty("diffpotential")), _actual_mean_energy(declareADProperty("actual_mean_energy")), _Tem(declareADProperty("Tem")), - _diffu(declareProperty("diffu")), - _sgnu(declareProperty("sgnu")), + _T_gas(declareProperty("T_gas")), _p_gas(declareProperty("p_gas")), _n_gas(declareProperty("n_gas")), diff --git a/src/materials/GasElectronMoments.C b/src/materials/GasElectronMoments.C index d532b00216b..58558067a20 100644 --- a/src/materials/GasElectronMoments.C +++ b/src/materials/GasElectronMoments.C @@ -20,8 +20,6 @@ GasElectronMoments::validParams() params.addParam( "user_relative_permittivity", 1.0, "Multiplies the permittivity of free space."); - // params.addRequiredParam("townsend","Whether to use the townsend formulation for the rate - // terms."); params.addRequiredParam("interp_trans_coeffs", "Whether to interpolate transport " "coefficients as a function of the mean " @@ -91,7 +89,6 @@ GasElectronMoments::GasElectronMoments(const InputParameters & parameters) _muem(declareADProperty("muem")), _diffem(declareADProperty("diffem")), - _rate_coeff_ion(declareProperty("rate_coeff_ion")), _Eiz(declareProperty("Eiz")), _Eex(declareProperty("Eex")), _Ar(declareProperty("Ar")), @@ -109,34 +106,14 @@ GasElectronMoments::GasElectronMoments(const InputParameters & parameters) _se_energy(declareProperty("se_energy")), - _ElectronTotalFluxMag(declareProperty("ElectronTotalFluxMag")), - _ElectronTotalFluxMagSizeForm(declareProperty("ElectronTotalFluxMagSizeForm")), - _ElectronTotalFlux(declareProperty("ElectronTotalFlux")), - _ElectronAdvectiveFlux(declareProperty("ElectronAdvectiveFlux")), - _ElectronDiffusiveFlux(declareProperty("ElectronDiffusiveFlux")), - _IonTotalFlux(declareProperty("IonTotalFlux")), - _IonAdvectiveFlux(declareProperty("IonAdvectiveFlux")), - _IonDiffusiveFlux(declareProperty("IonDiffusiveFlux")), - _Source_term(declareProperty("Source_term")), - _Source_term_coeff(declareProperty("Source_term_coeff")), _e(declareProperty("e")), _eps(declareProperty("eps")), - _Tem_lfa(declareProperty("Tem_lfa")), - _Tip_lfa(declareProperty("Tip_lfa")), + _k_boltz(declareProperty("k_boltz")), _Avogadro(declareProperty("Avogadro")), - _vthermal_em(declareProperty("vthermal_em")), - _vthermal_ip(declareProperty("vthermal_ip")), - _iz_coeff_efield_a(declareProperty("iz_coeff_efield_a")), - _iz_coeff_efield_b(declareProperty("iz_coeff_efield_b")), - _iz_coeff_efield_c(declareProperty("iz_coeff_efield_c")), - _iz_coeff_energy_a(declareProperty("iz_coeff_energy_a")), - _iz_coeff_energy_b(declareProperty("iz_coeff_energy_b")), - _iz_coeff_energy_c(declareProperty("iz_coeff_energy_c")), + _N_A(declareProperty("N_A")), - _el_coeff_energy_a(declareProperty("el_coeff_energy_a")), - _el_coeff_energy_b(declareProperty("el_coeff_energy_b")), - _el_coeff_energy_c(declareProperty("el_coeff_energy_c")), + _sgnem(declareProperty("sgnem")), _sgnmean_en(declareProperty("sgnmean_en")), _diffpotential(declareADProperty("diffpotential")), diff --git a/src/materials/HeavySpecies.C b/src/materials/HeavySpecies.C index 521b640c753..46eb35c6198 100644 --- a/src/materials/HeavySpecies.C +++ b/src/materials/HeavySpecies.C @@ -30,10 +30,7 @@ HeavySpeciesTempl::validParams() params.addParam("time_units", 1, "Units of time"); params.addParam("mobility", "The species mobility (if applicable)."); params.addParam("diffusivity", "The species diffusivity (if applicable)."); - // params.addRequiredParam( - // "reactions_file", "The file containing interpolation tables for material properties."); - // params.addParam("user_T_gas", 300, "The gas temperature in Kelvin."); - // params.addParam("user_p_gas", 1.01e5, "The gas pressure in Pascals."); + params.addClassDescription("Material properties of ions"); return params; } @@ -90,13 +87,8 @@ HeavySpeciesTempl::computeQpProperties() _massHeavy[_qp] = _user_massHeavy; _sgnHeavy[_qp] = _user_sgnHeavy; - // _T_gas[_qp] = _user_T_gas; - // _p_gas[_qp] = _user_p_gas; - _temperatureHeavy[_qp] = _T_gas[_qp]; // Needs to be changed. - // _n_gas[_qp] = _p_gas[_qp] / (8.3145 * _T_gas[_qp]); - if (!_calc_mobility && !_calc_diffusivity) { _diffHeavy[_qp] = getParam("diffusivity") * _time_units; @@ -126,28 +118,6 @@ HeavySpeciesTempl::computeQpProperties() 0.004 * _time_units / (760. * _p_gas[_qp] / 1.01E5); // covert to m^2 and include press } - /* - if (isParamValid("mobility")) - { - _muHeavy[_qp] = getParam("mobility") * _voltage_scaling * _time_units; - } - else - { - _muHeavy[_qp] = - 1444. * _voltage_scaling * _time_units / - (10000. * 760. * _p_gas[_qp] / 1.01E5); // units of m^2/(kV*s) if _voltage_scaling = 1000 - } - - if (isParamValid("diffusivity")) - { - _diffHeavy[_qp] = getParam("diffusivity") * _time_units; - } - else - { - _diffHeavy[_qp] = - 0.004 * _time_units / (760. * _p_gas[_qp] / 1.01E5); // covert to m^2 and include press - } - */ } template class HeavySpeciesTempl; diff --git a/src/materials/Water.C b/src/materials/Water.C index 6e50337e141..b214bda1bd4 100644 --- a/src/materials/Water.C +++ b/src/materials/Water.C @@ -65,7 +65,6 @@ Water::Water(const InputParameters & parameters) _kem(declareADProperty("kem")), _kemliqemliq(declareADProperty("kemliqemliq")), _kemem(declareADProperty("kemem")), - _k3(declareProperty("k3")), _k4(declareProperty("k4")), _k5(declareProperty("k5")), _k6(declareProperty("k6")), @@ -241,7 +240,7 @@ Water::computeQpProperties() _k25[_qp] = 1.3e10; // OH + OH- --> O- + H2O _k26[_qp] = 6.0e9; // OH + HO2 --> H2O + O2 _k27[_qp] = 8.0e9; // OH + O2- --> OH- + O2 - _k28[_qp] = 1.8e6; // ] O- + H2O --> OH- + OH + _k28[_qp] = 1.8e6; // O- + H2O --> OH- + OH _k29[_qp] = 8.0e7; // O- + H2 --> OH- + H _k30[_qp] = 5.0e8; // O- + H2O2 --> O2- + H2O _k31[_qp] = 4.0e8; // O- + HO2- --> O2- + OH- From c1357a17f828c4ce6929eded36fdf3d2deec0996 Mon Sep 17 00:00:00 2001 From: csdechant Date: Wed, 13 Nov 2024 12:41:41 -0700 Subject: [PATCH 03/10] Addressing trailing whitespace --- include/actions/AddDriftDiffusionAction.h | 2 +- include/auxkernels/AbsValueAux.h | 3 +-- include/auxkernels/DensityNormalization.h | 4 ++-- include/auxkernels/DiffusiveFlux.h | 2 +- include/auxkernels/Sigma.h | 2 +- include/auxkernels/TM0CylindricalErAux.h | 2 +- include/auxkernels/TM0CylindricalEzAux.h | 2 +- include/bcs/FieldEmissionBC.h | 5 ++--- include/bcs/HagelaarEnergyAdvectionBC.h | 2 +- include/bcs/SakiyamaEnergySecondaryElectronBC.h | 2 +- include/dgkernels/DGCoeffDiffusion.h | 4 ++-- include/dgkernels/DGEFieldAdvection.h | 2 +- include/interfacekernels/HphiRadialInterface.h | 2 +- include/interfacekernels/InterfaceLogDiffusionElectrons.h | 2 +- include/kernels/DriftDiffusion.h | 4 ++-- include/kernels/EEDFReactionLogForShootMethod.h | 2 +- include/kernels/EFieldArtDiff.h | 2 +- include/kernels/ElectronEnergyLossFromExcitation.h | 2 +- include/kernels/ElectronEnergyTermRate.h | 4 ++-- include/kernels/ProductAABBRxn.h | 4 ++-- include/kernels/ReactionSecondOrderLogForShootMethod.h | 4 ++-- include/kernels/ReactionThirdOrderLogForShootMethod.h | 6 +++--- include/kernels/TM0CylindricalEr.h | 4 ++-- include/kernels/TM0CylindricalEz.h | 4 ++-- include/materials/Gas.h | 4 ++-- include/materials/GasBase.h | 2 +- include/materials/GasElectronMoments.h | 2 +- include/materials/HeavySpecies.h | 8 ++++---- include/materials/Water.h | 4 ++-- include/postprocessors/AverageNodalDensity.h | 2 +- include/userobjects/ProvideMobility.h | 2 +- 31 files changed, 47 insertions(+), 49 deletions(-) diff --git a/include/actions/AddDriftDiffusionAction.h b/include/actions/AddDriftDiffusionAction.h index 15c1a9695df..48181f81095 100644 --- a/include/actions/AddDriftDiffusionAction.h +++ b/include/actions/AddDriftDiffusionAction.h @@ -40,7 +40,7 @@ class AddDriftDiffusionAction : public Action /* * Helper function that supplies the Kernels for drift-diffusion for the electrons, - * energy independent charged particles, neutral particles, and + * energy independent charged particles, neutral particles, and * electron mean energy depending */ virtual void addADKernels(const std::string & name, diff --git a/include/auxkernels/AbsValueAux.h b/include/auxkernels/AbsValueAux.h index 1b218a415f5..665b57116b8 100644 --- a/include/auxkernels/AbsValueAux.h +++ b/include/auxkernels/AbsValueAux.h @@ -26,7 +26,6 @@ class AbsValueAux : public AuxKernel virtual Real computeValue() override; private: - - /// The coupled variable in which to take to absolute value + /// The coupled variable in which to take to absolute value const VariableValue & _u; }; diff --git a/include/auxkernels/DensityNormalization.h b/include/auxkernels/DensityNormalization.h index 600dce6799a..4d0b46f951b 100644 --- a/include/auxkernels/DensityNormalization.h +++ b/include/auxkernels/DensityNormalization.h @@ -29,8 +29,8 @@ class DensityNormalization : public AuxKernel const VariableValue & _density; /// Denominator to normalize to - const Real * _pp_on_source; - + const Real * _pp_on_source; + /// A factor to shift the normilization by const Real * _shift; diff --git a/include/auxkernels/DiffusiveFlux.h b/include/auxkernels/DiffusiveFlux.h index 15050a429c5..24d7bfd6dff 100644 --- a/include/auxkernels/DiffusiveFlux.h +++ b/include/auxkernels/DiffusiveFlux.h @@ -37,7 +37,7 @@ class DiffusiveFluxTempl : public AuxKernel /// Coupled density variable MooseVariable & _density_var; - + /// Value of the coupled density variable const VariableValue & _density_log; diff --git a/include/auxkernels/Sigma.h b/include/auxkernels/Sigma.h index 396f0c28e85..6b12538e617 100644 --- a/include/auxkernels/Sigma.h +++ b/include/auxkernels/Sigma.h @@ -13,7 +13,7 @@ #include "AuxKernel.h" /** - * Calculates the surface charge due to a simplified version of the ion flux + * Calculates the surface charge due to a simplified version of the ion flux * to a boundary */ class Sigma : public AuxKernel diff --git a/include/auxkernels/TM0CylindricalErAux.h b/include/auxkernels/TM0CylindricalErAux.h index c7afb64ec2e..c1ee63caafa 100644 --- a/include/auxkernels/TM0CylindricalErAux.h +++ b/include/auxkernels/TM0CylindricalErAux.h @@ -26,7 +26,7 @@ class TM0CylindricalErAux : public AuxKernel virtual Real computeValue() override; private: - /// Gradient of the azimuthal component of the magnetic field + /// Gradient of the azimuthal component of the magnetic field const VariableGradient & _grad_Hphi; /// Angular frequency of the wave Real _omega; diff --git a/include/auxkernels/TM0CylindricalEzAux.h b/include/auxkernels/TM0CylindricalEzAux.h index 2b1460dc60b..fd0ef470ee2 100644 --- a/include/auxkernels/TM0CylindricalEzAux.h +++ b/include/auxkernels/TM0CylindricalEzAux.h @@ -28,7 +28,7 @@ class TM0CylindricalEzAux : public AuxKernel private: /// Gradient of the azimuthal component of the magnetic field const VariableGradient & _grad_Hphi; - /// Azimuthal component of the magnetic field + /// Azimuthal component of the magnetic field const VariableValue & _Hphi; /// Angular frequency of the wave Real _omega; diff --git a/include/bcs/FieldEmissionBC.h b/include/bcs/FieldEmissionBC.h index 88ca82e8193..bbed90c3fd4 100644 --- a/include/bcs/FieldEmissionBC.h +++ b/include/bcs/FieldEmissionBC.h @@ -32,7 +32,7 @@ class FieldEmissionBC : public ADIntegratedBC /// Number of ions defined const unsigned int _num_ions; - + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; /// Ion density variables @@ -42,8 +42,7 @@ class FieldEmissionBC : public ADIntegratedBC /// Gradient of ion density values std::vector _grad_ip; - - /// Mobility coefficient of the electrons + /// Mobility coefficient of the electrons const ADMaterialProperty & _muem; /// Mass of electrons const MaterialProperty & _massem; diff --git a/include/bcs/HagelaarEnergyAdvectionBC.h b/include/bcs/HagelaarEnergyAdvectionBC.h index fd29bfa6072..7dfdfe14ee0 100644 --- a/include/bcs/HagelaarEnergyAdvectionBC.h +++ b/include/bcs/HagelaarEnergyAdvectionBC.h @@ -63,7 +63,7 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC /// Electron thermal velocity Real _v_thermal; /// Gamma electron density (electrons emitted by the surface) - Real _n_gamma; /// TODO: currently '_n_gamma' is fixed at 0 + Real _n_gamma; /// TODO: currently '_n_gamma' is fixed at 0 /// Total flux form secondary electrons ADReal _bc_val; }; diff --git a/include/bcs/SakiyamaEnergySecondaryElectronBC.h b/include/bcs/SakiyamaEnergySecondaryElectronBC.h index 35c7bdf19cb..74082b10857 100644 --- a/include/bcs/SakiyamaEnergySecondaryElectronBC.h +++ b/include/bcs/SakiyamaEnergySecondaryElectronBC.h @@ -35,7 +35,7 @@ class SakiyamaEnergySecondaryElectronBC : public ADIntegratedBC const std::vector _se_coeff_names; /// Material value of secondary electron coefficient std::vector *> _se_coeff; - + // Gradient of the coupled potential const ADVariableGradient & _grad_potential; /// Electron density diff --git a/include/dgkernels/DGCoeffDiffusion.h b/include/dgkernels/DGCoeffDiffusion.h index 346ae9d9ce0..403679e2356 100644 --- a/include/dgkernels/DGCoeffDiffusion.h +++ b/include/dgkernels/DGCoeffDiffusion.h @@ -34,8 +34,8 @@ class DGCoeffDiffusion : public ADDGKernel /* * _epsilon and _sigma (as described above) are used to penalize the jumps - * in discontinuity between cells. More information can be found in "Discontinuous - * Galerkin Methods for Solving Elliptic and Parabolic Equations: Theory + * in discontinuity between cells. More information can be found in "Discontinuous + * Galerkin Methods for Solving Elliptic and Parabolic Equations: Theory * and Implementation" by B. Rivière */ Real _epsilon; diff --git a/include/dgkernels/DGEFieldAdvection.h b/include/dgkernels/DGEFieldAdvection.h index e7390909749..aa68aa0b0f9 100644 --- a/include/dgkernels/DGEFieldAdvection.h +++ b/include/dgkernels/DGEFieldAdvection.h @@ -11,7 +11,7 @@ #include "ADDGKernel.h" /** - * The discontinuous Galerkin form of the generic electric + * The discontinuous Galerkin form of the generic electric * field driven advection term */ class DGEFieldAdvection : public ADDGKernel diff --git a/include/interfacekernels/HphiRadialInterface.h b/include/interfacekernels/HphiRadialInterface.h index 0a51b6dbed1..3c37ff76652 100644 --- a/include/interfacekernels/HphiRadialInterface.h +++ b/include/interfacekernels/HphiRadialInterface.h @@ -14,7 +14,7 @@ /** * DG kernel for interfacing of the axial electic field on adjacent blocks. - * The axial electic field is relate to the azmithal magnetic flux + * The axial electic field is relate to the azmithal magnetic flux * through using Ampère–Maxwell law. */ class HphiRadialInterface : public ADInterfaceKernel diff --git a/include/interfacekernels/InterfaceLogDiffusionElectrons.h b/include/interfacekernels/InterfaceLogDiffusionElectrons.h index 16c17861976..844efb6ed58 100644 --- a/include/interfacekernels/InterfaceLogDiffusionElectrons.h +++ b/include/interfacekernels/InterfaceLogDiffusionElectrons.h @@ -27,7 +27,7 @@ class InterfaceLogDiffusionElectrons : public ADInterfaceKernel Real _r_units; /// Scaling units for the position for the neighbor variable Real _r_neighbor_units; - + /// Diffusion coefficient of the neighbor variable const ADMaterialProperty & _diffem; }; diff --git a/include/kernels/DriftDiffusion.h b/include/kernels/DriftDiffusion.h index c00f6e3aff8..3782e889b65 100644 --- a/include/kernels/DriftDiffusion.h +++ b/include/kernels/DriftDiffusion.h @@ -13,8 +13,8 @@ #include "ADKernel.h" /** - * Generic drift-diffusion equation that contains both - * an electric field driven advection term and a diffusion term + * Generic drift-diffusion equation that contains both + * an electric field driven advection term and a diffusion term */ class DriftDiffusion : public ADKernel { diff --git a/include/kernels/EEDFReactionLogForShootMethod.h b/include/kernels/EEDFReactionLogForShootMethod.h index b4bbd868500..04d569034af 100644 --- a/include/kernels/EEDFReactionLogForShootMethod.h +++ b/include/kernels/EEDFReactionLogForShootMethod.h @@ -13,7 +13,7 @@ #include "ADKernel.h" /** - * The derivative of an EEDF reaction term used to calculate the + * The derivative of an EEDF reaction term used to calculate the * sensitivity variable for the shoothing method */ class EEDFReactionLogForShootMethod : public ADKernel diff --git a/include/kernels/EFieldArtDiff.h b/include/kernels/EFieldArtDiff.h index 060fbfd6051..02a37370d97 100644 --- a/include/kernels/EFieldArtDiff.h +++ b/include/kernels/EFieldArtDiff.h @@ -13,7 +13,7 @@ #include "ADKernel.h" /** - * Generic artificial electric field driven advection term + * Generic artificial electric field driven advection term * (Densities must be in logarithmic form) */ class EFieldArtDiff : public ADKernel diff --git a/include/kernels/ElectronEnergyLossFromExcitation.h b/include/kernels/ElectronEnergyLossFromExcitation.h index 855e6bf22db..99697480a79 100644 --- a/include/kernels/ElectronEnergyLossFromExcitation.h +++ b/include/kernels/ElectronEnergyLossFromExcitation.h @@ -38,7 +38,7 @@ class ElectronEnergyLossFromExcitation : public ADKernel const ADMaterialProperty & _alpha_ex; /// Energy threshold for excitation const MaterialProperty & _Eex; - + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; /// Electron density diff --git a/include/kernels/ElectronEnergyTermRate.h b/include/kernels/ElectronEnergyTermRate.h index 5e967e77847..114ba4b5963 100644 --- a/include/kernels/ElectronEnergyTermRate.h +++ b/include/kernels/ElectronEnergyTermRate.h @@ -13,8 +13,8 @@ #include "ADKernel.h" /** - * Electron energy loss term for inelastic collisions - * using reaction rate coefficients. Threshold energy is the energy lost in Volts in a single + * Electron energy loss term for inelastic collisions + * using reaction rate coefficients. Threshold energy is the energy lost in Volts in a single * collision (Densities must be in logarithmic form) */ class ElectronEnergyTermRate : public ADKernel diff --git a/include/kernels/ProductAABBRxn.h b/include/kernels/ProductAABBRxn.h index 9b012c1edf4..c18b0cf1e62 100644 --- a/include/kernels/ProductAABBRxn.h +++ b/include/kernels/ProductAABBRxn.h @@ -13,8 +13,8 @@ #include "ADKernel.h" /** - * Generic second order reaction source term in which two molecules of - * v are produced from two molecules of u + * Generic second order reaction source term in which two molecules of + * v are produced from two molecules of u * (Densities must be in logarithmic form) */ class ProductAABBRxn : public ADKernel diff --git a/include/kernels/ReactionSecondOrderLogForShootMethod.h b/include/kernels/ReactionSecondOrderLogForShootMethod.h index 7b199b5e751..6a116ec8cbd 100644 --- a/include/kernels/ReactionSecondOrderLogForShootMethod.h +++ b/include/kernels/ReactionSecondOrderLogForShootMethod.h @@ -31,11 +31,11 @@ class ReactionSecondOrderLogForShootMethod : public ADKernel /// Accelerated density value const ADVariableValue & _density; - /// Accelerated density variable + /// Accelerated density variable unsigned int _density_id; /// Coupled density value const ADVariableValue & _v; - /// Coupled density variable + /// Coupled density variable unsigned int _v_id; /// Stoichiometric coefficient const Real & _stoichiometric_coeff; diff --git a/include/kernels/ReactionThirdOrderLogForShootMethod.h b/include/kernels/ReactionThirdOrderLogForShootMethod.h index dce5884cf8d..4aaa4a54259 100644 --- a/include/kernels/ReactionThirdOrderLogForShootMethod.h +++ b/include/kernels/ReactionThirdOrderLogForShootMethod.h @@ -13,7 +13,7 @@ #include "ADKernel.h" /** - * The derivative of a third order reaction term used to calculate the + * The derivative of a third order reaction term used to calculate the * sensitivity variable for the shoothing method. */ class ReactionThirdOrderLogForShootMethod : public ADKernel @@ -35,11 +35,11 @@ class ReactionThirdOrderLogForShootMethod : public ADKernel unsigned int _density_id; /// First coupled density value const ADVariableValue & _v; - /// First coupled density variable + /// First coupled density variable unsigned int _v_id; /// Second coupled density value const ADVariableValue & _w; - /// Second coupled density variable + /// Second coupled density variable unsigned int _w_id; /// Stoichiometric coefficient const Real & _stoichiometric_coeff; diff --git a/include/kernels/TM0CylindricalEr.h b/include/kernels/TM0CylindricalEr.h index b54b47b8b3d..71a5235e983 100644 --- a/include/kernels/TM0CylindricalEr.h +++ b/include/kernels/TM0CylindricalEr.h @@ -33,8 +33,8 @@ class TM0CylindricalEr : public ADKernel const Real _mu0; /// Permittivity of free space const Real _eps0; - /// Azimuthal component of magnetic field + /// Azimuthal component of magnetic field const ADVariableValue & _Hphi; - /// Gradient of azimuthal component of magnetic field + /// Gradient of azimuthal component of magnetic field const ADVariableGradient & _grad_Hphi; }; diff --git a/include/kernels/TM0CylindricalEz.h b/include/kernels/TM0CylindricalEz.h index f4a6df778c6..d8cf91d9aae 100644 --- a/include/kernels/TM0CylindricalEz.h +++ b/include/kernels/TM0CylindricalEz.h @@ -33,8 +33,8 @@ class TM0CylindricalEz : public ADKernel const Real _mu0; /// Permittivity of free space const Real _eps0; - /// Azimuthal component of magnetic field + /// Azimuthal component of magnetic field const ADVariableValue & _Hphi; - /// Gradient of azimuthal component of magnetic field + /// Gradient of azimuthal component of magnetic field const ADVariableGradient & _grad_Hphi; }; diff --git a/include/materials/Gas.h b/include/materials/Gas.h index 202330fd238..f3bcc3e3662 100644 --- a/include/materials/Gas.h +++ b/include/materials/Gas.h @@ -37,7 +37,7 @@ class Gas : public ADMaterial SplineInterpolation _mu_interpolation; /// Spline Interpolation fuction for diffusion mobility coefficient SplineInterpolation _diff_interpolation; - + /// True if interpolating transport coefficients as a function of the mean energy bool _interp_trans_coeffs; /// True if interpolating the elastic collision townsend coefficient as a function of the mean energy @@ -83,7 +83,7 @@ class Gas : public ADMaterial ADMaterialProperty & _mumean_en; /// AD electron energy diffusion coefficient ADMaterialProperty & _diffmean_en; - /// Constant elastic collision rate coefficient + /// Constant elastic collision rate coefficient MaterialProperty & _rate_coeff_elastic; /// Mass of electrons MaterialProperty & _massem; diff --git a/include/materials/GasBase.h b/include/materials/GasBase.h index 6aa50637533..1eca4697da5 100644 --- a/include/materials/GasBase.h +++ b/include/materials/GasBase.h @@ -75,7 +75,7 @@ class GasBase : public ADMaterial ADMaterialProperty & _mumean_en; /// AD electron energy diffusion coefficient ADMaterialProperty & _diffmean_en; - /// Constant elastic collision rate coefficient + /// Constant elastic collision rate coefficient MaterialProperty & _rate_coeff_elastic; /// Mass of electrons MaterialProperty & _massem; diff --git a/include/materials/GasElectronMoments.h b/include/materials/GasElectronMoments.h index 74708748b04..bd7d1e563d8 100644 --- a/include/materials/GasElectronMoments.h +++ b/include/materials/GasElectronMoments.h @@ -89,7 +89,7 @@ class GasElectronMoments : public ADMaterial ADMaterialProperty & _mumean_en; /// AD electron energy diffusion coefficient ADMaterialProperty & _diffmean_en; - /// Constant elastic collision rate coefficient + /// Constant elastic collision rate coefficient MaterialProperty & _rate_coeff_elastic; /// Mass of electrons MaterialProperty & _massem; diff --git a/include/materials/HeavySpecies.h b/include/materials/HeavySpecies.h index 92fa0da654a..42fd5c5231d 100644 --- a/include/materials/HeavySpecies.h +++ b/include/materials/HeavySpecies.h @@ -38,14 +38,14 @@ class HeavySpeciesTempl : public Material /// Ion mass MaterialProperty & _massHeavy; - /// Ion temperature + /// Ion temperature GenericMaterialProperty & _temperatureHeavy; /// Charge sign of ion MaterialProperty & _sgnHeavy; - /// Ion mobility coefficient + /// Ion mobility coefficient GenericMaterialProperty & _muHeavy; - /// Ion diffusion coefficient - GenericMaterialProperty & _diffHeavy; + /// Ion diffusion coefficient + GenericMaterialProperty & _diffHeavy; /// Neutal gas temperature const MaterialProperty & _T_gas; diff --git a/include/materials/Water.h b/include/materials/Water.h index 1d507be49c2..cb5d57171cd 100644 --- a/include/materials/Water.h +++ b/include/materials/Water.h @@ -117,7 +117,7 @@ class Water : public ADMaterial /* * Reaction coefficient for: * H + OH --> H2O - */ + */ MaterialProperty & _k14; /* * Reaction coefficient for: @@ -157,7 +157,7 @@ class Water : public ADMaterial /* * Reaction coefficient for: * 2OH --> H2O2 - */ + */ MaterialProperty & _k22; /* * Reaction coefficient for: diff --git a/include/postprocessors/AverageNodalDensity.h b/include/postprocessors/AverageNodalDensity.h index c3b33e47348..9019b002d39 100644 --- a/include/postprocessors/AverageNodalDensity.h +++ b/include/postprocessors/AverageNodalDensity.h @@ -13,7 +13,7 @@ #include "NodalVariablePostprocessor.h" /* - * Similar to AverageNodalVariableValue except meant to + * Similar to AverageNodalVariableValue except meant to * average variables expressed in logarithmic form */ class AverageNodalDensity : public NodalVariablePostprocessor diff --git a/include/userobjects/ProvideMobility.h b/include/userobjects/ProvideMobility.h index e11e87d5dfe..2c02caf71cf 100644 --- a/include/userobjects/ProvideMobility.h +++ b/include/userobjects/ProvideMobility.h @@ -13,7 +13,7 @@ #include "GeneralUserObject.h" /* - * Defines ballast resistance and the area of + * Defines ballast resistance and the area of * an electrode (Used with Circuit BCs) */ class ProvideMobility : public GeneralUserObject From 52b53b9861ed2f0b753c8f3ce6549456d38e7e04 Mon Sep 17 00:00:00 2001 From: csdechant Date: Wed, 13 Nov 2024 12:44:59 -0700 Subject: [PATCH 04/10] Addressing Clang formatting --- include/auxkernels/Current.h | 1 - include/auxkernels/ProcRateForRateCoeffThreeBody.h | 1 - include/auxkernels/TotalFlux.h | 2 +- include/constraints/ArbitrarilyTiedValueConstraint.h | 1 - include/postprocessors/AverageNodalDifference.h | 1 - include/userobjects/CurrentDensityShapeSideUserObject.h | 1 - src/actions/AddPeriodicRelativeNodalDifference.C | 3 +-- src/interfacekernels/InterfaceAdvection.C | 5 ++--- src/materials/HeavySpecies.C | 1 - 9 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/auxkernels/Current.h b/include/auxkernels/Current.h index 4958132f127..da0f7c967f6 100644 --- a/include/auxkernels/Current.h +++ b/include/auxkernels/Current.h @@ -27,7 +27,6 @@ class CurrentTempl : public AuxKernel virtual Real computeValue() override; protected: - /// The component of the current const int _component; /// The scaling units for the position diff --git a/include/auxkernels/ProcRateForRateCoeffThreeBody.h b/include/auxkernels/ProcRateForRateCoeffThreeBody.h index d7b849a2357..85acfda92b4 100644 --- a/include/auxkernels/ProcRateForRateCoeffThreeBody.h +++ b/include/auxkernels/ProcRateForRateCoeffThreeBody.h @@ -27,7 +27,6 @@ class ProcRateForRateCoeffThreeBodyTempl : public AuxKernel virtual Real computeValue() override; protected: - /// First body variable const VariableValue & _v; /// Second body variable diff --git a/include/auxkernels/TotalFlux.h b/include/auxkernels/TotalFlux.h index a5bf757de47..0ab0c202878 100644 --- a/include/auxkernels/TotalFlux.h +++ b/include/auxkernels/TotalFlux.h @@ -27,7 +27,7 @@ class TotalFluxTempl : public AuxKernel const int _component; /// Coupled density variable const MooseVariable & _density_var; - /// Value of the coupled density variable + /// Value of the coupled density variable const VariableValue & _density_log; /// Gradient of the coupled density variable const VariableGradient & _grad_density_log; diff --git a/include/constraints/ArbitrarilyTiedValueConstraint.h b/include/constraints/ArbitrarilyTiedValueConstraint.h index 88565d126d7..ff80b895baa 100644 --- a/include/constraints/ArbitrarilyTiedValueConstraint.h +++ b/include/constraints/ArbitrarilyTiedValueConstraint.h @@ -33,7 +33,6 @@ class ArbitrarilyTiedValueConstraint : public NodeFaceConstraint virtual Real computeQpJacobian(Moose::ConstraintJacobianType type); protected: - /// Scaling factor const Real _scaling; /// Ratio of secondary to primary variable diff --git a/include/postprocessors/AverageNodalDifference.h b/include/postprocessors/AverageNodalDifference.h index ec9a2057d91..74980797739 100644 --- a/include/postprocessors/AverageNodalDifference.h +++ b/include/postprocessors/AverageNodalDifference.h @@ -30,7 +30,6 @@ class AverageNodalDifference : public NodalVariablePostprocessor virtual void threadJoin(const UserObject & y) override; protected: - /// The coupled variable used to determined the difference const VariableValue & _other_var; /// The sum of the square of the difference diff --git a/include/userobjects/CurrentDensityShapeSideUserObject.h b/include/userobjects/CurrentDensityShapeSideUserObject.h index 513990a6378..32a1a57fd04 100644 --- a/include/userobjects/CurrentDensityShapeSideUserObject.h +++ b/include/userobjects/CurrentDensityShapeSideUserObject.h @@ -56,7 +56,6 @@ class CurrentDensityShapeSideUserObject : public ShapeSideUserObject ///@} protected: - /// Term that represents the value of the side integral Real _integral; /// Term that represents the Jacobian diff --git a/src/actions/AddPeriodicRelativeNodalDifference.C b/src/actions/AddPeriodicRelativeNodalDifference.C index 6516283a925..ebd37c7f174 100644 --- a/src/actions/AddPeriodicRelativeNodalDifference.C +++ b/src/actions/AddPeriodicRelativeNodalDifference.C @@ -56,8 +56,7 @@ AddPeriodicRelativeNodalDifference::validParams() params.addParam( "starting_cycle", 0.0, "The number of the cycles before starting the difference calculation"); params.addRequiredParam("cycle_frequency", "The cycle's frequency in Hz"); - params.addParam( - "num_cycles", 2000.0, "The number of cycles to calculate the difference."); + params.addParam("num_cycles", 2000.0, "The number of cycles to calculate the difference."); params.addParam>( "block", {}, "The subdomain that this action applies to."); params.addClassDescription( diff --git a/src/interfacekernels/InterfaceAdvection.C b/src/interfacekernels/InterfaceAdvection.C index 527188b99fa..f9b29ee7ca0 100644 --- a/src/interfacekernels/InterfaceAdvection.C +++ b/src/interfacekernels/InterfaceAdvection.C @@ -21,9 +21,8 @@ InterfaceAdvection::validParams() params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("neighbor_position_units", "The units of position in the neighboring domain."); - params.addClassDescription( - "Used to include the electric field driven advective flux of species" - "into or out of a neighboring subdomain."); + params.addClassDescription("Used to include the electric field driven advective flux of species" + "into or out of a neighboring subdomain."); return params; } diff --git a/src/materials/HeavySpecies.C b/src/materials/HeavySpecies.C index 46eb35c6198..8241dc1543a 100644 --- a/src/materials/HeavySpecies.C +++ b/src/materials/HeavySpecies.C @@ -117,7 +117,6 @@ HeavySpeciesTempl::computeQpProperties() _diffHeavy[_qp] = 0.004 * _time_units / (760. * _p_gas[_qp] / 1.01E5); // covert to m^2 and include press } - } template class HeavySpeciesTempl; From 6a94f3711db0160f69cf5975b38cb3ce506f0cab Mon Sep 17 00:00:00 2001 From: Corey DeChant <37221357+csdechant@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:57:38 -0700 Subject: [PATCH 05/10] Apply suggestions from code review Co-authored-by: Grayson Gall <66559200+gsgall@users.noreply.github.com> --- include/actions/AddPeriodicControllers.h | 2 +- include/auxkernels/AbsValueAux.h | 2 +- include/bcs/ElectronAdvectionDoNothingBC.h | 4 ++-- include/bcs/ElectronDiffusionDoNothingBC.h | 4 ++-- include/bcs/HagelaarEnergyAdvectionBC.h | 2 +- include/bcs/SchottkyEmissionBC.h | 2 +- include/bcs/SecondaryElectronEnergyBC.h | 4 ++-- include/interfacekernels/HphiRadialInterface.h | 4 ++-- include/kernels/ChargeSourceMoles_KV.h | 2 +- include/kernels/EFieldArtDiff.h | 2 +- include/kernels/EFieldMagnitudeSource.h | 2 +- include/kernels/TM0CylindricalEr.h | 4 ++-- include/kernels/TM0CylindricalEz.h | 4 ++-- include/materials/Gas.h | 16 +++++++++++----- include/materials/GasBase.h | 16 +++++++++++----- include/userobjects/ProvideMobility.h | 2 +- src/interfacekernels/InterfaceAdvection.C | 2 +- 17 files changed, 43 insertions(+), 31 deletions(-) diff --git a/include/actions/AddPeriodicControllers.h b/include/actions/AddPeriodicControllers.h index 9f1503274b2..721aa91aa6e 100644 --- a/include/actions/AddPeriodicControllers.h +++ b/include/actions/AddPeriodicControllers.h @@ -14,7 +14,7 @@ /* * This Action automatically adds multiply 'TimePeriod' controllers for - * the purpose of enabling and disabling multiple objects during multiple cycles. + * the purpose of enabling and disabling multiple objects cyclically. */ class AddPeriodicControllers : public Action { diff --git a/include/auxkernels/AbsValueAux.h b/include/auxkernels/AbsValueAux.h index 665b57116b8..b87302d3531 100644 --- a/include/auxkernels/AbsValueAux.h +++ b/include/auxkernels/AbsValueAux.h @@ -26,6 +26,6 @@ class AbsValueAux : public AuxKernel virtual Real computeValue() override; private: - /// The coupled variable in which to take to absolute value + /// The coupled variable that this object is taking the absolute value of. const VariableValue & _u; }; diff --git a/include/bcs/ElectronAdvectionDoNothingBC.h b/include/bcs/ElectronAdvectionDoNothingBC.h index 96ecd0af073..745a5221d4e 100644 --- a/include/bcs/ElectronAdvectionDoNothingBC.h +++ b/include/bcs/ElectronAdvectionDoNothingBC.h @@ -13,8 +13,8 @@ #include "ADIntegratedBC.h" /** - * Boundary condition where the election advection flux at the boundary - * is equal to the bulk election advection equation + * Boundary condition where the electron advection flux at the boundary + * is equal to the bulk electron advection equation */ class ElectronAdvectionDoNothingBC : public ADIntegratedBC { diff --git a/include/bcs/ElectronDiffusionDoNothingBC.h b/include/bcs/ElectronDiffusionDoNothingBC.h index 65f4505006b..97ff86b750c 100644 --- a/include/bcs/ElectronDiffusionDoNothingBC.h +++ b/include/bcs/ElectronDiffusionDoNothingBC.h @@ -13,8 +13,8 @@ #include "ADIntegratedBC.h" /** - * Boundary condition where the election diffusion flux at the boundary - * is equal to the bulk election diffusion equation + * Boundary condition where the electron diffusion flux at the boundary + * is equal to the bulk electron diffusion equation */ class ElectronDiffusionDoNothingBC : public ADIntegratedBC { diff --git a/include/bcs/HagelaarEnergyAdvectionBC.h b/include/bcs/HagelaarEnergyAdvectionBC.h index 7dfdfe14ee0..101c29dda17 100644 --- a/include/bcs/HagelaarEnergyAdvectionBC.h +++ b/include/bcs/HagelaarEnergyAdvectionBC.h @@ -64,6 +64,6 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC Real _v_thermal; /// Gamma electron density (electrons emitted by the surface) Real _n_gamma; /// TODO: currently '_n_gamma' is fixed at 0 - /// Total flux form secondary electrons + /// Total flux from secondary electrons ADReal _bc_val; }; diff --git a/include/bcs/SchottkyEmissionBC.h b/include/bcs/SchottkyEmissionBC.h index 603fe4ecbb6..a2acd46d70c 100644 --- a/include/bcs/SchottkyEmissionBC.h +++ b/include/bcs/SchottkyEmissionBC.h @@ -83,7 +83,7 @@ class SchottkyEmissionBC : public ADIntegratedBC /// Term for 'dPhi' divided by the local field squared Real _dPhi_over_F; - /// The different in the work funtion due to the electric field + /// The difference in the work function due to the electric field ADReal dPhi; /// Boltzmann constant Real kB; diff --git a/include/bcs/SecondaryElectronEnergyBC.h b/include/bcs/SecondaryElectronEnergyBC.h index 080516d5335..757a1861e91 100644 --- a/include/bcs/SecondaryElectronEnergyBC.h +++ b/include/bcs/SecondaryElectronEnergyBC.h @@ -68,9 +68,9 @@ class SecondaryElectronEnergyBC : public ADIntegratedBC /// Mobility coefficient of the electron mean energy density const ADMaterialProperty & _mumean_en; - /// Equal to 1 when the electron drift velocity is direct towards the wall and zero otherwise + /// Equal to 1 when the electron drift velocity is directed towards the wall and zero otherwise Real _a; - /// Equal to 1 when the ion drift velocity is direct towards the wall and zero otherwise + /// Equal to 1 when the ion drift velocity is directed towards the wall and zero otherwise Real _b; /// Electron thermal velocity ADReal _v_thermal; diff --git a/include/interfacekernels/HphiRadialInterface.h b/include/interfacekernels/HphiRadialInterface.h index 3c37ff76652..739003bb558 100644 --- a/include/interfacekernels/HphiRadialInterface.h +++ b/include/interfacekernels/HphiRadialInterface.h @@ -14,8 +14,8 @@ /** * DG kernel for interfacing of the axial electic field on adjacent blocks. - * The axial electic field is relate to the azmithal magnetic flux - * through using Ampère–Maxwell law. + * The axial electric field is related to the azimuthal magnetic flux + * through using the Ampère–Maxwell law. */ class HphiRadialInterface : public ADInterfaceKernel { diff --git a/include/kernels/ChargeSourceMoles_KV.h b/include/kernels/ChargeSourceMoles_KV.h index 6e7be8743d0..1b69bd95970 100644 --- a/include/kernels/ChargeSourceMoles_KV.h +++ b/include/kernels/ChargeSourceMoles_KV.h @@ -13,7 +13,7 @@ #include "ADKernel.h" /** - * Kernel for adding charged sources to Poisson’s equation + * Kernel for adding charge density sources to Poisson’s equation */ class ChargeSourceMoles_KV : public ADKernel { diff --git a/include/kernels/EFieldArtDiff.h b/include/kernels/EFieldArtDiff.h index 02a37370d97..3d480af0c71 100644 --- a/include/kernels/EFieldArtDiff.h +++ b/include/kernels/EFieldArtDiff.h @@ -26,7 +26,7 @@ class EFieldArtDiff : public ADKernel protected: virtual ADReal computeQpResidual() override; - /// Gradient of the coupled gradient + /// Gradient of the coupled potential const ADVariableGradient & _grad_potential; /// Scaling factor for the artificial diffusion diff --git a/include/kernels/EFieldMagnitudeSource.h b/include/kernels/EFieldMagnitudeSource.h index 2124a1ffca1..ecf14fd66d1 100644 --- a/include/kernels/EFieldMagnitudeSource.h +++ b/include/kernels/EFieldMagnitudeSource.h @@ -25,6 +25,6 @@ class EFieldMagnitudeSource : public ADKernel protected: virtual ADReal computeQpResidual() override; - /// Gradient of coupled gradient + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; }; diff --git a/include/kernels/TM0CylindricalEr.h b/include/kernels/TM0CylindricalEr.h index 71a5235e983..e2259639cb8 100644 --- a/include/kernels/TM0CylindricalEr.h +++ b/include/kernels/TM0CylindricalEr.h @@ -33,8 +33,8 @@ class TM0CylindricalEr : public ADKernel const Real _mu0; /// Permittivity of free space const Real _eps0; - /// Azimuthal component of magnetic field + /// Azimuthal component of the magnetic field const ADVariableValue & _Hphi; - /// Gradient of azimuthal component of magnetic field + /// Gradient of azimuthal component of the magnetic field const ADVariableGradient & _grad_Hphi; }; diff --git a/include/kernels/TM0CylindricalEz.h b/include/kernels/TM0CylindricalEz.h index d8cf91d9aae..734c136c04b 100644 --- a/include/kernels/TM0CylindricalEz.h +++ b/include/kernels/TM0CylindricalEz.h @@ -33,8 +33,8 @@ class TM0CylindricalEz : public ADKernel const Real _mu0; /// Permittivity of free space const Real _eps0; - /// Azimuthal component of magnetic field + /// Azimuthal component of the magnetic field const ADVariableValue & _Hphi; - /// Gradient of azimuthal component of magnetic field + /// Gradient of azimuthal component of the magnetic field const ADVariableGradient & _grad_Hphi; }; diff --git a/include/materials/Gas.h b/include/materials/Gas.h index f3bcc3e3662..29a912373e6 100644 --- a/include/materials/Gas.h +++ b/include/materials/Gas.h @@ -27,15 +27,15 @@ class Gas : public ADMaterial protected: virtual void computeQpProperties() override; - /// Spline Interpolation fuction for ionization Townsend coefficient + /// Spline Interpolation function for the ionization Townsend coefficient SplineInterpolation _alpha_interpolation; - /// Spline Interpolation fuction for excitation Townsend coefficient + /// Spline Interpolation function for the excitation Townsend coefficient SplineInterpolation _alphaEx_interpolation; - /// Spline Interpolation fuction for elastic Townsend coefficient + /// Spline Interpolation function for the elastic Townsend coefficient SplineInterpolation _alphaEl_interpolation; - /// Spline Interpolation fuction for electron mobility coefficient + /// Spline Interpolation function for the electron mobility coefficient SplineInterpolation _mu_interpolation; - /// Spline Interpolation fuction for diffusion mobility coefficient + /// Spline Interpolation function for the diffusion mobility coefficient SplineInterpolation _diff_interpolation; /// True if interpolating transport coefficients as a function of the mean energy @@ -115,25 +115,31 @@ class Gas : public ADMaterial * Curve fitting for ionization coefficients dependent * on the electric field based on bolos simulations */ + ///@{ MaterialProperty & _iz_coeff_efield_a; MaterialProperty & _iz_coeff_efield_b; MaterialProperty & _iz_coeff_efield_c; + ///@} /* * Curve fitting for ionization coefficients dependent * on the electron energy based on bolos simulations */ + ///@{ MaterialProperty & _iz_coeff_energy_a; MaterialProperty & _iz_coeff_energy_b; MaterialProperty & _iz_coeff_energy_c; + ///@} /// Avogadro's number MaterialProperty & _N_A; /* * Curve fitting for elastic coefficients dependent * on the electron energy based on bolos simulations */ + ///@{ MaterialProperty & _el_coeff_energy_a; MaterialProperty & _el_coeff_energy_b; MaterialProperty & _el_coeff_energy_c; + ///@} /// AD Ionization Townsend coefficient ADMaterialProperty & _alpha_iz; /// AD Excitation Townsend coefficient diff --git a/include/materials/GasBase.h b/include/materials/GasBase.h index 1eca4697da5..94530b04474 100644 --- a/include/materials/GasBase.h +++ b/include/materials/GasBase.h @@ -23,15 +23,15 @@ class GasBase : public ADMaterial protected: virtual void computeQpProperties() override; - /// Spline Interpolation fuction for ionization Townsend coefficient + /// Spline Interpolation function for the ionization Townsend coefficient SplineInterpolation _alpha_interpolation; - /// Spline Interpolation fuction for excitation Townsend coefficient + /// Spline Interpolation function for the excitation Townsend coefficient SplineInterpolation _alphaEx_interpolation; - /// Spline Interpolation fuction for elastic Townsend coefficient + /// Spline Interpolation function for the elastic Townsend coefficient SplineInterpolation _alphaEl_interpolation; - /// Spline Interpolation fuction for electron mobility coefficient + /// Spline Interpolation function for the electron mobility coefficient SplineInterpolation _mu_interpolation; - /// Spline Interpolation fuction for diffusion mobility coefficient + /// Spline Interpolation function for the diffusion mobility coefficient SplineInterpolation _diff_interpolation; /// Position units @@ -107,25 +107,31 @@ class GasBase : public ADMaterial * Curve fitting for ionization coefficients dependent * on the electric field based on bolos simulations */ + ///@{ MaterialProperty & _iz_coeff_efield_a; MaterialProperty & _iz_coeff_efield_b; MaterialProperty & _iz_coeff_efield_c; + ///@} /* * Curve fitting for ionization coefficients dependent * on the electron energy based on bolos simulations */ + ///@{ MaterialProperty & _iz_coeff_energy_a; MaterialProperty & _iz_coeff_energy_b; MaterialProperty & _iz_coeff_energy_c; + ///@} /// Avogadro's number MaterialProperty & _N_A; /* * Curve fitting for elastic coefficients dependent * on the electron energy based on bolos simulations */ + ///@{ MaterialProperty & _el_coeff_energy_a; MaterialProperty & _el_coeff_energy_b; MaterialProperty & _el_coeff_energy_c; + ///@} /// AD Ionization Townsend coefficient ADMaterialProperty & _alpha_iz; /// AD Excitation Townsend coefficient diff --git a/include/userobjects/ProvideMobility.h b/include/userobjects/ProvideMobility.h index 2c02caf71cf..6421c114567 100644 --- a/include/userobjects/ProvideMobility.h +++ b/include/userobjects/ProvideMobility.h @@ -40,7 +40,7 @@ class ProvideMobility : public GeneralUserObject */ virtual void execute(); /** - * Called _once_ after execute has been called all all "objects". + * Called _once_ after execute has been called on all "objects". */ virtual void finalize(); diff --git a/src/interfacekernels/InterfaceAdvection.C b/src/interfacekernels/InterfaceAdvection.C index f9b29ee7ca0..a8e6e7291d5 100644 --- a/src/interfacekernels/InterfaceAdvection.C +++ b/src/interfacekernels/InterfaceAdvection.C @@ -21,7 +21,7 @@ InterfaceAdvection::validParams() params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("neighbor_position_units", "The units of position in the neighboring domain."); - params.addClassDescription("Used to include the electric field driven advective flux of species" + params.addClassDescription("Used to include the electric field driven advective flux of a species" "into or out of a neighboring subdomain."); return params; } From 4f7fc5b3c5733570bf2aa661fa9150dc52197bc0 Mon Sep 17 00:00:00 2001 From: csdechant Date: Fri, 20 Dec 2024 10:16:34 -0700 Subject: [PATCH 06/10] Apply Clang Format --- include/materials/Gas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/materials/Gas.h b/include/materials/Gas.h index 29a912373e6..e4ca7abe68a 100644 --- a/include/materials/Gas.h +++ b/include/materials/Gas.h @@ -139,7 +139,7 @@ class Gas : public ADMaterial MaterialProperty & _el_coeff_energy_a; MaterialProperty & _el_coeff_energy_b; MaterialProperty & _el_coeff_energy_c; - ///@} + ///@} /// AD Ionization Townsend coefficient ADMaterialProperty & _alpha_iz; /// AD Excitation Townsend coefficient From 4b5a202d8b533fba4d69259261cd06b752ddfaf7 Mon Sep 17 00:00:00 2001 From: csdechant Date: Fri, 20 Dec 2024 13:15:39 -0700 Subject: [PATCH 07/10] Addressing edits in docstrings --- include/actions/AddDriftDiffusionAction.h | 40 ++++++++++++++--- include/actions/AddPeriodicControllers.h | 10 ++++- .../AddPeriodicRelativeNodalDifference.h | 44 ++++++++++++++++--- include/auxkernels/DensityNormalization.h | 9 +++- include/bcs/LymberopoulosElectronBC.h | 2 +- .../ArbitrarilyTiedValueConstraint.h | 2 +- .../AddPeriodicRelativeNodalDifference.C | 2 +- 7 files changed, 90 insertions(+), 19 deletions(-) diff --git a/include/actions/AddDriftDiffusionAction.h b/include/actions/AddDriftDiffusionAction.h index 48181f81095..8538c7dccac 100644 --- a/include/actions/AddDriftDiffusionAction.h +++ b/include/actions/AddDriftDiffusionAction.h @@ -34,14 +34,23 @@ class AddDriftDiffusionAction : public Action virtual void act(); protected: - /// Helper function that supplies the potentials charge sources + /** + * Helper function that supplies the potentials charge sources + * @param potential_name The name of the electrostatic potential + * @param charged_particle_name The name of the charge particle density + */ virtual void addChargeSourceKernels(const std::string & potential_name, const std::string & charged_particle_name); - /* + /** * Helper function that supplies the Kernels for drift-diffusion for the electrons, * energy independent charged particles, neutral particles, and - * electron mean energy depending + * electron mean energy density + * @param name The name of the density variable + * @param potential_name The name of the electrostatic potential + * @param Using_offset True if the LogStabilizationMoles Kernel being used + * @param charged True if the density variable has a charge + * @param energy True if the density is a mean energy density variable */ virtual void addADKernels(const std::string & name, const std::string & potential_name, @@ -49,16 +58,33 @@ class AddDriftDiffusionAction : public Action const bool & charged, const bool & energy); - /// Helper function that supplies the Aux kernels to convert scaled position units + /** + * Helper function that supplies the Aux kernels to convert scaled position units + * when the user sets position_units to non-unity value + * @param position_name The name of the position variable in the format of {component + "_position" + block} + * @param component The spatial component defined as x=0, y=1, and z=2 + */ virtual void addPosition(const std::string & position_name, const int & component); - /// Helper function that supplies the Aux kernels to convert densities from log form + /** + * Helper function that supplies the Aux kernels to convert densities from logarithmic form + * @param particle_name The name of the density variable + */ virtual void addDensityLog(const std::string & particle_name); - /// Helper function that supplies the Aux kernels for current + /** + * Helper function that supplies the Aux kernels for current + * @param particle_name The name of the charge density variable + * @param potential_name The name of the electrostatic potential + */ virtual void addCurrent(const std::string & particle_name, const std::string & potential_name); - /// Helper function that supplies the Aux kernels for the electric field + /** + * Helper function that supplies the Aux kernels for the electric field + * @param Efield_name The name of the electric field variable in the format of {"Efield" + component + block} + * @param potential_name The name of the electrostatic potential + * @param component The spatial component defined as x=0, y=1, and z=2 + */ virtual void addEfield(const std::string & Efield_name, const std::string & potential_name, const int & component); diff --git a/include/actions/AddPeriodicControllers.h b/include/actions/AddPeriodicControllers.h index 721aa91aa6e..25449136115 100644 --- a/include/actions/AddPeriodicControllers.h +++ b/include/actions/AddPeriodicControllers.h @@ -26,7 +26,15 @@ class AddPeriodicControllers : public Action virtual void act(); protected: - /// Function that adds a 'TimePeriod' controller + /** + * Function that adds a 'TimePeriod' controller + * @param enableORdisable Stating to uses either the "enable_objects" or "disable_objects" parameter from 'TimePeriod' + * @param objects The name of objects that are either being enabled or disabled + * @param start_times The time values to start the controller + * @param end_times The time values to stop the controller + * @param name_num The current number of the controller for the naming of the controller object + * @param first_controller True if this is the first controller object being set + */ virtual void AddTimePeriod(const std::string & enableORdisable, const std::vector & objects, const std::vector & start_times, diff --git a/include/actions/AddPeriodicRelativeNodalDifference.h b/include/actions/AddPeriodicRelativeNodalDifference.h index 04aa7e51251..8789e3f2ac3 100644 --- a/include/actions/AddPeriodicRelativeNodalDifference.h +++ b/include/actions/AddPeriodicRelativeNodalDifference.h @@ -28,23 +28,53 @@ class AddPeriodicRelativeNodalDifference : public Action virtual void act(); protected: - /// Function for setting ICs for the previous and sudo previous solutions + /** + * Function for setting ICs for the previous and sudo previous solutions + * @param variable_name The name of the variable + * @param initial The inital value of the variable + */ virtual void addPerviousSolutionsIC(const std::string & variable_name, const Real & initial); - /// Function for setting AuxKernels for the previous and sudo previous solutions + /** + * Function for setting AuxKernels for the previous and sudo previous solutions + * @param variable_name The name of the auxvariable to stores the previous cycle solution + * @param var_old_name The name of the variable storing the solution at the beginning of the time step + */ virtual void addPerviousSolutionsKernels(const std::string & variable_name, const std::string & var_old_name); - /// Function for setting AuxKernels to normalize solutions + /** + * Function for setting AuxKernels to normalize solutions + * @param variable_name The name of the auxvariable to stores normalization value + * @param source The name of the variable to be normalizated + * @param averaged The name of the postprocessor that calculates the spatial average + * @param log True if the source is in a logarithmic form + */ virtual void addNormalizationKernels(const std::string & variable_name, const std::string & source, const std::string & averaged, const bool & log); - /// Function for setting Postprocessor to take to nodal average + /** + * Function for setting Postprocessor to take to nodal average + * @param variable_name The name of the variable to be averaged + * @param log True if the variable is in a logarithmic form + */ virtual void addAverageNodalPP(const std::string & variable_name, const bool & log); - /// Function for setting Postprocessor to take to average nodal difference + /** + * Function for setting Postprocessor to take to average nodal difference + * @param variable_name The name of the variable that stores the current average + * @param var_old_name The name of the variable that stores the average from the previous cycle + * @param name The name of the variable that was averaged + */ virtual void addRelativePeriodicDiffPP(const std::string & variable_name, const std::string & var_old_name, const std::string & name); - /// Function that adds a 'TimePeriod' controller to begin calculating the relative periodic difference + /** + * Function that adds a 'TimePeriod' controller to begin calculating the relative periodic difference + * @param objects The name of objects that are either being enabled or disabled + * @param start_times The time values to start the controller + * @param end_times The time values to stop the controller + * @param name_num The current number of the controller for the naming of the controller object + * @param first_controller True if this is the first controller object being set + */ virtual void AddTimePeriod(const std::vector & objects, const std::vector & start_times, const std::vector & end_times, @@ -55,7 +85,7 @@ class AddPeriodicRelativeNodalDifference : public Action Real _start_time; /// The period of the cycle Real _period; - /// The number of cycles to calculate the difference + /// The number of cycles this object, PeriodicRelativeNodalDifference, is active Real _num_controller_set; /// The name of objects to enable at the start of the cycle diff --git a/include/auxkernels/DensityNormalization.h b/include/auxkernels/DensityNormalization.h index 4d0b46f951b..ab049ae9851 100644 --- a/include/auxkernels/DensityNormalization.h +++ b/include/auxkernels/DensityNormalization.h @@ -13,7 +13,14 @@ #include "AuxKernel.h" /** - * Normalize variables expressed in log form + * Normalize variables expressed in logarithmic form (n) by a + * postprocessor value (pp_value) in the form of: + * + * f * (exp(n) / pp_value) - shift + * + * where f and shift are user defined normalization and + * shifting factors, respectively (the default values being + * f = 1. and shift = 0.) */ class DensityNormalization : public AuxKernel { diff --git a/include/bcs/LymberopoulosElectronBC.h b/include/bcs/LymberopoulosElectronBC.h index 1eeeba79347..7d9f2e7352d 100644 --- a/include/bcs/LymberopoulosElectronBC.h +++ b/include/bcs/LymberopoulosElectronBC.h @@ -34,7 +34,7 @@ class LymberopoulosElectronBC : public ADIntegratedBC /// Number of ions defined const unsigned int _num_ions; - // Coupled variables + /// Gradient of coupled potential const ADVariableGradient & _grad_potential; /// Ion density variables std::vector _ion_var; diff --git a/include/constraints/ArbitrarilyTiedValueConstraint.h b/include/constraints/ArbitrarilyTiedValueConstraint.h index ff80b895baa..267c02cdb72 100644 --- a/include/constraints/ArbitrarilyTiedValueConstraint.h +++ b/include/constraints/ArbitrarilyTiedValueConstraint.h @@ -35,7 +35,7 @@ class ArbitrarilyTiedValueConstraint : public NodeFaceConstraint protected: /// Scaling factor const Real _scaling; - /// Ratio of secondary to primary variable + /// User defined ratio of secondary to primary variable const Real _H; /// Copy of residual NumericVector & _residual_copy; diff --git a/src/actions/AddPeriodicRelativeNodalDifference.C b/src/actions/AddPeriodicRelativeNodalDifference.C index ebd37c7f174..873466191d0 100644 --- a/src/actions/AddPeriodicRelativeNodalDifference.C +++ b/src/actions/AddPeriodicRelativeNodalDifference.C @@ -56,7 +56,7 @@ AddPeriodicRelativeNodalDifference::validParams() params.addParam( "starting_cycle", 0.0, "The number of the cycles before starting the difference calculation"); params.addRequiredParam("cycle_frequency", "The cycle's frequency in Hz"); - params.addParam("num_cycles", 2000.0, "The number of cycles to calculate the difference."); + params.addParam("num_cycles", 2000.0, "The number of cycles this object is active."); params.addParam>( "block", {}, "The subdomain that this action applies to."); params.addClassDescription( From fb79626e8c14f030bd2c5010939e0ffa7b182fa1 Mon Sep 17 00:00:00 2001 From: csdechant Date: Fri, 20 Dec 2024 13:20:21 -0700 Subject: [PATCH 08/10] Addressing whitespace --- include/actions/AddDriftDiffusionAction.h | 10 ++++++---- include/actions/AddPeriodicControllers.h | 5 +++-- include/actions/AddPeriodicRelativeNodalDifference.h | 6 ++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/actions/AddDriftDiffusionAction.h b/include/actions/AddDriftDiffusionAction.h index 8538c7dccac..421d8940569 100644 --- a/include/actions/AddDriftDiffusionAction.h +++ b/include/actions/AddDriftDiffusionAction.h @@ -61,15 +61,16 @@ class AddDriftDiffusionAction : public Action /** * Helper function that supplies the Aux kernels to convert scaled position units * when the user sets position_units to non-unity value - * @param position_name The name of the position variable in the format of {component + "_position" + block} + * @param position_name The name of the position variable in the format of {component + + * "_position" + block} * @param component The spatial component defined as x=0, y=1, and z=2 */ virtual void addPosition(const std::string & position_name, const int & component); - /** + /** * Helper function that supplies the Aux kernels to convert densities from logarithmic form * @param particle_name The name of the density variable - */ + */ virtual void addDensityLog(const std::string & particle_name); /** @@ -81,7 +82,8 @@ class AddDriftDiffusionAction : public Action /** * Helper function that supplies the Aux kernels for the electric field - * @param Efield_name The name of the electric field variable in the format of {"Efield" + component + block} + * @param Efield_name The name of the electric field variable in the format of {"Efield" + + * component + block} * @param potential_name The name of the electrostatic potential * @param component The spatial component defined as x=0, y=1, and z=2 */ diff --git a/include/actions/AddPeriodicControllers.h b/include/actions/AddPeriodicControllers.h index 25449136115..e910d0bfe99 100644 --- a/include/actions/AddPeriodicControllers.h +++ b/include/actions/AddPeriodicControllers.h @@ -26,9 +26,10 @@ class AddPeriodicControllers : public Action virtual void act(); protected: - /** + /** * Function that adds a 'TimePeriod' controller - * @param enableORdisable Stating to uses either the "enable_objects" or "disable_objects" parameter from 'TimePeriod' + * @param enableORdisable Stating to uses either the "enable_objects" or "disable_objects" + * parameter from 'TimePeriod' * @param objects The name of objects that are either being enabled or disabled * @param start_times The time values to start the controller * @param end_times The time values to stop the controller diff --git a/include/actions/AddPeriodicRelativeNodalDifference.h b/include/actions/AddPeriodicRelativeNodalDifference.h index 8789e3f2ac3..8a8a4b6c80d 100644 --- a/include/actions/AddPeriodicRelativeNodalDifference.h +++ b/include/actions/AddPeriodicRelativeNodalDifference.h @@ -37,7 +37,8 @@ class AddPeriodicRelativeNodalDifference : public Action /** * Function for setting AuxKernels for the previous and sudo previous solutions * @param variable_name The name of the auxvariable to stores the previous cycle solution - * @param var_old_name The name of the variable storing the solution at the beginning of the time step + * @param var_old_name The name of the variable storing the solution at the beginning of the time + * step */ virtual void addPerviousSolutionsKernels(const std::string & variable_name, const std::string & var_old_name); @@ -68,7 +69,8 @@ class AddPeriodicRelativeNodalDifference : public Action const std::string & var_old_name, const std::string & name); /** - * Function that adds a 'TimePeriod' controller to begin calculating the relative periodic difference + * Function that adds a 'TimePeriod' controller to begin calculating the relative periodic + * difference * @param objects The name of objects that are either being enabled or disabled * @param start_times The time values to start the controller * @param end_times The time values to stop the controller From dab4f0fd457c19b1446fb1b16d99ddd136b02f2a Mon Sep 17 00:00:00 2001 From: Corey DeChant <37221357+csdechant@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:15:28 -0700 Subject: [PATCH 09/10] Apply suggestions from code review Co-authored-by: Grayson Gall <66559200+gsgall@users.noreply.github.com> --- include/actions/AddPeriodicControllers.h | 38 +++++++++---------- .../AddPeriodicRelativeNodalDifference.h | 16 ++++---- include/auxkernels/DensityNormalization.h | 2 +- include/bcs/MatchedValueLogBC.h | 2 +- include/materials/ADSurfaceCharge.h | 2 +- include/materials/GasBase.h | 4 +- include/materials/GasElectronMoments.h | 2 +- .../postprocessors/AverageNodalDifference.h | 2 +- include/postprocessors/MultiPeriodAverager.h | 2 +- .../PeriodicTimeIntegratedPostprocessor.h | 2 +- src/interfacekernels/InterfaceAdvection.C | 2 +- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/include/actions/AddPeriodicControllers.h b/include/actions/AddPeriodicControllers.h index e910d0bfe99..f138a9c07b7 100644 --- a/include/actions/AddPeriodicControllers.h +++ b/include/actions/AddPeriodicControllers.h @@ -13,7 +13,7 @@ #include "Action.h" /* - * This Action automatically adds multiply 'TimePeriod' controllers for + * This Action automatically adds multiple 'TimePeriod' controllers for * the purpose of enabling and disabling multiple objects cyclically. */ class AddPeriodicControllers : public Action @@ -43,18 +43,18 @@ class AddPeriodicControllers : public Action const std::string & name_num, const bool & first_controller); - /// A list of objects names to enable at the start of the cycle + /// A list of object names to enable at the start of the cycle std::vector _enable_start; - /// A list of objects names to enable during the cycle + /// A list of object names to enable during the cycle std::vector _enable_during; - /// A list of objects names to enable at the end of the cycle + /// A list of object names to enable at the end of the cycle std::vector _enable_end; - /// A list of objects names to disable at the start of the cycle + /// A list of object names to disable at the start of the cycle std::vector _disable_start; - /// A list of objects names to disable during the cycle + /// A list of object names to disable during the cycle std::vector _disable_during; - /// A list of objects names to disable at the end of the cycle + /// A list of object names to disable at the end of the cycle std::vector _disable_end; /// The starting time to begin adding 'TimePeriod' controllers @@ -68,33 +68,33 @@ class AddPeriodicControllers : public Action /// Name of the 'TimePeriod' controllers std::string _name; - /// The array that holds the start times for objects that are enable at the start of the cycle + /// The array that holds the start times for objects that are enabled at the start of the cycle std::vector _enable_start_start_time_index; - /// The array that holds the end times for objects that are enable at the start of the cycle + /// The array that holds the end times for objects that are enabled at the start of the cycle std::vector _enable_start_end_time_index; - /// The array that holds the start times for objects that are enable at during the cycle + /// The array that holds the start times for objects that are enabled during the cycle std::vector _enable_during_start_time_index; - /// The array that holds the end times for objects that are enable at during the cycle + /// The array that holds the end times for objects that are enabled during the cycle std::vector _enable_during_end_time_index; - /// The array that holds the start times for objects that are enable at the end of the cycle + /// The array that holds the start times for objects that are enabled at the end of the cycle std::vector _enable_end_start_time_index; - /// The array that holds the end times for objects that are enable at the end of the cycle + /// The array that holds the end times for objects that are enabled at the end of the cycle std::vector _enable_end_end_time_index; - /// The array that holds the start times for objects that are disable at the start of the cycle + /// The array that holds the start times for objects that are disabled at the start of the cycle std::vector _disable_start_start_time_index; - /// The array that holds the end times for objects that are disable at the start of the cycle + /// The array that holds the end times for objects that are disabled at the start of the cycle std::vector _disable_start_end_time_index; - /// The array that holds the start times for objects that are disable at during the cycle + /// The array that holds the start times for objects that are disabled during the cycle std::vector _disable_during_start_time_index; - /// The array that holds the end times for objects that are disable at during the cycle + /// The array that holds the end times for objects that are disabled during the cycle std::vector _disable_during_end_time_index; - /// The array that holds the start times for objects that are disable at the end of the cycle + /// The array that holds the start times for objects that are disabled at the end of the cycle std::vector _disable_end_start_time_index; - /// The array that holds the end times for objects that are disable at the end of the cycle + /// The array that holds the end times for objects that are disabled at the end of the cycle std::vector _disable_end_end_time_index; }; diff --git a/include/actions/AddPeriodicRelativeNodalDifference.h b/include/actions/AddPeriodicRelativeNodalDifference.h index 8a8a4b6c80d..26408944c99 100644 --- a/include/actions/AddPeriodicRelativeNodalDifference.h +++ b/include/actions/AddPeriodicRelativeNodalDifference.h @@ -36,7 +36,7 @@ class AddPeriodicRelativeNodalDifference : public Action virtual void addPerviousSolutionsIC(const std::string & variable_name, const Real & initial); /** * Function for setting AuxKernels for the previous and sudo previous solutions - * @param variable_name The name of the auxvariable to stores the previous cycle solution + * @param variable_name The name of the auxvariable that stores the previous cycle solution * @param var_old_name The name of the variable storing the solution at the beginning of the time * step */ @@ -44,7 +44,7 @@ class AddPeriodicRelativeNodalDifference : public Action const std::string & var_old_name); /** * Function for setting AuxKernels to normalize solutions - * @param variable_name The name of the auxvariable to stores normalization value + * @param variable_name The name of the auxvariable that stores normalization value * @param source The name of the variable to be normalizated * @param averaged The name of the postprocessor that calculates the spatial average * @param log True if the source is in a logarithmic form @@ -54,13 +54,13 @@ class AddPeriodicRelativeNodalDifference : public Action const std::string & averaged, const bool & log); /** - * Function for setting Postprocessor to take to nodal average + * Function for setting Postprocessor to take the nodal average * @param variable_name The name of the variable to be averaged * @param log True if the variable is in a logarithmic form */ virtual void addAverageNodalPP(const std::string & variable_name, const bool & log); /** - * Function for setting Postprocessor to take to average nodal difference + * Function for setting Postprocessor to take the average nodal difference * @param variable_name The name of the variable that stores the current average * @param var_old_name The name of the variable that stores the average from the previous cycle * @param name The name of the variable that was averaged @@ -95,12 +95,12 @@ class AddPeriodicRelativeNodalDifference : public Action /// The name of objects to enable at the end of the cycle std::vector _enable_end; - /// The array that holds the start times for objects that are enable at the start of the cycle + /// The array that holds the start times for objects that are enabled at the start of the cycle std::vector _enable_start_start_time_index; - /// The array that holds the end times for objects that are enable at the start of the cycle + /// The array that holds the end times for objects that are enabled at the start of the cycle std::vector _enable_start_end_time_index; - /// The array that holds the start times for objects that are enable at the end of the cycle + /// The array that holds the start times for objects that are enabled at the end of the cycle std::vector _enable_end_start_time_index; - /// The array that holds the end times for objects that are enable at the end of the cycle + /// The array that holds the end times for objects that are enabled at the end of the cycle std::vector _enable_end_end_time_index; }; diff --git a/include/auxkernels/DensityNormalization.h b/include/auxkernels/DensityNormalization.h index ab049ae9851..24d9d528540 100644 --- a/include/auxkernels/DensityNormalization.h +++ b/include/auxkernels/DensityNormalization.h @@ -41,6 +41,6 @@ class DensityNormalization : public AuxKernel /// A factor to shift the normilization by const Real * _shift; - /// A factor to multiple the normilization by + /// A factor to multiply the normilization by Real _normal_factor; }; diff --git a/include/bcs/MatchedValueLogBC.h b/include/bcs/MatchedValueLogBC.h index 8950e3c17cb..1738c52cd3b 100644 --- a/include/bcs/MatchedValueLogBC.h +++ b/include/bcs/MatchedValueLogBC.h @@ -13,7 +13,7 @@ #include "ADNodalBC.h" /** - * Henry’s Law like thermodynamic boundary condition for specifying a specie + * Henry’s Law like thermodynamic boundary condition for specifying a species' * concentration ratio at the gas-liquid interface */ class MatchedValueLogBC : public ADNodalBC diff --git a/include/materials/ADSurfaceCharge.h b/include/materials/ADSurfaceCharge.h index d8756c1ea5f..7a0ca3dd6c3 100644 --- a/include/materials/ADSurfaceCharge.h +++ b/include/materials/ADSurfaceCharge.h @@ -57,7 +57,7 @@ class ADSurfaceCharge : public ADMaterial, public DerivativeMaterialPropertyName unsigned int _num_species; /// Charged species variables std::vector _species; - /// Gradient of charge species + /// Gradient of charged species std::vector _grad_species; /// Mobility coefficient std::vector *> _mu; diff --git a/include/materials/GasBase.h b/include/materials/GasBase.h index 94530b04474..3ce09cee797 100644 --- a/include/materials/GasBase.h +++ b/include/materials/GasBase.h @@ -56,9 +56,9 @@ class GasBase : public ADMaterial Real _user_Richardson_coefficient; /// User defined cathode temperature Real _user_cathode_temperature; - /// User defined neutral gase and ion temperature + /// User defined neutral gas and ion temperature Real _user_T_gas; - /// User defined neutral gase pressure + /// User defined neutral gas pressure Real _user_p_gas; /// True if molar density is used bool _use_moles; diff --git a/include/materials/GasElectronMoments.h b/include/materials/GasElectronMoments.h index bd7d1e563d8..daefc23f845 100644 --- a/include/materials/GasElectronMoments.h +++ b/include/materials/GasElectronMoments.h @@ -61,7 +61,7 @@ class GasElectronMoments : public ADMaterial Real _user_Richardson_coefficient; /// User defined cathode temperature Real _user_cathode_temperature; - /// User defined neutral gase and ion temperature + /// User defined neutral gas and ion temperature Real _user_T_gas; /// Coupled pressure variable const VariableValue & _user_p_gas; diff --git a/include/postprocessors/AverageNodalDifference.h b/include/postprocessors/AverageNodalDifference.h index 74980797739..9f8b30e4b02 100644 --- a/include/postprocessors/AverageNodalDifference.h +++ b/include/postprocessors/AverageNodalDifference.h @@ -34,7 +34,7 @@ class AverageNodalDifference : public NodalVariablePostprocessor const VariableValue & _other_var; /// The sum of the square of the difference Real _sum_of_squared_diff; - /// The simple size + /// The sample size Real _n; /// The root mean squared of the difference Real _value; diff --git a/include/postprocessors/MultiPeriodAverager.h b/include/postprocessors/MultiPeriodAverager.h index 43502443a34..101c2e644ac 100644 --- a/include/postprocessors/MultiPeriodAverager.h +++ b/include/postprocessors/MultiPeriodAverager.h @@ -13,7 +13,7 @@ #include "GeneralPostprocessor.h" /* - * Calculate the average value of a post processor over multiple periods + * Calculate the average value of a postprocessor over multiple periods */ class MultiPeriodAverager : public GeneralPostprocessor { diff --git a/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h b/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h index 4d158cad256..7b4616a4b60 100644 --- a/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h +++ b/include/postprocessors/PeriodicTimeIntegratedPostprocessor.h @@ -13,7 +13,7 @@ #include "MultipliedTimeIntegratedPostprocessor.h" /* - * Integrate a Postprocessor value over a period in time using trapezoidal rule. + * Integrates a Postprocessor value over a period in time using trapezoidal rule. */ class PeriodicTimeIntegratedPostprocessor : public MultipliedTimeIntegratedPostprocessor { diff --git a/src/interfacekernels/InterfaceAdvection.C b/src/interfacekernels/InterfaceAdvection.C index a8e6e7291d5..a6abee8e332 100644 --- a/src/interfacekernels/InterfaceAdvection.C +++ b/src/interfacekernels/InterfaceAdvection.C @@ -21,7 +21,7 @@ InterfaceAdvection::validParams() params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("neighbor_position_units", "The units of position in the neighboring domain."); - params.addClassDescription("Used to include the electric field driven advective flux of a species" + params.addClassDescription("Used to include the electric field driven advective flux of a species " "into or out of a neighboring subdomain."); return params; } From c4b976aa06c60fd92500c0d3c6fb8c9180e3fc5a Mon Sep 17 00:00:00 2001 From: csdechant Date: Thu, 16 Jan 2025 09:26:59 -0700 Subject: [PATCH 10/10] Applying Clang-format --- src/interfacekernels/InterfaceAdvection.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interfacekernels/InterfaceAdvection.C b/src/interfacekernels/InterfaceAdvection.C index a6abee8e332..6be3c349d01 100644 --- a/src/interfacekernels/InterfaceAdvection.C +++ b/src/interfacekernels/InterfaceAdvection.C @@ -21,8 +21,9 @@ InterfaceAdvection::validParams() params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("neighbor_position_units", "The units of position in the neighboring domain."); - params.addClassDescription("Used to include the electric field driven advective flux of a species " - "into or out of a neighboring subdomain."); + params.addClassDescription( + "Used to include the electric field driven advective flux of a species " + "into or out of a neighboring subdomain."); return params; }