19 params.addClassDescription(
"KKS model kernel for the Bulk Cahn-Hilliard term. This operates on "
20 "the concentration 'c' as the non-linear variable");
21 params.addRequiredParam<MaterialPropertyName>(
"fa_name",
22 "Base name of the free energy function "
23 "F (f_name in the corresponding "
24 "derivative function material)");
25 params.addRequiredParam<MaterialPropertyName>(
"fb_name",
26 "Base name of the free energy function "
27 "F (f_name in the corresponding "
28 "derivative function material)");
29 params.addRequiredCoupledVar(
30 "ca",
"phase concentration corresponding to the non-linear variable of this kernel");
31 params.addRequiredCoupledVar(
32 "cb",
"phase concentration corresponding to the non-linear variable of this kernel");
33 params.addCoupledVar(
"args_a",
"Vector of additional arguments to Fa");
34 params.addParam<MaterialPropertyName>(
35 "h_name",
"h",
"Base name for the switching function h(eta)");
41 :
CHBulk<Real>(parameters),
43 _nvar(_coupled_moose_vars.size()),
44 _ca_var(coupled(
"ca")),
45 _ca_name(getVar(
"ca", 0)->
name()),
46 _cb_var(coupled(
"cb")),
47 _cb_name(getVar(
"cb", 0)->
name()),
48 _prop_h(getMaterialProperty<Real>(
"h_name")),
49 _second_derivative_Fa(getMaterialPropertyDerivative<Real>(
"fa_name", _ca_name, _ca_name)),
50 _second_derivative_Fb(getMaterialPropertyDerivative<Real>(
"fb_name", _cb_name, _cb_name))
59 for (
unsigned int i = 0; i <
_nvar; ++i)
61 MooseVariable * cvar = _coupled_standard_moose_vars[i];
65 &getMaterialPropertyDerivative<Real>(
"fa_name",
_ca_name, cvar->name());
69 for (
unsigned int j = 0; j <
_nvar; ++j)
71 "fa_name",
_ca_name, cvar->name(), _coupled_moose_vars[j]->name());
75 &getMaterialPropertyDerivative<Real>(
"fa_name",
_ca_name, cvar->name(),
_ca_name);
97 for (
unsigned int i = 0; i <
_nvar; ++i)
113 for (
unsigned int i = 0; i <
_nvar; ++i)
120 mooseError(
"Invalid type passed in");
127 const unsigned int cvar = mapJvarToCvar(jvar);
131 for (
unsigned int i = 0; i <
_nvar; ++i)
135 return res * _grad_test[_i][_qp];