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 29 of file GBWidthAnisotropy.h.

Constructor & Destructor Documentation

◆ GBWidthAnisotropy()

GBWidthAnisotropy::GBWidthAnisotropy ( const InputParameters &  parameters)

Definition at line 25 of file GBWidthAnisotropy.C.

26  : GBAnisotropyBase(parameters), _mu(getParam<Real>("mu")), _kappa(getParam<Real>("kappa"))
27 {
28  _mu_qp = _mu;
29  Real g2 = 0.0;
30  Real f_interf = 0.0;
31  Real a = 0.0;
32  Real gamma = 0.0;
33  Real y = 0.0; // 1/gamma
34  Real yyy = 0.0;
35 
36  for (unsigned int m = 0; m < _op_num - 1; ++m)
37  for (unsigned int n = m + 1; n < _op_num; ++n)
38  {
39  // Convert units of mobility and energy
40  _sigma[m][n] *= _JtoeV * (_length_scale * _length_scale); // eV/nm^2
41 
43  _length_scale)); // Convert to nm^4/(eV*ns);
44  }
45 
46  for (unsigned int m = 0; m < _op_num - 1; ++m)
47  for (unsigned int n = m + 1; n < _op_num; ++n) // m<n
48  {
49  g2 = _sigma[m][n] * _sigma[m][n] / (_kappa * _mu_qp);
50  y = -5.288 * g2 * g2 * g2 * g2 - 0.09364 * g2 * g2 * g2 + 9.965 * g2 * g2 - 8.183 * g2 +
51  2.007;
52  gamma = 1 / y;
53  yyy = y * y * y;
54  f_interf = 0.05676 * yyy * yyy - 0.2924 * yyy * y * y + 0.6367 * yyy * y - 0.7749 * yyy +
55  0.6107 * y * y - 0.4324 * y + 0.2792;
56  a = std::sqrt(f_interf / g2);
57 
58  _kappa_gamma[m][n] = _kappa; // upper triangle stores the discrete set of kappa values
59  _kappa_gamma[n][m] = gamma; // lower triangle stores the discrete set of gamma values
60 
61  _a_g2[m][n] = a; // upper triangle stores "a" data.
62  _a_g2[n][m] = g2; // lower triangle stores "g2" data.
63  }
64 }
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

◆ computeQpProperties()

void GBAnisotropyBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 118 of file GBAnisotropyBase.C.

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

◆ _a_g2

std::vector<std::vector<Real> > GBAnisotropyBase::_a_g2
protectedinherited

◆ _act_wGB

MaterialProperty<Real>& GBAnisotropyBase::_act_wGB
protectedinherited

Definition at line 61 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _Anisotropic_GB_file_name

const FileName GBAnisotropyBase::_Anisotropic_GB_file_name
protectedinherited

Definition at line 42 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::GBAnisotropyBase().

◆ _delta_mob

const Real GBAnisotropyBase::_delta_mob
protectedinherited

Definition at line 40 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _delta_sigma

const Real GBAnisotropyBase::_delta_sigma
protectedinherited

Definition at line 39 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _entropy_diff

MaterialProperty<Real>& GBAnisotropyBase::_entropy_diff
protectedinherited

Definition at line 60 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _gamma

MaterialProperty<Real>& GBAnisotropyBase::_gamma
protectedinherited

Definition at line 55 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _grad_vals

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

◆ _inclination_anisotropy

const bool GBAnisotropyBase::_inclination_anisotropy
protectedinherited

Definition at line 44 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _JtoeV

const Real GBAnisotropyBase::_JtoeV
protectedinherited

◆ _kappa

const Real GBWidthAnisotropy::_kappa
private

Definition at line 36 of file GBWidthAnisotropy.h.

Referenced by GBWidthAnisotropy().

◆ _kappa_gamma

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

◆ _kb

const Real GBAnisotropyBase::_kb
protectedinherited

Definition at line 63 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _L

MaterialProperty<Real>& GBAnisotropyBase::_L
protectedinherited

Definition at line 56 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _length_scale

const Real GBAnisotropyBase::_length_scale
protectedinherited

◆ _M_V

const Real GBAnisotropyBase::_M_V
protectedinherited

Definition at line 38 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _mesh_dimension

const unsigned int GBAnisotropyBase::_mesh_dimension
protectedinherited

Definition at line 34 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _mob

std::vector<std::vector<Real> > GBAnisotropyBase::_mob
protectedinherited

◆ _molar_volume

MaterialProperty<Real>& GBAnisotropyBase::_molar_volume
protectedinherited

Definition at line 59 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _mu

const Real GBWidthAnisotropy::_mu
private

Definition at line 35 of file GBWidthAnisotropy.h.

Referenced by GBWidthAnisotropy().

◆ _mu_qp

Real GBAnisotropyBase::_mu_qp
protectedinherited

◆ _op_num

const unsigned int GBAnisotropyBase::_op_num
protectedinherited

◆ _Q

std::vector<std::vector<Real> > GBAnisotropyBase::_Q
protectedinherited

◆ _sigma

std::vector<std::vector<Real> > GBAnisotropyBase::_sigma
protectedinherited

◆ _T

const VariableValue& GBAnisotropyBase::_T
protectedinherited

Definition at line 46 of file GBAnisotropyBase.h.

Referenced by GBAnisotropyBase::computeQpProperties().

◆ _time_scale

const Real GBAnisotropyBase::_time_scale
protectedinherited

Definition at line 37 of file GBAnisotropyBase.h.

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

◆ _vals

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

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