18 params.
addClassDescription(
"Two phase material that combines n phase materials using a switching "
19 "function with and n non-conserved order parameters (to be used with "
20 "SwitchingFunctionConstraint*).");
21 params.
addCoupledVar(
"etas",
"Order parameters for all phases.");
30 paramError(
"hi_names",
"The number of hi_names must be equal to the number of coupled etas");
32 for (
unsigned int i = 0; i <
_num_etas; ++i)
38 _d3hi[i] = &getMaterialPropertyDerivative<Real>(
46 const unsigned int i =
argIndex(i_var);
54 for (
unsigned n = 0; n <
_num_fi; ++n)
63 const unsigned int i =
argIndex(i_var);
65 const unsigned int j =
argIndex(j_var);
70 if (i_eta >= 0 && j_eta >= 0)
77 return d2F +
_W * (*
_d2g[i_eta][j_eta])[
_qp];
91 for (
unsigned n = 0; n <
_num_fi; ++n)
99 const unsigned int i =
argIndex(i_var);
101 const unsigned int j =
argIndex(j_var);
103 const unsigned int k =
argIndex(k_var);
108 if (i_eta >= 0 && j_eta >= 0 && k_eta >= 0)
116 return d3F +
_W * (*
_d3g[i_eta][j_eta][k_eta])[
_qp];
121 if (i_eta >= 0 && j_eta >= 0)
124 if (j_eta >= 0 && k_eta >= 0)
127 if (k_eta >= 0 && i_eta >= 0)
144 for (
unsigned n = 0; n <
_num_fi; ++n)
registerMooseObject("PhaseFieldApp", DerivativeMultiPhaseMaterial)
DerivativeMaterial child class to evaluate a parsed function for the free energy and automatically pr...
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< std::vector< std::vector< const MaterialProperty< Real > * > > > _d3g
static InputParameters validParams()
std::vector< MaterialPropertyName > _hi_names
phase switching function names
std::vector< VariableName > _eta_names
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.
Multi phase free energy material that combines an arbitrary number of phase free energies to a global...
virtual Real computeD2F(unsigned int i_var, unsigned int j_var)
virtual Real computeD3F(unsigned int i_var, unsigned int j_var, unsigned int k_var)
std::vector< const MaterialProperty< Real > * > _d2hi
std::vector< const MaterialProperty< Real > * > _d3hi
DerivativeMultiPhaseMaterial(const InputParameters ¶meters)
std::vector< const MaterialProperty< Real > * > _dhi
Function value of the i phase.
virtual Real computeDF(unsigned int i_var)
static InputParameters validParams()
unsigned int argIndex(unsigned int i_var) const
void paramError(const std::string ¶m, Args... args) const