www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
GBAnisotropy Class Reference

Function[kappa, gamma, m, L] = parameters (sigma, mob, w_GB, sigma0) Parameter determination method is elaborated in Phys. More...

#include <GBAnisotropy.h>

Inheritance diagram for GBAnisotropy:
[legend]

Public Member Functions

 GBAnisotropy (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

const unsigned int _mesh_dimension
 
const Real _length_scale
 
const Real _time_scale
 
const Real _M_V
 
const Real _delta_sigma
 
const Real _delta_mob
 
const FileName _Anisotropic_GB_file_name
 
const bool _inclination_anisotropy
 
const VariableValue & _T
 
std::vector< std::vector< Real > > _sigma
 
std::vector< std::vector< Real > > _mob
 
std::vector< std::vector< Real > > _Q
 
std::vector< std::vector< Real > > _kappa_gamma
 
std::vector< std::vector< Real > > _a_g2
 
MaterialProperty< Real > & _kappa
 
MaterialProperty< Real > & _gamma
 
MaterialProperty< Real > & _L
 
MaterialProperty< Real > & _mu
 
MaterialProperty< Real > & _molar_volume
 
MaterialProperty< Real > & _entropy_diff
 
MaterialProperty< Real > & _act_wGB
 
const Real _kb
 
const Real _JtoeV
 
Real _mu_qp
 
const unsigned int _op_num
 
std::vector< const VariableValue * > _vals
 
std::vector< const VariableGradient * > _grad_vals
 

Private Attributes

const Real _wGB
 

Detailed Description

Function[kappa, gamma, m, L] = parameters (sigma, mob, w_GB, sigma0) Parameter determination method is elaborated in Phys.

Rev. B, 78(2), 024113, 2008, by N. Moelans This material uses Algorithm 1 from the paper to determine parameters for constant GB width

Definition at line 23 of file GBAnisotropy.h.

Constructor & Destructor Documentation

GBAnisotropy::GBAnisotropy ( const InputParameters &  parameters)

Definition at line 19 of file GBAnisotropy.C.

20  : GBAnisotropyBase(parameters), _wGB(getParam<Real>("wGB"))
21 {
22  Real sigma_init;
23  Real g2 = 0.0;
24  Real f_interf = 0.0;
25  Real a_0 = 0.75;
26  Real a_star = 0.0;
27  Real kappa_star = 0.0;
28  Real gamma_star = 0.0;
29  Real y = 0.0; // 1/gamma
30  Real yyy = 0.0;
31 
32  Real sigma_big = 0.0;
33  Real sigma_small = 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  if (m == 0 && n == 1)
45  {
46  sigma_big = _sigma[m][n];
47  sigma_small = sigma_big;
48  }
49 
50  else if (_sigma[m][n] > sigma_big)
51  sigma_big = _sigma[m][n];
52 
53  else if (_sigma[m][n] < sigma_small)
54  sigma_small = _sigma[m][n];
55  }
56 
57  sigma_init = (sigma_big + sigma_small) / 2.0;
58  _mu_qp = 6.0 * sigma_init / _wGB;
59 
60  for (unsigned int m = 0; m < _op_num - 1; ++m)
61  for (unsigned int n = m + 1; n < _op_num; ++n) // m<n
62  {
63 
64  a_star = a_0;
65  a_0 = 0.0;
66 
67  while (std::abs(a_0 - a_star) > 1.0e-9)
68  {
69  a_0 = a_star;
70  kappa_star = a_0 * _wGB * _sigma[m][n];
71  g2 = _sigma[m][n] * _sigma[m][n] / (kappa_star * _mu_qp);
72  y = -5.288 * g2 * g2 * g2 * g2 - 0.09364 * g2 * g2 * g2 + 9.965 * g2 * g2 - 8.183 * g2 +
73  2.007;
74  gamma_star = 1 / y;
75  yyy = y * y * y;
76  f_interf = 0.05676 * yyy * yyy - 0.2924 * yyy * y * y + 0.6367 * yyy * y - 0.7749 * yyy +
77  0.6107 * y * y - 0.4324 * y + 0.2792;
78  a_star = std::sqrt(f_interf / g2);
79  }
80 
81  _kappa_gamma[m][n] = kappa_star; // upper triangle stores the discrete set of kappa values
82  _kappa_gamma[n][m] = gamma_star; // lower triangle stores the discrete set of gamma values
83 
84  _a_g2[m][n] = a_star; // upper triangle stores "a" data.
85  _a_g2[n][m] = g2; // lower triangle stores "g2" data.
86  }
87 }
const unsigned int _op_num
std::vector< std::vector< Real > > _a_g2
std::vector< std::vector< Real > > _sigma
std::vector< std::vector< Real > > _kappa_gamma
const Real _length_scale
std::vector< std::vector< Real > > _mob
const Real _time_scale
const Real _wGB
Definition: GBAnisotropy.h:29
GBAnisotropyBase(const InputParameters &parameters)

Member Function Documentation

void GBAnisotropyBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 116 of file GBAnisotropyBase.C.

117 {
118  Real sum_kappa = 0.0;
119  Real sum_gamma = 0.0;
120  Real sum_L = 0.0;
121  Real Val = 0.0;
122  Real sum_val = 0.0;
123  Real f_sigma = 1.0;
124  Real f_mob = 1.0;
125  Real gamma_value = 0.0;
126 
127  for (unsigned int m = 0; m < _op_num - 1; ++m)
128  {
129  for (unsigned int n = m + 1; n < _op_num; ++n) // m<n
130  {
131  gamma_value = _kappa_gamma[n][m];
132 
134  {
135  if (_mesh_dimension == 3)
136  mooseError("This material doesn't support inclination dependence for 3D for now!");
137 
138  Real phi_ave = libMesh::pi * n / (2.0 * _op_num);
139  Real sin_phi = std::sin(2.0 * phi_ave);
140  Real cos_phi = std::cos(2.0 * phi_ave);
141 
142  Real a = (*_grad_vals[m])[_qp](0) - (*_grad_vals[n])[_qp](0);
143  Real b = (*_grad_vals[m])[_qp](1) - (*_grad_vals[n])[_qp](1);
144  Real ab = a * a + b * b + 1.0e-7; // for the sake of numerical convergence, the smaller the
145  // more accurate, but more difficult to converge
146 
147  Real cos_2phi = cos_phi * (a * a - b * b) / ab + sin_phi * 2.0 * a * b / ab;
148  Real cos_4phi = 2.0 * cos_2phi * cos_2phi - 1.0;
149 
150  f_sigma = 1.0 + _delta_sigma * cos_4phi;
151  f_mob = 1.0 + _delta_mob * cos_4phi;
152 
153  Real g2 = _a_g2[n][m] * f_sigma;
154  Real y = -5.288 * g2 * g2 * g2 * g2 - 0.09364 * g2 * g2 * g2 + 9.965 * g2 * g2 -
155  8.183 * g2 + 2.007;
156  gamma_value = 1.0 / y;
157  }
158 
159  Val = (100000.0 * ((*_vals[m])[_qp]) * ((*_vals[m])[_qp]) + 0.01) *
160  (100000.0 * ((*_vals[n])[_qp]) * ((*_vals[n])[_qp]) + 0.01);
161 
162  sum_val += Val;
163  sum_kappa += _kappa_gamma[m][n] * f_sigma * Val;
164  sum_gamma += gamma_value * Val;
165  // Following comes from substituting Eq. (36c) from the paper into (36b)
166  sum_L += Val * _mob[m][n] * std::exp(-_Q[m][n] / (_kb * _T[_qp])) * f_mob * _mu_qp *
167  _a_g2[n][m] / _sigma[m][n];
168  }
169  }
170 
171  _kappa[_qp] = sum_kappa / sum_val;
172  _gamma[_qp] = sum_gamma / sum_val;
173  _L[_qp] = sum_L / sum_val;
174  _mu[_qp] = _mu_qp;
175 
176  _molar_volume[_qp] =
177  _M_V / (_length_scale * _length_scale * _length_scale); // m^3/mol converted to ls^3/mol
178  _entropy_diff[_qp] = 9.5 * _JtoeV; // J/(K mol) converted to eV(K mol)
179  _act_wGB[_qp] = 0.5e-9 / _length_scale; // 0.5 nm
180 }
MaterialProperty< Real > & _kappa
const Real _delta_sigma
std::vector< std::vector< Real > > _Q
const unsigned int _op_num
const Real _delta_mob
std::vector< std::vector< Real > > _a_g2
MaterialProperty< Real > & _act_wGB
const VariableValue & _T
std::vector< std::vector< Real > > _sigma
MaterialProperty< Real > & _L
MaterialProperty< Real > & _entropy_diff
const unsigned int _mesh_dimension
MaterialProperty< Real > & _molar_volume
std::vector< const VariableGradient * > _grad_vals
const bool _inclination_anisotropy
std::vector< std::vector< Real > > _kappa_gamma
const Real _length_scale
std::vector< std::vector< Real > > _mob
std::vector< const VariableValue * > _vals
MaterialProperty< Real > & _mu
MaterialProperty< Real > & _gamma

Member Data Documentation

std::vector<std::vector<Real> > GBAnisotropyBase::_a_g2
protectedinherited
MaterialProperty<Real>& GBAnisotropyBase::_act_wGB
protectedinherited

Definition at line 58 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

const FileName GBAnisotropyBase::_Anisotropic_GB_file_name
protectedinherited

Definition at line 39 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::GBAnisotropyBase().

const Real GBAnisotropyBase::_delta_mob
protectedinherited

Definition at line 37 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

const Real GBAnisotropyBase::_delta_sigma
protectedinherited

Definition at line 36 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

MaterialProperty<Real>& GBAnisotropyBase::_entropy_diff
protectedinherited

Definition at line 57 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

MaterialProperty<Real>& GBAnisotropyBase::_gamma
protectedinherited

Definition at line 52 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

std::vector<const VariableGradient *> GBAnisotropyBase::_grad_vals
protectedinherited
const bool GBAnisotropyBase::_inclination_anisotropy
protectedinherited

Definition at line 41 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

const Real GBAnisotropyBase::_JtoeV
protectedinherited
MaterialProperty<Real>& GBAnisotropyBase::_kappa
protectedinherited

Definition at line 51 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

std::vector<std::vector<Real> > GBAnisotropyBase::_kappa_gamma
protectedinherited
const Real GBAnisotropyBase::_kb
protectedinherited

Definition at line 60 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

MaterialProperty<Real>& GBAnisotropyBase::_L
protectedinherited

Definition at line 53 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

const Real GBAnisotropyBase::_length_scale
protectedinherited
const Real GBAnisotropyBase::_M_V
protectedinherited

Definition at line 35 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

const unsigned int GBAnisotropyBase::_mesh_dimension
protectedinherited

Definition at line 31 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

std::vector<std::vector<Real> > GBAnisotropyBase::_mob
protectedinherited
MaterialProperty<Real>& GBAnisotropyBase::_molar_volume
protectedinherited

Definition at line 56 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

MaterialProperty<Real>& GBAnisotropyBase::_mu
protectedinherited

Definition at line 54 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

Real GBAnisotropyBase::_mu_qp
protectedinherited
const unsigned int GBAnisotropyBase::_op_num
protectedinherited
std::vector<std::vector<Real> > GBAnisotropyBase::_Q
protectedinherited
std::vector<std::vector<Real> > GBAnisotropyBase::_sigma
protectedinherited
const VariableValue& GBAnisotropyBase::_T
protectedinherited

Definition at line 43 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

const Real GBAnisotropyBase::_time_scale
protectedinherited

Definition at line 34 of file GBAnisotropyBase.h.

Referenced by GBAnisotropy(), and GBWidthAnisotropy::GBWidthAnisotropy().

std::vector<const VariableValue *> GBAnisotropyBase::_vals
protectedinherited
const Real GBAnisotropy::_wGB
private

Definition at line 29 of file GBAnisotropy.h.

Referenced by GBAnisotropy().


The documentation for this class was generated from the following files: