Skip to content

Multiple initial rotations in setInitDisp() method #586

@akeeste

Description

@akeeste

Note: italicized text below is include as an example and should be updated before submission. If you feel any section is not applicable to your request, please replace with 'N/A' rather than delete a section.

Is your feature request related to a problem? Please describe.
It is difficult (though possible) to set-up multiple initial rotations in WEC-Sim. Equations are complicated for an individual user to setup.

Describe the solution you'd like
It would be nice if we can incorporate the alternate solution below into the body(#).setInitDisp() method so that users do not need to set-up axis-to-matrix and matrix-to-axis rotation scripts themselves. The body(#).setInitDisp() method could iterate through multiple axis/angle inputs and multiply all rotation matrices together to get a net rotation matrix, then the net axis-angle.

Describe alternatives you've considered
My current solution is to use custom scripts that given two axis-angle rotations (e.g. in pitch and yaw) will calculate:

  1. Axis-angle rotations to rotation matrices
  2. Net rotation matrix = rotMat1 * rotMat2 * ...
  3. Back out net axis-angle rotation from a net rotation matrix

Then the net axis-angle rotation is input to body(#).setInitDisp() method.

Part of this workflow could maybe be done with existing functions (eulXYZ2RotMat.m) but I believe we still need a rotMat2AxisAngle function to convert a net rotation into axis-angle format for Simulink.

Personal project context
Discuss TEAMER internally. Another example of this could include a passive yaw OSWEC which could have initial rotations in both pitch and yaw.

Additional context
I have already created a rotMat2AxisAngle function, we just need to discuss how/if this can be implemented robustly.

Metadata

Metadata

Assignees

Labels

Body ClassBody Class (bodyClass.m)Constraint ClassConstraint Class (constraintClass.m)Featurenew feature requestMooring ClassMooring Class (mooringClass.m)PTO ClassPower Take-off Class (ptoClass.m)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions