18 params.
addClassDescription(
"Multi-phase KKS model kernel (part 2 of 2) for the Bulk Allen-Cahn. " 19 "This includes all terms dependent on chemical potential.");
24 "Phase concentrations. They must have the same order as Fj_names and global_cs, for " 25 "example, c1, c2, b1, b2.");
31 _c_names(coupledNames(
"global_cs")),
32 _c_map(getParameterJvarMap(
"global_cs")),
33 _num_c(coupledComponents(
"global_cs")),
34 _eta_names(coupledNames(
"all_etas")),
35 _eta_map(getParameterJvarMap(
"all_etas")),
37 _ci_names(getParam<
std::vector<MaterialPropertyName>>(
"ci_names")),
38 _ci_name_matrix(_num_c),
42 _prop_d2hjdetaidetap(_num_j),
47 for (
unsigned int i = 0; i <
_num_j; ++i)
53 if (coupled(
"all_etas", i) == _var.number())
58 for (
unsigned int m = 0; m <
_num_c; ++m)
107 _d2F1dc1db1[m][n] = &getMaterialPropertyDerivative<Real>(
138 sum += (*
_dF1dc1[m])[_qp] * sum1;
166 sum += sum1 * sum2 + (*
_dF1dc1[m])[_qp] * sum3;
169 return -sum * _phi[_j][_qp];
184 auto compvar = mapJvarToCvar(jvar,
_c_map);
202 sum += sum1 * sum2 + (*
_dF1dc1[m])[_qp] * sum3;
205 res += -
_L[_qp] * sum * _phi[_j][_qp] * _test[_i][_qp];
211 auto etavar = mapJvarToCvar(jvar,
_eta_map);
231 sum += sum1 * sum2 + (*
_dF1dc1[m])[_qp] * sum3;
234 res += -
_L[_qp] * sum * _phi[_j][_qp] * _test[_i][_qp];
238 const unsigned int cvar = mapJvarToCvar(jvar);
239 for (
unsigned int m = 0; m <
_num_c; ++m)
246 res += -
_L[_qp] * sum1 * _phi[_j][_qp] * _test[_i][_qp];
std::vector< MaterialPropertyName > _ci_names
Phase concentrations.
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1darg
Mixed partial derivatives of the free energy function wrt c and any other coupled variables ...
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_ci
const MaterialProperty< Real > & _L
Mobility.
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidb
Derivative of phase concentrations wrt global concentrations .
ACBulk child class that sets up necessary variables and materials for calculation of residual contrib...
void mooseError(Args &&... args)
static InputParameters validParams()
std::vector< MaterialPropertyName > _Fj_names
Names of free energy functions for each phase .
KKSACBulkBase child class for the phase concentration term in the the Allen-Cahn bulk residual...
std::vector< const MaterialProperty< Real > * > _dF1dc1
Derivative of the free energy function .
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidetaj
Derivative of phase concentrations wrt etaj .
std::vector< MaterialPropertyName > _hj_names
switching function names
virtual Real computeDFDOP(PFFunctionType type)
static InputParameters validParams()
std::vector< VariableName > _c_names
Global concentrations.
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidetap
Second derivative of switching function .
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
int _k
Position of the nonlinear variable in the list of cj's.
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
IntRange< T > make_range(T beg, T end)
unsigned int _num_c
Number of global concentrations.
std::vector< VariableName > _eta_names
Phase parameters.
std::vector< std::vector< MaterialPropertyName > > _ci_name_matrix
unsigned int _etai_var
index of order parameter that derivatives are taken wrt
registerMooseObject("PhaseFieldApp", NestedKKSMultiACBulkC)
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1db1
Second derivative of the free energy function .
NestedKKSMultiACBulkC(const InputParameters ¶meters)