Go to the documentation of this file.
18 InputParameters params = validParams<AuxKernel>();
19 params.addClassDescription(
20 "Calculates the advection velocity of grain due to rigid body translation and rotation");
21 params.addParam<Real>(
22 "translation_constant", 1.0,
"constant value characterizing grain translation");
23 params.addParam<Real>(
"rotation_constant", 1.0,
"constant value characterizing grain rotation");
24 params.addParam<UserObjectName>(
"grain_tracker_object",
25 "userobject for getting volume and center of mass of grains");
26 params.addParam<VectorPostprocessorName>(
"grain_volumes",
27 "The feature volume VectorPostprocessorValue.");
28 params.addParam<UserObjectName>(
"grain_force",
29 "userobject for getting force and torque acting on grains");
31 params.addParam<MooseEnum>(
"component",
component,
"The gradient component to compute");
36 : AuxKernel(parameters),
38 _grain_volumes(getVectorPostprocessorValue(
"grain_volumes",
"feature_volumes")),
40 _grain_forces(_grain_force_torque.getForceValues()),
41 _grain_torques(_grain_force_torque.getTorqueValues()),
42 _mt(getParam<Real>(
"translation_constant")),
43 _mr(getParam<Real>(
"rotation_constant")),
44 _component(getParam<MooseEnum>(
"component"))
47 mooseError(
"Advection velocity can be assigned to elemental variables only.");
58 mooseAssert(grain_id <
_grain_volumes.size(),
"grain index is out of bounds");
64 _mr / volume * (
_grain_torques[grain_id].cross(_current_elem->centroid() - centroid));
const std::vector< RealGradient > & _grain_forces
This class defines the interface for the GrainTracking objects.
VectorValue< Real > RealGradient
InputParameters validParams< GrainAdvectionAux >()
const Real _mt
constant value corresponding to grain translation
const VectorPostprocessorValue & _grain_volumes
The grain volumes.
virtual void precalculateValue()
calculate the advection velocity
Calculates the advection velocity of grain due to rigid body motion Reports the components of the vel...
const GrainTrackerInterface & _grain_tracker
getting userobject for calculating grain centers and volumes
RealGradient _velocity_advection
virtual Real getEntityValue(dof_id_type entity_id, FeatureFloodCount::FieldType, std::size_t var_index=0) const =0
Accessor for retrieving either nodal or elemental information (unique grains or variable indicies)
registerMooseObject("PhaseFieldApp", GrainAdvectionAux)
virtual Real computeValue()
output the component of advection velocity
const Real _mr
constant value corresponding to grain rotation
virtual Point getGrainCentroid(unsigned int grain_id) const =0
Returns the centroid for the given grain number.
GrainAdvectionAux(const InputParameters ¶meters)
const std::vector< RealGradient > & _grain_torques
This class provides interface for extracting the forces and torques computed in other UserObjects.