www.mooseframework.org
GBEvolutionBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "GBEvolutionBase.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<Material>();
17  params.addClassDescription(
18  "Computes necessary material properties for the isotropic grian 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 lengthscale 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 }
35 
36 GBEvolutionBase::GBEvolutionBase(const InputParameters & parameters)
37  : DerivativeMaterialInterface<Material>(parameters),
38  _f0s(getParam<Real>("f0s")),
39  _wGB(getParam<Real>("wGB")),
40  _length_scale(getParam<Real>("length_scale")),
41  _time_scale(getParam<Real>("time_scale")),
42  _GBmob0(getParam<Real>("GBmob0")),
43  _Q(getParam<Real>("Q")),
44  _GBMobility(getParam<Real>("GBMobility")),
45  _molar_vol(getParam<Real>("molar_volume")),
46  _T(coupledValue("T")),
47  _sigma(declareProperty<Real>("sigma")),
48  _M_GB(declareProperty<Real>("M_GB")),
49  _kappa(declareProperty<Real>("kappa_op")),
50  _gamma(declareProperty<Real>("gamma_asymm")),
51  _L(declareProperty<Real>("L")),
52  _dLdT(parameters.hasDefaultCoupledValue("T")
53  ? nullptr
54  : &declarePropertyDerivative<Real>("L", getVar("T", 0)->name())),
55  _l_GB(declareProperty<Real>("l_GB")),
56  _mu(declareProperty<Real>("mu")),
57  _entropy_diff(declareProperty<Real>("entropy_diff")),
58  _molar_volume(declareProperty<Real>("molar_volume")),
59  _act_wGB(declareProperty<Real>("act_wGB")),
60  _kb(8.617343e-5), // Boltzmann constant in eV/K
61  _JtoeV(6.24150974e18) // Joule to eV conversion
62 {
63  if (_GBMobility == -1 && _GBmob0 == 0)
64  mooseError("Either a value for GBMobility or for GBmob0 and Q must be provided");
65 }
66 
67 void
69 {
70  const Real length_scale4 = _length_scale * _length_scale * _length_scale * _length_scale;
71 
72  // GB mobility Derivative
73  Real dM_GBdT;
74 
75  if (_GBMobility < 0)
76  {
77  // Convert to lengthscale^4/(eV*timescale);
78  const Real M0 = _GBmob0 * _time_scale / (_JtoeV * length_scale4);
79 
80  _M_GB[_qp] = M0 * std::exp(-_Q / (_kb * _T[_qp]));
81  dM_GBdT = _M_GB[_qp] * _Q / (_kb * _T[_qp] * _T[_qp]);
82  }
83  else
84  {
85  // Convert to lengthscale^4/(eV*timescale)
86  _M_GB[_qp] = _GBMobility * _time_scale / (_JtoeV * length_scale4);
87  dM_GBdT = 0.0;
88  }
89 
90  // in the length scale of the system
91  _l_GB[_qp] = _wGB;
92 
93  _L[_qp] = 4.0 / 3.0 * _M_GB[_qp] / _l_GB[_qp];
94  if (_dLdT)
95  (*_dLdT)[_qp] = 4.0 / 3.0 * dM_GBdT / _l_GB[_qp];
96  _kappa[_qp] = 3.0 / 4.0 * _sigma[_qp] * _l_GB[_qp];
97  _gamma[_qp] = 1.5;
98  _mu[_qp] = 3.0 / 4.0 * 1.0 / _f0s * _sigma[_qp] / _l_GB[_qp];
99 
100  // J/(K mol) converted to eV(K mol)
101  _entropy_diff[_qp] = 8.0e3 * _JtoeV;
102 
103  // m^3/mol converted to ls^3/mol
105  _act_wGB[_qp] = 0.5e-9 / _length_scale;
106 }
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
const std::string name
Definition: Setup.h:21
MaterialProperty< Real > & _L
MaterialProperty< Real > & _act_wGB