https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
GBEvolutionBaseTempl< is_ad > Class Template Reference

#include <GBEvolutionBase.h>

Inheritance diagram for GBEvolutionBaseTempl< is_ad >:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 GBEvolutionBaseTempl (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

Real _f0s
 
Real _wGB
 
Real _length_scale
 
Real _time_scale
 
Real _GBmob0
 
Real _Q
 
Real _GBMobility
 
Real _molar_vol
 
const VariableValue_T
 
GenericMaterialProperty< Real, is_ad > & _sigma
 
GenericMaterialProperty< Real, is_ad > & _M_GB
 
GenericMaterialProperty< Real, is_ad > & _kappa
 
GenericMaterialProperty< Real, is_ad > & _gamma
 
GenericMaterialProperty< Real, is_ad > & _L
 
MaterialProperty< Real > * _dLdT
 
GenericMaterialProperty< Real, is_ad > & _l_GB
 
GenericMaterialProperty< Real, is_ad > & _mu
 
GenericMaterialProperty< Real, is_ad > & _entropy_diff
 
GenericMaterialProperty< Real, is_ad > & _molar_volume
 
GenericMaterialProperty< Real, is_ad > & _act_wGB
 
const Real _kb
 
const Real _JtoeV
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

Detailed Description

template<bool is_ad>
class GBEvolutionBaseTempl< is_ad >

Definition at line 16 of file GBEvolutionBase.h.

Constructor & Destructor Documentation

◆ GBEvolutionBaseTempl()

template<bool is_ad>
GBEvolutionBaseTempl< is_ad >::GBEvolutionBaseTempl ( const InputParameters parameters)

Definition at line 37 of file GBEvolutionBase.C.

39 _f0s(getParam<Real>("f0s")),
40 _wGB(getParam<Real>("wGB")),
41 _length_scale(getParam<Real>("length_scale")),
42 _time_scale(getParam<Real>("time_scale")),
43 _GBmob0(getParam<Real>("GBmob0")),
44 _Q(getParam<Real>("Q")),
45 _GBMobility(getParam<Real>("GBMobility")),
46 _molar_vol(getParam<Real>("molar_volume")),
47 _T(coupledValue("T")),
48 _sigma(declareGenericProperty<Real, is_ad>("sigma")),
49 _M_GB(declareGenericProperty<Real, is_ad>("M_GB")),
50 _kappa(declareGenericProperty<Real, is_ad>("kappa_op")),
51 _gamma(declareGenericProperty<Real, is_ad>("gamma_asymm")),
52 _L(declareGenericProperty<Real, is_ad>("L")),
53 _dLdT(parameters.hasDefaultCoupledValue("T")
54 ? nullptr
55 : &declarePropertyDerivative<Real>("L", coupledName("T", 0))),
56 _l_GB(declareGenericProperty<Real, is_ad>("l_GB")),
57 _mu(declareGenericProperty<Real, is_ad>("mu")),
58 _entropy_diff(declareGenericProperty<Real, is_ad>("entropy_diff")),
59 _molar_volume(declareGenericProperty<Real, is_ad>("molar_volume")),
60 _act_wGB(declareGenericProperty<Real, is_ad>("act_wGB")),
61 _kb(8.617343e-5), // Boltzmann constant in eV/K
62 _JtoeV(6.24150974e18) // Joule to eV conversion
63{
64 if (_GBMobility == -1 && _GBmob0 == 0)
65 mooseError("Either a value for GBMobility or for GBmob0 and Q must be provided");
66}
void mooseError(Args &&... args)
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative(const std::string &base, const std::vector< VariableName > &c)
MaterialProperty< Real > * _dLdT
GenericMaterialProperty< Real, is_ad > & _L
GenericMaterialProperty< Real, is_ad > & _mu
GenericMaterialProperty< Real, is_ad > & _act_wGB
GenericMaterialProperty< Real, is_ad > & _molar_volume
GenericMaterialProperty< Real, is_ad > & _entropy_diff
GenericMaterialProperty< Real, is_ad > & _M_GB
GenericMaterialProperty< Real, is_ad > & _kappa
GenericMaterialProperty< Real, is_ad > & _gamma
const VariableValue & _T
GenericMaterialProperty< Real, is_ad > & _sigma
GenericMaterialProperty< Real, is_ad > & _l_GB
bool hasDefaultCoupledValue(const std::string &coupling_name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ computeQpProperties()

template<bool is_ad>
void GBEvolutionBaseTempl< is_ad >::computeQpProperties ( )
protectedvirtual

Reimplemented in GBEvolutionTempl< is_ad >.

Definition at line 70 of file GBEvolutionBase.C.

71{
73
74 // GB mobility Derivative
75 Real dM_GBdT;
76
77 if (_GBMobility < 0)
78 {
79 // Convert to lengthscale^4/(eV*timescale);
80 const Real M0 = _GBmob0 * _time_scale / (_JtoeV * length_scale4);
81
82 _M_GB[_qp] = M0 * std::exp(-_Q / (_kb * _T[_qp]));
83 dM_GBdT = MetaPhysicL::raw_value(_M_GB[_qp] * _Q / (_kb * _T[_qp] * _T[_qp]));
84 }
85 else
86 {
87 // Convert to lengthscale^4/(eV*timescale)
88 _M_GB[_qp] = _GBMobility * _time_scale / (_JtoeV * length_scale4);
89 dM_GBdT = 0.0;
90 }
91
92 // in the length scale of the system
93 _l_GB[_qp] = _wGB;
94
95 _L[_qp] = 4.0 / 3.0 * _M_GB[_qp] / _l_GB[_qp];
96 if (_dLdT)
97 (*_dLdT)[_qp] = MetaPhysicL::raw_value(4.0 / 3.0 * dM_GBdT / _l_GB[_qp]);
98 _kappa[_qp] = 3.0 / 4.0 * _sigma[_qp] * _l_GB[_qp];
99 _gamma[_qp] = 1.5;
100 _mu[_qp] = 3.0 / 4.0 * 1.0 / _f0s * _sigma[_qp] / _l_GB[_qp];
101
102 // J/(K mol) converted to eV(K mol)
103 _entropy_diff[_qp] = 8.0e3 * _JtoeV;
104
105 // m^3/mol converted to ls^3/mol
107 _act_wGB[_qp] = 0.5e-9 / _length_scale;
108}
auto raw_value(const Eigen::Map< T > &in)

Referenced by GBEvolutionTempl< is_ad >::computeQpProperties().

◆ validParams()

template<bool is_ad>
InputParameters GBEvolutionBaseTempl< is_ad >::validParams ( )
static

Definition at line 14 of file GBEvolutionBase.C.

15{
18 "Computes necessary material properties for the isotropic grain growth model");
19 params.addRequiredCoupledVar("T", "Temperature in Kelvin");
20 params.addParam<Real>("f0s", 0.125, "The GB energy constant ");
21 params.addRequiredParam<Real>("wGB", "Diffuse GB width in the length scale of the model");
22 params.addParam<Real>("length_scale", 1.0e-9, "Length scale in m, where default is nm");
23 params.addParam<Real>("time_scale", 1.0e-9, "Time scale in s, where default is ns");
24 params.addParam<Real>(
25 "GBMobility",
26 -1,
27 "GB mobility input in m^4/(J*s), that overrides the temperature dependent calculation");
28 params.addParam<Real>("GBmob0", 0, "Grain boundary mobility prefactor in m^4/(J*s)");
29 params.addParam<Real>("Q", 0, "Grain boundary migration activation energy in eV");
30 params.addParam<Real>("molar_volume",
31 24.62e-6,
32 "Molar volume in m^3/mol, needed for temperature gradient driving force");
33 return params;
34}
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()

Referenced by GBEvolutionTempl< is_ad >::validParams().

Member Data Documentation

◆ _act_wGB

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_act_wGB
protected

Definition at line 47 of file GBEvolutionBase.h.

◆ _dLdT

template<bool is_ad>
MaterialProperty<Real>* GBEvolutionBaseTempl< is_ad >::_dLdT
protected

Definition at line 42 of file GBEvolutionBase.h.

◆ _entropy_diff

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_entropy_diff
protected

Definition at line 45 of file GBEvolutionBase.h.

◆ _f0s

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_f0s
protected

Definition at line 26 of file GBEvolutionBase.h.

◆ _gamma

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_gamma
protected

Definition at line 40 of file GBEvolutionBase.h.

◆ _GBmob0

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_GBmob0
protected

◆ _GBMobility

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_GBMobility
protected

◆ _JtoeV

template<bool is_ad>
const Real GBEvolutionBaseTempl< is_ad >::_JtoeV
protected

Definition at line 50 of file GBEvolutionBase.h.

◆ _kappa

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_kappa
protected

Definition at line 39 of file GBEvolutionBase.h.

◆ _kb

template<bool is_ad>
const Real GBEvolutionBaseTempl< is_ad >::_kb
protected

Definition at line 49 of file GBEvolutionBase.h.

◆ _L

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_L
protected

Definition at line 41 of file GBEvolutionBase.h.

◆ _l_GB

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_l_GB
protected

Definition at line 43 of file GBEvolutionBase.h.

◆ _length_scale

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_length_scale
protected

Definition at line 28 of file GBEvolutionBase.h.

◆ _M_GB

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_M_GB
protected

Definition at line 38 of file GBEvolutionBase.h.

◆ _molar_vol

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_molar_vol
protected

Definition at line 33 of file GBEvolutionBase.h.

◆ _molar_volume

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_molar_volume
protected

Definition at line 46 of file GBEvolutionBase.h.

◆ _mu

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_mu
protected

Definition at line 44 of file GBEvolutionBase.h.

◆ _Q

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_Q
protected

Definition at line 31 of file GBEvolutionBase.h.

◆ _sigma

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& GBEvolutionBaseTempl< is_ad >::_sigma
protected

Definition at line 37 of file GBEvolutionBase.h.

◆ _T

template<bool is_ad>
const VariableValue& GBEvolutionBaseTempl< is_ad >::_T
protected

Definition at line 35 of file GBEvolutionBase.h.

◆ _time_scale

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_time_scale
protected

Definition at line 29 of file GBEvolutionBase.h.

◆ _wGB

template<bool is_ad>
Real GBEvolutionBaseTempl< is_ad >::_wGB
protected

Definition at line 27 of file GBEvolutionBase.h.


The documentation for this class was generated from the following files: