Skip to content

Commit

Permalink
BCs input parameters have been updated and deprecated for all AD BCs
Browse files Browse the repository at this point in the history
- input parameters were made consistent with issue shannon-lab#223
- secondary electron emmision coefficients were made material and species dependent
- secondary electron energy was moved to a BC input parameters
- several test inputs were updated in order to facilitate this as well
  • Loading branch information
gsgall committed Dec 20, 2023
1 parent 55baaf2 commit cf34230
Show file tree
Hide file tree
Showing 51 changed files with 427 additions and 235 deletions.
3 changes: 2 additions & 1 deletion include/bcs/EconomouDielectricBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ class EconomouDielectricBC : public ADIntegratedBC
std::vector<const MaterialProperty<Real> *> _sgnip;
std::vector<const ADMaterialProperty<Real> *> _muip;
const MaterialProperty<Real> & _massem;
Real _user_se_coeff;
std::vector<Real> _user_se_coeff;

const Real & _epsilon_d;
const Real & _thickness;
Real _a;
ADRealVectorValue _ion_flux;
ADRealVectorValue _temp_flux;
ADReal _v_thermal;
ADRealVectorValue _em_flux;
std::string _potential_units;
Expand Down
1 change: 0 additions & 1 deletion include/bcs/ElectronAdvectionDoNothingBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ class ElectronAdvectionDoNothingBC : public ADIntegratedBC
private:
// Coupled variables
const ADVariableGradient & _grad_potential;
const ADVariableValue & _mean_en;
};
1 change: 0 additions & 1 deletion include/bcs/ElectronDiffusionDoNothingBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ class ElectronDiffusionDoNothingBC : public ADIntegratedBC
Real _r_units;

const ADMaterialProperty<Real> & _diffem;
const ADVariableValue & _mean_en;
};
20 changes: 10 additions & 10 deletions include/bcs/FieldEmissionBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ class FieldEmissionBC : public ADIntegratedBC
protected:
virtual ADReal computeQpResidual() override;

Real _r_units;
Real _r;
const Real _r_units;
const Real _r;

const unsigned int _num_ions;
// Coupled variables

const ADVariableGradient & _grad_potential;
const ADVariableValue & _mean_en;
MooseVariable & _ip_var;
const ADVariableValue & _ip;
const ADVariableGradient & _grad_ip;
std::vector<MooseVariable *> _ip_var;
std::vector<const ADVariableValue *> _ip;
std::vector<const ADVariableGradient *> _grad_ip;

const ADMaterialProperty<Real> & _muem;
const MaterialProperty<Real> & _massem;
const MaterialProperty<Real> & _e;
const MaterialProperty<Real> & _sgnip;
const ADMaterialProperty<Real> & _muip;
const ADMaterialProperty<Real> & _Dip;
const MaterialProperty<Real> & _se_coeff;
std::vector<const MaterialProperty<Real> *> _sgnip;
std::vector<const ADMaterialProperty<Real> *> _muip;
std::vector<const ADMaterialProperty<Real> *> _Dip;
const std::vector<Real> _se_coeff;
const MaterialProperty<Real> & _work_function;
const MaterialProperty<Real> & _field_enhancement;

Expand Down
21 changes: 11 additions & 10 deletions include/bcs/HagelaarEnergyAdvectionBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,24 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC

Real _r_units;
Real _r;

const unsigned int _num_ions;
// Coupled variables

const ADVariableGradient & _grad_potential;
MooseVariable & _ip_var;
const ADVariableValue & _ip;
const ADVariableGradient & _grad_ip;

const MaterialProperty<Real> & _sgnip;
const ADMaterialProperty<Real> & _muip;
const ADMaterialProperty<Real> & _Dip;
const MaterialProperty<Real> & _se_coeff;
const MaterialProperty<Real> & _se_energy;
std::vector<MooseVariable *> _ip_var;
std::vector<const ADVariableValue *> _ip;
std::vector<const ADVariableGradient *> _grad_ip;

std::vector<const MaterialProperty<Real> *> _sgnip;
std::vector<const ADMaterialProperty<Real> *> _muip;
std::vector<const ADMaterialProperty<Real> *> _Dip;
const std::vector<Real> _se_coeff;
const Real _se_energy;
const ADMaterialProperty<Real> & _mumean_en;

Real _a;
ADRealVectorValue _ion_flux;
Real _v_thermal;
Real _n_gamma;
ADReal _bc_val;
};
2 changes: 0 additions & 2 deletions include/bcs/HagelaarEnergyBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class HagelaarEnergyBC : public ADIntegratedBC

const MaterialProperty<Real> & _massem;
const MaterialProperty<Real> & _e;
const MaterialProperty<Real> & _se_coeff;
const MaterialProperty<Real> & _se_energy;
const ADMaterialProperty<Real> & _mumean_en;

Real _a;
Expand Down
13 changes: 4 additions & 9 deletions include/bcs/LymberopoulosElectronBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,18 @@ class LymberopoulosElectronBC : public ADIntegratedBC
protected:
virtual ADReal computeQpResidual() override;

Real _r_units;
Real _ks;
Real _gamma;
const Real _r_units;
const Real _ks;
const std::vector<Real> _gamma;
const unsigned int _num_ions;

// Coupled variables
const ADVariableGradient & _grad_potential;
std::vector<MooseVariable *> _ion_var;
std::vector<const ADVariableValue *> _ion;

Real _sign;

std::vector<const MaterialProperty<Real> *> _sgnion;
std::vector<const ADMaterialProperty<Real> *> _muion;

unsigned int _num_ions;
unsigned int _ip_index;
std::vector<unsigned int>::iterator _iter;

ADRealVectorValue _ion_flux;
};
2 changes: 1 addition & 1 deletion include/bcs/NeumannCircuitVoltageMoles_KV.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NeumannCircuitVoltageMoles_KV : public ADIntegratedBC
const ADVariableValue & _mean_en;
const ADVariableValue & _em;

const MaterialProperty<Real> & _se_coeff;
const std::vector<Real> & _se_coeff;
std::vector<const ADMaterialProperty<Real> *> _muip;
const MaterialProperty<Real> & _eps;
const MaterialProperty<Real> & _N_A;
Expand Down
13 changes: 5 additions & 8 deletions include/bcs/SakiyamaEnergySecondaryElectronBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ class SakiyamaEnergySecondaryElectronBC : public ADIntegratedBC
protected:
virtual ADReal computeQpResidual() override;

Real _r_units;
bool Te_dependent;

const Real _r_units;
const bool Te_dependent;
const unsigned int _num_ions;
const std::vector<Real> _se_coeff;
// Coupled variables
const ADVariableGradient & _grad_potential;
const ADVariableValue & _em;
Expand All @@ -33,14 +34,10 @@ class SakiyamaEnergySecondaryElectronBC : public ADIntegratedBC

std::vector<const MaterialProperty<Real> *> _sgnip;
std::vector<const ADMaterialProperty<Real> *> _muip;
Real _se_coeff;

Real _user_se_energy;

Real _a;
ADReal _se_energy;
ADRealVectorValue _ion_flux;

unsigned int _num_ions;
unsigned int _ip_index;
std::vector<unsigned int>::iterator _iter;
};
8 changes: 3 additions & 5 deletions include/bcs/SakiyamaSecondaryElectronBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ class SakiyamaSecondaryElectronBC : public ADIntegratedBC
protected:
virtual ADReal computeQpResidual() override;

Real _r_units;

const Real _r_units;
const unsigned int _num_ions;
const std::vector<Real> _user_se_coeff;
// Coupled variables

const ADVariableGradient & _grad_potential;
std::vector<const ADVariableValue *> _ip;

Real _a;
ADRealVectorValue _ion_flux;
Real _user_se_coeff;

std::vector<const MaterialProperty<Real> *> _sgnip;
std::vector<const ADMaterialProperty<Real> *> _muip;

unsigned int _num_ions;
};
21 changes: 11 additions & 10 deletions include/bcs/SchottkyEmissionBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,25 @@ class SchottkyEmissionBC : public ADIntegratedBC
protected:
virtual ADReal computeQpResidual() override;

Real _r_units;
Real _r;

const Real _r_units;
const Real _r;
const unsigned int _num_ions;
const std::vector<Real> _se_coeff;
// Coupled variables

const ADVariableGradient & _grad_potential;
const ADVariableValue & _mean_en;

MooseVariable & _ip_var;
const ADVariableValue & _ip;
const ADVariableGradient & _grad_ip;
std::vector<MooseVariable *> _ip_var;
std::vector<const ADVariableValue *> _ip;
std::vector<const ADVariableGradient *> _grad_ip;

std::vector<const MaterialProperty<Real> *> _sgnip;
std::vector<const ADMaterialProperty<Real> *> _muip;
std::vector<const ADMaterialProperty<Real> *> _Dip;

const MaterialProperty<Real> & _massem;
const MaterialProperty<Real> & _e;
const MaterialProperty<Real> & _sgnip;
const ADMaterialProperty<Real> & _muip;
const ADMaterialProperty<Real> & _Dip;
const MaterialProperty<Real> & _se_coeff;
const MaterialProperty<Real> & _work_function;
const MaterialProperty<Real> & _field_enhancement;
const MaterialProperty<Real> & _Richardson_coefficient;
Expand Down
6 changes: 2 additions & 4 deletions include/bcs/SecondaryElectronBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class SecondaryElectronBC : public ADIntegratedBC
const Real & _r;
const Real & _r_ion;
const MaterialProperty<Real> & _kb;

const unsigned int _num_ions;
const std::vector<Real> _se_coeff;
// Coupled variables

const ADVariableGradient & _grad_potential;
Expand All @@ -41,13 +42,10 @@ class SecondaryElectronBC : public ADIntegratedBC
std::vector<const ADMaterialProperty<Real> *> _muip;
std::vector<const ADMaterialProperty<Real> *> _Tip;
std::vector<const MaterialProperty<Real> *> _massip;
const MaterialProperty<Real> & _se_coeff;

Real _a;
Real _b;
ADReal _v_thermal;
ADReal _ion_flux;
ADReal _n_gamma;

unsigned int _num_ions;
};
9 changes: 4 additions & 5 deletions include/bcs/SecondaryElectronEnergyBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class SecondaryElectronEnergyBC : public ADIntegratedBC
const Real & _r;
const Real & _r_ion;
const MaterialProperty<Real> & _kb;

const unsigned int _num_ions;
const std::vector<Real> & _se_coeff;
// Coupled variables

const ADVariableGradient & _grad_potential;
Expand All @@ -41,15 +42,13 @@ class SecondaryElectronEnergyBC : public ADIntegratedBC
std::vector<const ADMaterialProperty<Real> *> _muip;
std::vector<const ADMaterialProperty<Real> *> _Tip;
std::vector<const MaterialProperty<Real> *> _massip;
const MaterialProperty<Real> & _se_coeff;
const MaterialProperty<Real> & _se_energy;

const Real & _se_energy;
const ADMaterialProperty<Real> & _mumean_en;

Real _a;
Real _b;
ADReal _v_thermal;
ADReal _ion_flux;
ADReal _n_gamma;

unsigned int _num_ions;
};
Loading

0 comments on commit cf34230

Please sign in to comment.