Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] AD15 nacelle reference position was set to hub position #982

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/aerodyn/src/AeroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ subroutine Init_u( u, p, p_AD, InputFileData, InitInp, errStat, errMsg )
if (errStat >= AbortErrLev) return

! set node initial position/orientation
position = InitInp%HubPosition
position = InitInp%NacellePosition
position(1:2) = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mesh was originally created to transfer nacelle drag loads, which are calculated at the tower center line at hub height with the orientation of the nacelle. If you want this to be the actual nacelle position, you should probably also remove the line setting position(1:2)=0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll do that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to add the drag loads at some point though. Should this mesh have two points then ? A nacelle center and an aerodynamic center?

Copy link
Collaborator Author

@andrew-platt andrew-platt Jan 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like any offset to the aero center should be handled within AD15. So I would expect only a single mesh point is necessary for the loads to ED.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe two points on the mesh would be better.... I feel like we had a conversation with Hannah about this when I first sent her the code to add the nacelle mesh to AeroDyn. Did she alter her equations to be calculated at this different point???

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw this. The buoyancy calculations for the nacelle assume a nacelle reference position aligned with the tower centerline and vertically with the hub, which is how the nacelle position was defined previously. I assume this means I need to adjust the buoyancy calculation now? Where is the new nacelle reference position? @andrew-platt

Copy link
Collaborator Author

@andrew-platt andrew-platt Jan 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nacelle reference position from the ElastoDyn NacelleLoads mesh (and sibling mesh NacelleMotion) is located at (0,0,TwrHt). This is what is passed to AD15 for the Nacelle initial position. So this should work as expected with the MHK buoyancy updates.

Copy link
Contributor

@hkross hkross Jan 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see. I think the key thing is to make sure it is clear in the documentation that the nacelle center of buoyancy input by the user should be relative to the tower top position. I believe Jason already suggested that "nacelle reference position" be changed to "yaw bearing", so that should take care of it.

We do have a calculation to move the correction for the tower top (since it is not exposed to fluid) from the center of buoyancy of the tower top node to the nacelle reference position. Since the tower center of buoyancy is assumed along the centerline and we are now defining the nacelle reference position as (0,0,TwrHt), these points should be coincident, so I could remove this calculation. Does this sound correct, @jjonkman? I could also leave it since it is more robust to future changes this way.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hkross -- Yes, that sounds correct, but may as well leave that code in there in case the nacelle reference position is moved again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I came across another potential issue with this. The AeroDyn driver does not pass the nacelle position to AeroDyn. Since the mesh creation in AeroDyn used to call InitInp%HubPosition, the nacelle position was not needed. This is fairly easy to fix and pass in the nacelle position. However, the nacelle position in the driver is set to (0, 0, HubHt+overhang*sin(shftTilt)) rather than (0,0,TwrHt), meaning that the nacelle position is defined differently when the AeroDyn driver vs OpenFAST driver is used. This will affect the buoyancy calculations, since the user inputs offsets for the nacelle center of buoyancy relative to the tower top. I'm not sure there is even enough info in the AeroDyn driver input file to be able to calculate TwrHt. @andrew-platt and @ebranlard, do either of you have any input on this?

call MeshPositionNode(u%NacelleMotion, 1, position, errStat2, errMsg2, orient=InitInp%NacelleOrientation)
call SetErrStat( errStat2, errMsg2, errStat, errMsg, RoutineName )
Expand Down
1 change: 1 addition & 0 deletions modules/aerodyn/src/AeroDyn_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ typedef ^ RotInitInputType ReKi HubPosition {3} - - "X-Y-Z reference position of
typedef ^ RotInitInputType R8Ki HubOrientation {3}{3} - - "DCM reference orientation of hub" -
typedef ^ RotInitInputType ReKi BladeRootPosition {:}{:} - - "X-Y-Z reference position of each blade root (3 x NumBlades)" m
typedef ^ RotInitInputType R8Ki BladeRootOrientation {:}{:}{:} - - "DCM reference orientation of blade roots (3x3 x NumBlades)" -
typedef ^ RotInitInputType R8Ki NacellePosition {3} - - "X-Y-Z reference position of hub" m
typedef ^ RotInitInputType R8Ki NacelleOrientation {3}{3} - - "DCM reference orientation of nacelle" -
typedef ^ RotInitInputType IntKi AeroProjMod - 0 - "Flag to switch between different projection models" -

Expand Down
13 changes: 13 additions & 0 deletions modules/aerodyn/src/AeroDyn_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ MODULE AeroDyn_Types
REAL(R8Ki) , DIMENSION(1:3,1:3) :: HubOrientation !< DCM reference orientation of hub [-]
REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: BladeRootPosition !< X-Y-Z reference position of each blade root (3 x NumBlades) [m]
REAL(R8Ki) , DIMENSION(:,:,:), ALLOCATABLE :: BladeRootOrientation !< DCM reference orientation of blade roots (3x3 x NumBlades) [-]
REAL(R8Ki) , DIMENSION(1:3) :: NacellePosition !< X-Y-Z reference position of hub [m]
REAL(R8Ki) , DIMENSION(1:3,1:3) :: NacelleOrientation !< DCM reference orientation of nacelle [-]
INTEGER(IntKi) :: AeroProjMod = 0 !< Flag to switch between different projection models [-]
END TYPE RotInitInputType
Expand Down Expand Up @@ -416,6 +417,7 @@ SUBROUTINE AD_CopyRotInitInputType( SrcRotInitInputTypeData, DstRotInitInputType
END IF
DstRotInitInputTypeData%BladeRootOrientation = SrcRotInitInputTypeData%BladeRootOrientation
ENDIF
DstRotInitInputTypeData%NacellePosition = SrcRotInitInputTypeData%NacellePosition
DstRotInitInputTypeData%NacelleOrientation = SrcRotInitInputTypeData%NacelleOrientation
DstRotInitInputTypeData%AeroProjMod = SrcRotInitInputTypeData%AeroProjMod
END SUBROUTINE AD_CopyRotInitInputType
Expand Down Expand Up @@ -485,6 +487,7 @@ SUBROUTINE AD_PackRotInitInputType( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat,
Int_BufSz = Int_BufSz + 2*3 ! BladeRootOrientation upper/lower bounds for each dimension
Db_BufSz = Db_BufSz + SIZE(InData%BladeRootOrientation) ! BladeRootOrientation
END IF
Db_BufSz = Db_BufSz + SIZE(InData%NacellePosition) ! NacellePosition
Db_BufSz = Db_BufSz + SIZE(InData%NacelleOrientation) ! NacelleOrientation
Int_BufSz = Int_BufSz + 1 ! AeroProjMod
IF ( Re_BufSz .GT. 0 ) THEN
Expand Down Expand Up @@ -571,6 +574,10 @@ SUBROUTINE AD_PackRotInitInputType( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat,
END DO
END DO
END IF
DO i1 = LBOUND(InData%NacellePosition,1), UBOUND(InData%NacellePosition,1)
DbKiBuf(Db_Xferred) = InData%NacellePosition(i1)
Db_Xferred = Db_Xferred + 1
END DO
DO i2 = LBOUND(InData%NacelleOrientation,2), UBOUND(InData%NacelleOrientation,2)
DO i1 = LBOUND(InData%NacelleOrientation,1), UBOUND(InData%NacelleOrientation,1)
DbKiBuf(Db_Xferred) = InData%NacelleOrientation(i1,i2)
Expand Down Expand Up @@ -680,6 +687,12 @@ SUBROUTINE AD_UnPackRotInitInputType( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrSt
END DO
END DO
END IF
i1_l = LBOUND(OutData%NacellePosition,1)
i1_u = UBOUND(OutData%NacellePosition,1)
DO i1 = LBOUND(OutData%NacellePosition,1), UBOUND(OutData%NacellePosition,1)
OutData%NacellePosition(i1) = REAL(DbKiBuf(Db_Xferred), R8Ki)
Db_Xferred = Db_Xferred + 1
END DO
i1_l = LBOUND(OutData%NacelleOrientation,1)
i1_u = UBOUND(OutData%NacelleOrientation,1)
i2_l = LBOUND(OutData%NacelleOrientation,2)
Expand Down
1 change: 1 addition & 0 deletions modules/openfast-library/src/FAST_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD,

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
Expand Down