https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GBWidthAnisotropy.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
13
16{
19 "A material to compute anisotropic grain boundary energies and mobilities with "
20 "user-specified grain boundary widths, independently for each interface between grains");
21 params.addRequiredParam<Real>("mu", "Prefactor of bulk free energy");
22 params.addRequiredParam<Real>("kappa",
23 "Prefactor of gradient free energies for all i-j interfaces");
24 return params;
25}
26
28 : GBAnisotropyBase(parameters), _mu(getParam<Real>("mu")), _kappa(getParam<Real>("kappa"))
29{
30 _mu_qp = _mu;
31 Real g2 = 0.0;
32 Real f_interf = 0.0;
33 Real a = 0.0;
34 Real gamma = 0.0;
35 Real y = 0.0; // 1/gamma
36 Real yyy = 0.0;
37
38 for (unsigned int m = 0; m < _op_num - 1; ++m)
39 for (unsigned int n = m + 1; n < _op_num; ++n)
40 {
41 // Convert units of mobility and energy
42 _sigma[m][n] *= _JtoeV * (_length_scale * _length_scale); // eV/nm^2
43
45 _length_scale)); // Convert to nm^4/(eV*ns);
46 }
47
48 for (unsigned int m = 0; m < _op_num - 1; ++m)
49 for (unsigned int n = m + 1; n < _op_num; ++n) // m<n
50 {
51 g2 = _sigma[m][n] * _sigma[m][n] / (_kappa * _mu_qp);
52 y = -5.288 * g2 * g2 * g2 * g2 - 0.09364 * g2 * g2 * g2 + 9.965 * g2 * g2 - 8.183 * g2 +
53 2.007;
54 gamma = 1 / y;
55 yyy = y * y * y;
56 f_interf = 0.05676 * yyy * yyy - 0.2924 * yyy * y * y + 0.6367 * yyy * y - 0.7749 * yyy +
57 0.6107 * y * y - 0.4324 * y + 0.2792;
58 a = std::sqrt(f_interf / g2);
59
60 _kappa_gamma[m][n] = _kappa; // upper triangle stores the discrete set of kappa values
61 _kappa_gamma[n][m] = gamma; // lower triangle stores the discrete set of gamma values
62
63 _a_g2[m][n] = a; // upper triangle stores "a" data.
64 _a_g2[n][m] = g2; // lower triangle stores "g2" data.
65 }
66}
const std::vector< double > y
registerMooseObject("PhaseFieldApp", GBWidthAnisotropy)
Function[kappa, gamma, m, L] = parameters (sigma, mob, w_GB, sigma0) Parameter determination method i...
std::vector< std::vector< Real > > _a_g2
std::vector< std::vector< Real > > _sigma
const Real _length_scale
const unsigned int _op_num
static InputParameters validParams()
std::vector< std::vector< Real > > _mob
std::vector< std::vector< Real > > _kappa_gamma
Function[kappa, gamma, m, L] = parameters (sigma, mob, w_GB, sigma0) Parameter determination method i...
GBWidthAnisotropy(const InputParameters &parameters)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)