18 InputParameters params = validParams<Material>();
19 params.addClassDescription(
"Double well phase transformation barrier free energy contribution.");
20 params.addParam<std::string>(
"function_name",
"g",
"actual name for g(eta_i)");
21 MooseEnum h_order(
"SIMPLE=0",
"SIMPLE");
22 params.addParam<MooseEnum>(
23 "g_order", h_order,
"Polynomial order of the switching function h(eta)");
24 params.addParam<
bool>(
"well_only",
26 "Make the g zero in [0:1] so it only contributes to "
27 "enforcing the eta range and not to the phase "
28 "transformation barrier.");
29 params.addRequiredCoupledVar(
"etas",
"eta_i order parameters, one for each h");
34 : DerivativeMaterialInterface<Material>(parameters),
35 _function_name(getParam<std::string>(
"function_name")),
36 _g_order(getParam<MooseEnum>(
"g_order")),
37 _well_only(getParam<bool>(
"well_only")),
38 _num_eta(coupledComponents(
"etas")),
40 _prop_g(declareProperty<Real>(_function_name)),
45 for (
unsigned int i = 0; i <
_num_eta; ++i)
47 const VariableName & eta_name = getVar(
"etas", i)->name();
50 _eta[i] = &coupledValue(
"etas", i);
59 for (
unsigned int i = 0; i <
_num_eta; ++i)
61 const Real n = (*
_eta[i])[_qp];
73 g += n * n * (1.0 - n) * (1.0 - n);
74 (*
_prop_dg[i])[_qp] = 2.0 * n * (n - 1.0) * (2.0 * n - 1.0);
75 (*
_prop_d2g[i])[_qp] = 12.0 * (n * n - n) + 2.0;