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

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

#include <GBWidthAnisotropy.h>

Inheritance diagram for GBWidthAnisotropy:
[legend]

Public Member Functions

 GBWidthAnisotropy (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 > & _gamma
 
MaterialProperty< Real > & _L
 
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 _mu
 
const Real _kappa
 

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 user-supplied m, kappa and calculates remaining parameters using Eq. (36a) - (36c) from the paper. The interface width is allowed to vary in this material. By maintaining kappa constant and equal for all interfaces, the Allen-Cahn equation is fully variational, as described in Moelans, Acta Mat., 59, 1077-1086, 2011.

Definition at line 26 of file GBWidthAnisotropy.h.

Constructor & Destructor Documentation

GBWidthAnisotropy::GBWidthAnisotropy ( const InputParameters &  parameters)

Definition at line 21 of file GBWidthAnisotropy.C.

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
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
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
const Real GBWidthAnisotropy::_kappa
private

Definition at line 33 of file GBWidthAnisotropy.h.

Referenced by GBWidthAnisotropy().

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().

const Real GBWidthAnisotropy::_mu
private

Definition at line 32 of file GBWidthAnisotropy.h.

Referenced by GBWidthAnisotropy().

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::GBAnisotropy(), and GBWidthAnisotropy().

std::vector<const VariableValue *> GBAnisotropyBase::_vals
protectedinherited

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