19 "Calculation the advection velocity of grain due to rigid body translation and rotation");
21 "etas",
"var_name_base",
"op_num",
"Array of other coupled order parameters");
24 "translation_constant", 500,
"constant value characterizing grain translation");
25 params.
addParam<Real>(
"rotation_constant", 1.0,
"constant value characterizing grain rotation");
26 params.
addParam<std::string>(
"base_name",
27 "Optional parameter that allows the user to define "
28 "type of force density under consideration");
29 params.
addParam<UserObjectName>(
"grain_data",
30 "UserObject for getting the center of mass of grains");
31 params.
addParam<UserObjectName>(
"grain_force",
32 "userobject for getting force and torque acting on grains");
33 params.
addParam<VectorPostprocessorName>(
"grain_volumes",
34 "The feature volume VectorPostprocessorValue.");
42 _grain_volumes(getVectorPostprocessorValue(
"grain_volumes",
"feature_volumes")),
43 _grain_forces(_grain_force_torque.getForceValues()),
44 _grain_torques(_grain_force_torque.getTorqueValues()),
45 _mt(getParam<Real>(
"translation_constant")),
46 _mr(getParam<Real>(
"rotation_constant")),
47 _op_num(coupledComponents(
"etas")),
48 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
50 declareProperty<
std::vector<RealGradient>>(_base_name +
"advection_velocity"))
52 mooseDeprecated(
"Use GrainAdvectionAux for visualizing advection velocities.");
65 mooseAssert(i <
_grain_volumes.size(),
"grain index is out of bounds");
69 for (
unsigned int j = 0; j <
_op_num; ++j)
70 if (i == op_to_grains[j])
73 const RealGradient velocity_rotation =
74 _mr / volume * (
_grain_torques[i].cross(_current_elem->vertex_average() - centroid));
registerMooseObject("PhaseFieldApp", GrainAdvectionVelocity)
void mooseDeprecated(Args &&... args)
This Material calculates the advection velocity, it's divergence and derivatives acting on a particle...
static InputParameters validParams()
const GrainTrackerInterface & _grain_tracker
getting userobject for calculating grain centers and volumes
GrainAdvectionVelocity(const InputParameters ¶meters)
const std::vector< RealGradient > & _grain_forces
const VectorPostprocessorValue & _grain_volumes
The grain volumes.
const Real _mr
constant value corresponding to grain rotation
MaterialProperty< std::vector< RealGradient > > & _velocity_advection
Material storing advection velocities of grains.
const unsigned int _op_num
const Real _mt
constant value corresponding to grain translation
virtual void computeQpProperties()
const std::vector< RealGradient > & _grain_torques
This class provides interface for extracting the forces and torques computed in other UserObjects.
This class defines the interface for the GrainTracking objects.
virtual std::size_t getTotalFeatureCount() const =0
Returns a number large enough to contain the largest ID for all grains in use.
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.
virtual Point getGrainCentroid(unsigned int grain_id) const =0
Returns the centroid for the given grain number.
virtual void resize(const std::size_t size) override final
static InputParameters validParams()