18 InputParameters params = validParams<Material>();
19 params.addClassDescription(
20 "Calculation the advection velocity of grain due to rigid body translation and rotation");
21 params.addRequiredCoupledVarWithAutoBuild(
22 "etas",
"var_name_base",
"op_num",
"Array of other coupled order parameters");
23 params.addCoupledVar(
"c",
"Concentration field");
24 params.addParam<Real>(
25 "translation_constant", 500,
"constant value characterizing grain translation");
26 params.addParam<Real>(
"rotation_constant", 1.0,
"constant value characterizing grain rotation");
27 params.addParam<std::string>(
"base_name",
28 "Optional parameter that allows the user to define "
29 "type of force density under consideration");
30 params.addParam<UserObjectName>(
"grain_data",
31 "UserObject for getting the center of mass of grains");
32 params.addParam<UserObjectName>(
"grain_force",
33 "userobject for getting force and torque acting on grains");
34 params.addParam<VectorPostprocessorName>(
"grain_volumes",
35 "The feature volume VectorPostprocessorValue.");
40 : DerivativeMaterialInterface<Material>(parameters),
43 _grain_volumes(getVectorPostprocessorValue(
"grain_volumes",
"feature_volumes")),
44 _grain_forces(_grain_force_torque.getForceValues()),
45 _grain_torques(_grain_force_torque.getTorqueValues()),
46 _mt(getParam<Real>(
"translation_constant")),
47 _mr(getParam<Real>(
"rotation_constant")),
48 _op_num(coupledComponents(
"etas")),
49 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
51 declareProperty<std::vector<
RealGradient>>(_base_name +
"advection_velocity"))
53 mooseDeprecated(
"Use GrainAdvectionAux for visualizing advection velocities.");
66 mooseAssert(i <
_grain_volumes.size(),
"grain index is out of bounds");
70 for (
unsigned int j = 0; j <
_op_num; ++j)
71 if (i == op_to_grains[j])