19 "fi_names",
"List of free energies for the n phases");
20 params.
addParam<std::vector<MaterialPropertyName>>(
21 "hi_names",
"Switching Function Materials that provide h(eta_i)");
24 params.
addCoupledVar(
"coupled_variables",
"Vector of variable arguments of the fi free energies");
26 "Vector of displacement gradient variables (see "
27 "Modules/PhaseField/DisplacementGradients "
31 params.
addParam<MaterialPropertyName>(
32 "g",
"g",
"Barrier Function Material that provides g(eta_i)");
33 params.
addParam<Real>(
"W", 0.0,
"Energy barrier for the phase transformation from A to B");
40 _eta_index(_nargs, -1),
41 _num_etas(coupledComponents(
"etas")),
42 _eta_names(_num_etas),
44 _fi_names(getParam<
std::vector<MaterialPropertyName>>(
"fi_names")),
45 _num_fi(_fi_names.size()),
50 _hi_names(getParam<
std::vector<MaterialPropertyName>>(
"hi_names")),
51 _num_hi(_hi_names.size()),
53 _g(getMaterialProperty<Real>(
"g")),
57 _W(getParam<Real>(
"W"))
61 mooseError(
"Need to pass in as many hi_names as fi_names in DerivativeMultiPhaseBase ",
name());
64 for (
unsigned int i = 0; i <
_num_etas; ++i)
74 _dg[i] = &getMaterialPropertyDerivative<Real>(
"g",
_eta_names[i]);
79 for (
unsigned int j = 0; j <
_num_etas; ++j)
86 for (
unsigned int k = 0; k <
_num_etas; ++k)
87 _d3g[i][j][k] = &getMaterialPropertyDerivative<Real>(
94 for (
unsigned int n = 0; n <
_num_fi; ++n)
103 _hi[n] = &getMaterialPropertyByName<Real>(
_hi_names[n]);
105 for (
unsigned int i = 0; i <
_nargs; ++i)
113 for (
unsigned int j = 0; j <
_nargs; ++j)
122 for (
unsigned int k = 0; k <
_nargs; ++k)
123 _prop_d3Fi[n][i][j][k] = &getMaterialPropertyDerivative<Real>(
134 for (
unsigned int n = 0; n <
_num_fi; ++n)
142 for (
unsigned n = 0; n <
_num_fi; ++n)
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
static InputParameters validParams()
std::vector< unsigned int > _eta_vars
unsigned int _num_etas
name of the order parameter variable
std::vector< int > _eta_index
If the variable a non-conserved OP this array holds the index into the etas parameter vector for a gi...
Real _W
Phase transformation energy barrier.
std::vector< MaterialPropertyName > _fi_names
phase derivative material names
DerivativeMultiPhaseBase(const InputParameters ¶meters)
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _d3g
const MaterialProperty< Real > & _g
Barrier function .
static InputParameters validParams()
std::vector< MaterialPropertyName > _hi_names
phase switching function names
std::vector< VariableName > _eta_names
virtual void initialSetup()
std::vector< std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > > _prop_d3Fi
Third derivatives of Fi.
std::vector< const MaterialProperty< Real > * > _prop_Fi
Function value of the i phase.
std::vector< const MaterialProperty< Real > * > _dg
Barrier function derivatives.
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFi
Derivatives of Fi w.r.t. arg[i].
std::vector< const MaterialProperty< Real > * > _hi
Switching functions.
std::vector< std::vector< const MaterialProperty< Real > * > > _d2g
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _prop_d2Fi
Second derivatives of Fi.
std::vector< std::string > _arg_names
unsigned int argIndex(unsigned int i_var) const
const std::string & name() const
void mooseError(Args &&... args) const