Skip to content

Commit

Permalink
Update HydroDyn c-binding to use full rotation instead of small angle…
Browse files Browse the repository at this point in the history
… approximation

* HydroDyn now assumes the three rotation angles are the Tait-Bryan roll, pitch, and yaw angles following the intrinsic yaw-pitch-roll convenction.
* The angular velocity and acceleration passed to HydroDyn should be the true angular velocity and acceleration vectors in the inertial frame, not the time derivatives of the Tait-Bryan angles.
  • Loading branch information
luwang00 committed Jul 24, 2024
1 parent 5b90df2 commit b588a69
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/hydrodyn/src/HydroDyn_C_Binding.f90
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ subroutine SetMotionLoadsInterfaceMeshes(ErrStat3,ErrMsg3)
! initial position and orientation of node
InitPos = tmpNodePos(1:3,iNode)
theta = real(tmpNodePos(4:6,iNode),DbKi) ! convert ReKi to DbKi to avoid roundoff
CALL SmllRotTrans( 'InputRotation', theta(1), theta(2), theta(3), Orient, 'Orient', ErrStat, ErrMsg )
! CALL SmllRotTrans( 'InputRotation', theta(1), theta(2), theta(3), Orient, 'Orient', ErrStat, ErrMsg )
Orient = EulerConstructZYX(theta)
call MeshPositionNode( HD_MotionMesh , &
iNode , &
InitPos , & ! position
Expand Down Expand Up @@ -1071,7 +1072,8 @@ subroutine Set_MotionMesh(ErrStat3, ErrMsg3)
! Set mesh corresponding to input motions
do iNode=1,NumNodePts
theta = real(tmpNodePos(4:6,iNode),DbKi) ! convert ReKi to DbKi to avoid roundoff
CALL SmllRotTrans( 'InputRotation', theta(1), theta(2), theta(3), Orient, 'Orient', ErrStat3, ErrMsg3 )
! CALL SmllRotTrans( 'InputRotation', theta(1), theta(2), theta(3), Orient, 'Orient', ErrStat3, ErrMsg3 )
Orient = EulerConstructZYX(theta)
HD_MotionMesh%TranslationDisp(1:3,iNode) = tmpNodePos(1:3,iNode) - HD_MotionMesh%Position(1:3,iNode) ! relative displacement only
HD_MotionMesh%Orientation(1:3,1:3,iNode) = Orient
HD_MotionMesh%TranslationVel( 1:3,iNode) = tmpNodeVel(1:3,iNode)
Expand Down

0 comments on commit b588a69

Please sign in to comment.