21 params.
addParam<Real>(
"length_scale", 1.0e-9,
"Length scale in m, where default is nm");
22 params.
addParam<Real>(
"time_scale", 1.0e-9,
"Time scale in s, where default is ns");
23 params.
addParam<Real>(
"molar_volume_value",
25 "molar volume of material in m^3/mol, by default it's the value of copper");
27 "delta_sigma", 0.1,
"factor determining inclination dependence of GB energy");
29 "delta_mob", 0.1,
"factor determining inclination dependence of GB mobility");
31 "Name of the file containing: 1)GB mobility prefactor; 2) GB "
32 "migration activation energy; 3)GB energy");
34 "The GB anisotropy inclination would be considered if true");
36 "v",
"var_name_base",
"op_num",
"Array of coupled variables");
42 _mesh_dimension(_mesh.dimension()),
43 _length_scale(getParam<Real>(
"length_scale")),
44 _time_scale(getParam<Real>(
"time_scale")),
45 _M_V(getParam<Real>(
"molar_volume_value")),
46 _delta_sigma(getParam<Real>(
"delta_sigma")),
47 _delta_mob(getParam<Real>(
"delta_mob")),
48 _Anisotropic_GB_file_name(getParam<FileName>(
"Anisotropic_GB_file_name")),
49 _inclination_anisotropy(getParam<bool>(
"inclination_anisotropy")),
51 _T(coupledValue(
"T")),
52 _kappa(declareProperty<Real>(
"kappa_op")),
53 _gamma(declareProperty<Real>(
"gamma_asymm")),
54 _L(declareProperty<Real>(
"L")),
55 _mu(declareProperty<Real>(
"mu")),
56 _molar_volume(declareProperty<Real>(
"molar_volume")),
57 _entropy_diff(declareProperty<Real>(
"entropy_diff")),
58 _act_wGB(declareProperty<Real>(
"act_wGB")),
60 _JtoeV(6.24150974e18),
62 _op_num(coupledComponents(
"v")),
63 _vals(coupledValues(
"v")),
64 _grad_vals(coupledGradients(
"v"))
73 for (
unsigned int op = 0; op <
_op_num; ++op)
86 paramError(
"Anisotropic_GB_file_name",
"Can't open GB anisotropy input file");
88 for (
unsigned int i = 0; i < 2; ++i)
89 inFile.ignore(255,
'\n');
92 for (
unsigned int i = 0; i < 3 *
_op_num; ++i)
94 std::vector<Real> row;
95 for (
unsigned int j = 0; j <
_op_num; ++j)
117 Real sum_kappa = 0.0;
118 Real sum_gamma = 0.0;
124 Real gamma_value = 0.0;
126 for (
unsigned int m = 0; m <
_op_num - 1; ++m)
128 for (
unsigned int n = m + 1; n <
_op_num; ++n)
135 mooseError(
"This material doesn't support inclination dependence for 3D for now!");
138 Real sin_phi = std::sin(2.0 * phi_ave);
139 Real cos_phi = std::cos(2.0 * phi_ave);
143 Real ab =
a *
a +
b *
b + 1.0e-7;
146 Real cos_2phi = cos_phi * (
a *
a -
b *
b) / ab + sin_phi * 2.0 *
a *
b / ab;
147 Real cos_4phi = 2.0 * cos_2phi * cos_2phi - 1.0;
152 Real g2 =
_a_g2[n][m] * f_sigma;
162 sum_gamma += gamma_value * Val;
171 _L[
_qp] = sum_L / sum_val;
184 mooseError(
"The grain boundary energies give g = ",
186 ", which is outside the range 0.098 <= g <= 0.766 (0.53 <= gamma <= 40) covered by "
187 "interface_fit = moelans2022.");
MaterialProperty< Real > & _act_wGB
const unsigned int _mesh_dimension
const FileName _Anisotropic_GB_file_name
void checkFitRange(Real g2) const
Error if g^2 lies outside the range covered by the selected interface fit.
virtual void computeQpProperties()
const std::vector< const VariableGradient * > _grad_vals
MaterialProperty< Real > & _gamma
std::vector< std::vector< Real > > _a_g2
MaterialProperty< Real > & _molar_volume
const MoelansInterfaceFits::Fit _interface_fit
Polynomial fits used to compute gamma and the diffuse interface width.
std::vector< std::vector< Real > > _Q
GBAnisotropyBase(const InputParameters ¶meters)
MaterialProperty< Real > & _entropy_diff
std::vector< std::vector< Real > > _sigma
MaterialProperty< Real > & _mu
const unsigned int _op_num
static InputParameters validParams()
std::vector< std::vector< Real > > _mob
const std::vector< const VariableValue * > _vals
MaterialProperty< Real > & _kappa
MaterialProperty< Real > & _L
const bool _inclination_anisotropy
std::vector< std::vector< Real > > _kappa_gamma
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
Polynomial fits for the interface relations of the multi-order-parameter model of Moelans et al....
Real inverseGamma(Real g2, Fit fit)
1/gamma as a function of g^2
InputParameters validParams()
Parameters for objects using these fits.
bool inRange(Real g2, Fit fit)
Whether g^2 lies within the range the fit was made for.