21 params.
addClassDescription(
"KKS model kernel to enforce the pointwise equality of phase chemical "
22 "potentials $dF_a/dc_a = dF_b/dc_b$. The non-linear variable of this "
25 "cb",
"Phase b concentration");
27 "Base name of the free energy function "
28 "Fa (f_name in the corresponding "
29 "derivative function material)");
31 "Base name of the free energy function "
32 "Fb (f_name in the corresponding "
33 "derivative function material)");
36 "Site fraction for the ca variable (specify this if ca is a sublattice "
37 "concentration, and make sure it is a true site fraction eg. 0.6666666) ");
40 "Site fraction for the cb variable (specify this if ca is a sublattice "
41 "concentration, and make sure it is a true site fraction eg. 0.6666666) ");
44 "Vector of further parameters to Fa (optional, to add in second cross derivatives of Fa)");
47 "Vector of further parameters to Fb (optional, to add in second cross derivatives of Fb)");
53 _cb_var(coupled(
"cb")),
54 _cb_name(coupledName(
"cb", 0)),
56 _dfadca(getMaterialPropertyDerivative<Real>(
"fa_name", _var.
name())),
57 _dfbdcb(getMaterialPropertyDerivative<Real>(
"fb_name", _cb_name)),
59 _d2fadca2(getMaterialPropertyDerivative<Real>(
"fa_name", _var.
name(), _var.
name())),
60 _d2fbdcbca(getMaterialPropertyDerivative<Real>(
"fb_name", _cb_name, _var.
name())),
61 _d2fadcadarg(_n_args),
62 _d2fbdcbdarg(_n_args),
64 _ka(getParam<Real>(
"ka")),
65 _kb(getParam<Real>(
"kb"))
68 _console <<
"KKSPhaseChemicalPotential(" <<
name() <<
") " << _var.
name() <<
' ' <<
_cb_name
74 for (std::size_t i = 0; i < _n_args; ++i)
76 _d2fadcadarg[i] = &getMaterialPropertyDerivative<Real>(
"fa_name", _var.name(), i);
84 validateNonlinearCoupling<Real>(
"fa_name");
85 validateNonlinearCoupling<Real>(
"fb_name");
106 const unsigned int cvar = mapJvarToCvar(jvar);
108 return _test[_i][_qp] * _phi[_j][_qp] *
registerMooseObject("PhaseFieldApp", KKSPhaseChemicalPotential)
Enforce the equality of the chemical potentials in the two phases.
const MaterialProperty< Real > & _dfadca
material properties we need to access
static InputParameters validParams()
const MaterialProperty< Real > & _dfbdcb
virtual void initialSetup()
const Real _ka
site fractions
std::vector< const MaterialProperty< Real > * > _d2fbdcbdarg
const MaterialProperty< Real > & _d2fadca2
const MaterialProperty< Real > & _d2fbdcbca
std::vector< const MaterialProperty< Real > * > _d2fadcadarg
virtual Real computeQpJacobian()
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
virtual Real computeQpResidual()
KKSPhaseChemicalPotential(const InputParameters ¶meters)
static InputParameters validParams()
const std::string & name() const