20 "displacement around an axis on a boundary");
22 params.
addRequiredParam<
int>(
"component",
"The component for the rotational displacement");
23 params.
set<
bool>(
"use_displaced_mesh") =
false;
24 params.
set<
bool>(
"preset") =
true;
33 "function",
"The function providing the total angle of rotation or the angular velocity.");
36 "The units of the angle of rotation. Choices are:" +
38 params.
addRequiredParam<RealVectorValue>(
"axis_origin",
"Origin of the axis of rotation");
39 params.
addRequiredParam<RealVectorValue>(
"axis_direction",
"Direction of the axis of rotation");
41 "angular_velocity",
false,
"If true interprets the function value as an angular velocity");
43 "The string of displacements suitable for the problem statement");
48 _component(getParam<
int>(
"component")),
49 _func(getFunction(
"function")),
50 _angle_units(getParam<
MooseEnum>(
"angle_units")),
51 _axis_origin(getParam<RealVectorValue>(
"axis_origin")),
52 _axis_direction(getParam<RealVectorValue>(
"axis_direction")),
53 _ndisp(coupledComponents(
"displacements")),
55 _angular_velocity(getParam<bool>(
"angular_velocity"))
57 if (_component < 0 || _component > 2)
61 mooseError(
"Please specify a non-zero direction vector for the axis_direction in ",
name());
71 for (
unsigned int i = 0; i <
_ndisp; ++i)
74 for (
unsigned int i = 0; i <
_ndisp; ++i)
97 for (
unsigned int i = 0; i <
_ndisp; i++)
109 rotate_about_z(0, 0) = cos(angle);
110 rotate_about_z(0, 1) = -sin(angle);
111 rotate_about_z(0, 2) = 0;
112 rotate_about_z(0, 3) = 0;
113 rotate_about_z(1, 0) = sin(angle);
114 rotate_about_z(1, 1) = cos(angle);
115 rotate_about_z(1, 2) = 0;
116 rotate_about_z(1, 3) = 0;
117 rotate_about_z(2, 0) = 0;
118 rotate_about_z(2, 1) = 0;
119 rotate_about_z(2, 2) = 1;
120 rotate_about_z(2, 3) = 0;
121 rotate_about_z(3, 0) = 0;
122 rotate_about_z(3, 1) = 0;
123 rotate_about_z(3, 2) = 0;
124 rotate_about_z(3, 3) = 1;
128 return transform * p0;
165 rotate_about_x(0, 0) = 1;
166 rotate_about_x(0, 1) = 0;
167 rotate_about_x(0, 2) = 0;
168 rotate_about_x(0, 3) = 0;
169 rotate_about_x(1, 0) = 0;
172 rotate_about_x(1, 3) = 0;
173 rotate_about_x(2, 0) = 0;
176 rotate_about_x(2, 3) = 0;
177 rotate_about_x(3, 0) = 0;
178 rotate_about_x(3, 1) = 0;
179 rotate_about_x(3, 2) = 0;
180 rotate_about_x(3, 3) = 1;
183 rotate_about_y(0, 0) =
v / length;
184 rotate_about_y(0, 1) = 0;
186 rotate_about_y(0, 3) = 0;
187 rotate_about_y(1, 0) = 0;
188 rotate_about_y(1, 1) = 1;
189 rotate_about_y(1, 2) = 0;
190 rotate_about_y(1, 3) = 0;
192 rotate_about_y(2, 1) = 0;
193 rotate_about_y(2, 2) =
v / length;
194 rotate_about_y(2, 3) = 0;
195 rotate_about_y(3, 0) = 0;
196 rotate_about_y(3, 1) = 0;
197 rotate_about_y(3, 2) = 0;
198 rotate_about_y(3, 3) = 1;
203 rotate_about_x.
inverse(rotx_inv);
205 rotate_about_y.
inverse(roty_inv);
void addDisplacementAboutAxisParams(InputParameters ¶ms)
registerMooseObject("SolidMechanicsApp", DisplacementAboutAxis)
void addDisplacementAboutAxisParams(InputParameters ¶ms)
void ErrorVector unsigned int
void inverse(ColumnMajorMatrixTempl< T > &invA) const
virtual const VariableValue & coupledDofValuesOld(const std::string &var_name, unsigned int comp=0) const
static InputParameters validParams()
Implements a boundary condition that enforces rotational displacement around an axis on a boundary.
void calculateTransformationMatrices()
Calculate the rotation about the x and y axes based on the provided axis direction vector at the star...
static InputParameters validParams()
virtual Real computeQpValue()
Evaluate the boundary condition at the current quadrature point and timestep.
ColumnMajorMatrix rotateAroundAxis(const ColumnMajorMatrix &p0, const Real angle)
Calculate the tranformation matrix to rotate in x, y, and z depends on the prescribed BC angle and th...
const unsigned int _ndisp
number of displacement components
void calculateUnitDirectionVector()
Check if the provided axis direction vector is a unit vector and normalizes the vector if necessary d...
DisplacementAboutAxis(const InputParameters ¶meters)
ColumnMajorMatrix _transformation_matrix
const bool _angular_velocity
flag for incremental formulation
ColumnMajorMatrix _transformation_matrix_inv
std::vector< const VariableValue * > _disp_old
the old displacement value
virtual void initialSetup()
virtual Real value(Real t, const Point &p) const
const std::string & name() const
void mooseError(Args &&... args) const
std::string getRawNames() const
const Node *const & _current_node