www.mooseframework.org
GBWidthAnisotropy.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 
8 #include "GBWidthAnisotropy.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<GBAnisotropyBase>();
15  params.addRequiredParam<Real>("mu", "Prefactor of bulk free energy");
16  params.addRequiredParam<Real>("kappa",
17  "Prefactor of gradient free energies for all i-j interfaces");
18  return params;
19 }
20 
21 GBWidthAnisotropy::GBWidthAnisotropy(const InputParameters & parameters)
22  : GBAnisotropyBase(parameters), _mu(getParam<Real>("mu")), _kappa(getParam<Real>("kappa"))
23 {
24  _mu_qp = _mu;
25  Real g2 = 0.0;
26  Real f_interf = 0.0;
27  Real a = 0.0;
28  Real gamma = 0.0;
29  Real y = 0.0; // 1/gamma
30  Real yyy = 0.0;
31 
32  for (unsigned int m = 0; m < _op_num - 1; ++m)
33  for (unsigned int n = m + 1; n < _op_num; ++n)
34  {
35  // Convert units of mobility and energy
36  _sigma[m][n] *= _JtoeV * (_length_scale * _length_scale); // eV/nm^2
37 
39  _length_scale)); // Convert to nm^4/(eV*ns);
40  }
41 
42  for (unsigned int m = 0; m < _op_num - 1; ++m)
43  for (unsigned int n = m + 1; n < _op_num; ++n) // m<n
44  {
45  g2 = _sigma[m][n] * _sigma[m][n] / (_kappa * _mu_qp);
46  y = -5.288 * g2 * g2 * g2 * g2 - 0.09364 * g2 * g2 * g2 + 9.965 * g2 * g2 - 8.183 * g2 +
47  2.007;
48  gamma = 1 / y;
49  yyy = y * y * y;
50  f_interf = 0.05676 * yyy * yyy - 0.2924 * yyy * y * y + 0.6367 * yyy * y - 0.7749 * yyy +
51  0.6107 * y * y - 0.4324 * y + 0.2792;
52  a = std::sqrt(f_interf / g2);
53 
54  _kappa_gamma[m][n] = _kappa; // upper triangle stores the discrete set of kappa values
55  _kappa_gamma[n][m] = gamma; // lower triangle stores the discrete set of gamma values
56 
57  _a_g2[m][n] = a; // upper triangle stores "a" data.
58  _a_g2[n][m] = g2; // lower triangle stores "g2" data.
59  }
60 }
const unsigned int _op_num
GBWidthAnisotropy(const InputParameters &parameters)
std::vector< std::vector< Real > > _a_g2
InputParameters validParams< GBAnisotropyBase >()
std::vector< std::vector< Real > > _sigma
InputParameters validParams< GBWidthAnisotropy >()
std::vector< std::vector< Real > > _kappa_gamma
const Real _length_scale
std::vector< std::vector< Real > > _mob
const Real _time_scale
Function[kappa, gamma, m, L] = parameters (sigma, mob, w_GB, sigma0) Parameter determination method i...