From f87fdbf490a3a8cdd640f55ce8b848d5b9f60c59 Mon Sep 17 00:00:00 2001 From: csdechant Date: Fri, 22 Nov 2024 10:30:24 -0700 Subject: [PATCH] Updating docstring for new objects and cleaning up mms test input files closes #257 --- include/bcs/DielectricBCWithEffEfield.h | 53 +- ...maEnergySecondaryElectronWithEffEfieldBC.h | 28 +- .../bcs/SakiyamaIonAdvectionWithEffEfieldBC.h | 16 +- ...SakiyamaSecondaryElectronWithEffEfieldBC.h | 21 +- include/kernels/EffectiveEField.h | 9 +- include/kernels/EffectiveEFieldAdvection.h | 14 +- .../kernels/ThermalConductivityDiffusion.h | 13 +- include/materials/ADMMSEEDFRates.h | 37 +- include/materials/PlasmaDielectricConstant.h | 13 +- ...maEnergySecondaryElectronWithEffEfieldBC.C | 2 - src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C | 1 - ...SakiyamaSecondaryElectronWithEffEfieldBC.C | 1 - .../mms/bcs/1D_LymberopoulosElectronBC.i | 283 ++++---- test/tests/mms/bcs/1D_LymberopoulosIonBC.i | 217 +++--- test/tests/mms/bcs/2D_ElectronBC.i | 659 ++++++----------- ...D_ElectronBC_NegivateOutWardFacingEfield.i | 663 ++++++----------- test/tests/mms/bcs/2D_EnergyBC.i | 667 ++++++------------ .../2D_EnergyBC_NegivateOutWardFacingEfield.i | 655 ++++++----------- test/tests/mms/bcs/2D_IonBC.i | 353 +++------ .../2D_IonBC_NegivateOutWardFacingEfield.i | 354 +++------- .../2D_Coupling_Electons_Potential_Ions.i | 349 +++------ ...pling_Electons_Potential_Ions_MeanEnergy.i | 480 ++++--------- ...ential_Ions_MeanEnergy_Einstein_Relation.i | 484 ++++--------- ...s_MeanEnergy_Einstein_Relation_EffEfield.i | 646 +++++------------ .../2D_Single_Fluid_Diffusion.i | 139 ++-- .../2D_Single_Fluid_Diffusion_Advection.i | 167 ++--- .../materials/2D_PlasmaDielectricConstant.i | 2 +- 27 files changed, 2079 insertions(+), 4247 deletions(-) diff --git a/include/bcs/DielectricBCWithEffEfield.h b/include/bcs/DielectricBCWithEffEfield.h index 4e465a54639..c98966655ac 100644 --- a/include/bcs/DielectricBCWithEffEfield.h +++ b/include/bcs/DielectricBCWithEffEfield.h @@ -1,8 +1,9 @@ -//* This file is part of the MOOSE framework -//* https://www.mooseframework.org +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos //* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org //* //* Licensed under LGPL 2.1, please see LICENSE for details //* https://www.gnu.org/licenses/lgpl-2.1.html @@ -12,8 +13,7 @@ #include "ADIntegratedBC.h" /** - * Implements a simple constant Neumann BC where grad(u)=value on the boundary. - * Uses the term produced from integrating the diffusion operator by parts. + * Time integrated dielectric boundary condition */ class DielectricBCWithEffEfield : public ADIntegratedBC { @@ -25,51 +25,90 @@ class DielectricBCWithEffEfield : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position Real _r_units; + /// Variable value during previous time step const VariableValue & _u_old; + /// Gradient of variable during previous time step const VariableGradient & _grad_u_old; + /// Electron mean energy density value const ADVariableValue & _mean_en; + /// Electron mean energy density variable MooseVariable & _mean_en_var; + /// Electron mean energy density value during previous time step const VariableValue & _mean_en_old; + /// Electron density value const ADVariableValue & _em; + /// Electron density variable MooseVariable & _em_var; + /// Electron density value during previous time step const VariableValue & _em_old; + /// Ion density value const ADVariableValue & _ip; + /// Ion density variable MooseVariable & _ip_var; + /// Ion density value during previous time step const VariableValue & _ip_old; + /// x-component of the electric field value const ADVariableValue & _Ex; + /// x-component of the electric field variable MooseVariable & _Ex_var; + /// x-component of the electric field value during previous time step const VariableValue & _Ex_old; + /// y-component of the electric field value const ADVariableValue & _Ey; + /// y-component of the electric field variable MooseVariable & _Ey_var; + /// y-component of the electric field value during previous time step const VariableValue & _Ey_old; + /// z-component of the electric field value const ADVariableValue & _Ez; + /// z-component of the electric field variable MooseVariable & _Ez_var; + /// z-component of the electric field value during previous time step const VariableValue & _Ez_old; + /// Elementary charge const MaterialProperty & _e; + /// Permittivity of free space const ADMaterialProperty & _epsilon_0; + /// Avogadro's number const MaterialProperty & _N_A; + /// Charge sign of the ions const MaterialProperty & _sgnip; + /// Mobility coefficient of the ions const ADMaterialProperty & _muip; + /// Mass of electrons const MaterialProperty & _massem; + /// Secondary electron coefficient Real _user_se_coeff; + /// Permittivity of the dielectric const Real & _epsilon_d; + /// Thickness of the dielectric const Real & _thickness; + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Value of "_a" during previous time step Real _a_old; + /// Value of ion flux ADRealVectorValue _ion_flux; + /// Value of ion flux during previous time step ADRealVectorValue _ion_flux_old; + /// Electron thermal velocity ADReal _v_thermal; + /// Value of electron thermal velocity during previous time step Real _v_thermal_old; + /// Electron flux ADRealVectorValue _em_flux; + /// Value of electron flux during previous time step ADRealVectorValue _em_flux_old; + /// Scaling units for the potential (V or kV) std::string _potential_units; - + /// Scaling value for the potential Real _voltage_scaling; }; diff --git a/include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h b/include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h index a31af230a5c..d341760f974 100644 --- a/include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h +++ b/include/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.h @@ -12,6 +12,10 @@ #include "ADIntegratedBC.h" +/** + * Kinetic secondary electron for mean electron energy boundary condition + * with an effective electric field for ions + */ class SakiyamaEnergySecondaryElectronWithEffEfieldBC : public ADIntegratedBC { public: @@ -22,28 +26,36 @@ class SakiyamaEnergySecondaryElectronWithEffEfieldBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position Real _r_units; + /// If true, secondary electron energy is equal to electron energy bool Te_dependent; - - // Coupled variables + /// x-component of the electric field const ADVariableValue & _Ex; + /// y-component of the electric field const ADVariableValue & _Ey; + /// z-component of the electric field const ADVariableValue & _Ez; - + /// Electron density const ADVariableValue & _em; + /// Ion density variables std::vector _ip_var; + /// Ion density values std::vector _ip; - + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; + /// Secondary electron coefficient Real _se_coeff; + /// Custom secondary electron energy Real _user_se_energy; - + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Term for secondary electron energy ADReal _se_energy; + /// Ion flux ADRealVectorValue _ion_flux; - + /// Number of ions defined unsigned int _num_ions; - unsigned int _ip_index; - std::vector::iterator _iter; }; diff --git a/include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h b/include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h index be5ad6d32ae..d782b86dd09 100644 --- a/include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h +++ b/include/bcs/SakiyamaIonAdvectionWithEffEfieldBC.h @@ -12,6 +12,10 @@ #include "ADIntegratedBC.h" +/** + * Kinetic advective ion boundary condition + * with an effective electric field for ions + */ class SakiyamaIonAdvectionWithEffEfieldBC : public ADIntegratedBC { public: @@ -22,16 +26,18 @@ class SakiyamaIonAdvectionWithEffEfieldBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position Real _r_units; - - // Coupled variables - + /// x-component of the electric field const ADVariableValue & _Ex; + /// y-component of the electric field const ADVariableValue & _Ey; + /// z-component of the electric field const ADVariableValue & _Ez; - + /// Mobility coefficient const ADMaterialProperty & _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/SakiyamaSecondaryElectronWithEffEfieldBC.h b/include/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.h index 350748cd07c..8a09d974895 100644 --- a/include/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.h +++ b/include/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.h @@ -12,6 +12,10 @@ #include "ADIntegratedBC.h" +/** + * Kinetic secondary electron boundary condition + * with an effective electric field for ions + */ class SakiyamaSecondaryElectronWithEffEfieldBC : public ADIntegratedBC { public: @@ -22,21 +26,26 @@ class SakiyamaSecondaryElectronWithEffEfieldBC : public ADIntegratedBC protected: virtual ADReal computeQpResidual() override; + /// Scaling units for the position Real _r_units; - - // Coupled variables - + /// x-component of the electric field const ADVariableValue & _Ex; + /// y-component of the electric field const ADVariableValue & _Ey; + /// z-component of the electric field const ADVariableValue & _Ez; + /// Ion density values std::vector _ip; - + /// Equal to 1 when the drift velocity is direct towards the wall and zero otherwise Real _a; + /// Ion flux ADRealVectorValue _ion_flux; + /// Secondary electron coefficient Real _user_se_coeff; - + /// Charge sign of the ions std::vector *> _sgnip; + /// Mobility coefficient of the ions std::vector *> _muip; - + /// Number of ions defined unsigned int _num_ions; }; diff --git a/include/kernels/EffectiveEField.h b/include/kernels/EffectiveEField.h index 770d81e5e90..b2126e374d5 100644 --- a/include/kernels/EffectiveEField.h +++ b/include/kernels/EffectiveEField.h @@ -12,6 +12,9 @@ #include "ADKernel.h" +/** + * Supplies the source term of the time derivative calculation of the effective electric field for ions + */ class EffectiveEField : public ADKernel { public: @@ -20,15 +23,15 @@ class EffectiveEField : public ADKernel EffectiveEField(const InputParameters & parameters); protected: - // virtual ADRealVectorValue precomputeQpResidual() override; virtual ADReal computeQpResidual(); - // // using ADKernelGrad::getPostprocessorValue; - private: /// Position units const Real _r_units; + /// Momentum-transfer frequency of ions const Real _nu; + /// Component of the electric field unsigned _component; + /// Electric field provided as a material property const ADMaterialProperty & _electric_field; }; diff --git a/include/kernels/EffectiveEFieldAdvection.h b/include/kernels/EffectiveEFieldAdvection.h index 16ed5ceed97..8eaddee619e 100644 --- a/include/kernels/EffectiveEFieldAdvection.h +++ b/include/kernels/EffectiveEFieldAdvection.h @@ -12,6 +12,10 @@ #include "ADKernel.h" +/* + * Effective electric field driven advection term. The effective electric + * field is supplied as scalar components of the field + */ class EffectiveEFieldAdvection : public ADKernel { public: @@ -20,20 +24,20 @@ class EffectiveEFieldAdvection : public ADKernel EffectiveEFieldAdvection(const InputParameters & parameters); protected: - // virtual ADRealVectorValue precomputeQpResidual() override; virtual ADReal computeQpResidual(); - // // using ADKernelGrad::getPostprocessorValue; - private: /// Position units const Real _r_units; - /// The diffusion coefficient (either constant or mixture-averaged) + /// Mobility coefficient const ADMaterialProperty & _mu; + /// Charge sign of the species const MaterialProperty & _sign; - + /// x-component of the electric field const ADVariableValue & _u_Efield; + /// y-component of the electric field const ADVariableValue & _v_Efield; + /// z-component of the electric field const ADVariableValue & _w_Efield; }; diff --git a/include/kernels/ThermalConductivityDiffusion.h b/include/kernels/ThermalConductivityDiffusion.h index 76eaf7d3dc6..f66ea921a71 100644 --- a/include/kernels/ThermalConductivityDiffusion.h +++ b/include/kernels/ThermalConductivityDiffusion.h @@ -12,6 +12,11 @@ #include "ADKernel.h" +/** + * Electron energy diffusion term + * that assumes a thermal conductivity of + * K = 3/2 D_e n_e + */ class ThermalConductivityDiffusion : public ADKernel { public: @@ -23,11 +28,15 @@ class ThermalConductivityDiffusion : public ADKernel virtual ADReal computeQpResidual() override; private: + + /// Position units Real _r_units; + /// Coefficient relating diffusion coefficient * density to thermal conductivity Real _coeff; - + /// Diffusion coefficient const ADMaterialProperty & _diffem; - + /// Electron density const ADVariableValue & _em; + /// Gradient of electron density const ADVariableGradient & _grad_em; }; diff --git a/include/materials/ADMMSEEDFRates.h b/include/materials/ADMMSEEDFRates.h index 3feb1cf6d03..64b777a2ee1 100644 --- a/include/materials/ADMMSEEDFRates.h +++ b/include/materials/ADMMSEEDFRates.h @@ -1,20 +1,19 @@ -/****************************************************************/ -/* DO NOT MODIFY THIS HEADER */ -/* MOOSE - Multiphysics Object Oriented Simulation Environment */ -/* */ -/* (c) 2010 Battelle Energy Alliance, LLC */ -/* ALL RIGHTS RESERVED */ -/* */ -/* Prepared by Battelle Energy Alliance, LLC */ -/* Under Contract No. DE-AC07-05ID14517 */ -/* With the U. S. Department of Energy */ -/* */ -/* See COPYRIGHT for full restrictions */ -/****************************************************************/ -#pragma once +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html #include "ADMaterial.h" +/** + * Add material properties used for MMS verifications involving + properties as a function of electron mean energy. + */ class ADMMSEEDFRates : public ADMaterial { public: @@ -25,19 +24,29 @@ class ADMMSEEDFRates : public ADMaterial virtual void initQpStatefulProperties() override; virtual void computeQpProperties() override; + /// Electron density const ADVariableValue & _em; + /// Electron mean energy density const ADVariableValue & _mean_en; + /// Name of material properties std::vector _prop_names; + /// Name of functions representing property values std::vector _prop_values; + /// Name of functions representing derivative of the property values wrt the electron mean energy std::vector _d_prop_values_actual_mean_en; + /// Number of named material properties unsigned int _num_props; + /// Material properties std::vector *> _properties; + /// Functions of material properties std::vector _functions; + /// Functions of derivatives of material properties std::vector _deriv_functions; + using ADMaterial::_communicator; private: diff --git a/include/materials/PlasmaDielectricConstant.h b/include/materials/PlasmaDielectricConstant.h index 56c2a5f532e..6c3fb749304 100644 --- a/include/materials/PlasmaDielectricConstant.h +++ b/include/materials/PlasmaDielectricConstant.h @@ -1,9 +1,20 @@ +//* This file is part of Zapdos, an open-source +//* application for the simulation of plasmas +//* https://github.com/shannon-lab/zapdos +//* +//* Zapdos is powered by the MOOSE Framework +//* https://www.mooseframework.org +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + #pragma once #include "ADMaterial.h" /** - * + * Provides the real and complex components, the spatial gradient and + * the first time derivative of the plasma dielectric. */ class PlasmaDielectricConstant : public ADMaterial { diff --git a/src/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.C b/src/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.C index 2858f70f753..0c6c552e0ce 100644 --- a/src/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.C +++ b/src/bcs/SakiyamaEnergySecondaryElectronWithEffEfieldBC.C @@ -40,8 +40,6 @@ SakiyamaEnergySecondaryElectronWithEffEfieldBC::SakiyamaEnergySecondaryElectronW _r_units(1. / getParam("position_units")), Te_dependent(getParam("Tse_equal_Te")), - // Coupled Variables - // Coupled Variables _Ex(adCoupledValue("Ex")), _Ey(adCoupledValue("Ey")), _Ez(adCoupledValue("Ez")), diff --git a/src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C b/src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C index 643bd973c97..7ef50acda75 100644 --- a/src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C +++ b/src/bcs/SakiyamaIonAdvectionWithEffEfieldBC.C @@ -30,7 +30,6 @@ SakiyamaIonAdvectionWithEffEfieldBC::SakiyamaIonAdvectionWithEffEfieldBC(const I _r_units(1. / getParam("position_units")), - // Coupled Variables _Ex(adCoupledValue("Ex")), _Ey(adCoupledValue("Ey")), _Ez(adCoupledValue("Ez")), diff --git a/src/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.C b/src/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.C index 2fc66baf420..7605cbe1dd8 100644 --- a/src/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.C +++ b/src/bcs/SakiyamaSecondaryElectronWithEffEfieldBC.C @@ -33,7 +33,6 @@ SakiyamaSecondaryElectronWithEffEfieldBC::SakiyamaSecondaryElectronWithEffEfield _r_units(1. / getParam("position_units")), - // Coupled Variables _Ex(adCoupledValue("Ex")), _Ey(adCoupledValue("Ey")), _Ez(adCoupledValue("Ez")), diff --git a/test/tests/mms/bcs/1D_LymberopoulosElectronBC.i b/test/tests/mms/bcs/1D_LymberopoulosElectronBC.i index 19ec33455ba..339d6869dae 100644 --- a/test/tests/mms/bcs/1D_LymberopoulosElectronBC.i +++ b/test/tests/mms/bcs/1D_LymberopoulosElectronBC.i @@ -1,29 +1,29 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = 'LymberopoulosElectronBC_LeftBC_IC_out.e' #file = 'LymberopoulosElectronBC_RightBC_IC_out.e' use_for_exodus_restart = true - [../] - [./left] + [] + [left] type = SideSetsFromNormalsGenerator normals = '-1 0 0' new_boundary = 'left' input = geo - [../] - [./right] + [] + [right] type = SideSetsFromNormalsGenerator normals = '1 0 0' new_boundary = 'right' input = left - [../] + [] [] [Outputs] file_base = 'LymberopoulosElectronBC_LeftBC_out' #file_base = 'LymberopoulosElectronBC_RightBC_out' perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] @@ -34,271 +34,254 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] + [] - [./potential] + [potential] initial_from_file_var = potential - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EFieldAdvection variable = ion position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Potential Equations - [./potential_diff] + [potential_diff] type = CoeffDiffusionLin variable = potential position_units = 1.0 - [../] - [./potential_source] + [] + [potential_source] type = BodyForce variable = potential function = 'potential_source' - [../] + [] [] [AuxVariables] - [./potential_sol] - [../] - [./ion_sol] - [../] + [potential_sol] + [] + [ion_sol] + [] - [./em_sol] - [../] + [em_sol] + [] [] [AuxKernels] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] - [./ion_sol] + [] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] [] [Functions] #Constants for the manufactured solutions #The lenght between electrode - [./l] + [l] type = ConstantFunction value = 1.0 - [../] + [] #The frequency - [./f] + [f] type = ConstantFunction value = 1.0 - [../] + [] #Material Variables #Electron diffusion coeff. - [./diffem] + [diffem] type = ConstantFunction value = '1.0' - [../] + [] #Electron mobility coeff. - [./muem] + [muem] type = ConstantFunction value = 1.0 - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ParsedFunction vars = 'diffem' vals = 'diffem' value = 'diffem' - [../] + [] #Ion mobility coeff. - [./muion] + [muion] type = ParsedFunction vars = 'muem' vals = 'muem' value = 'muem' - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 1.0 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'l f N_A' vals = 'l f N_A' value = 'log(((sin(2.*pi*f*t) + 2.) * ((x/l)*(1. - x/l) + 1.)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'em_fun' vals = 'em_fun' value = 'em_fun' - [../] + [] #The manufactured electron density solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'l f' vals = 'l f' value = '-sin(2.*pi*f*t)*(x/l)^2. + (x/l)^2.' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'l f diffem muem N_A' vals = 'l f diffem muem N_A' value = '((2.*diffem*(sin(2.*pi*f*t) + 2.))/l^2. + (2.*f*pi*cos(2.*pi*f*t)*(l^2. + l*x - x^2.))/l^2. - (2.*muem*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l^2. + l*x - x^2.))/l^4. - (2.*muem*x*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l - 2.*x))/l^4.) / N_A' - [../] - [./ion_source] + [] + [ion_source] type = ParsedFunction vars = 'l f diffion muion N_A' vals = 'l f diffion muion N_A' value = '((2.*diffion*(sin(2.*pi*f*t) + 2.))/l^2. + (2.*f*pi*cos(2.*pi*f*t)*(l^2. + l*x - x^2.))/l^2. + (2.*muion*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l^2. + l*x - x^2.))/l^4. + (2.*muion*x*(sin(2.*pi*f*t) - 1.)*(sin(2.*pi*f*t) + 2.)*(l - 2.*x))/l^4.) / N_A' - [../] - [./potential_source] + [] + [potential_source] type = ParsedFunction vars = 'l f' vals = 'l f' value = 'sin(2.*pi*f*t)*(2./l^2.) - (2./l^2.)' - [../] + [] #The left BC dirichlet function - [./em_left_BC] + [em_left_BC] type = ParsedFunction vars = 'l f N_A' vals = 'l f N_A' value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' - [../] - [./ion_left_BC] + [] + [ion_left_BC] type = ParsedFunction vars = 'l f N_A' vals = 'l f N_A' value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' - [../] - [./potential_left_BC] + [] + [potential_left_BC] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = '0.0' - [../] + [] #The right BC dirichlet function - [./em_right_BC] + [em_right_BC] type = ParsedFunction vars = 'l f N_A' vals = 'l f N_A' value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' - [../] - [./ion_right_BC] + [] + [ion_right_BC] type = ParsedFunction vars = 'l f N_A' vals = 'l f N_A' value = 'log((sin(2.*pi*f*t) + 2.) / N_A)' - [../] - [./potential_right_BC] + [] + [potential_right_BC] type = ParsedFunction vars = 'f N_A' vals = 'f N_A' value = '1. - sin(2.*pi*f*t)' - [../] - -#'log(((sin(2.*pi*f*t) + 2.) * ((x/l)*(1. - x/l) + 1.)) / N_A)' - - #The left Flux BC function - [./em_left_Flux_BC] - type = ParsedFunction - vars = 'l f diffem muem N_A' - vals = 'l f diffem muem N_A' - value = '(-(diffem*(sin(2.*pi*f*t) + 2.))/l) / N_A' - [../] - #The right Flux BC function - [./em_right_Flux_BC] - type = ParsedFunction - vars = 'l f diffem muem N_A' - vals = 'l f diffem muem N_A' - value = '-1.0 * ((diffem*(sin(2.*pi*f*t) + 2.))/l - muem*(sin(2.*pi*f*t) + 2.)*((2.*sin(2.*pi*f*t))/l - 2./l)) / N_A' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((1.) / N_A)' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((1.) / N_A)' - [../] + [] [] [BCs] @@ -323,45 +306,45 @@ # em_left_BC em_right_LymberopoulosElectronBC' - [./potential_left_BC] + [potential_left_BC] type = FunctionDirichletBC variable = potential - function = 'potential_left_BC' + function = 'potential_fun' boundary = 'left' - [../] - [./potential_right_BC] + [] + [potential_right_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' + function = 'potential_fun' boundary = 'right' - [../] + [] - [./ion_left_BC] + [ion_left_BC] type = FunctionDirichletBC variable = ion - function = 'ion_left_BC' + function = 'ion_fun' boundary = 'left' - [../] - [./ion_right_BC] + [] + [ion_right_BC] type = FunctionDirichletBC variable = ion - function = 'ion_right_BC' + function = 'ion_fun' boundary = 'right' - [../] + [] - [./em_left_BC] + [em_left_BC] type = FunctionDirichletBC variable = em - function = 'em_left_BC' + function = 'em_fun' boundary = 'left' - [../] - [./em_left_Flux_BC] + [] + [em_left_Flux_BC] type = FunctionNeumannBC variable = em function = 'em_left_Flux_BC' boundary = 'left' - [../] - [./em_left_LymberopoulosElectronBC] + [] + [em_left_LymberopoulosElectronBC] type = LymberopoulosElectronBC variable = em boundary = 'left' @@ -369,21 +352,21 @@ ks = 1.0 ions = ion position_units = 1.0 - [../] + [] - [./em_right_BC] + [em_right_BC] type = FunctionDirichletBC variable = em - function = 'em_right_BC' + function = 'em_fun' boundary = 'right' - [../] - [./em_right_Flux_BC] + [] + [em_right_Flux_BC] type = FunctionNeumannBC variable = em function = 'em_right_Flux_BC' boundary = 'right' - [../] - [./em_right_LymberopoulosElectronBC] + [] + [em_right_LymberopoulosElectronBC] type = LymberopoulosElectronBC variable = em boundary = 'right' @@ -391,7 +374,7 @@ ks = 1.0 ions = ion position_units = 1.0 - [../] + [] [] [Materials] @@ -399,52 +382,52 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff] + [] + [ADMaterial_Coeff] type = ADGenericFunctionMaterial prop_names = 'diffpotential diffem muem diffion muion' prop_values = 'diffpotential diffem muem diffion muion' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion' prop_values = '-1.0 1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./potential_l2Error] + [] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] diff --git a/test/tests/mms/bcs/1D_LymberopoulosIonBC.i b/test/tests/mms/bcs/1D_LymberopoulosIonBC.i index f71d7730e13..399d5226f6d 100644 --- a/test/tests/mms/bcs/1D_LymberopoulosIonBC.i +++ b/test/tests/mms/bcs/1D_LymberopoulosIonBC.i @@ -1,29 +1,29 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = 'LymberopoulosIonBC_LeftBC_IC_out.e' #file = 'LymberopoulosIonBC_RightBC_IC_out.e' use_for_exodus_restart = true - [../] - [./left] + [] + [left] type = SideSetsFromNormalsGenerator normals = '-1 0 0' new_boundary = 'left' input = geo - [../] - [./right] + [] + [right] type = SideSetsFromNormalsGenerator normals = '1 0 0' new_boundary = 'right' input = left - [../] + [] [] [Outputs] file_base = 'LymberopoulosIonBC_LeftBC_out' #file_base = 'LymberopoulosIonBC_RightBC_out' perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] @@ -34,134 +34,134 @@ [] [Variables] - [./ion] + [ion] initial_from_file_var = ion - [../] - [./potential] + [] + [potential] initial_from_file_var = potential - [../] + [] [] [Kernels] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EFieldAdvection variable = ion position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Potential Equations - [./potential_time_derivative] + [potential_time_derivative] type = TimeDerivative variable = potential - [../] - [./potential_diff] + [] + [potential_diff] type = CoeffDiffusionLin variable = potential position_units = 1.0 - [../] - [./potential_source] + [] + [potential_source] type = BodyForce variable = potential function = 'potential_source' - [../] + [] [] [AuxVariables] - [./potential_sol] - [../] + [potential_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] [] [AuxKernels] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] [] [Functions] #Constants for the manufactured solutions #The lenght between electrode - [./l] + [l] type = ConstantFunction value = 1.0 - [../] + [] #The frequency - [./f] + [f] type = ConstantFunction value = 1.0 - [../] + [] #Material Variables #Ion diffusion coeff. - [./diffion] + [diffion] type = ConstantFunction value = 1.0 - [../] + [] #Ion mobility coeff. - [./muion] + [muion] type = ConstantFunction value = 0.1 - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.01 - [../] + [] #Manufactured Solutions #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'l N_A' vals = 'l N_A' value = 'log((1.0 + x^2*(1 - x/l)^2/l^2) / N_A)' - [../] + [] #The manufactured electron density solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'l f ee diffpotential' vals = 'l f ee diffpotential' value = '-(ee*l^2*sin((pi*x)/l)*sin(2*pi*f*t))/(5*diffpotential*pi^2)' - [../] + [] #Source Terms in moles #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'l f ee diffpotential diffion muion N_A' vals = 'l f ee diffpotential diffion muion N_A' @@ -175,62 +175,35 @@ 2*ee*muion*x^3*sin(2*pi*f*t)*sin(pi*x/l)/(5*diffpotential*l^3) + 4*ee*muion*x^3*sin(2*pi*f*t)*cos(pi*x/l)/(5*pi*diffpotential*l^3) - ee*muion*x^4*sin(2*pi*f*t)*sin(pi*x/l)/(5*diffpotential*l^4)) / N_A' - [../] - [./potential_source] + [] + [potential_source] type = ParsedFunction vars = 'l f ee diffpotential' vals = 'l f ee diffpotential' value = '-ee*sin(2*pi*f*t)*sin(pi*x/l)/5 - 2*ee*f*l^2*sin(pi*x/l)*cos(2*pi*f*t)/(5*pi*diffpotential)' - [../] - - #The left BC dirichlet function - [./ion_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((1.0) / N_A)' - [../] - [./potential_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = '0.0' - [../] - #The right BC dirichlet function - [./ion_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((1.0) / N_A)' - [../] - [./potential_right_BC] - type = ParsedFunction - vars = 'f N_A' - vals = 'f N_A' - value = '0.0' - [../] + [] #The left Flux BC function - [./ion_left_Flux_BC] + [ion_left_Flux_BC] type = ParsedFunction vars = 'l f ee diffpotential muion N_A' vals = 'l f ee diffpotential muion N_A' value = '(0.2*ee*l*muion*sin(2*pi*f*t)/(pi*diffpotential)) / N_A' - [../] + [] #The right Flux BC function - [./ion_right_Flux_BC] + [ion_right_Flux_BC] type = ParsedFunction vars = 'l f ee diffpotential muion N_A' vals = 'l f ee diffpotential muion N_A' value = '-1.0 * (-0.2*ee*l*muion*sin(2*pi*f*t)/(pi*diffpotential)) / N_A' - [../] + [] - [./ion_ICs] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = '(1.) / N_A' - [../] + [] [] [BCs] @@ -250,57 +223,57 @@ #active = 'potential_left_BC potential_right_BC # ion_left_BC ion_right_LymberopoulosIonBC' - [./potential_left_BC] + [potential_left_BC] type = FunctionDirichletBC variable = potential - function = 'potential_left_BC' + function = 'potential_fun' boundary = 'left' - [../] - [./potential_right_BC] + [] + [potential_right_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' + function = 'potential_fun' boundary = 'right' - [../] + [] - [./ion_left_BC] + [ion_left_BC] type = FunctionDirichletBC variable = ion - function = 'ion_left_BC' + function = 'ion_fun' boundary = 'left' - [../] - [./ion_left_Flux_BC] + [] + [ion_left_Flux_BC] type = FunctionNeumannBC variable = ion function = 'ion_left_Flux_BC' boundary = 'left' - [../] - [./ion_left_LymberopoulosIonBC] + [] + [ion_left_LymberopoulosIonBC] type = LymberopoulosIonBC variable = ion boundary = 'left' position_units = 1.0 - [../] + [] - [./ion_right_BC] + [ion_right_BC] type = FunctionDirichletBC variable = ion - function = 'ion_right_BC' + function = 'ion_fun' boundary = 'right' - [../] - [./ion_right_Flux_BC] + [] + [ion_right_Flux_BC] type = FunctionNeumannBC variable = ion function = 'ion_right_Flux_BC' boundary = 'right' - [../] - [./ion_right_LymberopoulosIonBC] + [] + [ion_right_LymberopoulosIonBC] type = LymberopoulosIonBC variable = ion boundary = 'right' position_units = 1.0 - [../] + [] [] [Materials] @@ -308,47 +281,47 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff] + [] + [ADMaterial_Coeff] type = ADGenericFunctionMaterial prop_names = 'diffpotential diffion muion' prop_values = 'diffpotential diffion muion' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnion' prop_values = '1.0' - [../] + [] [] [Postprocessors] - [./ion_l2Error] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./potential_l2Error] + [] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] diff --git a/test/tests/mms/bcs/2D_ElectronBC.i b/test/tests/mms/bcs/2D_ElectronBC.i index 6038bf9e76b..772d3671166 100644 --- a/test/tests/mms/bcs/2D_ElectronBC.i +++ b/test/tests/mms/bcs/2D_ElectronBC.i @@ -1,9 +1,9 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_ElectronBC_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -11,288 +11,288 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] - [./mean_en] + [] + [mean_en] initial_from_file_var = mean_en - [../] + [] - [./Ex] + [Ex] initial_from_file_var = Ex - [../] - [./Ey] + [] + [Ey] initial_from_file_var = Ey - [../] + [] - [./potential] + [potential] initial_from_file_var = potential - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EffectiveEFieldAdvection variable = ion u = Ex v = Ey position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Eff. Efield - [./EffEfield_X_time_deriv] + [EffEfield_X_time_deriv] type = TimeDerivative variable = Ex - [../] - [./EffEfield_X_diffusion] + [] + [EffEfield_X_diffusion] type = MatDiffusion diffusivity = diffEx variable = Ex - [../] - [./EffEfield_X_source] + [] + [EffEfield_X_source] type = BodyForce variable = Ex function = 'Ex_source' - [../] - [./EffEfield_Y_time_deriv] + [] + [EffEfield_Y_time_deriv] type = TimeDerivative variable = Ey - [../] - [./EffEfield_Y_diffusion] + [] + [EffEfield_Y_diffusion] type = MatDiffusion diffusivity = diffEy variable = Ey - [../] - [./EffEfield_Y_source] + [] + [EffEfield_Y_source] type = BodyForce variable = Ey function = 'Ey_source' - [../] + [] #Potential - [./Potential_time_deriv] + [Potential_time_deriv] type = TimeDerivative variable = potential - [../] - [./Potential_diffusion] + [] + [Potential_diffusion] type = MatDiffusion diffusivity = diffpotential variable = potential - [../] - [./Potential_source] + [] + [Potential_source] type = BodyForce variable = potential function = 'potential_source' - [../] + [] #Electron Energy Equations - [./mean_en_time_deriv] + [mean_en_time_deriv] type = TimeDerivativeLog variable = mean_en - [../] - [./mean_en_diffusion] + [] + [mean_en_diffusion] type = CoeffDiffusion variable = mean_en position_units = 1.0 - [../] - [./mean_en_source] + [] + [mean_en_source] type = BodyForce variable = mean_en function = 'energy_source' - [../] + [] [] [AuxVariables] - [./mean_en_sol] - [../] + [mean_en_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] - [./Ex_sol] - [../] - [./Ey_sol] - [../] + [Ex_sol] + [] + [Ey_sol] + [] - [./potential_sol] - [../] + [potential_sol] + [] [] [AuxKernels] - [./mean_en_sol] + [mean_en_sol] type = FunctionAux variable = mean_en_sol function = mean_en_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./Ex_sol] + [Ex_sol] type = FunctionAux variable = Ex_sol function = Ex_fun - [../] - [./Ey_sol] + [] + [Ey_sol] type = FunctionAux variable = Ey_sol function = Ey_fun - [../] + [] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] [] [Functions] #Material Variables - [./massem] + [massem] type = ConstantFunction value = 1.0 - [../] + [] #Electron diffusion coeff. - [./diffem] + [diffem] type = ConstantFunction value = 0.05 - [../] - [./muem] + [] + [muem] type = ConstantFunction value = 0.01 - [../] + [] #Electron energy mobility coeff. - [./diffmean_en] + [diffmean_en] type = ConstantFunction value = 0.05 - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ParsedFunction vars = diffem vals = diffem value = diffem - [../] - [./muion] + [] + [muion] type = ParsedFunction vars = muem vals = muem value = muem - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.25 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured electron energy solution - [./mean_en_fun] + [mean_en_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = 'log(((3*massem*pi*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' - [../] + [] #The manufactured eff. Efield solution - [./Ex_fun] + [Ex_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_fun] + [] + [Ey_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] #The manufactured potential solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' @@ -301,9 +301,9 @@ (muem*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' @@ -311,8 +311,8 @@ (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (muion*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] - [./energy_source] + [] + [energy_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' @@ -340,246 +340,90 @@ 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))*(sin(pi*t) + 1))/(ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))) - (3*massem*pi^2*cos(2*pi*t)*cos(pi*y)*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(40*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) / N_A' - [../] + [] #The Ex source term. - [./Ex_source] + [Ex_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-pi^2*cos(pi*t)*cos(pi*x) - diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_source] + [] + [Ey_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-pi^2*cos(pi*t)*cos(pi*y) - diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] - [./potential_source] + [potential_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The left BC dirichlet function - [./em_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./energy_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*y) + - (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./Ey_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The right BC dirichlet function - [./em_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./energy_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*y) + - (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./Ey_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The Down BC dirichlet function - [./em_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./energy_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(2*pi*t)/5 + - sin(pi*x) + 1))^2)/(16*ee*(sin(2*pi*t)/5 + sin(pi*x) + 1))) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./Ex_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./potential_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] - - #The up BC dirichlet function - [./em_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./energy_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 8*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) - - sin(2*pi*t)/5 + 1))^2)/(16*ee*(sin(pi*x) - sin(2*pi*t)/5 + 1))) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./Ex_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./potential_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] - [./mean_en_ICs] + [] + [mean_en_ICs] type = ParsedFunction vars = 'em_ICs' vals = 'em_ICs' value = 'log(3./2.) + em_ICs' - [../] + [] - [./em_left_Flux_BC] + [em_left_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '(-diffem*pi*cos(pi*x) - muem*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] - [./em_down_Flux_BC] + [] + [em_down_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '(-(diffem*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - muem*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] + [] [] [BCs] - #[./em_left_BC] + #[em_left_BC] # type = FunctionDirichletBC # variable = em - # function = 'em_left_BC' + # function = 'em_fun' # boundary = 3 # preset = true - #[../] - #[./em_left_BC] + #[] + #[em_left_BC] # type = FunctionNeumannBC # variable = em # function = 'em_left_Flux_BC' # boundary = 3 # preset = true - #[../] - [./em_physical_diffusion_left] + #[] + [em_physical_diffusion_left] type = SakiyamaElectronDiffusionBC variable = em electron_energy = mean_en boundary = 3 position_units = 1.0 - [../] - [./em_Ar+_second_emissions_left] + [] + [em_Ar+_second_emissions_left] type = SakiyamaSecondaryElectronWithEffEfieldBC variable = em Ex = Ex @@ -588,38 +432,38 @@ users_gamma = 1.0 boundary = 3 position_units = 1.0 - [../] + [] - [./em_right_BC] + [em_right_BC] type = FunctionDirichletBC variable = em - function = 'em_right_BC' + function = 'em_fun' boundary = 1 preset = true - [../] + [] - #[./em_down_BC] + #[em_down_BC] # type = FunctionDirichletBC # variable = em - # function = 'em_down_BC' + # function = 'em_fun' # boundary = 0 # preset = true - #[../] - #[./em_down_BC] + #[] + #[em_down_BC] # type = FunctionNeumannBC # variable = em # function = 'em_down_Flux_BC' # boundary = 0 # preset = true - #[../] - [./em_physical_diffusion_down] + #[] + [em_physical_diffusion_down] type = SakiyamaElectronDiffusionBC variable = em electron_energy = mean_en boundary = 0 position_units = 1.0 - [../] - [./em_Ar+_second_emissions_down] + [] + [em_Ar+_second_emissions_down] type = SakiyamaSecondaryElectronWithEffEfieldBC variable = em Ex = Ex @@ -628,160 +472,55 @@ users_gamma = 1.0 boundary = 0 position_units = 1.0 - [../] + [] - [./em_up_BC] + [em_up_BC] type = FunctionDirichletBC variable = em - function = 'em_up_BC' + function = 'em_fun' boundary = 2 preset = true - [../] + [] - [./ion_left_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_left_BC' - boundary = 3 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 - preset = true - [../] - [./ion_down_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_down_BC' - boundary = 0 - preset = true - [../] - [./ion_up_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_up_BC' - boundary = 2 - preset = true - [../] + [] - [./energy_left_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_left_BC' - boundary = 3 - preset = true - [../] - [./energy_right_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_right_BC' - boundary = 1 - preset = true - [../] - [./energy_down_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_down_BC' - boundary = 0 - preset = true - [../] - [./energy_up_BC] + [energy_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_up_BC' - boundary = 2 + function = 'mean_en_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./Ex_left_BC] + [Ex_BC] type = FunctionDirichletBC variable = Ex - function = 'Ex_left_BC' - boundary = 3 + function = 'Ex_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ex_right_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_right_BC' - boundary = 1 - preset = true - [../] - [./Ex_down_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_down_BC' - boundary = 0 - preset = true - [../] - [./Ex_up_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_up_BC' - boundary = 2 - preset = true - [../] + [] - [./Ey_left_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_left_BC' - boundary = 3 - preset = true - [../] - [./Ey_right_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_right_BC' - boundary = 1 - preset = true - [../] - [./Ey_down_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_down_BC' - boundary = 0 - preset = true - [../] - [./Ey_up_BC] + [Ey_BC] type = FunctionDirichletBC variable = Ey - function = 'Ey_up_BC' - boundary = 2 + function = 'Ey_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] + [potential_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' - boundary = 1 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] - [./potential_down_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_down_BC' - boundary = 0 - preset = true - [../] - [./potential_up_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -789,73 +528,73 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A massem diffpotential diffEx diffEy' prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffion muion diffem muem diffmean_en' prop_values = 'diffion muion diffem muem diffmean_en' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion sgnmean_en' prop_values = '-1.0 1.0 -1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./mean_en_l2Error] + [] + [mean_en_l2Error] type = ElementL2Error variable = mean_en function = mean_en_fun - [../] + [] - [./Ex_l2Error] + [Ex_l2Error] type = ElementL2Error variable = Ex function = Ex_fun - [../] - [./Ey_l2Error] + [] + [Ey_l2Error] type = ElementL2Error variable = Ey function = Ey_fun - [../] + [] - [./potential_l2Error] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -880,7 +619,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield.i b/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield.i index 256779d23c6..8e48140ec60 100644 --- a/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield.i +++ b/test/tests/mms/bcs/2D_ElectronBC_NegivateOutWardFacingEfield.i @@ -1,9 +1,9 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_ElectronBC_NegivateOutWardFacingEfield_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -11,288 +11,288 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] - [./mean_en] + [] + [mean_en] initial_from_file_var = mean_en - [../] + [] - [./Ex] + [Ex] initial_from_file_var = Ex - [../] - [./Ey] + [] + [Ey] initial_from_file_var = Ey - [../] + [] - [./potential] + [potential] initial_from_file_var = potential - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EffectiveEFieldAdvection variable = ion u = Ex v = Ey position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Eff. Efield - [./EffEfield_X_time_deriv] + [EffEfield_X_time_deriv] type = TimeDerivative variable = Ex - [../] - [./EffEfield_X_diffusion] + [] + [EffEfield_X_diffusion] type = MatDiffusion diffusivity = diffEx variable = Ex - [../] - [./EffEfield_X_source] + [] + [EffEfield_X_source] type = BodyForce variable = Ex function = 'Ex_source' - [../] - [./EffEfield_Y_time_deriv] + [] + [EffEfield_Y_time_deriv] type = TimeDerivative variable = Ey - [../] - [./EffEfield_Y_diffusion] + [] + [EffEfield_Y_diffusion] type = MatDiffusion diffusivity = diffEy variable = Ey - [../] - [./EffEfield_Y_source] + [] + [EffEfield_Y_source] type = BodyForce variable = Ey function = 'Ey_source' - [../] + [] #Potential - [./Potential_time_deriv] + [Potential_time_deriv] type = TimeDerivative variable = potential - [../] - [./Potential_diffusion] + [] + [Potential_diffusion] type = MatDiffusion diffusivity = diffpotential variable = potential - [../] - [./Potential_source] + [] + [Potential_source] type = BodyForce variable = potential function = 'potential_source' - [../] + [] #Electron Energy Equations - [./mean_en_time_deriv] + [mean_en_time_deriv] type = TimeDerivativeLog variable = mean_en - [../] - [./mean_en_diffusion] + [] + [mean_en_diffusion] type = CoeffDiffusion variable = mean_en position_units = 1.0 - [../] - [./mean_en_source] + [] + [mean_en_source] type = BodyForce variable = mean_en function = 'energy_source' - [../] + [] [] [AuxVariables] - [./mean_en_sol] - [../] + [mean_en_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] - [./Ex_sol] - [../] - [./Ey_sol] - [../] + [Ex_sol] + [] + [Ey_sol] + [] - [./potential_sol] - [../] + [potential_sol] + [] [] [AuxKernels] - [./mean_en_sol] + [mean_en_sol] type = FunctionAux variable = mean_en_sol function = mean_en_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./Ex_sol] + [Ex_sol] type = FunctionAux variable = Ex_sol function = Ex_fun - [../] - [./Ey_sol] + [] + [Ey_sol] type = FunctionAux variable = Ey_sol function = Ey_fun - [../] + [] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] [] [Functions] #Material Variables - [./massem] + [massem] type = ConstantFunction value = 1.0 - [../] + [] #Electron diffusion coeff. - [./diffem] + [diffem] type = ConstantFunction value = 0.05 - [../] - [./muem] + [] + [muem] type = ConstantFunction value = 0.01 - [../] + [] #Electron energy mobility coeff. - [./diffmean_en] + [diffmean_en] type = ConstantFunction value = 0.05 - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ParsedFunction vars = diffem vals = diffem value = diffem - [../] - [./muion] + [] + [muion] type = ParsedFunction vars = muem vals = muem value = muem - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.25 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured electron energy solution - [./mean_en_fun] + [mean_en_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = 'log(((3*massem*pi*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' - [../] + [] #The manufactured eff. Efield solution - [./Ex_fun] + [Ex_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_fun] + [] + [Ey_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] #The manufactured potential solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' @@ -301,9 +301,9 @@ (muem*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' @@ -312,8 +312,8 @@ 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] - [./energy_source] + [] + [energy_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' @@ -350,248 +350,90 @@ (3*massem*pi^2*cos(2*pi*t)*cos(pi*y)*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(40*ee*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) / N_A' - [../] + [] #The Ex source term. - [./Ex_source] + [Ex_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = 'pi^2*cos(pi*t)*cos(pi*x) + diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_source] + [] + [Ey_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = 'pi^2*cos(pi*t)*cos(pi*y) + diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] - [./potential_source] + [potential_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The left BC dirichlet function - [./em_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./energy_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*y) + - (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*y) + - (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./Ey_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The right BC dirichlet function - [./em_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./energy_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*y) + - (cos(pi*y)*sin(2*pi*t))/5 + 1))^2)/(16*ee*(sin(pi*y) + - (cos(pi*y)*sin(2*pi*t))/5 + 1))) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./Ey_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The Down BC dirichlet function - [./em_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./energy_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(2*pi*t)/5 + - sin(pi*x) + 1))^2)/(16*ee*(sin(2*pi*t)/5 + sin(pi*x) + 1))) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./Ex_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./potential_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] - - #The up BC dirichlet function - [./em_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./energy_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log(((3*massem*pi*(4*pi*diffem + 4*muem*pi*(sin(pi*t) + 1)*(sin(pi*x) - - sin(2*pi*t)/5 + 1))^2)/(16*ee*(sin(pi*x) - sin(2*pi*t)/5 + 1))) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./Ex_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./potential_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] - [./mean_en_ICs] + [] + [mean_en_ICs] type = ParsedFunction vars = 'em_ICs' vals = 'em_ICs' - value = 'log(3./2.) + em_ICs' - [../] + value = 'log(32.) + em_ICs' + [] - [./em_left_Flux_BC] + [em_left_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '(-diffem*pi*cos(pi*x) - muem*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] - [./em_down_Flux_BC] + [] + [em_down_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en diffion muion' value = '(-(diffem*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - muem*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] + [] [] [BCs] - #[./em_left_BC] + #[em_left_BC] # type = FunctionDirichletBC # variable = em - # function = 'em_left_BC' + # function = 'em_fun' # boundary = 3 # preset = true - #[../] - #[./em_left_BC] + #[] + #[em_left_BC] # type = FunctionNeumannBC # variable = em # function = 'em_left_Flux_BC' # boundary = 3 # preset = true - #[../] - [./em_physical_diffusion_left] + #[] + [em_physical_diffusion_left] type = SakiyamaElectronDiffusionBC variable = em electron_energy = mean_en boundary = 3 position_units = 1.0 - [../] - [./em_Ar+_second_emissions_left] + [] + [em_Ar+_second_emissions_left] type = SakiyamaSecondaryElectronWithEffEfieldBC variable = em Ex = Ex @@ -600,38 +442,38 @@ users_gamma = 1.0 boundary = 3 position_units = 1.0 - [../] + [] - [./em_right_BC] + [em_right_BC] type = FunctionDirichletBC variable = em - function = 'em_right_BC' + function = 'em_fun' boundary = 1 preset = true - [../] + [] - #[./em_down_BC] + #[em_down_BC] # type = FunctionDirichletBC # variable = em - # function = 'em_down_BC' + # function = 'em_fun' # boundary = 0 # preset = true - #[../] - #[./em_down_BC] + #[] + #[em_down_BC] # type = FunctionNeumannBC # variable = em # function = 'em_down_Flux_BC' # boundary = 0 # preset = true - #[../] - [./em_physical_diffusion_down] + #[] + [em_physical_diffusion_down] type = SakiyamaElectronDiffusionBC variable = em electron_energy = mean_en boundary = 0 position_units = 1.0 - [../] - [./em_Ar+_second_emissions_down] + [] + [em_Ar+_second_emissions_down] type = SakiyamaSecondaryElectronWithEffEfieldBC variable = em Ex = Ex @@ -640,160 +482,55 @@ users_gamma = 1.0 boundary = 0 position_units = 1.0 - [../] + [] - [./em_up_BC] + [em_up_BC] type = FunctionDirichletBC variable = em - function = 'em_up_BC' + function = 'em_fun' boundary = 2 preset = true - [../] + [] - [./ion_left_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_left_BC' - boundary = 3 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 - preset = true - [../] - [./ion_down_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_down_BC' - boundary = 0 - preset = true - [../] - [./ion_up_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_up_BC' - boundary = 2 - preset = true - [../] + [] - [./energy_left_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_left_BC' - boundary = 3 - preset = true - [../] - [./energy_right_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_right_BC' - boundary = 1 - preset = true - [../] - [./energy_down_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_down_BC' - boundary = 0 - preset = true - [../] - [./energy_up_BC] + [energy_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_up_BC' - boundary = 2 + function = 'mean_en_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./Ex_left_BC] + [Ex_BC] type = FunctionDirichletBC variable = Ex - function = 'Ex_left_BC' - boundary = 3 + function = 'Ex_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ex_right_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_right_BC' - boundary = 1 - preset = true - [../] - [./Ex_down_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_down_BC' - boundary = 0 - preset = true - [../] - [./Ex_up_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_up_BC' - boundary = 2 - preset = true - [../] + [] - [./Ey_left_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_left_BC' - boundary = 3 - preset = true - [../] - [./Ey_right_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_right_BC' - boundary = 1 - preset = true - [../] - [./Ey_down_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_down_BC' - boundary = 0 - preset = true - [../] - [./Ey_up_BC] + [Ey_BC] type = FunctionDirichletBC variable = Ey - function = 'Ey_up_BC' - boundary = 2 + function = 'Ey_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] + [potential_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' - boundary = 1 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] - [./potential_down_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_down_BC' - boundary = 0 - preset = true - [../] - [./potential_up_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -801,73 +538,73 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A massem diffpotential diffEx diffEy' prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffion muion diffem muem diffmean_en' prop_values = 'diffion muion diffem muem diffmean_en' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion sgnmean_en' prop_values = '-1.0 1.0 -1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./mean_en_l2Error] + [] + [mean_en_l2Error] type = ElementL2Error variable = mean_en function = mean_en_fun - [../] + [] - [./Ex_l2Error] + [Ex_l2Error] type = ElementL2Error variable = Ex function = Ex_fun - [../] - [./Ey_l2Error] + [] + [Ey_l2Error] type = ElementL2Error variable = Ey function = Ey_fun - [../] + [] - [./potential_l2Error] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -893,7 +630,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/bcs/2D_EnergyBC.i b/test/tests/mms/bcs/2D_EnergyBC.i index 3bf1a75060e..b9e16c8849e 100644 --- a/test/tests/mms/bcs/2D_EnergyBC.i +++ b/test/tests/mms/bcs/2D_EnergyBC.i @@ -1,21 +1,9 @@ -#This MMS test was designed to test the log version of Zapdos' -#kernels with coupling between electrons, ions, potential, and -#the mean electron energy density. - -#The mean electron energy density has a "correction" term that assumes -#an thermal conductivity coefficient of K=3/2*D_e*n_e (this is based on -#using the assumption of Einstein Relation) - -#Note: The electron/mean energy's diffusion and mobility coefficients are -#directly proportional to the energy function. - - [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_EnergyBC_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -23,291 +11,291 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] - [./mean_en] + [] + [mean_en] initial_from_file_var = mean_en - [../] + [] - [./Ex] + [Ex] initial_from_file_var = Ex - [../] - [./Ey] + [] + [Ey] initial_from_file_var = Ey - [../] + [] - [./potential] + [potential] initial_from_file_var = potential - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EffectiveEFieldAdvection variable = ion u = Ex v = Ey position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Eff. Efield - [./EffEfield_X_time_deriv] + [EffEfield_X_time_deriv] type = TimeDerivative variable = Ex - [../] - [./EffEfield_X_diffusion] + [] + [EffEfield_X_diffusion] type = MatDiffusion diffusivity = diffEx variable = Ex - [../] - [./EffEfield_X_source] + [] + [EffEfield_X_source] type = BodyForce variable = Ex function = 'Ex_source' - [../] - [./EffEfield_Y_time_deriv] + [] + [EffEfield_Y_time_deriv] type = TimeDerivative variable = Ey - [../] - [./EffEfield_Y_diffusion] + [] + [EffEfield_Y_diffusion] type = MatDiffusion diffusivity = diffEy variable = Ey - [../] - [./EffEfield_Y_source] + [] + [EffEfield_Y_source] type = BodyForce variable = Ey function = 'Ey_source' - [../] + [] #Potential - [./Potential_time_deriv] + [Potential_time_deriv] type = TimeDerivative variable = potential - [../] - [./Potential_diffusion] + [] + [Potential_diffusion] type = MatDiffusion diffusivity = diffpotential variable = potential - [../] - [./Potential_source] + [] + [Potential_source] type = BodyForce variable = potential function = 'potential_source' - [../] + [] #Electron Energy Equations - [./mean_en_time_deriv] + [mean_en_time_deriv] type = TimeDerivativeLog variable = mean_en - [../] - [./mean_en_diffusion] + [] + [mean_en_diffusion] type = CoeffDiffusion variable = mean_en position_units = 1.0 - [../] - [./mean_en_advection] + [] + [mean_en_advection] type = EFieldAdvection variable = mean_en position_units = 1.0 - [../] - [./mean_en_source] + [] + [mean_en_source] type = BodyForce variable = mean_en function = 'energy_source' - [../] + [] [] [AuxVariables] - [./mean_en_sol] - [../] + [mean_en_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] - [./Ex_sol] - [../] - [./Ey_sol] - [../] + [Ex_sol] + [] + [Ey_sol] + [] - [./potential_sol] - [../] + [potential_sol] + [] [] [AuxKernels] - [./mean_en_sol] + [mean_en_sol] type = FunctionAux variable = mean_en_sol function = mean_en_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./Ex_sol] + [Ex_sol] type = FunctionAux variable = Ex_sol function = Ex_fun - [../] - [./Ey_sol] + [] + [Ey_sol] type = FunctionAux variable = Ey_sol function = Ey_fun - [../] + [] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] [] [Functions] #Material Variables - [./massem] + [massem] type = ConstantFunction value = 1.0 - [../] + [] #Electron diffusion coeff. - [./diffem] + [diffem] type = ConstantFunction value = 0.05 - [../] - [./muem] + [] + [muem] type = ConstantFunction value = 0.01 - [../] + [] #Electron energy mobility coeff. - [./diffmean_en] + [diffmean_en] type = ConstantFunction value = 0.05 - [../] - [./mumean_en] + [] + [mumean_en] type = ConstantFunction value = 0.01 - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ParsedFunction vars = diffmean_en vals = diffmean_en value = diffmean_en - [../] - [./muion] + [] + [muion] type = ParsedFunction vars = mumean_en vals = mumean_en value = mumean_en - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.25 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'log(((16*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured electron energy solution - [./mean_en_fun] + [mean_en_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured eff. Efield solution - [./Ex_fun] + [Ex_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_fun] + [] + [Ey_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] #The manufactured potential solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' @@ -338,9 +326,9 @@ (cos(pi*y)*sin(2*pi*t))/5 + 1))/5 + (64*mumean_en*pi^2*cos(2*pi*t)*cos(pi*y)*(sin(pi*t) + 1))/25)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3)) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' @@ -348,8 +336,8 @@ (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (muion*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] - [./energy_source] + [] + [energy_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' @@ -357,296 +345,98 @@ (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (mumean_en*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] + [] #The Ex source term. - [./Ex_source] + [Ex_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-pi^2*cos(pi*t)*cos(pi*x) - diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_source] + [] + [Ey_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-pi^2*cos(pi*t)*cos(pi*y) - diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] - [./potential_source] + [potential_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The left BC dirichlet function - [./em_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' - [../] - [./energy_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./Ey_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The right BC dirichlet function - [./em_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' - [../] - [./energy_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./Ey_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The Down BC dirichlet function - [./em_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(2*pi*t)/5 + sin(pi*x) + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(2*t*pi)/5 + sin(x*pi) + 1))/5)^2)) / N_A)' - [../] - [./energy_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./Ex_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./potential_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] - - #The up BC dirichlet function - [./em_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(pi*x) - sin(2*pi*t)/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (32*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) - sin(2*t*pi)/5 + 1))/5)^2)) / N_A)' - [../] - [./energy_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./Ex_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./potential_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = '4.0' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] - [./mean_en_ICs] + [] + [mean_en_ICs] type = ParsedFunction vars = 'em_ICs' vals = 'em_ICs' value = '1.0' - [../] + [] - [./em_left_Flux_BC] + [em_left_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '(-diffmean_en*pi*cos(pi*x) - mumean_en*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] - [./em_down_Flux_BC] + [] + [em_down_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '(-(diffmean_en*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - mumean_en*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] + [] [] [BCs] - [./em_left_BC] - type = FunctionDirichletBC - variable = em - function = 'em_left_BC' - boundary = 3 - preset = true - [../] - [./em_right_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_right_BC' - boundary = 1 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] - [./em_down_BC] - type = FunctionDirichletBC - variable = em - function = 'em_down_BC' - boundary = 0 - preset = true - [../] - [./em_up_BC] - type = FunctionDirichletBC - variable = em - function = 'em_up_BC' - boundary = 2 - preset = true - [../] + [] - [./ion_left_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_left_BC' - boundary = 3 - preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] - [./ion_down_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_down_BC' - boundary = 0 - preset = true - [../] - [./ion_up_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_up_BC' - boundary = 2 - preset = true - [../] + [] - #[./energy_left_BC] + #[energy_left_BC] # type = FunctionDirichletBC # variable = mean_en - # function = 'energy_left_BC' + # function = 'mean_en_fun' # boundary = 3 # preset = true - #[../] - [./energy_left_physical_diffusion] + #[] + [energy_left_physical_diffusion] type = SakiyamaEnergyDiffusionBC variable = mean_en electrons = em boundary = 3 position_units = 1.0 - [../] - [./energy_left_second_emissions] + [] + [energy_left_second_emissions] type = SakiyamaEnergySecondaryElectronWithEffEfieldBC variable = mean_en em = em @@ -658,31 +448,31 @@ se_coeff = 1.0 boundary = 3 position_units = 1.0 - [../] + [] - [./energy_right_BC] + [energy_right_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_right_BC' + function = 'mean_en_fun' boundary = 1 preset = true - [../] + [] - #[./energy_down_BC] + #[energy_down_BC] # type = FunctionDirichletBC # variable = mean_en - # function = 'energy_down_BC' + # function = 'mean_en_fun' # boundary = 0 # preset = true - #[../] - [./energy_down_physical_diffusion] + #[] + [energy_down_physical_diffusion] type = SakiyamaEnergyDiffusionBC variable = mean_en electrons = em boundary = 0 position_units = 1.0 - [../] - [./energy_down_second_emissions] + [] + [energy_down_second_emissions] type = SakiyamaEnergySecondaryElectronWithEffEfieldBC variable = mean_en em = em @@ -694,102 +484,39 @@ se_coeff = 1.0 boundary = 0 position_units = 1.0 - [../] + [] - [./energy_up_BC] + [energy_up_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_up_BC' + function = 'mean_en_fun' boundary = 2 preset = true - [../] + [] - [./Ex_left_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_left_BC' - boundary = 3 - preset = true - [../] - [./Ex_right_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_right_BC' - boundary = 1 - preset = true - [../] - [./Ex_down_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_down_BC' - boundary = 0 - preset = true - [../] - [./Ex_up_BC] + [Ex_BC] type = FunctionDirichletBC variable = Ex - function = 'Ex_up_BC' - boundary = 2 + function = 'Ex_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./Ey_left_BC] + [Ey_BC] type = FunctionDirichletBC variable = Ey - function = 'Ey_left_BC' - boundary = 3 + function = 'Ey_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ey_right_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_right_BC' - boundary = 1 - preset = true - [../] - [./Ey_down_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_down_BC' - boundary = 0 - preset = true - [../] - [./Ey_up_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_up_BC' - boundary = 2 - preset = true - [../] + [] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] + [potentialt_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' - boundary = 1 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] - [./potential_down_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_down_BC' - boundary = 0 - preset = true - [../] - [./potential_up_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -797,73 +524,73 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A massem diffpotential diffEx diffEy' prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffion muion diffem muem diffmean_en mumean_en' prop_values = 'diffion muion diffem muem diffmean_en mumean_en' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion sgnmean_en' prop_values = '-1.0 1.0 -1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./mean_en_l2Error] + [] + [mean_en_l2Error] type = ElementL2Error variable = mean_en function = mean_en_fun - [../] + [] - [./Ex_l2Error] + [Ex_l2Error] type = ElementL2Error variable = Ex function = Ex_fun - [../] - [./Ey_l2Error] + [] + [Ey_l2Error] type = ElementL2Error variable = Ey function = Ey_fun - [../] + [] - [./potential_l2Error] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -889,7 +616,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield.i b/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield.i index 71a63ff8fe6..2f0784b63f3 100644 --- a/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield.i +++ b/test/tests/mms/bcs/2D_EnergyBC_NegivateOutWardFacingEfield.i @@ -1,9 +1,9 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_EnergyBC_NegivateOutWardFacingEfield_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -11,291 +11,291 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] - [./mean_en] + [] + [mean_en] initial_from_file_var = mean_en - [../] + [] - [./Ex] + [Ex] initial_from_file_var = Ex - [../] - [./Ey] + [] + [Ey] initial_from_file_var = Ey - [../] + [] - [./potential] + [potential] initial_from_file_var = potential - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EffectiveEFieldAdvection variable = ion u = Ex v = Ey position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Eff. Efield - [./EffEfield_X_time_deriv] + [EffEfield_X_time_deriv] type = TimeDerivative variable = Ex - [../] - [./EffEfield_X_diffusion] + [] + [EffEfield_X_diffusion] type = MatDiffusion diffusivity = diffEx variable = Ex - [../] - [./EffEfield_X_source] + [] + [EffEfield_X_source] type = BodyForce variable = Ex function = 'Ex_source' - [../] - [./EffEfield_Y_time_deriv] + [] + [EffEfield_Y_time_deriv] type = TimeDerivative variable = Ey - [../] - [./EffEfield_Y_diffusion] + [] + [EffEfield_Y_diffusion] type = MatDiffusion diffusivity = diffEy variable = Ey - [../] - [./EffEfield_Y_source] + [] + [EffEfield_Y_source] type = BodyForce variable = Ey function = 'Ey_source' - [../] + [] #Potential - [./Potential_time_deriv] + [Potential_time_deriv] type = TimeDerivative variable = potential - [../] - [./Potential_diffusion] + [] + [Potential_diffusion] type = MatDiffusion diffusivity = diffpotential variable = potential - [../] - [./Potential_source] + [] + [Potential_source] type = BodyForce variable = potential function = 'potential_source' - [../] + [] #Electron Energy Equations - [./mean_en_time_deriv] + [mean_en_time_deriv] type = TimeDerivativeLog variable = mean_en - [../] - [./mean_en_diffusion] + [] + [mean_en_diffusion] type = CoeffDiffusion variable = mean_en position_units = 1.0 - [../] - [./mean_en_advection] + [] + [mean_en_advection] type = EFieldAdvection variable = mean_en position_units = 1.0 - [../] - [./mean_en_source] + [] + [mean_en_source] type = BodyForce variable = mean_en function = 'energy_source' - [../] + [] [] [AuxVariables] - [./mean_en_sol] - [../] + [mean_en_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] - [./Ex_sol] - [../] - [./Ey_sol] - [../] + [Ex_sol] + [] + [Ey_sol] + [] - [./potential_sol] - [../] + [potential_sol] + [] [] [AuxKernels] - [./mean_en_sol] + [mean_en_sol] type = FunctionAux variable = mean_en_sol function = mean_en_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./Ex_sol] + [Ex_sol] type = FunctionAux variable = Ex_sol function = Ex_fun - [../] - [./Ey_sol] + [] + [Ey_sol] type = FunctionAux variable = Ey_sol function = Ey_fun - [../] + [] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] [] [Functions] #Material Variables - [./massem] + [massem] type = ConstantFunction value = 1.0 - [../] + [] #Electron diffusion coeff. - [./diffem] + [diffem] type = ConstantFunction value = 0.05 - [../] - [./muem] + [] + [muem] type = ConstantFunction value = 0.01 - [../] + [] #Electron energy mobility coeff. - [./diffmean_en] + [diffmean_en] type = ConstantFunction value = 0.05 - [../] - [./mumean_en] + [] + [mumean_en] type = ConstantFunction value = 0.01 - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ParsedFunction vars = diffmean_en vals = diffmean_en value = diffmean_en - [../] - [./muion] + [] + [muion] type = ParsedFunction vars = mumean_en vals = mumean_en value = mumean_en - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.25 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'log(((16*ee*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured electron energy solution - [./mean_en_fun] + [mean_en_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured eff. Efield solution - [./Ex_fun] + [Ex_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_fun] + [] + [Ey_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] #The manufactured potential solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-(sin(pi*t) + 1.0)*(sin(pi*y) + sin(pi*x))' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' @@ -332,9 +332,9 @@ (24*mumean_en*pi^2*cos(2*pi*t)*cos(pi*y)*(sin(pi*t) + 1))/25)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^3)) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' @@ -342,8 +342,8 @@ (2*pi*cos(2*pi*t)*cos(pi*y))/5 - (muion*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] - [./energy_source] + [] + [energy_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' @@ -351,295 +351,97 @@ (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (mumean_en*pi^2*(sin(pi*t) + 1)*(5*sin(pi*x) + 5*sin(pi*y) + 10*sin(pi*x)*sin(pi*y) - 10*cos(pi*x)^2 - 10*cos(pi*y)^2 + cos(pi*y)*sin(2*pi*t)*sin(pi*x) + 2*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 10))/5) / N_A' - [../] + [] #The Ex source term. - [./Ex_source] + [Ex_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'pi^2*cos(pi*t)*cos(pi*x) + diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_source] + [] + [Ey_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = 'pi^2*cos(pi*t)*cos(pi*y) + diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] - [./potential_source] + [potential_source] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '-pi*cos(pi*t)*(sin(pi*x) + sin(pi*y)) - diffpotential*pi^2*sin(pi*x)*(sin(pi*t) + 1) - diffpotential*pi^2*sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The left BC dirichlet function - [./em_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' - [../] - [./energy_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./Ey_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The right BC dirichlet function - [./em_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1))/5)^2)) / N_A)' - [../] - [./energy_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./Ey_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - [./potential_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*y)*(sin(pi*t) + 1)' - [../] - - #The Down BC dirichlet function - [./em_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(2*pi*t)/5 + sin(pi*x) + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(2*t*pi)/5 + sin(x*pi) + 1))/5)^2)) / N_A)' - [../] - [./energy_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./Ex_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./potential_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] - - #The up BC dirichlet function - [./em_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log(((16*ee*(sin(pi*x) - sin(2*pi*t)/5 + 1)^3)/(3*massem*pi*((12*diffmean_en*pi)/5 + - (12*mumean_en*pi*(sin(t*pi) + 1)*(sin(x*pi) - sin(2*t*pi)/5 + 1))/5)^2)) / N_A)' - [../] - [./energy_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./Ex_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = 'pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./potential_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' - value = '-sin(pi*x)*(sin(pi*t) + 1)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = '4.0' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] - [./mean_en_ICs] + [] + [mean_en_ICs] type = ParsedFunction vars = 'em_ICs' vals = 'em_ICs' value = '1.0' - [../] + [] - [./em_left_Flux_BC] + [em_left_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '(-diffmean_en*pi*cos(pi*x) - mumean_en*pi*cos(pi*x)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] - [./em_down_Flux_BC] + [] + [em_down_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' vals = 'ee N_A diffpotential diffem muem massem diffmean_en mumean_en diffion muion' value = '(-(diffmean_en*pi*(5*cos(pi*y) - sin(2*pi*t)*sin(pi*y)))/5 - mumean_en*pi*cos(pi*y)*(sin(pi*t) + 1)*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] + [] [] [BCs] - [./em_left_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_left_BC' - boundary = 3 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] - [./em_right_BC] - type = FunctionDirichletBC - variable = em - function = 'em_right_BC' - boundary = 1 - preset = true - [../] - [./em_down_BC] - type = FunctionDirichletBC - variable = em - function = 'em_down_BC' - boundary = 0 - preset = true - [../] - [./em_up_BC] - type = FunctionDirichletBC - variable = em - function = 'em_up_BC' - boundary = 2 - preset = true - [../] + [] - [./ion_left_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_left_BC' - boundary = 3 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 - preset = true - [../] - [./ion_down_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_down_BC' - boundary = 0 - preset = true - [../] - [./ion_up_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_up_BC' - boundary = 2 - preset = true - [../] + [] - #[./energy_left_BC] + #[energy_left_BC] # type = FunctionDirichletBC # variable = mean_en - # function = 'energy_left_BC' + # function = 'mean_en_fun' # boundary = 3 # preset = true - #[../] - [./energy_left_physical_diffusion] + #[] + [energy_left_physical_diffusion] type = SakiyamaEnergyDiffusionBC variable = mean_en electrons = em boundary = 3 position_units = 1.0 - [../] - [./energy_left_second_emissions] + [] + [energy_left_second_emissions] type = SakiyamaEnergySecondaryElectronWithEffEfieldBC variable = mean_en em = em @@ -651,31 +453,31 @@ se_coeff = 1.0 boundary = 3 position_units = 1.0 - [../] + [] - [./energy_right_BC] + [energy_right_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_right_BC' + function = 'mean_en_fun' boundary = 1 preset = true - [../] + [] - #[./energy_down_BC] + #[energy_down_BC] # type = FunctionDirichletBC # variable = mean_en - # function = 'energy_down_BC' + # function = 'mean_en_fun' # boundary = 0 # preset = true - #[../] - [./energy_down_physical_diffusion] + #[] + [energy_down_physical_diffusion] type = SakiyamaEnergyDiffusionBC variable = mean_en electrons = em boundary = 0 position_units = 1.0 - [../] - [./energy_down_second_emissions] + [] + [energy_down_second_emissions] type = SakiyamaEnergySecondaryElectronWithEffEfieldBC variable = mean_en em = em @@ -687,102 +489,39 @@ se_coeff = 1.0 boundary = 0 position_units = 1.0 - [../] + [] - [./energy_up_BC] + [energy_up_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_up_BC' + function = 'mean_en_fun' boundary = 2 preset = true - [../] + [] - [./Ex_left_BC] + [Ex_BC] type = FunctionDirichletBC variable = Ex - function = 'Ex_left_BC' - boundary = 3 + function = 'Ex_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ex_right_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_right_BC' - boundary = 1 - preset = true - [../] - [./Ex_down_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_down_BC' - boundary = 0 - preset = true - [../] - [./Ex_up_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_up_BC' - boundary = 2 - preset = true - [../] + [] - [./Ey_left_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_left_BC' - boundary = 3 - preset = true - [../] - [./Ey_right_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_right_BC' - boundary = 1 - preset = true - [../] - [./Ey_down_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_down_BC' - boundary = 0 - preset = true - [../] - [./Ey_up_BC] + [Ey_BC] type = FunctionDirichletBC variable = Ey - function = 'Ey_up_BC' - boundary = 2 + function = 'Ey_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] + [potential_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' - boundary = 1 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] - [./potential_down_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_down_BC' - boundary = 0 - preset = true - [../] - [./potential_up_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -790,73 +529,73 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A massem diffpotential diffEx diffEy' prop_values = 'ee N_A massem diffpotential diffpotential diffpotential ' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffion muion diffem muem diffmean_en mumean_en' prop_values = 'diffion muion diffem muem diffmean_en mumean_en' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion sgnmean_en' prop_values = '-1.0 1.0 -1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./mean_en_l2Error] + [] + [mean_en_l2Error] type = ElementL2Error variable = mean_en function = mean_en_fun - [../] + [] - [./Ex_l2Error] + [Ex_l2Error] type = ElementL2Error variable = Ex function = Ex_fun - [../] - [./Ey_l2Error] + [] + [Ey_l2Error] type = ElementL2Error variable = Ey function = Ey_fun - [../] + [] - [./potential_l2Error] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -882,7 +621,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/bcs/2D_IonBC.i b/test/tests/mms/bcs/2D_IonBC.i index fd843898ae6..8a07c9b6e23 100644 --- a/test/tests/mms/bcs/2D_IonBC.i +++ b/test/tests/mms/bcs/2D_IonBC.i @@ -1,21 +1,9 @@ -#This MMS test was designed to test the log version of Zapdos' -#kernels with coupling between electrons, ions, potential, and -#the mean electron energy density. - -#The mean electron energy density has a "correction" term that assumes -#an thermal conductivity coefficient of K=3/2*D_e*n_e (this is based on -#using the assumption of Einstein Relation) - -#Note: The electron/mean energy's diffusion and mobility coefficients are -#directly proportional to the energy function. - - [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_IonBC_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -23,153 +11,153 @@ [] [Variables] - [./ion] + [ion] initial_from_file_var = ion - [../] + [] - [./Ex] + [Ex] initial_from_file_var = Ex - [../] - [./Ey] + [] + [Ey] initial_from_file_var = Ey - [../] + [] [] [Kernels] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EffectiveEFieldAdvection variable = ion u = Ex v = Ey position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Eff. Efield - [./EffEfield_X_time_deriv] + [EffEfield_X_time_deriv] type = TimeDerivative variable = Ex - [../] - [./EffEfield_X_diffusion] + [] + [EffEfield_X_diffusion] type = MatDiffusion diffusivity = diffEx variable = Ex - [../] - [./EffEfield_X_source] + [] + [EffEfield_X_source] type = BodyForce variable = Ex function = 'Ex_source' - [../] - [./EffEfield_Y_time_deriv] + [] + [EffEfield_Y_time_deriv] type = TimeDerivative variable = Ey - [../] - [./EffEfield_Y_diffusion] + [] + [EffEfield_Y_diffusion] type = MatDiffusion diffusivity = diffEy variable = Ey - [../] - [./EffEfield_Y_source] + [] + [EffEfield_Y_source] type = BodyForce variable = Ey function = 'Ey_source' - [../] + [] [] [AuxVariables] - [./ion_sol] - [../] + [ion_sol] + [] - [./Ex_sol] - [../] - [./Ey_sol] - [../] + [Ex_sol] + [] + [Ey_sol] + [] [] [AuxKernels] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./Ex_sol] + [Ex_sol] type = FunctionAux variable = Ex_sol function = Ex_fun - [../] - [./Ey_sol] + [] + [Ey_sol] type = FunctionAux variable = Ey_sol function = Ey_fun - [../] + [] [] [Functions] #Material Variables #Ion diffusion coeff. - [./diffion] + [diffion] type = ConstantFunction value = 0.05 - [../] - [./muion] + [] + [muion] type = ConstantFunction value = 0.01 - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.25 - [../] + [] #Manufactured Solutions #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((cos(pi/2*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured eff. Efield solution - [./Ex_fun] + [Ex_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_fun] + [] + [Ey_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] + [] #Source Terms in moles #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' @@ -178,286 +166,163 @@ cos((pi*y)/2) + (cos(pi*y)*sin(2*pi*t))/5 + 1) + muion*pi^2*sin(pi*y)*(sin(pi*t) + 1)*(cos((pi*x)/2) + cos((pi*y)/2) + (cos(pi*y)*sin(2*pi*t))/5 + 1) + muion*pi*cos(pi*y)*((pi*sin((pi*y)/2))/2 + (pi*sin(2*pi*t)*sin(pi*y))/5)*(sin(pi*t) + 1) + (muion*pi^2*cos(pi*x)*sin((pi*x)/2)*(sin(pi*t) + 1))/2) / N_A' - [../] + [] #The Ex source term. - [./Ex_source] + [Ex_source] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '-pi^2*cos(pi*t)*cos(pi*x) - diffpotential*pi^3*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_source] + [] + [Ey_source] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '-pi^2*cos(pi*t)*cos(pi*y) - diffpotential*pi^3*cos(pi*y)*(sin(pi*t) + 1)' - [../] - - #The left BC dirichlet function - [./ion_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((cos((pi*y)/2) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' - [../] - [./Ex_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - [./Ey_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - - #The right BC dirichlet function - [./ion_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((cos((pi*y)/2) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - [./Ey_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-pi*cos(pi*y)*(sin(pi*t) + 1)' - [../] - - #The Down BC dirichlet function - [./ion_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((cos((pi*x)/2) + sin(2*pi*t)/5 + 2) / N_A)' - [../] - [./Ex_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-pi*(sin(pi*t) + 1)' - [../] - - #The up BC dirichlet function - [./ion_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((cos((pi*x)/2) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./Ex_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-pi*cos(pi*x)*(sin(pi*t) + 1)' - [../] - [./Ey_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'pi*(sin(pi*t) + 1)' - [../] - + [] - [./ion_ICs] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] + [] - [./ion_left_Flux_BC] + [ion_left_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '((diffion*pi*sin((pi*x)/2))/2 - muion*pi*(2*cos((pi*x)/2)^2 - 1)*(sin(pi*t) + 1)*(cos((pi*x)/2) + cos((pi*y)/2) + (2*cos(pi*t)*sin(pi*t)*(2*cos((pi*y)/2)^2 - 1))/5 + 1)) / N_A' - [../] - [./ion_down_Flux_BC] + [] + [ion_down_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '(diffion*((pi*sin((pi*y)/2))/2 + (pi*sin(2*pi*t)*sin(pi*y))/5) - muion*pi*cos(pi*y)*(sin(pi*t) + 1)*(cos((pi*x)/2) + cos((pi*y)/2) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A' - [../] + [] [] [BCs] - #[./ion_left_BC] + #[ion_left_BC] # type = FunctionDirichletBC # variable = ion # function = 'ion_left_BC' # boundary = 3 # preset = true - #[../] - [./ion_left_physical_advection] + #[] + [ion_left_physical_advection] type = SakiyamaIonAdvectionWithEffEfieldBC variable = ion Ex = Ex Ey = Ey boundary = 3 position_units = 1.0 - [../] + [] - [./ion_right_BC] + [ion_right_BC] type = FunctionDirichletBC variable = ion - function = 'ion_right_BC' + function = 'ion_fun' boundary = 1 preset = true - [../] + [] - #[./ion_down_BC] + #[ion_down_BC] # type = FunctionDirichletBC # variable = ion # function = 'ion_down_BC' # boundary = 0 # preset = true - #[../] - [./ion_down_physical_advection] + #[] + [ion_down_physical_advection] type = SakiyamaIonAdvectionWithEffEfieldBC variable = ion Ex = Ex Ey = Ey boundary = 0 position_units = 1.0 - [../] + [] - [./ion_up_BC] + [ion_up_BC] type = FunctionDirichletBC variable = ion - function = 'ion_up_BC' + function = 'ion_fun' boundary = 2 preset = true - [../] + [] - [./Ex_left_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_left_BC' - boundary = 3 - preset = true - [../] - [./Ex_right_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_right_BC' - boundary = 1 - preset = true - [../] - [./Ex_down_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_down_BC' - boundary = 0 - preset = true - [../] - [./Ex_up_BC] + [Ex_BC] type = FunctionDirichletBC variable = Ex - function = 'Ex_up_BC' - boundary = 2 + function = 'Ex_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./Ey_left_BC] + [Ey_BC] type = FunctionDirichletBC variable = Ey - function = 'Ey_left_BC' - boundary = 3 - preset = true - [../] - [./Ey_right_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_right_BC' - boundary = 1 + function = 'Ey_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ey_down_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_down_BC' - boundary = 0 - preset = true - [../] - [./Ey_up_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A diffEx diffEy' prop_values = 'ee N_A diffpotential diffpotential ' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffion muion' prop_values = 'diffion muion' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnion' prop_values = '1.0' - [../] + [] [] [Postprocessors] - [./ion_l2Error] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] + [] - [./Ex_l2Error] + [Ex_l2Error] type = ElementL2Error variable = Ex function = Ex_fun - [../] - [./Ey_l2Error] + [] + [Ey_l2Error] type = ElementL2Error variable = Ey function = Ey_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -483,7 +348,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield.i b/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield.i index dae008b0c2b..2cbf40003f1 100644 --- a/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield.i +++ b/test/tests/mms/bcs/2D_IonBC_NegivateOutWardFacingEfield.i @@ -1,21 +1,9 @@ -#This MMS test was designed to test the log version of Zapdos' -#kernels with coupling between electrons, ions, potential, and -#the mean electron energy density. - -#The mean electron energy density has a "correction" term that assumes -#an thermal conductivity coefficient of K=3/2*D_e*n_e (this is based on -#using the assumption of Einstein Relation) - -#Note: The electron/mean energy's diffusion and mobility coefficients are -#directly proportional to the energy function. - - [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_IonBC_NegivateOutWardFacingEfield_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -23,435 +11,313 @@ [] [Variables] - [./ion] + [ion] initial_from_file_var = ion - [../] + [] - [./Ex] + [Ex] initial_from_file_var = Ex - [../] - [./Ey] + [] + [Ey] initial_from_file_var = Ey - [../] + [] [] [Kernels] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EffectiveEFieldAdvection variable = ion u = Ex v = Ey position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Eff. Efield - [./EffEfield_X_time_deriv] + [EffEfield_X_time_deriv] type = TimeDerivative variable = Ex - [../] - [./EffEfield_X_diffusion] + [] + [EffEfield_X_diffusion] type = MatDiffusion diffusivity = diffEx variable = Ex - [../] - [./EffEfield_X_source] + [] + [EffEfield_X_source] type = BodyForce variable = Ex function = 'Ex_source' - [../] - [./EffEfield_Y_time_deriv] + [] + [EffEfield_Y_time_deriv] type = TimeDerivative variable = Ey - [../] - [./EffEfield_Y_diffusion] + [] + [EffEfield_Y_diffusion] type = MatDiffusion diffusivity = diffEy variable = Ey - [../] - [./EffEfield_Y_source] + [] + [EffEfield_Y_source] type = BodyForce variable = Ey function = 'Ey_source' - [../] + [] [] [AuxVariables] - [./ion_sol] - [../] + [ion_sol] + [] - [./Ex_sol] - [../] - [./Ey_sol] - [../] + [Ex_sol] + [] + [Ey_sol] + [] [] [AuxKernels] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./Ex_sol] + [Ex_sol] type = FunctionAux variable = Ex_sol function = Ex_fun - [../] - [./Ey_sol] + [] + [Ey_sol] type = FunctionAux variable = Ey_sol function = Ey_fun - [../] + [] [] [Functions] #Material Variables #Ion diffusion coeff. - [./diffion] + [diffion] type = ConstantFunction value = 0.05 - [../] - [./muion] + [] + [muion] type = ConstantFunction value = 0.01 - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.25 - [../] + [] #Manufactured Solutions #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + sin(pi*x)) / N_A)' - [../] + [] #The manufactured eff. Efield solution - [./Ex_fun] + [Ex_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '(diffion*pi*cos(pi*x))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' - [../] - [./Ey_fun] + [] + [Ey_fun] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '(diffion*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' - [../] + [] #Source Terms in moles #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '((2*pi*cos(2*pi*t)*cos(pi*y))/5) / N_A' - [../] + [] #The Ex source term. - [./Ex_source] + [Ex_source] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '-diffpotential*((2*diffion*pi^3*cos(pi*x)^3)/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (diffion*pi^3*cos(pi*x))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) + (3*diffion*pi^3*cos(pi*x)*sin(pi*x))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) - (2*diffion*diffpotential*pi*cos(pi*x)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^2)/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (2*diffion*pi^2*cos(2*pi*t)*cos(pi*x)*cos(pi*y))/(5*muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) - (diffion*diffpotential*pi*cos(pi*x)*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)' - [../] - [./Ey_source] + [] + [Ey_source] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '-diffpotential*((2*diffion*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)^3)/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (diffion*(pi^3*cos(pi*y) - (pi^3*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) + (3*diffion*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)) - (2*diffion*pi^2*cos(2*pi*t)*sin(pi*y))/(5*muion*(sin(pi*x) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) - (diffion*diffpotential*pi^2*sin(pi*x)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2) - (2*diffion*diffpotential*pi^2*cos(pi*x)^2*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^3) - (2*diffion*pi*cos(2*pi*t)*cos(pi*y)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(5*muion*(sin(x*pi) + sin(y*pi) + (cos(y*pi)*sin(2*t*pi))/5 + 1)^2)' - [../] - - #The left BC dirichlet function - [./ion_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '(diffion*pi)/(muion*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' - [../] - [./Ey_left_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '(diffion*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' - [../] - - #The right BC dirichlet function - [./ion_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./Ex_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-(diffion*pi)/(muion*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' - [../] - [./Ey_right_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '(diffion*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5))/(muion*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))' - [../] - - #The Down BC dirichlet function - [./ion_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((sin(2*pi*t)/5 + sin(pi*x) + 1) / N_A)' - [../] - [./Ex_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '(diffion*pi*cos(pi*x))/(muion*(sin(2*pi*t)/5 + sin(pi*x) + 1))' - [../] - [./Ey_down_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '(diffion*pi)/(muion*(sin(2*pi*t)/5 + sin(pi*x) + 1))' - [../] - - #The up BC dirichlet function - [./ion_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = 'log((sin(pi*x) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./Ex_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '(diffion*pi*cos(pi*x))/(muion*(sin(pi*x) - sin(2*pi*t)/5 + 1))' - [../] - [./Ey_up_BC] - type = ParsedFunction - vars = 'ee N_A diffpotential diffion muion' - vals = 'ee N_A diffpotential diffion muion' - value = '-(diffion*pi)/(muion*(sin(pi*x) - sin(2*pi*t)/5 + 1))' - [../] + [] - [./ion_ICs] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + sin(pi/2*x)) / N_A)' - [../] + [] - [./ion_left_Flux_BC] + [ion_left_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '(0) / N_A' - [../] - [./ion_down_Flux_BC] + [] + [ion_down_Flux_BC] type = ParsedFunction vars = 'ee N_A diffpotential diffion muion' vals = 'ee N_A diffpotential diffion muion' value = '(0) / N_A' - [../] + [] [] [BCs] - #[./ion_left_BC] + #[ion_left_BC] # type = FunctionDirichletBC # variable = ion - # function = 'ion_left_BC' + # function = 'ion_fun' # boundary = 3 # preset = true - #[../] - [./ion_left_physical_advection] + #[] + [ion_left_physical_advection] type = SakiyamaIonAdvectionWithEffEfieldBC variable = ion Ex = Ex Ey = Ey boundary = 3 position_units = 1.0 - [../] + [] - [./ion_right_BC] + [ion_right_BC] type = FunctionDirichletBC variable = ion - function = 'ion_right_BC' + function = 'ion_fun' boundary = 1 preset = true - [../] + [] - #[./ion_down_BC] + #[ion_down_BC] # type = FunctionDirichletBC # variable = ion # function = 'ion_down_BC' # boundary = 0 # preset = true - #[../] - [./ion_down_physical_advection] + #[] + [ion_down_physical_advection] type = SakiyamaIonAdvectionWithEffEfieldBC variable = ion Ex = Ex Ey = Ey boundary = 0 position_units = 1.0 - [../] + [] - [./ion_up_BC] + [ion_up_BC] type = FunctionDirichletBC variable = ion - function = 'ion_up_BC' + function = 'ion_fun' boundary = 2 preset = true - [../] + [] - [./Ex_left_BC] + [Ex_BC] type = FunctionDirichletBC variable = Ex - function = 'Ex_left_BC' - boundary = 3 + function = 'Ex_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ex_right_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_right_BC' - boundary = 1 - preset = true - [../] - [./Ex_down_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_down_BC' - boundary = 0 - preset = true - [../] - [./Ex_up_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_up_BC' - boundary = 2 - preset = true - [../] + [] - [./Ey_left_BC] + [Ey_BC] type = FunctionDirichletBC variable = Ey - function = 'Ey_left_BC' - boundary = 3 - preset = true - [../] - [./Ey_right_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_right_BC' - boundary = 1 - preset = true - [../] - [./Ey_down_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_down_BC' - boundary = 0 + function = 'Ey_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ey_up_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A diffEx diffEy' prop_values = 'ee N_A diffpotential diffpotential ' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffion muion' prop_values = 'diffion muion' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnion' prop_values = '1.0' - [../] + [] [] [Postprocessors] - [./ion_l2Error] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] + [] - [./Ex_l2Error] + [Ex_l2Error] type = ElementL2Error variable = Ex function = Ex_fun - [../] - [./Ey_l2Error] + [] + [Ey_l2Error] type = ElementL2Error variable = Ey function = Ey_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -478,7 +344,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions.i index 4d0f6d7b02f..0ed4a25130d 100644 --- a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions.i +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions.i @@ -1,9 +1,9 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_Coupling_Electons_Potential_Ions_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -11,173 +11,173 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./potential] + [] + [potential] initial_from_file_var = potential - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EFieldAdvection variable = ion position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Potential Equations - [./potential_diffusion] + [potential_diffusion] type = CoeffDiffusionLin variable = potential position_units = 1.0 - [../] - [./ion_charge_source] + [] + [ion_charge_source] type = ChargeSourceMoles_KV variable = potential charged = ion potential_units = V - [../] - [./em_charge_source] + [] + [em_charge_source] type = ChargeSourceMoles_KV variable = potential charged = em potential_units = V - [../] + [] [] [AuxVariables] - [./potential_sol] - [../] + [potential_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] [] [AuxKernels] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] [] [Functions] #Material Variables #Electron diffusion coeff. - [./diffem_coeff] + [diffem_coeff] type = ConstantFunction value = 0.05 - [../] + [] #Electron mobility coeff. - [./muem_coeff] + [muem_coeff] type = ConstantFunction value = 0.01 - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ConstantFunction value = 0.1 - [../] + [] #Ion mobility coeff. - [./muion] + [muion] type = ConstantFunction value = 0.025 - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.01 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured electron density solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee diffpotential' vals = 'ee diffpotential' value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee diffpotential diffem_coeff muem_coeff N_A' vals = 'ee diffpotential diffem_coeff muem_coeff N_A' @@ -187,9 +187,9 @@ 10*cos(pi*y)*sin(2*pi*t) + 5*cos((pi*x)/2)*sin(pi*y) + 2*cos(2*pi*t)^2 + 10*cos((pi*x)/2)^2 + 4*cos(pi*y)^2 + 11*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + 20*cos(pi*y)*sin(2*pi*t)*sin(pi*y) - 7))/(50*diffpotential)) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee diffpotential diffion muion N_A' vals = 'ee diffpotential diffion muion N_A' @@ -199,189 +199,46 @@ (ee*muion*cos(pi*y)*sin(2*pi*t)*sin(pi*y))/(5*diffpotential) - (ee*muion*cos(pi*y)*sin(2*pi*t)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(5*diffpotential)) / N_A' - [../] - - #The left BC dirichlet function - [./potential_left_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(cos(pi*y)*sin(2*pi*t) + 2))/(5*diffpotential*pi^2)' - [../] - [./em_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 19/10) / N_A)' - [../] - - #The right BC dirichlet function - [./potential_right_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*cos(pi*y)*sin(2*pi*t))/(5*diffpotential*pi^2)' - [../] - [./em_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 1) / N_A)' - [../] - - #The Down BC dirichlet function - [./potential_down_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) + sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) + sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] - - #The up BC dirichlet function - [./potential_up_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) - sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + cos(pi/2*x)) / N_A)' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] + [] [] [BCs] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_right_BC' - boundary = 1 - preset = true - [../] - [./potential_down_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_down_BC' - boundary = 0 - preset = true - [../] - [./potential_up_BC] + [potential_BC] type = FunctionDirichletBC variable = potential - function = 'potential_up_BC' - boundary = 2 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./em_left_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_left_BC' - boundary = 3 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] - [./em_right_BC] - type = FunctionDirichletBC - variable = em - function = 'em_right_BC' - boundary = 1 - preset = true - [../] - [./em_down_BC] - type = FunctionDirichletBC - variable = em - function = 'em_down_BC' - boundary = 0 - preset = true - [../] - [./em_up_BC] - type = FunctionDirichletBC - variable = em - function = 'em_up_BC' - boundary = 2 - preset = true - [../] + [] - [./ion_left_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_left_BC' - boundary = 3 - preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 - preset = true - [../] - [./ion_down_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_down_BC' - boundary = 0 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] - [./ion_up_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -389,61 +246,61 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffpotential diffion muion' prop_values = 'diffpotential diffion muion' - [../] - [./ADMaterial_Coeff_Set2] + [] + [ADMaterial_Coeff_Set2] type = ADGenericFunctionMaterial prop_names = 'diffem muem' prop_values = 'diffem_coeff muem_coeff' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion' prop_values = '-1.0 1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./potential_l2Error] + [] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -470,7 +327,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i index 56e310f8ff4..5e880d150ed 100644 --- a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy.i @@ -1,9 +1,9 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -11,269 +11,269 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./potential] + [] + [potential] initial_from_file_var = potential - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] - [./mean_en] + [] + [mean_en] initial_from_file_var = mean_en - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EFieldAdvection variable = ion position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Potential Equations - [./potential_diffusion] + [potential_diffusion] type = CoeffDiffusionLin variable = potential position_units = 1.0 - [../] - [./ion_charge_source] + [] + [ion_charge_source] type = ChargeSourceMoles_KV variable = potential charged = ion potential_units = V - [../] - [./em_charge_source] + [] + [em_charge_source] type = ChargeSourceMoles_KV variable = potential charged = em potential_units = V - [../] + [] #Electron Energy Equations - [./mean_en_time_deriv] + [mean_en_time_deriv] type = TimeDerivativeLog variable = mean_en - [../] - [./mean_en_advection] + [] + [mean_en_advection] type = EFieldAdvection variable = mean_en position_units = 1.0 - [../] - [./mean_en_diffusion] + [] + [mean_en_diffusion] type = CoeffDiffusion variable = mean_en position_units = 1.0 - [../] - [./mean_en_joule_heating] + [] + [mean_en_joule_heating] type = JouleHeating variable = mean_en em = em position_units = 1.0 potential_units = V - [../] - [./mean_en_source] + [] + [mean_en_source] type = BodyForce variable = mean_en function = 'energy_source' - [../] + [] [] [AuxVariables] - [./potential_sol] - [../] + [potential_sol] + [] - [./mean_en_sol] - [../] + [mean_en_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] [] [AuxKernels] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] - [./mean_en_sol] + [mean_en_sol] type = FunctionAux variable = mean_en_sol function = mean_en_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] [] [Functions] #Material Variables #Electron diffusion coeff. - [./diffem_coeff] + [diffem_coeff] type = ConstantFunction value = 0.05 - [../] + [] #Electron mobility coeff. - [./muem_coeff] + [muem_coeff] type = ConstantFunction value = 0.01 - [../] + [] #Electron energy diffusion coeff. - [./diffmean_en_coeff] + [diffmean_en_coeff] type = ParsedFunction vars = 'diffem_coeff' vals = 'diffem_coeff' value = '5.0 / 3.0 * diffem_coeff' - [../] + [] #Electron energy mobility coeff. - [./mumean_en_coeff] + [mumean_en_coeff] type = ParsedFunction vars = 'muem_coeff' vals = 'muem_coeff' value = '5.0 / 3.0 * muem_coeff' - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ConstantFunction value = 0.1 - [../] + [] #Ion mobility coeff. - [./muion] + [muion] type = ConstantFunction value = 0.025 - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.01 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured electron density solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee diffpotential' vals = 'ee diffpotential' value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] + [] #The manufactured electron energy solution - [./energy_fun] + [energy_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'sin(pi*y) + sin(2*pi*t)*cos(pi*y)*sin(pi*y) + 0.75 + cos(pi/2*x)' - [../] - [./mean_en_fun] + [] + [mean_en_fun] type = ParsedFunction vars = 'energy_fun em_fun' vals = 'energy_fun em_fun' value = 'log(energy_fun) + em_fun' - [../] + [] #Electron diffusion coeff. - [./diffem] + [diffem] type = ParsedFunction vars = 'diffem_coeff energy_fun' vals = 'diffem_coeff energy_fun' value = 'diffem_coeff * energy_fun' - [../] + [] #Electron mobility coeff. - [./muem] + [muem] type = ParsedFunction vars = 'muem_coeff energy_fun' vals = 'muem_coeff energy_fun' value = 'muem_coeff * energy_fun' - [../] + [] #Electron energy diffusion coeff. - [./diffmean_en] + [diffmean_en] type = ParsedFunction vars = 'diffmean_en_coeff energy_fun' vals = 'diffmean_en_coeff energy_fun' value = 'diffmean_en_coeff * energy_fun' - [../] + [] #Electron energy mobility coeff. - [./mumean_en] + [mumean_en] type = ParsedFunction vars = 'mumean_en_coeff energy_fun' vals = 'mumean_en_coeff energy_fun' value = 'mumean_en_coeff * energy_fun' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee diffpotential diffem_coeff muem_coeff N_A' vals = 'ee diffpotential diffem_coeff muem_coeff N_A' @@ -294,9 +294,9 @@ sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(5*diffpotential) + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee diffpotential diffion muion N_A' vals = 'ee diffpotential diffion muion N_A' @@ -305,8 +305,8 @@ (ee*muion*cos((pi*x)/2)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(10*diffpotential) - (ee*muion*cos(pi*y)*sin(2*pi*t)*sin(pi*y))/(5*diffpotential) - (ee*muion*cos(pi*y)*sin(2*pi*t)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(5*diffpotential)) / N_A' - [../] - [./energy_source] + [] + [energy_source] type = ParsedFunction vars = 'ee diffpotential diffem_coeff muem_coeff N_A' vals = 'ee diffpotential diffem_coeff muem_coeff N_A' @@ -357,248 +357,60 @@ 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(10*ee*muem_coeff + 10*ee*muem_coeff*cos((pi*x)/2) + 10*ee*muem_coeff*sin(pi*y) + 25*diffem_coeff*diffpotential*pi^2 + 2*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)))/(1000*diffpotential^2*pi^2)) / N_A' - [../] - - #The left BC dirichlet function - [./potential_left_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(cos(pi*y)*sin(2*pi*t) + 2))/(5*diffpotential*pi^2)' - [../] - [./em_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 19/10) / N_A)' - [../] - [./energy_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 7/4)*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) / N_A)' - [../] - - #The right BC dirichlet function - [./potential_right_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*cos(pi*y)*sin(2*pi*t))/(5*diffpotential*pi^2)' - [../] - [./em_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 1) / N_A)' - [../] - [./energy_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4)*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A)' - [../] - - #The Down BC dirichlet function - [./potential_down_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) + sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) + sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] - [./energy_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((cos((pi*x)/2) + 3/4)*(cos((pi*x)/2) + sin(2*pi*t)/5 + 1)) / N_A)' - [../] - - #The up BC dirichlet function - [./potential_up_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) - sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] - [./energy_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((cos((pi*x)/2) + 3/4)*(cos((pi*x)/2) - sin(2*pi*t)/5 + 1)) / N_A)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + cos(pi/2*x)) / N_A)' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] - [./mean_en_ICs] + [] + [mean_en_ICs] type = ParsedFunction vars = 'em_ICs' vals = 'em_ICs' - value = 'log(3./2. + cos(pi/2*x)) + em_ICs' - [../] + value = 'log(32. + cos(pi/2*x)) + em_ICs' + [] [] [BCs] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] + [potential_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' - boundary = 1 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] - [./potential_down_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_down_BC' - boundary = 0 - preset = true - [../] - [./potential_up_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_up_BC' - boundary = 2 - preset = true - [../] + [] - [./em_left_BC] - type = FunctionDirichletBC - variable = em - function = 'em_left_BC' - boundary = 3 - preset = true - [../] - [./em_right_BC] - type = FunctionDirichletBC - variable = em - function = 'em_right_BC' - boundary = 1 - preset = true - [../] - [./em_down_BC] - type = FunctionDirichletBC - variable = em - function = 'em_down_BC' - boundary = 0 - preset = true - [../] - [./em_up_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_up_BC' - boundary = 2 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./ion_left_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_left_BC' - boundary = 3 - preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 - preset = true - [../] - [./ion_down_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_down_BC' - boundary = 0 - preset = true - [../] - [./ion_up_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_up_BC' - boundary = 2 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./energy_left_BC] + [energy_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_left_BC' - boundary = 3 + function = 'mean_en_fun' + boundary = '0 1 2 3' preset = true - [../] - [./energy_right_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_right_BC' - boundary = 1 - preset = true - [../] - [./energy_down_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_down_BC' - boundary = 0 - preset = true - [../] - [./energy_up_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -606,69 +418,69 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffpotential diffion muion' prop_values = 'diffpotential diffion muion' - [../] - [./Material_Coeff_Set2] + [] + [Material_Coeff_Set2] type = ADMMSEEDFRates electrons = em mean_energy = mean_en prop_names = 'diffem muem diffmean_en mumean_en' prop_values = 'diffem muem diffmean_en mumean_en' d_prop_d_actual_mean_en = 'diffem_coeff muem_coeff diffmean_en_coeff mumean_en_coeff' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion sgnmean_en' prop_values = '-1.0 1.0 -1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./potential_l2Error] + [] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] - [./mean_en_l2Error] + [] + [mean_en_l2Error] type = ElementL2Error variable = mean_en function = mean_en_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -694,7 +506,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i index 694f04871ab..0553bc6cdac 100644 --- a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation.i @@ -1,284 +1,284 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] type = FEProblem [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./potential] + [] + [potential] initial_from_file_var = potential - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] - [./mean_en] + [] + [mean_en] initial_from_file_var = mean_en - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EFieldAdvection variable = ion position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Potential Equations - [./potential_diffusion] + [potential_diffusion] type = CoeffDiffusionLin variable = potential position_units = 1.0 - [../] - [./ion_charge_source] + [] + [ion_charge_source] type = ChargeSourceMoles_KV variable = potential charged = ion potential_units = V - [../] - [./em_charge_source] + [] + [em_charge_source] type = ChargeSourceMoles_KV variable = potential charged = em potential_units = V - [../] + [] #Electron Energy Equations - [./mean_en_time_deriv] + [mean_en_time_deriv] type = TimeDerivativeLog variable = mean_en - [../] - [./mean_en_advection] + [] + [mean_en_advection] type = EFieldAdvection variable = mean_en position_units = 1.0 - [../] - [./mean_en_diffusion] + [] + [mean_en_diffusion] type = CoeffDiffusion variable = mean_en position_units = 1.0 - [../] - [./mean_en_diffusion_correction] + [] + [mean_en_diffusion_correction] type = ThermalConductivityDiffusion variable = mean_en em = em position_units = 1.0 - [../] - [./mean_en_joule_heating] + [] + [mean_en_joule_heating] type = JouleHeating variable = mean_en em = em position_units = 1.0 potential_units = V - [../] - [./mean_en_source] + [] + [mean_en_source] type = BodyForce variable = mean_en function = 'energy_source' - [../] + [] [] [AuxVariables] - [./potential_sol] - [../] + [potential_sol] + [] - [./mean_en_sol] - [../] + [mean_en_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] [] [AuxKernels] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] - [./mean_en_sol] + [mean_en_sol] type = FunctionAux variable = mean_en_sol function = mean_en_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] [] [Functions] #Material Variables #Electron diffusion coeff. - [./diffem_coeff] + [diffem_coeff] type = ConstantFunction value = 0.05 - [../] + [] #Electron mobility coeff. - [./muem_coeff] + [muem_coeff] type = ConstantFunction value = 0.01 - [../] + [] #Electron energy diffusion coeff. - [./diffmean_en_coeff] + [diffmean_en_coeff] type = ParsedFunction vars = 'diffem_coeff' vals = 'diffem_coeff' value = '5.0 / 3.0 * diffem_coeff' - [../] + [] #Electron energy mobility coeff. - [./mumean_en_coeff] + [mumean_en_coeff] type = ParsedFunction vars = 'muem_coeff' vals = 'muem_coeff' value = '5.0 / 3.0 * muem_coeff' - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ConstantFunction value = 0.1 - [../] + [] #Ion mobility coeff. - [./muion] + [muion] type = ConstantFunction value = 0.025 - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.01 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured electron density solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee diffpotential' vals = 'ee diffpotential' value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] + [] #The manufactured electron energy solution - [./energy_fun] + [energy_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'sin(pi*y) + sin(2*pi*t)*cos(pi*y)*sin(pi*y) + 0.75 + cos(pi/2*x)' - [../] - [./mean_en_fun] + [] + [mean_en_fun] type = ParsedFunction vars = 'energy_fun em_fun' vals = 'energy_fun em_fun' value = 'log(energy_fun) + em_fun' - [../] + [] #Electron diffusion coeff. - [./diffem] + [diffem] type = ParsedFunction vars = 'diffem_coeff energy_fun' vals = 'diffem_coeff energy_fun' value = 'diffem_coeff * energy_fun' - [../] + [] #Electron mobility coeff. - [./muem] + [muem] type = ParsedFunction vars = 'muem_coeff energy_fun' vals = 'muem_coeff energy_fun' value = 'muem_coeff * energy_fun' - [../] + [] #Electron energy diffusion coeff. - [./diffmean_en] + [diffmean_en] type = ParsedFunction vars = 'diffmean_en_coeff energy_fun' vals = 'diffmean_en_coeff energy_fun' value = 'diffmean_en_coeff * energy_fun' - [../] + [] #Electron energy mobility coeff. - [./mumean_en] + [mumean_en] type = ParsedFunction vars = 'mumean_en_coeff energy_fun' vals = 'mumean_en_coeff energy_fun' value = 'mumean_en_coeff * energy_fun' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee diffpotential diffem_coeff muem_coeff N_A' vals = 'ee diffpotential diffem_coeff muem_coeff N_A' @@ -299,9 +299,9 @@ sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(5*diffpotential) + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee diffpotential diffion muion N_A' vals = 'ee diffpotential diffion muion N_A' @@ -310,8 +310,8 @@ (ee*muion*cos((pi*x)/2)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(10*diffpotential) - (ee*muion*cos(pi*y)*sin(2*pi*t)*sin(pi*y))/(5*diffpotential) - (ee*muion*cos(pi*y)*sin(2*pi*t)*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(5*diffpotential)) / N_A' - [../] - [./energy_source] + [] + [energy_source] type = ParsedFunction vars = 'ee diffpotential diffem_coeff muem_coeff N_A' vals = 'ee diffpotential diffem_coeff muem_coeff N_A' @@ -366,248 +366,60 @@ 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(10*ee*muem_coeff + 10*ee*muem_coeff*cos((pi*x)/2) + 10*ee*muem_coeff*sin(pi*y) + 25*diffem_coeff*diffpotential*pi^2 + 2*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)))/(1000*diffpotential^2*pi^2)) / N_A' - [../] - - #The left BC dirichlet function - [./potential_left_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(cos(pi*y)*sin(2*pi*t) + 2))/(5*diffpotential*pi^2)' - [../] - [./em_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 19/10) / N_A)' - [../] - [./energy_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 7/4)*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) / N_A)' - [../] - - #The right BC dirichlet function - [./potential_right_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*cos(pi*y)*sin(2*pi*t))/(5*diffpotential*pi^2)' - [../] - [./em_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 1) / N_A)' - [../] - [./energy_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4)*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A)' - [../] - - #The Down BC dirichlet function - [./potential_down_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) + sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) + sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] - [./energy_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((cos((pi*x)/2) + 3/4)*(cos((pi*x)/2) + sin(2*pi*t)/5 + 1)) / N_A)' - [../] - - #The up BC dirichlet function - [./potential_up_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) - sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] - [./energy_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((cos((pi*x)/2) + 3/4)*(cos((pi*x)/2) - sin(2*pi*t)/5 + 1)) / N_A)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + cos(pi/2*x)) / N_A)' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] - [./mean_en_ICs] + [] + [mean_en_ICs] type = ParsedFunction vars = 'em_ICs' vals = 'em_ICs' - value = 'log(3./2. + cos(pi/2*x)) + em_ICs' - [../] + value = 'log(32. + cos(pi/2*x)) + em_ICs' + [] [] [BCs] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] + [potential_BC] type = FunctionDirichletBC variable = potential - function = 'potential_right_BC' - boundary = 1 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] - [./potential_down_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_down_BC' - boundary = 0 - preset = true - [../] - [./potential_up_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_up_BC' - boundary = 2 - preset = true - [../] + [] - [./em_left_BC] - type = FunctionDirichletBC - variable = em - function = 'em_left_BC' - boundary = 3 - preset = true - [../] - [./em_right_BC] - type = FunctionDirichletBC - variable = em - function = 'em_right_BC' - boundary = 1 - preset = true - [../] - [./em_down_BC] - type = FunctionDirichletBC - variable = em - function = 'em_down_BC' - boundary = 0 - preset = true - [../] - [./em_up_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_up_BC' - boundary = 2 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./ion_left_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_left_BC' - boundary = 3 - preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 - preset = true - [../] - [./ion_down_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_down_BC' - boundary = 0 - preset = true - [../] - [./ion_up_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_up_BC' - boundary = 2 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./energy_left_BC] + [energy_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_left_BC' - boundary = 3 + function = 'mean_en_fun' + boundary = '0 1 2 3' preset = true - [../] - [./energy_right_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_right_BC' - boundary = 1 - preset = true - [../] - [./energy_down_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_down_BC' - boundary = 0 - preset = true - [../] - [./energy_up_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -615,69 +427,69 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffpotential diffion muion' prop_values = 'diffpotential diffion muion' - [../] - [./Material_Coeff_Set2] + [] + [Material_Coeff_Set2] type = ADMMSEEDFRates electrons = em mean_energy = mean_en prop_names = 'diffem muem diffmean_en mumean_en' prop_values = 'diffem muem diffmean_en mumean_en' d_prop_d_actual_mean_en = 'diffem_coeff muem_coeff diffmean_en_coeff mumean_en_coeff' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion sgnmean_en' prop_values = '-1.0 1.0 -1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./potential_l2Error] + [] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] - [./mean_en_l2Error] + [] + [mean_en_l2Error] type = ElementL2Error variable = mean_en function = mean_en_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -704,7 +516,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i index c4b26dea0d7..5defff72982 100644 --- a/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i +++ b/test/tests/mms/continuity_equations/2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield.i @@ -1,9 +1,9 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_Coupling_Electons_Potential_Ions_MeanEnergy_Einstein_Relation_EffEfield_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -11,338 +11,338 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] - [./potential] + [] + [potential] initial_from_file_var = potential - [../] - [./ion] + [] + [ion] initial_from_file_var = ion - [../] - [./mean_en] + [] + [mean_en] initial_from_file_var = mean_en - [../] + [] - [./Ex] + [Ex] initial_from_file_var = Ex - [../] - [./Ey] + [] + [Ey] initial_from_file_var = Ey - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] #Ion Equations - [./ion_time_derivative] + [ion_time_derivative] type = TimeDerivativeLog variable = ion - [../] - [./ion_diffusion] + [] + [ion_diffusion] type = CoeffDiffusion variable = ion position_units = 1.0 - [../] - [./ion_advection] + [] + [ion_advection] type = EffectiveEFieldAdvection variable = ion u = Ex v = Ey position_units = 1.0 - [../] - [./ion_source] + [] + [ion_source] type = BodyForce variable = ion function = 'ion_source' - [../] + [] #Potential Equations - [./potential_diffusion] + [potential_diffusion] type = CoeffDiffusionLin variable = potential position_units = 1.0 - [../] - [./ion_charge_source] + [] + [ion_charge_source] type = ChargeSourceMoles_KV variable = potential charged = ion potential_units = V - [../] - [./em_charge_source] + [] + [em_charge_source] type = ChargeSourceMoles_KV variable = potential charged = em potential_units = V - [../] + [] #Eff. Efield - [./EffEfield_X_time_deriv] + [EffEfield_X_time_deriv] type = TimeDerivative variable = Ex - [../] - [./EffEfield_X_ForceBody] + [] + [EffEfield_X_ForceBody] type = EffectiveEField variable = Ex nu = 5.0 component = 0 position_units = 1.0 - [../] - [./EffEfield_Y_time_deriv] + [] + [EffEfield_Y_time_deriv] type = TimeDerivative variable = Ey - [../] - [./EffEfield_Y_ForceBody] + [] + [EffEfield_Y_ForceBody] type = EffectiveEField variable = Ey nu = 5.0 component = 1 position_units = 1.0 - [../] + [] #Electron Energy Equations - [./mean_en_time_deriv] + [mean_en_time_deriv] type = TimeDerivativeLog variable = mean_en - [../] - [./mean_en_advection] + [] + [mean_en_advection] type = EFieldAdvection variable = mean_en position_units = 1.0 - [../] - [./mean_en_diffusion] + [] + [mean_en_diffusion] type = CoeffDiffusion variable = mean_en position_units = 1.0 - [../] - [./mean_en_diffusion_correction] + [] + [mean_en_diffusion_correction] type = ThermalConductivityDiffusion variable = mean_en em = em position_units = 1.0 - [../] - [./mean_en_joule_heating] + [] + [mean_en_joule_heating] type = JouleHeating variable = mean_en em = em position_units = 1.0 potential_units = V - [../] - [./mean_en_source] + [] + [mean_en_source] type = BodyForce variable = mean_en function = 'energy_source' - [../] + [] [] [AuxVariables] - [./potential_sol] - [../] + [potential_sol] + [] - [./mean_en_sol] - [../] + [mean_en_sol] + [] - [./em_sol] - [../] + [em_sol] + [] - [./ion_sol] - [../] + [ion_sol] + [] - [./Ex_sol] - [../] - [./Ey_sol] - [../] + [Ex_sol] + [] + [Ey_sol] + [] [] [AuxKernels] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential_sol function = potential_fun - [../] + [] - [./mean_en_sol] + [mean_en_sol] type = FunctionAux variable = mean_en_sol function = mean_en_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] - [./ion_sol] + [ion_sol] type = FunctionAux variable = ion_sol function = ion_fun - [../] + [] - [./Ex_sol] + [Ex_sol] type = FunctionAux variable = Ex_sol function = Ex_fun - [../] - [./Ey_sol] + [] + [Ey_sol] type = FunctionAux variable = Ey_sol function = Ey_fun - [../] + [] [] [Functions] #Material Variables #Electron diffusion coeff. - [./diffem_coeff] + [diffem_coeff] type = ConstantFunction value = 0.05 - [../] + [] #Electron mobility coeff. - [./muem_coeff] + [muem_coeff] type = ConstantFunction value = 0.01 - [../] + [] #Electron energy diffusion coeff. - [./diffmean_en_coeff] + [diffmean_en_coeff] type = ParsedFunction vars = 'diffem_coeff' vals = 'diffem_coeff' value = '5.0 / 3.0 * diffem_coeff' - [../] + [] #Electron energy mobility coeff. - [./mumean_en_coeff] + [mumean_en_coeff] type = ParsedFunction vars = 'muem_coeff' vals = 'muem_coeff' value = '5.0 / 3.0 * muem_coeff' - [../] + [] #Ion diffusion coeff. - [./diffion] + [diffion] type = ConstantFunction value = 0.1 - [../] + [] #Ion mobility coeff. - [./muion] + [muion] type = ConstantFunction value = 0.025 - [../] - [./N_A] + [] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.01 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured ion density solution - [./ion_fun] + [ion_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 1.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured electron density solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee diffpotential' vals = 'ee diffpotential' value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] + [] #The manufactured electron energy solution - [./energy_fun] + [energy_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'sin(pi*y) + sin(2*pi*t)*cos(pi*y)*sin(pi*y) + 0.75 + cos(pi/2*x)' - [../] - [./mean_en_fun] + [] + [mean_en_fun] type = ParsedFunction vars = 'energy_fun em_fun' vals = 'energy_fun em_fun' value = 'log(energy_fun) + em_fun' - [../] + [] #The manufactured eff. Efield solution - [./Ex_fun] + [Ex_fun] type = ParsedFunction vars = 'ee diffpotential' vals = 'ee diffpotential' value = '-(ee*exp(-5*t)*sin((pi*x)/2)*(exp(5*t) - 1))/(5*diffpotential*pi)' - [../] - [./Ey_fun] + [] + [Ey_fun] type = ParsedFunction vars = 'ee diffpotential' vals = 'ee diffpotential' value = '-(2*ee*exp(-5*t)*sin(pi*y))/(4*diffpotential*pi^2 + 25*diffpotential) - (ee*sin(pi*y)*(5*sin(2*pi*t) - 2*pi*cos(2*pi*t)))/(diffpotential*pi*(4*pi^2 + 25))' - [../] + [] #Electron diffusion coeff. - [./diffem] + [diffem] type = ParsedFunction vars = 'diffem_coeff energy_fun' vals = 'diffem_coeff energy_fun' value = 'diffem_coeff * energy_fun' - [../] + [] #Electron mobility coeff. - [./muem] + [muem] type = ParsedFunction vars = 'muem_coeff energy_fun' vals = 'muem_coeff energy_fun' value = 'muem_coeff * energy_fun' - [../] + [] #Electron energy diffusion coeff. - [./diffmean_en] + [diffmean_en] type = ParsedFunction vars = 'diffmean_en_coeff energy_fun' vals = 'diffmean_en_coeff energy_fun' value = 'diffmean_en_coeff * energy_fun' - [../] + [] #Electron energy mobility coeff. - [./mumean_en] + [mumean_en] type = ParsedFunction vars = 'mumean_en_coeff energy_fun' vals = 'mumean_en_coeff energy_fun' value = 'mumean_en_coeff * energy_fun' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee diffpotential diffem_coeff muem_coeff N_A' vals = 'ee diffpotential diffem_coeff muem_coeff N_A' @@ -361,9 +361,9 @@ sin(2*pi*t) + 2*cos(pi*y)^2*sin(2*pi*t))*(cos((pi*x)/2) + sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1))/(5*diffpotential) + (ee*muem_coeff*sin(2*pi*t)*sin(pi*y)*(pi*cos(pi*y) - (pi*sin(2*pi*t)*sin(pi*y))/5)*(cos((pi*x)/2) + sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4))/(5*diffpotential*pi)) / N_A' - [../] + [] #The ion source term. - [./ion_source] + [ion_source] type = ParsedFunction vars = 'ee diffpotential diffion muion N_A' vals = 'ee diffpotential diffion muion N_A' @@ -374,8 +374,8 @@ 2*pi*exp(5*t)*cos(2*pi*t))*((9*cos((pi*x)/2))/10 + sin(pi*y) + 1))/(diffpotential*(4*pi^2 + 25)) - (ee*muion*exp(-5*t)*cos(pi*y)*sin(pi*y)*(2*pi + 5*exp(5*t)*sin(2*pi*t) - 2*pi*exp(5*t)*cos(2*pi*t)))/(diffpotential*(4*pi^2 + 25))) / N_A' - [../] - [./energy_source] + [] + [energy_source] type = ParsedFunction vars = 'ee diffpotential diffem_coeff muem_coeff N_A' vals = 'ee diffpotential diffem_coeff muem_coeff N_A' @@ -424,354 +424,76 @@ 4*cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3)*(10*ee*muem_coeff + 10*ee*muem_coeff*cos((pi*x)/2) + 10*ee*muem_coeff*sin(pi*y) + 25*diffem_coeff*diffpotential*pi^2 + 2*ee*muem_coeff*cos(pi*y)*sin(2*pi*t)))/(1000*diffpotential^2*pi^2)) / N_A' - [../] - - #The left BC dirichlet function - [./potential_left_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(cos(pi*y)*sin(2*pi*t) + 2))/(5*diffpotential*pi^2)' - [../] - [./em_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' - [../] - [./ion_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 19/10) / N_A)' - [../] - [./energy_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 7/4)*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2)) / N_A)' - [../] - [./Ex_left_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '0.0' - [../] - [./Ey_left_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '- (2*ee*exp(-5*t)*sin(pi*y))/(4*diffpotential*pi^2 + 25*diffpotential) - (ee*sin(pi*y)*(5*sin(2*pi*t) - 2*pi*cos(2*pi*t)))/(diffpotential*pi*(4*pi^2 + 25))' - [../] - - #The right BC dirichlet function - [./potential_right_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*cos(pi*y)*sin(2*pi*t))/(5*diffpotential*pi^2)' - [../] - [./em_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - [./ion_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + 1) / N_A)' - [../] - [./energy_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((sin(pi*y) + cos(pi*y)*sin(2*pi*t)*sin(pi*y) + 3/4)*(sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1)) / N_A)' - [../] - [./Ex_right_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*exp(-5*t)*(exp(5*t) - 1))/(5*diffpotential*pi)' - [../] - [./Ey_right_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(2*ee*exp(-5*t)*sin(pi*y))/(4*diffpotential*pi^2 + 25*diffpotential) - (ee*sin(pi*y)*(5*sin(2*pi*t) - 2*pi*cos(2*pi*t)))/(diffpotential*pi*(4*pi^2 + 25))' - [../] - - #The Down BC dirichlet function - [./potential_down_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) + sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) + sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] - [./energy_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((cos((pi*x)/2) + 3/4)*(cos((pi*x)/2) + sin(2*pi*t)/5 + 1)) / N_A)' - [../] - [./Ex_down_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*exp(-5*t)*sin((pi*x)/2)*(exp(5*t) - 1))/(5*diffpotential*pi)' - [../] - [./Ey_down_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '0.0' - [../] - - #The up BC dirichlet function - [./potential_up_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*(2*cos((pi*x)/2) - sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] - [./em_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) - sin(2*pi*t)/5 + 1) / N_A)' - [../] - [./ion_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((9*cos((pi*x)/2))/10 + 1) / N_A)' - [../] - [./energy_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log(((cos((pi*x)/2) + 3/4)*(cos((pi*x)/2) - sin(2*pi*t)/5 + 1)) / N_A)' - [../] - [./Ex_up_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '-(ee*exp(-5*t)*sin((pi*x)/2)*(exp(5*t) - 1))/(5*diffpotential*pi)' - [../] - [./Ey_up_BC] - type = ParsedFunction - vars = 'ee diffpotential' - vals = 'ee diffpotential' - value = '0.0' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + cos(pi/2*x)) / N_A)' - [../] - [./ion_ICs] + [] + [ion_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + 0.9*cos(pi/2*x)) / N_A)' - [../] - [./mean_en_ICs] + [] + [mean_en_ICs] type = ParsedFunction vars = 'em_ICs' vals = 'em_ICs' - value = 'log(3./2. + cos(pi/2*x)) + em_ICs' - [../] + value = 'log(32. + cos(pi/2*x)) + em_ICs' + [] [] [BCs] - [./potential_left_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_left_BC' - boundary = 3 - preset = true - [../] - [./potential_right_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_right_BC' - boundary = 1 - preset = true - [../] - [./potential_down_BC] + [potential_BC] type = FunctionDirichletBC variable = potential - function = 'potential_down_BC' - boundary = 0 + function = 'potential_fun' + boundary = '0 1 2 3' preset = true - [../] - [./potential_up_BC] - type = FunctionDirichletBC - variable = potential - function = 'potential_up_BC' - boundary = 2 - preset = true - [../] + [] - [./em_left_BC] - type = FunctionDirichletBC - variable = em - function = 'em_left_BC' - boundary = 3 - preset = true - [../] - [./em_right_BC] - type = FunctionDirichletBC - variable = em - function = 'em_right_BC' - boundary = 1 - preset = true - [../] - [./em_down_BC] - type = FunctionDirichletBC - variable = em - function = 'em_down_BC' - boundary = 0 - preset = true - [../] - [./em_up_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_up_BC' - boundary = 2 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] + [] - [./ion_left_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_left_BC' - boundary = 3 - preset = true - [../] - [./ion_right_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_right_BC' - boundary = 1 - preset = true - [../] - [./ion_down_BC] + [ion_BC] type = FunctionDirichletBC variable = ion - function = 'ion_down_BC' - boundary = 0 + function = 'ion_fun' + boundary = '0 1 2 3' preset = true - [../] - [./ion_up_BC] - type = FunctionDirichletBC - variable = ion - function = 'ion_up_BC' - boundary = 2 - preset = true - [../] + [] - [./energy_left_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_left_BC' - boundary = 3 - preset = true - [../] - [./energy_right_BC] + [energy_BC] type = FunctionDirichletBC variable = mean_en - function = 'energy_right_BC' - boundary = 1 + function = 'mean_en_fun' + boundary = '0 1 2 3' preset = true - [../] - [./energy_down_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_down_BC' - boundary = 0 - preset = true - [../] - [./energy_up_BC] - type = FunctionDirichletBC - variable = mean_en - function = 'energy_up_BC' - boundary = 2 - preset = true - [../] + [] - [./Ex_left_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_left_BC' - boundary = 3 - preset = true - [../] - [./Ex_right_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_right_BC' - boundary = 1 - preset = true - [../] - [./Ex_down_BC] + [Ex_BC] type = FunctionDirichletBC variable = Ex - function = 'Ex_down_BC' - boundary = 0 + function = 'Ex_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ex_up_BC] - type = FunctionDirichletBC - variable = Ex - function = 'Ex_up_BC' - boundary = 2 - preset = true - [../] + [] - [./Ey_left_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_left_BC' - boundary = 3 - preset = true - [../] - [./Ey_right_BC] + [Ey_BC] type = FunctionDirichletBC variable = Ey - function = 'Ey_right_BC' - boundary = 1 + function = 'Ey_fun' + boundary = '0 1 2 3' preset = true - [../] - [./Ey_down_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_down_BC' - boundary = 0 - preset = true - [../] - [./Ey_up_BC] - type = FunctionDirichletBC - variable = Ey - function = 'Ey_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -779,80 +501,80 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff_Set1] + [] + [ADMaterial_Coeff_Set1] type = ADGenericFunctionMaterial prop_names = 'diffpotential diffion muion' prop_values = 'diffpotential diffion muion' - [../] - [./Material_Coeff_Set2] + [] + [Material_Coeff_Set2] type = ADMMSEEDFRates electrons = em mean_energy = mean_en prop_names = 'diffem muem diffmean_en mumean_en' prop_values = 'diffem muem diffmean_en mumean_en' d_prop_d_actual_mean_en = 'diffem_coeff muem_coeff diffmean_en_coeff mumean_en_coeff' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem sgnion sgnmean_en' prop_values = '-1.0 1.0 -1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] - [./ion_l2Error] + [] + [ion_l2Error] type = ElementL2Error variable = ion function = ion_fun - [../] - [./potential_l2Error] + [] + [potential_l2Error] type = ElementL2Error variable = potential function = potential_fun - [../] - [./mean_en_l2Error] + [] + [mean_en_l2Error] type = ElementL2Error variable = mean_en function = mean_en_fun - [../] + [] - [./Ex_l2Error] + [Ex_l2Error] type = ElementL2Error variable = Ex function = Ex_fun - [../] - [./Ey_l2Error] + [] + [Ey_l2Error] type = ElementL2Error variable = Ey function = Ey_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -878,7 +600,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion.i b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion.i index 4675ce0604b..9669efd50d3 100644 --- a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion.i +++ b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion.i @@ -1,201 +1,156 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_Single_Fluid_Diffusion_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] type = FEProblem [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] [] [AuxVariables] - [./em_sol] - [../] + [em_sol] + [] [] [AuxKernels] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] [] [Functions] #Material Variables #Electron diffusion coeff. - [./diffem_coeff] + [diffem_coeff] type = ConstantFunction value = 0.05 - [../] + [] - [./N_A] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee diffem_coeff N_A' vals = 'ee diffem_coeff N_A' value = '(diffem_coeff*(pi^2*sin(pi*y) + (pi^2*cos(pi*y)*sin(2*pi*t))/5) + (2*pi*cos(2*pi*t)*cos(pi*y))/5 + (diffem_coeff*pi^2*cos((pi*x)/2))/4) / N_A' - [../] + [] #The left BC dirichlet function - [./em_left_BC] + [em_left_BC] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' - [../] - - #The right BC dirichlet function - [./em_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - - #The Down BC dirichlet function - [./em_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) + sin(2*pi*t)/5 + 1) / N_A)' - [../] - - #The up BC dirichlet function - [./em_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) - sin(2*pi*t)/5 + 1) / N_A)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + cos(pi/2*x)) / N_A)' - [../] + [] [] [BCs] - [./em_left_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_left_BC' - boundary = 3 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] - [./em_right_BC] - type = FunctionDirichletBC - variable = em - function = 'em_right_BC' - boundary = 1 - preset = true - [../] - [./em_down_BC] - type = FunctionDirichletBC - variable = em - function = 'em_down_BC' - boundary = 0 - preset = true - [../] - [./em_up_BC] - type = FunctionDirichletBC - variable = em - function = 'em_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff] + [] + [ADMaterial_Coeff] type = ADGenericFunctionMaterial prop_names = 'diffem' prop_values = 'diffem_coeff' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem' prop_values = '-1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -222,7 +177,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection.i b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection.i index 19d6da1d641..9fcf271efe5 100644 --- a/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection.i +++ b/test/tests/mms/continuity_equations/2D_Single_Fluid_Diffusion_Advection.i @@ -1,9 +1,9 @@ [Mesh] - [./geo] + [geo] type = FileMeshGenerator file = '2D_Single_Fluid_Diffusion_Advection_IC_out.e' use_for_exodus_restart = true - [../] + [] [] [Problem] @@ -11,102 +11,102 @@ [] [Variables] - [./em] + [em] initial_from_file_var = em - [../] + [] [] [Kernels] #Electron Equations - [./em_time_derivative] + [em_time_derivative] type = TimeDerivativeLog variable = em - [../] - [./em_diffusion] + [] + [em_diffusion] type = CoeffDiffusion variable = em position_units = 1.0 - [../] - [./em_advection] + [] + [em_advection] type = EFieldAdvection variable = em position_units = 1.0 - [../] - [./em_source] + [] + [em_source] type = BodyForce variable = em function = 'em_source' - [../] + [] [] [AuxVariables] - [./potential] - [../] + [potential] + [] - [./em_sol] - [../] + [em_sol] + [] [] [AuxKernels] - [./potential_sol] + [potential_sol] type = FunctionAux variable = potential function = potential_fun - [../] + [] - [./em_sol] + [em_sol] type = FunctionAux variable = em_sol function = em_fun - [../] + [] [] [Functions] #Material Variables #Electron diffusion coeff. - [./diffem_coeff] + [diffem_coeff] type = ConstantFunction value = 0.05 - [../] + [] #Electron mobility coeff. - [./muem_coeff] + [muem_coeff] type = ConstantFunction value = 0.01 - [../] + [] - [./N_A] + [N_A] type = ConstantFunction value = 1.0 - [../] - [./ee] + [] + [ee] type = ConstantFunction value = 1.0 - [../] - [./diffpotential] + [] + [diffpotential] type = ConstantFunction value = 0.01 - [../] + [] #Manufactured Solutions #The manufactured electron density solution - [./em_fun] + [em_fun] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((sin(pi*y) + 0.2*sin(2*pi*t)*cos(pi*y) + 1.0 + cos(pi/2*x)) / N_A)' - [../] + [] #The manufactured electron density solution - [./potential_fun] + [potential_fun] type = ParsedFunction vars = 'ee diffpotential' vals = 'ee diffpotential' value = '-(ee*(2*cos((pi*x)/2) + cos(pi*y)*sin(2*pi*t)))/(5*diffpotential*pi^2)' - [../] + [] #Source Terms in moles #The electron source term. - [./em_source] + [em_source] type = ParsedFunction vars = 'ee diffem_coeff muem_coeff diffpotential N_A' vals = 'ee diffem_coeff muem_coeff diffpotential N_A' @@ -116,77 +116,24 @@ 10*cos(pi*y)*sin(2*pi*t) + 5*cos((pi*x)/2)*sin(pi*y) + 2*cos(2*pi*t)^2 + 10*cos((pi*x)/2)^2 + 4*cos(pi*y)^2 + 11*cos((pi*x)/2)*cos(pi*y)*sin(2*pi*t) + 20*cos(pi*y)*sin(2*pi*t)*sin(pi*y) - 7))/(50*diffpotential)) / N_A' - [../] - - #The left BC dirichlet function - [./em_left_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 2) / N_A)' - [../] - - #The right BC dirichlet function - [./em_right_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((sin(pi*y) + (cos(pi*y)*sin(2*pi*t))/5 + 1) / N_A)' - [../] - - #The Down BC dirichlet function - [./em_down_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) + sin(2*pi*t)/5 + 1) / N_A)' - [../] - - #The up BC dirichlet function - [./em_up_BC] - type = ParsedFunction - vars = 'N_A' - vals = 'N_A' - value = 'log((cos((pi*x)/2) - sin(2*pi*t)/5 + 1) / N_A)' - [../] + [] - [./em_ICs] + [em_ICs] type = ParsedFunction vars = 'N_A' vals = 'N_A' value = 'log((3.0 + cos(pi/2*x)) / N_A)' - [../] + [] [] [BCs] - [./em_left_BC] - type = FunctionDirichletBC - variable = em - function = 'em_left_BC' - boundary = 3 - preset = true - [../] - [./em_right_BC] - type = FunctionDirichletBC - variable = em - function = 'em_right_BC' - boundary = 1 - preset = true - [../] - [./em_down_BC] + [em_BC] type = FunctionDirichletBC variable = em - function = 'em_down_BC' - boundary = 0 + function = 'em_fun' + boundary = '0 1 2 3' preset = true - [../] - [./em_up_BC] - type = FunctionDirichletBC - variable = em - function = 'em_up_BC' - boundary = 2 - preset = true - [../] + [] [] [Materials] @@ -194,46 +141,46 @@ type = FieldSolverMaterial potential = potential [] - [./Material_Coeff] + [Material_Coeff] type = GenericFunctionMaterial prop_names = 'e N_A' prop_values = 'ee N_A' - [../] - [./ADMaterial_Coeff] + [] + [ADMaterial_Coeff] type = ADGenericFunctionMaterial prop_names = 'diffem muem diffpotential' prop_values = 'diffem_coeff muem_coeff diffpotential' - [../] - [./Charge_Signs] + [] + [Charge_Signs] type = GenericConstantMaterial prop_names = 'sgnem' prop_values = '-1.0' - [../] + [] [] [Postprocessors] - [./em_l2Error] + [em_l2Error] type = ElementL2Error variable = em function = em_fun - [../] + [] - [./h] + [h] type = AverageElementSize - [../] + [] [] [Preconditioning] active = 'smp' - [./smp] + [smp] type = SMP full = true - [../] + [] - [./fdp] + [fdp] type = FDP full = true - [../] + [] [] [Executioner] @@ -260,7 +207,7 @@ [Outputs] perf_graph = true - [./out] + [out] type = Exodus interval = 10 [] diff --git a/test/tests/mms/materials/2D_PlasmaDielectricConstant.i b/test/tests/mms/materials/2D_PlasmaDielectricConstant.i index 7d8747122aa..20e311b77a1 100644 --- a/test/tests/mms/materials/2D_PlasmaDielectricConstant.i +++ b/test/tests/mms/materials/2D_PlasmaDielectricConstant.i @@ -390,7 +390,7 @@ [] [Outputs] - [./out] + [out] type = Exodus interval = 10 []