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