Skip to content

Commit

Permalink
BD RefChange: add short note about changes
Browse files Browse the repository at this point in the history
Some minor cleanup to better match parent branch (deleted blank lines, etc)
  • Loading branch information
andrew-platt committed Sep 13, 2023
1 parent 1a44fd8 commit 6603997
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions modules/beamdyn/src/BeamDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ MODULE BeamDyn
PUBLIC :: BD_UpdateGlobalRef !< update the BeamDyn reference. The reference for the calculations follows u%RootMotionMesh
! and therefore x%q must be updated from T -> T+DT to include the root motion from T->T+DT

! do we change the reference frame at each State update?
! The original formulation kept all states in the inertial reference frame. This has been leading to convergence issues
! when there is a large rotational change from the reference frame (i.e. large turbine yaw, large blade pitch). During
! the development of the tight coupling algorithm for OpenFAST, we decided to try changing all the states in BeamDyn to
! follow the moving BladeRootMotion mesh. This requires changing the states after an UpdateStates call to be relative to
! the new BladeRootMotion mesh orientation and position.
! Upadate the reference frame after each State update (or use the old method)?
LOGICAL, PARAMETER :: ChangeRefFrame = .true.

CONTAINS
Expand Down Expand Up @@ -6825,7 +6830,6 @@ END SUBROUTINE BD_WriteMassStiffInFirstNodeFrame
!> Update the state information to follow the blade rootmotion mesh.
!! - move the state information in x from the previous reference frame at time T (u(2)%rootmotion) to the new reference frame at T+dt (u(1)%rootmation)
!! - the GlbRot, GlbPos, and Glb_crv values are stored as otherstates and updated
!! -
subroutine BD_UpdateGlobalRef(u, p, x, OtherState, ErrStat, ErrMsg)
type(BD_InputType), intent(in ) :: u !< Inputs at utimes
type(BD_ParameterType), intent(in ) :: p !< Parameters
Expand Down
5 changes: 3 additions & 2 deletions modules/beamdyn/src/BeamDyn_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,6 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, OtherState, m, y)

! Calculate the translational displacement of each GLL node in the FAST coordinate system,
! referenced against the DCM of the blade root at T=0.
! y%BldMotion%TranslationDisp(1:3,temp_id2) = OtherState%GlbPos - y%BldMotion%Position(1:3,temp_id2) + &
! matmul(OtherState%GlbRot, p%uuN0(1:3, j, i) + x%q(1:3, temp_id))
y%BldMotion%TranslationDisp(1:3,temp_id2) = OtherState%GlbPos + matmul(OtherState%GlbRot, p%uuN0(1:3, j, i) + x%q(1:3, temp_id)) - &
y%BldMotion%Position(1:3,temp_id2)

Expand Down Expand Up @@ -719,9 +717,12 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, OtherState, m, y)
ENDDO
ENDDO



CASE (BD_MESH_STATIONS)
END SELECT


END SUBROUTINE Set_BldMotion_NoAcc
!-----------------------------------------------------------------------------------------------------------------------------------
!> This routine calculates values for the y%BldMotion mesh.
Expand Down

0 comments on commit 6603997

Please sign in to comment.