18 params.addClassDescription(
"Multi-phase SLKKS model kernel for the bulk Allen-Cahn. " 19 "This includes all terms dependent on chemical potential.");
20 params.addRequiredParam<MaterialPropertyName>(
21 "F",
"Phase free energy function that is a function of 'c'");
22 params.addRequiredCoupledVar(
"c",
"Concentration variable F depends on");
23 params.addCoupledVar(
"eta_i",
24 "Order parameter that derivatives are taken with respect to (kernel " 25 "variable is used if this is not specified)");
26 params.addParam<MaterialPropertyName>(
"mob_name",
"L",
"The mobility used with the kernel");
32 _c_name(coupledName(
"c", 0)),
33 _lagrange(isCoupled(
"eta_i")),
34 _etai_name(_lagrange ? coupledName(
"eta_i", 0) : _var.
name()),
35 _etai_var(_lagrange ? coupled(
"eta_i") : _var.number()),
37 _prop_dFdc(getMaterialPropertyDerivative<
Real>(
"F", _c_name)),
43 _mob(getMaterialProperty<
Real>(
"mob_name"))
46 for (std::size_t i = 0; i <
_ncs; ++i)
49 if (coupled(
"cs", i) ==
_c_var)
55 paramError(
"cs",
"One of the listed variables must be the 'c' variable");
58 for (std::size_t i = 0; i <
_neta; ++i)
65 "Either eta_i or the kernel variable must be one of the listed 'eta' variables");
68 for (std::size_t i = 0; i <
_ncs; ++i)
75 for (std::size_t i = 0; i <
_nh; ++i)
80 for (std::size_t
j = 0;
j <
_neta; ++
j)
91 for (std::size_t i = 0; i <
_nh; ++i)
95 for (
unsigned int j = 0;
j <
_ns[i]; ++
j)
116 for (std::size_t i = 0; i <
_nh; ++i)
120 for (
unsigned int j = 0;
j <
_ns[i]; ++
j)
135 auto csvar = mapJvarToCvar(jvar,
_cs_map);
144 for (std::size_t i = 0; i <
_nh; ++i)
148 for (
unsigned int j = 0;
j <
_ns[i]; ++
j)
159 _a_cs[
_l_cs] * _phi[_j][_qp] * _test[_i][_qp];
163 _a_cs[csvar] * _phi[_j][_qp] * _test[_i][_qp];
167 auto etavar = mapJvarToCvar(jvar,
_eta_map);
173 for (std::size_t i = 0; i <
_nh; ++i)
177 for (
unsigned int j = 0;
j <
_ns[i]; ++
j)
const std::size_t _neta
Order parameters for each phase .
const MaterialProperty< Real > & _mob
Mobility.
int _l_cs
Position of the c variable in the cs list.
int _l_etai
Position of the eta_i variable in the eta list.
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const VariableName _c_name
name of the coupled concentration variable c
const std::size_t _ncs
Sublattice concentrations.
const unsigned int _c_var
virtual Real precomputeQpJacobian()
std::vector< const MaterialProperty< Real > * > _prop_dhdni
first derivatives of all h w.r.t. to etai
static InputParameters validParams()
virtual Real precomputeQpResidual()
std::vector< VariableName > _eta_names
std::vector< const VariableValue * > _cs
VariableName _etai_name
name of order parameter that derivatives are taken w.r.t.
unsigned int _etai_var
index of order parameter that derivatives are taken w.r.t.
SLKKSMultiPhaseBase child class for the phase concentration term in the the Allen-Cahn bulk residual...
std::vector< Real > _a_cs
Sublattice site numbers.
std::vector< VariableName > _cs_names
names of all sublattice concentrations
registerMooseObject("PhaseFieldApp", SLKKSMultiACBulkC)
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hdnidn
first derivatives of all h w.r.t. to the kernel variable and other etas
std::vector< const MaterialProperty< Real > * > _prop_d2Fdcdcs
Second derivatives of F w.r.t. c and all cs.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< unsigned int > _phase
phase index of each cs entry
Enforce sum of phase sublattice concentrations to be the real concentration.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< MaterialPropertyName > _h_names
Switching function names.
static InputParameters validParams()
std::vector< unsigned int > _ns
Number of sublattices per phase.
const bool _lagrange
is eta_i supplied (then we assume the kernel operates on the Lagrange var)
static const std::string k
const MaterialProperty< Real > & _prop_dFdc
Derivative of the free energy function w.r.t. c.
SLKKSMultiACBulkC(const InputParameters ¶meters)