23 "Number of OP representing deformed grains");
25 "The GrainTracker UserObject to get values from.");
26 params.
addRequiredParam<
unsigned int>(
"op_index",
"The index for the current order parameter");
31 :
ACBulk<Real>(parameters),
32 _op_num(coupledComponents(
"v")),
33 _vals(coupledValues(
"v")),
34 _vals_var(coupledIndices(
"v")),
35 _beta(getMaterialProperty<Real>(
"beta")),
36 _rho_eff(getMaterialProperty<Real>(
"rho_eff")),
37 _Disloc_Den_i(getMaterialProperty<Real>(
"Disloc_Den_i")),
38 _deformed_grain_num(getParam<unsigned
int>(
"deformed_grain_num")),
40 _op_index(getParam<unsigned
int>(
"op_index"))
48 for (
unsigned int i = 0; i <
_op_num; ++i)
49 SumEtaj += (*
_vals[i])[_qp] * (*
_vals[i])[_qp];
52 Real SumEtai2 = SumEtaj + _u[_qp] * _u[_qp];
57 const auto grn_index = op_to_grain[
_op_index];
62 Real drho_eff_detai = 2.0 * _u[_qp] * (rho_i -
_rho_eff[_qp]) / SumEtai2;
69 return _beta[_qp] * drho_eff_detai;
72 return _beta[_qp] * _phi[_j][_qp] *
73 (2.0 * SumEtai2 * ((rho_i -
_rho_eff[_qp]) - _u[_qp] * drho_eff_detai) -
74 4.0 * _u[_qp] * _u[_qp] * (rho_i -
_rho_eff[_qp])) /
75 (SumEtai2 * SumEtai2);
registerMooseObject("PhaseFieldApp", ACSEDGPoly)
void mooseError(Args &&... args)
void ErrorVector unsigned int
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
static InputParameters validParams()
unsigned int _deformed_grain_num
number of deformed grains
const MaterialProperty< Real > & _Disloc_Den_i
dislocation density in grain i
static InputParameters validParams()
virtual Real computeDFDOP(PFFunctionType type)
const unsigned int _op_num
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
const MaterialProperty< Real > & _beta
the prefactor needed to calculate the deformation energy from dislocation density
const std::vector< const VariableValue * > _vals
ACSEDGPoly(const InputParameters ¶meters)
unsigned int _op_index
index of the OP the kernel is currently acting on
const MaterialProperty< Real > & _rho_eff
the average/effective dislocation density
This class defines the interface for the GrainTracking objects.
virtual const std::vector< unsigned int > & getVarToFeatureVector(dof_id_type elem_id) const =0
Returns a list of active unique feature ids for a particular element.