Ora

How to Measure Rotation in Ansys?

Published in Ansys Rotation Measurement 6 mins read

Measuring rotation in Ansys is crucial for understanding the angular displacement of components and verifying design performance. While direct nodal rotations are available for certain element types, more sophisticated methods are often required to capture the averaged or component-level rotation, especially for solid geometries.

Understanding Rotation in Ansys

Ansys handles rotation based on the element types and analysis context. For elements with rotational degrees of freedom (DOFs), such as shells and beams, nodal rotations (ROTX, ROTY, ROTZ) are directly available as results. However, for solid elements, rotational DOFs are not explicitly assigned to nodes. In such cases, rotation must be inferred from the displacement of multiple nodes or through specialized techniques. Ansys typically reports rotational values in radians by default.

Common Methods for Measuring Rotation

Several approaches can be employed to measure rotation within Ansys, ranging from direct post-processing to advanced APDL scripting.

1. Direct Nodal Rotations (Shell and Beam Elements)

For models containing shell or beam elements, you can directly plot or list nodal rotations:

  • Path: In Ansys Workbench Mechanical, after solving, navigate to Solution > Rotational Degrees of Freedom. You can then select ROTX, ROTY, or ROTZ to visualize or probe these values.
  • APDL Command: PRNSOL, ROT (to print nodal rotations) or PLNSOL, ROT, X (to plot X-rotation).

2. Measuring Averaged Rotation with Remote Points and APDL

For solid bodies or complex geometries where an averaged rotation across a section or component is needed, a powerful technique involves using a Remote Point combined with APDL Command Objects. This method is particularly useful when direct nodal rotations are not available or when a representative rotation for a larger area is desired.

Steps for Measuring Averaged Rotation:

  1. Create a Remote Point:

    • In Ansys Workbench Mechanical, insert a Remote Point under the desired geometry (e.g., a face, edge, or body).
    • Crucially, set the Behavior of the Remote Point to Deformable. This allows the Remote Point to average the motion, including rotation, of the associated geometry. If set to "Rigid," it will enforce a rigid body motion.
  2. Insert APDL Command Objects:

    • Add two APDL Commands Objects under the Solution branch.

    • First APDL Command Object (Pre-processing for Node ID): This object is used to identify the node ID corresponding to the Remote Point.

      *GET, RP_NODE, EPEL, RP_ID, NODE, 1
      /COM, The node ID for the Remote Point is stored in RP_NODE variable

      Replace RP_ID with the actual ID of your Remote Point (found in its details).

    • Second APDL Command Object (Post-processing for Rotation): This object retrieves the rotation of the identified node and can convert it to degrees.

      *GET, ROT_X_RAD, NODE, RP_NODE, ROT, X
      *GET, ROT_Y_RAD, NODE, RP_NODE, ROT, Y
      *GET, ROT_Z_RAD, NODE, RP_NODE, ROT, Z
      
      ROT_X_DEG = ROT_X_RAD * (180 / %PI%)
      ROT_Y_DEG = ROT_Y_RAD * (180 / %PI%)
      ROT_Z_DEG = ROT_Z_RAD * (180 / %PI%)
      
      *DIM, MY_ROT_RESULTS, TABLE, 1, 3, , , RESULT
      MY_ROT_RESULTS(1,1) = ROT_X_DEG
      MY_ROT_RESULTS(1,2) = ROT_Y_DEG
      MY_ROT_RESULTS(1,3) = ROT_Z_DEG
      
      *VWRITE, ROT_X_DEG, ROT_Y_DEG, ROT_Z_DEG
      (F10.4, ' deg (X),', F10.4, ' deg (Y),', F10.4, ' deg (Z)')
      /COM, Outputting Rotation in Degrees

      This script retrieves the rotation in radians for X, Y, and Z axes, converts them to degrees, and then prints them to the output.

This method effectively measures the averaged rotation of the geometry associated with the deformable Remote Point.

3. Coordinate System Transformation

For rigid body rotation or general orientation changes, tracking the orientation of a local coordinate system relative to the global system can be highly effective.

  • Steps:
    1. Define a Local Coordinate System on the component whose rotation you want to measure.
    2. Use the RSYS command in APDL to switch to this local system for post-processing.
    3. Track the displacement of key nodes within this system to infer rotation or, for rigid bodies, use the RIGID command to output orientation matrices.
    4. In Workbench, you can define a Coordinate System and then use Probe results with respect to this system.

4. User-Defined Results (APDL) from Displacements

For solid elements where direct rotations are not available, you can calculate rotation from nodal displacements. This typically involves picking three non-collinear nodes and using vector mathematics to determine the change in their relative orientation.

  • Concept:
    1. Select three reference nodes on the body.
    2. Record their initial (undeformed) coordinates (X0, Y0, Z0).
    3. Record their final (deformed) coordinates (X, Y, Z).
    4. Form vectors between these nodes (e.g., Vector A = Node2 - Node1, Vector B = Node3 - Node1).
    5. Calculate the rotation matrix that transforms the initial vectors to the final vectors.
    6. Extract Euler angles or an axis-angle representation from the rotation matrix.
  • APDL Implementation: This requires extensive scripting using commands like *GET, NSEL, *VEC, *MAT, and matrix manipulation.

5. Outputting Orientation for Rigid Body Elements

When using rigid body elements (e.g., in Explicit Dynamics or with RIGID body settings), Ansys can directly output orientation data.

  • APDL Command: For RIGID elements, you can request the output of R (Rotation matrix) or A (Euler angles) using the OUTRES command in Mechanical APDL.

Practical Considerations and Tips

  • Units: Always be mindful that Ansys outputs rotation in radians. Convert to degrees (degrees = radians * 180 / pi) for easier interpretation if needed.
  • Reference Point/Axis: Define a clear reference point or axis about which rotation is being measured. This is especially important for multi-axis rotations.
  • Element Type: The availability of direct rotation results is highly dependent on the element type used (shell/beam vs. solid).
  • Large Rotations: For large rotations, the simple vector subtraction methods might not be accurate. Consider using quaternions or rotation matrices for robust calculations.
  • Visual Inspection: Always complement numerical results with visual inspection of the deformed model to ensure the rotation values make physical sense.
  • Post-processing Tools: Utilize the built-in Ansys Workbench results viewer for quick plots and probes. For more detailed analysis and custom calculations, APDL is indispensable.

Summary of Rotation Measurement Methods

The following table summarizes the common methods for measuring rotation in Ansys:

Method Description Element Types Best For Key Considerations
Direct Nodal Rotations Directly plot/list nodal rotational DOFs. Shell, Beam Localized rotation of thin structures. Only available for elements with rotational DOFs. Units are radians.
Remote Point + APDL (Deformable) Uses a deformable remote point to average motion, then APDL to extract rotation. Solid, Shell, Beam (any geometry) Averaged rotation of a body/surface, even for solids. Requires two APDL Command Objects. Remote point behavior must be Deformable.
Coordinate System Transformation Defines a local system and tracks its orientation relative to global. Any Rigid body rotations, large deformations. Can be complex for non-rigid transformations.
APDL from Displacements Calculates rotation from the displacement of multiple nodes using vector math. Solid (when direct rotation is absent) Inferred rotation for solid elements. Requires advanced APDL scripting and understanding of transformation mathematics.
Rigid Body Orientation Outputs orientation matrix or Euler angles for rigid elements. RIGID, LINK (Explicit Dynamics) Full 3D orientation of designated rigid bodies. Specific to rigid body dynamics.

By understanding these techniques, you can effectively measure and analyze rotational behavior in your Ansys simulations, gaining deeper insights into your designs.