18 params.
addParam<std::string>(
"function_name",
"g",
"actual name for g(eta_i)");
21 "Free Energy contribution that penalizes more than two order parameters being non-zero");
27 _function_name(getParam<
std::string>(
"function_name")),
28 _num_eta(coupledComponents(
"etas")),
29 _eta(coupledValues(
"etas")),
30 _prop_g(declareProperty<Real>(_function_name)),
34 const auto eta_name = coupledNames(
"etas");
36 for (
unsigned int i = 0; i <
_num_eta; ++i)
39 for (
unsigned int i = 0; i <
_num_eta; ++i)
42 for (
unsigned int j = i; j <
_num_eta; ++j)
45 &declarePropertyDerivative<Real>(
_function_name, eta_name[i], eta_name[j]);
55 for (
unsigned int i = 0; i <
_num_eta; ++i)
58 for (
unsigned int j = i; j <
_num_eta; ++j)
63 for (
unsigned int i = 0; i <
_num_eta; ++i)
64 for (
unsigned int j = 0; j < i; ++j)
65 for (
unsigned int k = 0; k < j; ++k)
67 const Real ni = (*
_eta[i])[_qp];
68 const Real nj = (*
_eta[j])[_qp];
69 const Real nk = (*
_eta[k])[_qp];
71 _prop_g[_qp] += ni * ni * nj * nj * nk * nk;
72 (*
_prop_dg[i])[_qp] += 2 * ni * nj * nj * nk * nk;
73 (*
_prop_dg[j])[_qp] += 2 * ni * ni * nj * nk * nk;
74 (*
_prop_dg[k])[_qp] += 2 * ni * ni * nj * nj * nk;
75 (*
_prop_d2g[i][i])[_qp] += 2 * nj * nj * nk * nk;
76 (*
_prop_d2g[j][j])[_qp] += 2 * ni * ni * nk * nk;
77 (*
_prop_d2g[k][k])[_qp] += 2 * ni * ni * nj * nj;
78 (*
_prop_d2g[i][j])[_qp] += 4 * ni * nj * nk * nk;
79 (*
_prop_d2g[i][k])[_qp] += 4 * ni * nj * nj * nk;
80 (*
_prop_d2g[k][j])[_qp] += 4 * ni * ni * nj * nk;
registerMooseObject("PhaseFieldApp", ThirdPhaseSuppressionMaterial)
static InputParameters validParams()
OPInterfaceBarrierMaterial is a Free Energy Penalty contribution material that acts on all of the eta...
const std::vector< const VariableValue * > _eta
const unsigned int _num_eta
order parameters
virtual void computeQpProperties()
std::vector< MaterialProperty< Real > * > _prop_dg
static InputParameters validParams()
ThirdPhaseSuppressionMaterial(const InputParameters ¶meters)
MaterialProperty< Real > & _prop_g
Barrier functions and their drivatives.
std::string _function_name
name of the function of eta (used to generate the material property names)
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
Material properties to store the second derivatives.