20 params.
addParam<
Real>(
"length_scale", 1.0e-9,
"Length scale in m, where default is nm");
21 params.
addParam<
Real>(
"time_scale", 1.0e-9,
"Time scale in s, where default is ns");
24 "molar volume of material in m^3/mol, by default it's the value of copper");
26 "delta_sigma", 0.1,
"factor determining inclination dependence of GB energy");
28 "delta_mob", 0.1,
"factor determining inclination dependence of GB mobility");
30 "Name of the file containing: 1)GB mobility prefactor; 2) GB " 31 "migration activation energy; 3)GB energy");
33 "The GB anisotropy inclination would be considered if true");
35 "v",
"var_name_base",
"op_num",
"Array of coupled variables");
41 _mesh_dimension(_mesh.dimension()),
42 _length_scale(getParam<
Real>(
"length_scale")),
43 _time_scale(getParam<
Real>(
"time_scale")),
44 _M_V(getParam<
Real>(
"molar_volume_value")),
45 _delta_sigma(getParam<
Real>(
"delta_sigma")),
46 _delta_mob(getParam<
Real>(
"delta_mob")),
47 _Anisotropic_GB_file_name(getParam<FileName>(
"Anisotropic_GB_file_name")),
48 _inclination_anisotropy(getParam<bool>(
"inclination_anisotropy")),
49 _T(coupledValue(
"T")),
50 _kappa(declareProperty<
Real>(
"kappa_op")),
51 _gamma(declareProperty<
Real>(
"gamma_asymm")),
52 _L(declareProperty<
Real>(
"L")),
53 _mu(declareProperty<
Real>(
"mu")),
54 _molar_volume(declareProperty<
Real>(
"molar_volume")),
55 _entropy_diff(declareProperty<
Real>(
"entropy_diff")),
56 _act_wGB(declareProperty<
Real>(
"act_wGB")),
58 _JtoeV(6.24150974e18),
60 _op_num(coupledComponents(
"v")),
61 _vals(coupledValues(
"v")),
62 _grad_vals(coupledGradients(
"v"))
71 for (
unsigned int op = 0; op <
_op_num; ++op)
84 paramError(
"Anisotropic_GB_file_name",
"Can't open GB anisotropy input file");
86 for (
unsigned int i = 0; i < 2; ++i)
87 inFile.ignore(255,
'\n');
90 for (
unsigned int i = 0; i < 3 *
_op_num; ++i)
92 std::vector<Real> row;
115 Real sum_kappa = 0.0;
116 Real sum_gamma = 0.0;
122 Real gamma_value = 0.0;
124 for (
unsigned int m = 0; m <
_op_num - 1; ++m)
126 for (
unsigned int n = m + 1; n <
_op_num; ++n)
133 mooseError(
"This material doesn't support inclination dependence for 3D for now!");
136 Real sin_phi = std::sin(2.0 * phi_ave);
137 Real cos_phi = std::cos(2.0 * phi_ave);
144 Real cos_2phi = cos_phi * (
a *
a -
b *
b) / ab + sin_phi * 2.0 *
a *
b / ab;
145 Real cos_4phi = 2.0 * cos_2phi * cos_2phi - 1.0;
151 Real y = -5.288 * g2 * g2 * g2 * g2 - 0.09364 * g2 * g2 * g2 + 9.965 * g2 * g2 -
153 gamma_value = 1.0 /
y;
161 sum_gamma += gamma_value * Val;
170 _L[
_qp] = sum_L / sum_val;
MaterialProperty< Real > & _kappa
static InputParameters validParams()
std::vector< std::vector< Real > > _Q
const unsigned int _op_num
const std::vector< const VariableValue * > _vals
const std::vector< const VariableGradient * > _grad_vals
std::vector< std::vector< Real > > _a_g2
const std::vector< double > y
MaterialProperty< Real > & _act_wGB
virtual void computeQpProperties()
std::vector< std::vector< Real > > _sigma
const FileName _Anisotropic_GB_file_name
MaterialProperty< Real > & _L
static InputParameters validParams()
MaterialProperty< Real > & _entropy_diff
const unsigned int _mesh_dimension
MaterialProperty< Real > & _molar_volume
const bool _inclination_anisotropy
void paramError(const std::string ¶m, Args... args) const
std::vector< std::vector< Real > > _kappa_gamma
std::vector< std::vector< Real > > _mob
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
MaterialProperty< Real > & _mu
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
GBAnisotropyBase(const InputParameters ¶meters)
MaterialProperty< Real > & _gamma