www.mooseframework.org
GBEvolutionBase.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "GBEvolutionBase.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Material>();
14  params.addClassDescription(
15  "Computes necessary material properties for the isotropic grian growth model");
16  params.addRequiredCoupledVar("T", "Temperature in Kelvin");
17  params.addParam<Real>("f0s", 0.125, "The GB energy constant ");
18  params.addRequiredParam<Real>("wGB", "Diffuse GB width in the lengthscale of the model");
19  params.addParam<Real>("length_scale", 1.0e-9, "Length scale in m, where default is nm");
20  params.addParam<Real>("time_scale", 1.0e-9, "Time scale in s, where default is ns");
21  params.addParam<Real>(
22  "GBMobility",
23  -1,
24  "GB mobility input in m^4/(J*s), that overrides the temperature dependent calculation");
25  params.addParam<Real>("GBmob0", 0, "Grain boundary mobility prefactor in m^4/(J*s)");
26  params.addParam<Real>("Q", 0, "Grain boundary migration activation energy in eV");
27  params.addParam<Real>("molar_volume",
28  24.62e-6,
29  "Molar volume in m^3/mol, needed for temperature gradient driving force");
30  return params;
31 }
32 
33 GBEvolutionBase::GBEvolutionBase(const InputParameters & parameters)
34  : DerivativeMaterialInterface<Material>(parameters),
35  _f0s(getParam<Real>("f0s")),
36  _wGB(getParam<Real>("wGB")),
37  _length_scale(getParam<Real>("length_scale")),
38  _time_scale(getParam<Real>("time_scale")),
39  _GBmob0(getParam<Real>("GBmob0")),
40  _Q(getParam<Real>("Q")),
41  _GBMobility(getParam<Real>("GBMobility")),
42  _molar_vol(getParam<Real>("molar_volume")),
43  _T(coupledValue("T")),
44  _sigma(declareProperty<Real>("sigma")),
45  _M_GB(declareProperty<Real>("M_GB")),
46  _kappa(declareProperty<Real>("kappa_op")),
47  _gamma(declareProperty<Real>("gamma_asymm")),
48  _L(declareProperty<Real>("L")),
49  _dLdT(parameters.hasDefaultCoupledValue("T")
50  ? nullptr
51  : &declarePropertyDerivative<Real>("L", getVar("T", 0)->name())),
52  _l_GB(declareProperty<Real>("l_GB")),
53  _mu(declareProperty<Real>("mu")),
54  _entropy_diff(declareProperty<Real>("entropy_diff")),
55  _molar_volume(declareProperty<Real>("molar_volume")),
56  _act_wGB(declareProperty<Real>("act_wGB")),
57  _kb(8.617343e-5), // Boltzmann constant in eV/K
58  _JtoeV(6.24150974e18) // Joule to eV conversion
59 {
60  if (_GBMobility == -1 && _GBmob0 == 0)
61  mooseError("Either a value for GBMobility or for GBmob0 and Q must be provided");
62 }
63 
64 void
66 {
67  const Real length_scale4 = _length_scale * _length_scale * _length_scale * _length_scale;
68 
69  // Convert to lengthscale^4/(eV*timescale);
70  Real M0 = _GBmob0 * _time_scale / (_JtoeV * length_scale4);
71 
72  // GB mobility Derivative
73  Real dM_GBdT;
74 
75  if (_GBMobility < 0)
76  {
77  _M_GB[_qp] = M0 * std::exp(-_Q / (_kb * _T[_qp]));
78  dM_GBdT = _M_GB[_qp] * _Q / (_kb * _T[_qp] * _T[_qp]);
79  }
80  else
81  {
82  // Convert to lengthscale^4/(eV*timescale)
83  _M_GB[_qp] = _GBMobility * _time_scale / (_JtoeV * length_scale4);
84  dM_GBdT = 0.0;
85  }
86 
87  // in the length scale of the system
88  _l_GB[_qp] = _wGB;
89 
90  _L[_qp] = 4.0 / 3.0 * _M_GB[_qp] / _l_GB[_qp];
91  if (_dLdT)
92  (*_dLdT)[_qp] = 4.0 / 3.0 * dM_GBdT / _l_GB[_qp];
93  _kappa[_qp] = 3.0 / 4.0 * _sigma[_qp] * _l_GB[_qp];
94  _gamma[_qp] = 1.5;
95  _mu[_qp] = 3.0 / 4.0 * 1.0 / _f0s * _sigma[_qp] / _l_GB[_qp];
96 
97  // J/(K mol) converted to eV(K mol)
98  _entropy_diff[_qp] = 8.0e3 * _JtoeV;
99 
100  // m^3/mol converted to ls^3/mol
101  _molar_volume[_qp] = _molar_vol / (_length_scale * _length_scale * _length_scale);
102  _act_wGB[_qp] = 0.5e-9 / _length_scale;
103 }
MaterialProperty< Real > & _entropy_diff
const Real _JtoeV
MaterialProperty< Real > & _M_GB
MaterialProperty< Real > & _molar_volume
MaterialProperty< Real > & _gamma
const VariableValue & _T
MaterialProperty< Real > & _l_GB
MaterialProperty< Real > * _dLdT
MaterialProperty< Real > & _kappa
MaterialProperty< Real > & _mu
InputParameters validParams< GBEvolutionBase >()
GBEvolutionBase(const InputParameters &parameters)
virtual void computeQpProperties()
MaterialProperty< Real > & _sigma
MaterialProperty< Real > & _L
MaterialProperty< Real > & _act_wGB