Skip to content

Commit

Permalink
Using translated inertia matrix negates need for centripetal moment
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanDavies19 committed Jul 18, 2024
1 parent 8050873 commit 0bf5971
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/moordyn/src/MoorDyn_Body.f90
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ SUBROUTINE Body_DoRHS(Body, m, p)
! Centripetal force and moment due to COM not being at body origin plus gyroscopic moment
w = Body%v6(4:6)
Fcentripetal = - MATMUL(Body%M(1:3,1:3), CROSS_PRODUCT(w, CROSS_PRODUCT(w, body_rCGrotated)))
Mcentripetal = - CROSS_PRODUCT(w, MATMUL(Body%M(4:6,4:6), w)) + CROSS_PRODUCT(body_rCGrotated, Fcentripetal)
Mcentripetal = - CROSS_PRODUCT(w, MATMUL(Body%M(4:6,4:6), w))

Body%F6net(1:3) = Body%F6net(1:3) + Fcentripetal
Body%F6net(4:6) = Body%F6net(4:6) + Mcentripetal
Expand Down
2 changes: 1 addition & 1 deletion modules/moordyn/src/MoorDyn_Point.f90
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ SUBROUTINE Point_GetNetForceAndMass(Point, rRef, wRef, Fnet_out, M_out, m, p)

! add in the centripetal force and moment on the body. If rRel is zero there will be no translational centripetal component
Fcentripetal = - MATMUL(M_out(1:3,1:3), CROSS_PRODUCT(wRef, CROSS_PRODUCT(wRef,rRel)))
Mcentripetal = - CROSS_PRODUCT(wRef, MATMUL(M_out(4:6,4:6), wRef)) + CROSS_PRODUCT(rRel, Fcentripetal)
Mcentripetal = - CROSS_PRODUCT(wRef, MATMUL(M_out(4:6,4:6), wRef))

Fnet_out(1:3) = Fnet_out(1:3) + Fcentripetal
Fnet_out(4:6) = Fnet_out(4:6) + Mcentripetal
Expand Down
2 changes: 1 addition & 1 deletion modules/moordyn/src/MoorDyn_Rod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ SUBROUTINE Rod_GetNetForceAndMass(Rod, rRef, wRef, Fnet_out, M_out, m, p)
CALL TranslateMass3to6DOF(r_c+rRel, Rod%Imat, I_out) ! translate the COG inertia matrix (no parallel axis terms) about the body ref point

Fcentripetal = - MATMUL(Rod%M6net(1:3,1:3), CROSS_PRODUCT(wRef, CROSS_PRODUCT(wRef,r_c+rRel)))
Mcentripetal = CROSS_PRODUCT(r_c+rRel, Fcentripetal) - CROSS_PRODUCT(wRef, MATMUL(I_out(4:6,4:6), wRef))
Mcentripetal = - CROSS_PRODUCT(wRef, MATMUL(I_out(4:6,4:6), wRef))

Fnet_out(1:3) = Fnet_out(1:3) + Fcentripetal
Fnet_out(4:6) = Fnet_out(4:6) + Mcentripetal
Expand Down

0 comments on commit 0bf5971

Please sign in to comment.