Go to the documentation of this file.
21 params.addClassDescription(
"Stored Energy contribution to grain growth");
22 params.addRequiredCoupledVar(
"v",
"Array of coupled variable names");
23 params.addRequiredParam<
unsigned int>(
"deformed_grain_num",
24 "Number of OP representing deformed grains");
25 params.addRequiredParam<UserObjectName>(
"grain_tracker",
26 "The GrainTracker UserObject to get values from.");
27 params.addRequiredParam<
unsigned int>(
"op_index",
"The index for the current order parameter");
32 :
ACBulk<Real>(parameters),
33 _op_num(coupledComponents(
"v")),
36 _beta(getMaterialProperty<Real>(
"beta")),
37 _rho_eff(getMaterialProperty<Real>(
"rho_eff")),
38 _Disloc_Den_i(getMaterialProperty<Real>(
"Disloc_Den_i")),
39 _deformed_grain_num(getParam<unsigned int>(
"deformed_grain_num")),
41 _op_index(getParam<unsigned int>(
"op_index"))
44 for (
unsigned int i = 0; i <
_op_num; ++i)
46 _vals[i] = &coupledValue(
"v", i);
55 for (
unsigned int i = 0; i <
_op_num; ++i)
56 SumEtaj += (*
_vals[i])[_qp] * (*
_vals[i])[_qp];
59 Real SumEtai2 = SumEtaj + _u[_qp] * _u[_qp];
64 const auto grn_index = op_to_grain[
_op_index];
69 Real drho_eff_detai = 2.0 * _u[_qp] * (rho_i -
_rho_eff[_qp]) / SumEtai2;
76 return _beta[_qp] * drho_eff_detai;
79 return _beta[_qp] * _phi[_j][_qp] *
80 (2.0 * SumEtai2 * ((rho_i -
_rho_eff[_qp]) - _u[_qp] * drho_eff_detai) -
81 4.0 * _u[_qp] * _u[_qp] * (rho_i -
_rho_eff[_qp])) /
82 (SumEtai2 * SumEtai2);
84 mooseError(
"Invalid type passed in");
ACSEDGPoly(const InputParameters ¶meters)
unsigned int _op_index
index of the OP the kernel is currently acting on
registerMooseObject("PhaseFieldApp", ACSEDGPoly)
This class defines the interface for the GrainTracking objects.
virtual Real computeDFDOP(PFFunctionType type)
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
const MaterialProperty< Real > & _Disloc_Den_i
dislocation density in grain i
const MaterialProperty< Real > & _rho_eff
the average/effective dislocation density
const MaterialProperty< Real > & _beta
the prefactor needed to calculate the deformation energy from dislocation density
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
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.
const unsigned int _op_num
InputParameters validParams< ACSEDGPoly >()
static InputParameters validParams()
unsigned int _deformed_grain_num
number of deformed grains
std::vector< const VariableValue * > _vals
std::vector< unsigned int > _vals_var