Skip to content

Commit

Permalink
Merge pull request #2406 from andrew-platt/b/SED_segfault
Browse files Browse the repository at this point in the history
Correct issues with SED
  • Loading branch information
andrew-platt committed Sep 5, 2024
2 parents c05b3ca + b8967b7 commit 65a4465
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 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
2 changes: 1 addition & 1 deletion modules/simple-elastodyn/src/SED.f90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MODULE SED

implicit none
private
type(ProgDesc), parameter :: SED_Ver = ProgDesc( 'SED', 'v1.00.00', '15-Feb-2022' )
type(ProgDesc), parameter :: SED_Ver = ProgDesc( 'SED', '', '' )

public :: SED_Init
public :: SED_End
Expand Down
3 changes: 3 additions & 0 deletions reg_tests/CTestList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ of_regression("MHK_RM1_Floating" "openfast;elastodyn;aerod
of_regression("MHK_RM1_Floating_wNacDrag" "openfast;elastodyn;aerodyn;hydrodyn;moordyn;mhk")
of_regression("Tailfin_FreeYaw1DOF_PolarBased" "openfast;elastodyn;aerodyn")
of_regression("Tailfin_FreeYaw1DOF_Unsteady" "openfast;elastodyn;aerodyn")
of_regression("5MW_Land_DLL_WTurb_ADsk" "openfast;elastodyn;aerodisk")
of_regression("5MW_Land_DLL_WTurb_ADsk_SED" "openfast;simple-elastodyn;aerodisk")
of_regression("5MW_Land_DLL_WTurb_SED" "openfast;simple-elastodyn;aerodyn")

of_aeromap_regression("5MW_Land_AeroMap" "aeromap;elastodyn;aerodyn")

Expand Down

0 comments on commit 65a4465

Please sign in to comment.