23 "Provide updated euler angles after rigid body rotation of the grains.");
25 "The FeatureFloodCount UserObject to get values from.");
27 "Name of Euler angle provider user object");
29 "Name of Euler angle provider user object");
31 "The feature volume VectorPostprocessorValue.");
32 params.
addParam<
Real>(
"rotation_constant", 1.0,
"Constant value characterizing grain rotation");
41 _grain_volumes(getVectorPostprocessorValue(
"grain_volumes",
"feature_volumes")),
42 _mr(getParam<
Real>(
"rotation_constant")),
56 for (
unsigned int i = 0; i < grain_num; ++i)
60 unsigned int angle_size =
_angles.size();
61 for (
unsigned int i = angle_size; i < grain_num; ++i)
64 for (
unsigned int i = 0; i < grain_num; ++i)
91 angle_change(0) = omega(2) *
_dt;
93 (omega(0) * std::cos(angle_change(0)) + omega(1) * std::sin(angle_change(0))) *
_dt;
94 angle_change(2) = (omega(0) * std::sin(angle_change(0)) * std::sin(angle_change(1)) -
95 omega(1) * std::cos(angle_change(0)) * std::sin(angle_change(1)) +
96 omega(2) * std::cos(angle_change(1))) *
109 if (
R(2, 2) != 1.0 &&
R(2, 2) != -1.0)
115 else if (
R(2, 2) == 1.0)
122 _angles[i].phi1 = angle_change(0);
126 int laps =
_angles[i].phi1 / 360.0;
127 _angles[i].phi1 -= laps * 360.0;
137 _angles[i].phi1 = angle_change(0);
141 int laps =
_angles[i].phi1 / 360.0;
142 _angles[i].phi1 -= laps * 360.0;
170 mooseAssert(i <
getGrainNum(),
"Requesting Euler angles for an invalid grain id");
177 mooseAssert(i <
getGrainNum(),
"Requesting Euler angles for an invalid grain id");
const GrainTrackerInterface & _grain_tracker
const GrainForceAndTorqueInterface & _grain_torque
This class defines the interface for the GrainTracking objects.
virtual bool converged(const unsigned int nl_sys_num)
This class provides interface for extracting the forces and torques computed in other UserObjects...
const VectorPostprocessorValue & _grain_volumes
virtual unsigned int getGrainNum() const override
virtual const std::vector< RealGradient > & getTorqueValues() const =0
virtual std::size_t getTotalFeatureCount() const =0
Returns a number large enough to contain the largest ID for all grains in use.
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
TensorValue< Real > RealTensorValue
static InputParameters validParams()
const EulerAngleProvider & _euler
registerMooseObject("PhaseFieldApp", EulerAngleUpdater)
virtual const EulerAngles & getEulerAnglesOld(unsigned int) const
static InputParameters validParams()
unsigned int number() const
Update Euler angles of each grains after rigid body rotation This class estimates the rotation of pri...
virtual const EulerAngles & getEulerAngles(unsigned int) const override
This is a RealTensor version of a rotation matrix It is instantiated with the Euler angles...
static const std::string R
EulerAngleUpdater(const InputParameters ¶meters)
virtual void initialize() override
std::vector< EulerAngles > _angles_old
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const EulerAngles & getEulerAngles(unsigned int) const =0
FEProblemBase & _fe_problem
void mooseError(Args &&... args) const
Abstract base class for user objects that implement the Euler Angle provider interface.
std::vector< EulerAngles > _angles