Skip to content

Commit

Permalink
SED: error in glue code with SED + AD
Browse files Browse the repository at this point in the history
Probably missed this during a merge (some code blocks were moved making merging tricky, and then we lost the testing of this combination somewhere)
  • Loading branch information
andrew-platt committed Sep 5, 2024
1 parent adde4c6 commit 2486a78
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions modules/openfast-library/src/FAST_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -783,18 +783,29 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, SED, BD, S
Init%InData_AD%MSL2SWL = p_FAST%MSL2SWL


Init%InData_AD%rotors(1)%HubPosition = ED%y%HubPtMotion%Position(:,1)
Init%InData_AD%rotors(1)%HubOrientation = ED%y%HubPtMotion%RefOrientation(:,:,1)
Init%InData_AD%rotors(1)%NacellePosition = ED%y%NacelleMotion%Position(:,1)
Init%InData_AD%rotors(1)%NacelleOrientation = ED%y%NacelleMotion%RefOrientation(:,:,1)
if (p_FAST%CompElast == Module_SED) then
Init%InData_AD%rotors(1)%HubPosition = SED%y%HubPtMotion%Position(:,1)
Init%InData_AD%rotors(1)%HubOrientation = SED%y%HubPtMotion%RefOrientation(:,:,1)
Init%InData_AD%rotors(1)%NacellePosition = SED%y%NacelleMotion%Position(:,1)
Init%InData_AD%rotors(1)%NacelleOrientation = SED%y%NacelleMotion%RefOrientation(:,:,1)
do k=1,NumBl
Init%InData_AD%rotors(1)%BladeRootPosition(:,k) = SED%y%BladeRootMotion(k)%Position(:,1)
Init%InData_AD%rotors(1)%BladeRootOrientation(:,:,k) = SED%y%BladeRootMotion(k)%RefOrientation(:,:,1)
end do
elseif (p_FAST%CompElast == Module_ED .or. p_FAST%CompElast == Module_BD) then
Init%InData_AD%rotors(1)%HubPosition = ED%y%HubPtMotion%Position(:,1)
Init%InData_AD%rotors(1)%HubOrientation = ED%y%HubPtMotion%RefOrientation(:,:,1)
Init%InData_AD%rotors(1)%NacellePosition = ED%y%NacelleMotion%Position(:,1)
Init%InData_AD%rotors(1)%NacelleOrientation = ED%y%NacelleMotion%RefOrientation(:,:,1)
do k=1,NumBl
Init%InData_AD%rotors(1)%BladeRootPosition(:,k) = ED%y%BladeRootMotion(k)%Position(:,1)
Init%InData_AD%rotors(1)%BladeRootOrientation(:,:,k) = ED%y%BladeRootMotion(k)%RefOrientation(:,:,1)
end do
endif

! Note: not passing tailfin position and orientation at init
Init%InData_AD%rotors(1)%AeroProjMod = APM_BEM_NoSweepPitchTwist

do k=1,NumBl
Init%InData_AD%rotors(1)%BladeRootPosition(:,k) = ED%y%BladeRootMotion(k)%Position(:,1)
Init%InData_AD%rotors(1)%BladeRootOrientation(:,:,k) = ED%y%BladeRootMotion(k)%RefOrientation(:,:,1)
end do

! Set pointers to flowfield
IF (p_FAST%CompInflow == Module_IfW) Init%InData_AD%FlowField => Init%OutData_IfW%FlowField

Expand Down

0 comments on commit 2486a78

Please sign in to comment.