18 params.addClassDescription(
19 "Sublattice KKS model kernel to enforce the decomposition of concentration into " 20 "phase and sublattice concentrations The non-linear variable of this kernel is a sublattice " 21 "concentration of phase b.");
22 params.addRequiredCoupledVar(
"ca",
"Phase a sublattice concentrations");
23 params.addRequiredParam<std::vector<Real>>(
"aa",
"Phase a sublattice site fraction");
24 params.addRequiredCoupledVar(
25 "cb",
"Phase b sublattice concentrations (except for the kernel variable)");
26 params.addRequiredParam<std::vector<Real>>(
"ab",
"Phase b sublattice site fraction");
27 params.addRequiredParam<
Real>(
"a",
28 "Sublattice site fraction for the kernel variable (in phase b)");
29 params.addRequiredCoupledVar(
"c",
"Global concentration");
30 params.addRequiredCoupledVar(
"eta",
"Phase a/b order parameter");
31 params.addParam<MaterialPropertyName>(
32 "h_name",
"h",
"Base name for the switching function h(eta)");
39 _nca(coupledComponents(
"ca")),
41 _a_ca(getParam<
std::vector<
Real>>(
"aa")),
42 _ca_map(getParameterJvarMap(
"ca")),
43 _ncb(coupledComponents(
"cb")),
45 _a_cb(getParam<
std::vector<
Real>>(
"ab")),
46 _cb_map(getParameterJvarMap(
"cb")),
47 _a_u(getParam<
Real>(
"a")),
48 _c(coupledValue(
"c")),
50 _eta(coupledValue(
"eta")),
51 _eta_var(coupled(
"eta")),
52 _prop_h(getMaterialProperty<
Real>(
"h_name")),
53 _prop_dh(getMaterialPropertyDerivative<
Real>(
"h_name", coupledName(
"eta", 0)))
56 paramError(
"aa",
"Specify one sublattice site fraction per sublattice concentration variable");
58 paramError(
"ab",
"Specify one sublattice site fraction per sublattice concentration variable");
62 for (std::size_t i = 0; i <
_nca; ++i)
65 paramError(
"aa",
"The sum of the aa values must be greater than zero");
66 for (std::size_t i = 0; i <
_nca; ++i)
71 for (std::size_t i = 0; i <
_ncb; ++i)
74 paramError(
"ab",
"The sum of the ab values and k must be greater than zero");
75 for (std::size_t i = 0; i <
_ncb; ++i)
80 for (std::size_t i = 0; i <
_nca; ++i)
82 for (std::size_t i = 0; i <
_ncb; ++i)
126 for (std::size_t i = 0; i <
_nca; ++i)
130 for (std::size_t i = 0; i <
_ncb; ++i)
Enforce sum of phase concentrations to be the real concentration.
static InputParameters validParams()
std::vector< Real > _a_ca
unsigned int _ncb
sublattice B variables
static InputParameters validParams()
const VariableValue & _c
global concentration variable
unsigned int _nca
sublattice A variables
std::vector< const VariableValue * > _cb
Real _a_u
sublattice fraction for the sublattice B concentration represented by the kernel variable ...
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
std::vector< Real > _a_cb
const VariableTestValue & _test
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
registerMooseObject("PhaseFieldApp", SLKKSPhaseConcentration)
std::vector< const VariableValue * > _ca
Real _casum
updated by computeSums
const MaterialProperty< Real > & _prop_h
Switching function .
void paramError(const std::string ¶m, Args... args) const
unsigned int mapJvarToCvar(unsigned int jvar)
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpResidual()
SLKKSPhaseConcentration(const InputParameters ¶meters)
const VariablePhiValue & _phi
void computeSums()
update the _casum and _cbsum members
virtual Real computeQpJacobian()