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 authored and csdechant committed Sep 4, 2024
1 parent 9dea375 commit 9cc0617
Show file tree
Hide file tree
Showing 51 changed files with 438 additions and 249 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
4 changes: 0 additions & 4 deletions include/bcs/ElectronAdvectionDoNothingBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,4 @@ class ElectronAdvectionDoNothingBC : public ADIntegratedBC
const ADMaterialProperty<Real> & _muem;
const MaterialProperty<Real> & _sign;
const ADMaterialProperty<RealVectorValue> & _electric_field;

private:
// Coupled variables
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;
};
21 changes: 11 additions & 10 deletions include/bcs/FieldEmissionBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ 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 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
22 changes: 12 additions & 10 deletions include/bcs/HagelaarEnergyAdvectionBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC

Real _r_units;
Real _r;

const unsigned int _num_ions;
// Coupled variables
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;

const ADMaterialProperty<RealVectorValue> & _electric_field;
Expand All @@ -43,4 +44,5 @@ class HagelaarEnergyAdvectionBC : public ADIntegratedBC
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 @@ -29,8 +29,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;

const ADMaterialProperty<RealVectorValue> & _electric_field;
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,24 +22,19 @@ 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
std::vector<MooseVariable *> _ion_var;
std::vector<const ADVariableValue *> _ion;

const ADMaterialProperty<RealVectorValue> & _electric_field;

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
14 changes: 5 additions & 9 deletions include/bcs/SakiyamaEnergySecondaryElectronBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,22 @@ 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 ADVariableValue & _em;
std::vector<MooseVariable *> _ip_var;
std::vector<const ADVariableValue *> _ip;

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;

const ADMaterialProperty<RealVectorValue> & _electric_field;
};
9 changes: 3 additions & 6 deletions include/bcs/SakiyamaSecondaryElectronBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,16 @@ 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
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;

const ADMaterialProperty<RealVectorValue> & _electric_field;
};
21 changes: 11 additions & 10 deletions include/bcs/SchottkyEmissionBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ 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 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 ADVariableValue & _mean_en;
std::vector<const ADVariableValue *> _ip;
Expand All @@ -39,7 +40,6 @@ 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;

const ADMaterialProperty<RealVectorValue> & _electric_field;

Expand All @@ -48,6 +48,4 @@ class SecondaryElectronBC : public ADIntegratedBC
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 ADVariableValue & _em;
std::vector<const ADVariableValue *> _ip;
Expand All @@ -39,8 +40,8 @@ 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;

const ADMaterialProperty<RealVectorValue> & _electric_field;
Expand All @@ -50,6 +51,4 @@ class SecondaryElectronEnergyBC : public ADIntegratedBC
ADReal _v_thermal;
ADReal _ion_flux;
ADReal _n_gamma;

unsigned int _num_ions;
};
Loading

0 comments on commit 9cc0617

Please sign in to comment.