Skip to content

Commit

Permalink
Merge pull request OpenFAST#9 from ashesh2512/bladeResolvedFSIprep
Browse files Browse the repository at this point in the history
Building on incorporating ExtLoads to the Fast flow framework
  • Loading branch information
gantech committed May 18, 2018
2 parents 8073308 + 5d71723 commit c1f85d6
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 166 deletions.
2 changes: 1 addition & 1 deletion modules-local/extloads/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(EXTLOADS_LIBS_SOURCES
)

add_library(extloadslib ${EXTLOADS_LIBS_SOURCES})
target_link_libraries(extloadslib nwtclibs)
target_link_libraries(extloadslib nwtclibs beamdynlib)

install(TARGETS extloadslib
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
Expand Down
126 changes: 63 additions & 63 deletions modules-local/extloads/src/ExtLoads.f90

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules-local/extloads/src/ExtLoadsDX_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ include Registry_NWTC_Library.txt

# ..... Inputs ....................................................................................................................
# Define inputs that are contained on the mesh here:
typedef ExtLoadsDX/ExtLoadsDX InputType R8Ki twrDef {:} - - "Deformations on the tower - to send to external driver"
typedef ExtLoadsDX/ExtLdDX InputType R8Ki twrDef {:} - - "Deformations on the tower - to send to external driver"
typedef ^ InputType R8Ki bldDef {:} - - "Deformations on all blades - to send to external driver"
typedef ^ InputType IntKi nBlades - - - "Number of blades"
typedef ^ InputType IntKi nBladeNodes {:} - - "Number of blade nodes for each blade" -
Expand Down
10 changes: 5 additions & 5 deletions modules-local/extloads/src/ExtLoads_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ usefrom ExtLoadsDX_Registry.txt

# ..... Initialization data .......................................................................................................
# Define inputs that the initialization routine may need here:
typedef ExtLoads/ExtLoads InitInputType IntKi NumBlades - - - "Number of blades on the turbine" -
typedef ExtLoads/ExtLd InitInputType IntKi NumBlades - - - "Number of blades on the turbine" -
typedef ^ InitInputType IntKi NumBldNodes {:} - - "Number of blade nodes for each blade" -
typedef ^ InitInputType Logical TwrAero - .false. - "Flag that tells this module if the tower aero is on." -
typedef ^ InitInputType IntKi NumTwrNds - - - "Number of tower nodes for each blade" -
Expand Down Expand Up @@ -72,14 +72,14 @@ typedef ^ ParameterType IntKi NumTwrNds - - - "

# ..... Inputs ....................................................................................................................
# Define inputs that are contained on the mesh here:
typedef ^ InputType ExtLoadsDX_InputType DX_u - - - "Data to send to external driver"
typedef ^ InputType ExtLdDX_InputType DX_u - - - "Data to send to external driver"
typedef ^ InputType MeshType TowerMotion - - - "motion on the tower" -
typedef ^ InputType MeshType HubMotion - - - "motion on the hub" -
typedef ^ InputType MeshType BladeRootMotion {:} - - "motion on each blade root" -
typedef ^ InputType MeshType BladeMotion {:} - - "motion on each blade" -

# ..... Outputs ...................................................................................................................
# Define outputs that are contained on the mesh here:
typedef ^ OutputType ExtLoadsDX_OutputType DX_y - - - "Data to get from external driver"
typedef ^ OutputType MeshType TowerLoad - - - "loads on the tower" -
typedef ^ OutputType MeshType BladeLoad {:} - - "loads on each blade" -
typedef ^ OutputType ExtLdDX_OutputType DX_y - - - "Data to get from external driver"
typedef ^ OutputType MeshType TowerLoad - - - "loads on the tower" -
typedef ^ OutputType MeshType BladeLoad {:} - - "loads on each blade" -
16 changes: 8 additions & 8 deletions modules-local/fast-library/src/FAST_Library.f90
Original file line number Diff line number Diff line change
Expand Up @@ -590,19 +590,19 @@ subroutine FAST_OpFM_Restart(iTurb, CheckpointRootName_c, AbortErrLev_c, dt_c, n

end subroutine FAST_OpFM_Restart
!==================================================================================================================================
subroutine SetExtLoads_pointers(iTurb, ExtLoads_iFromOF, ExtLoads_oToOF)
subroutine SetExtLoads_pointers(iTurb, ExtLd_iFromOF, ExtLd_oToOF)

IMPLICIT NONE
INTEGER(C_INT), INTENT(IN ) :: iTurb ! Turbine number
TYPE(ExtLoadsDX_InputType_C), INTENT(INOUT) :: ExtLoads_iFromOF
TYPE(ExtLoadsDX_OutputType_C),INTENT(INOUT) :: ExtLoads_oToOF
TYPE(ExtLdDX_InputType_C), INTENT(INOUT) :: ExtLd_iFromOF
TYPE(ExtLdDX_OutputType_C),INTENT(INOUT) :: ExtLd_oToOF

ExtLoads_iFromOF%twrDef_Len = Turbine(iTurb)%ExtLoads%u%DX_u%c_obj%twrDef_Len; ExtLoads_iFromOF%twrDef = Turbine(iTurb)%ExtLoads%u%DX_u%c_obj%twrDef
ExtLoads_iFromOF%bldDef_Len = Turbine(iTurb)%ExtLoads%u%DX_u%c_obj%bldDef_Len; ExtLoads_iFromOF%bldDef = Turbine(iTurb)%ExtLoads%u%DX_u%c_obj%bldDef
ExtLoads_iFromOF%nBladeNodes_Len = Turbine(iTurb)%ExtLoads%u%DX_u%c_obj%nBladeNodes_Len; ExtLoads_iFromOF%nBladeNodes = Turbine(iTurb)%ExtLoads%u%DX_u%c_obj%nBladeNodes
ExtLd_iFromOF%twrDef_Len = Turbine(iTurb)%ExtLd%u%DX_u%c_obj%twrDef_Len; ExtLd_iFromOF%twrDef = Turbine(iTurb)%ExtLd%u%DX_u%c_obj%twrDef
ExtLd_iFromOF%bldDef_Len = Turbine(iTurb)%ExtLd%u%DX_u%c_obj%bldDef_Len; ExtLd_iFromOF%bldDef = Turbine(iTurb)%ExtLd%u%DX_u%c_obj%bldDef
ExtLd_iFromOF%nBladeNodes_Len = Turbine(iTurb)%ExtLd%u%DX_u%c_obj%nBladeNodes_Len; ExtLd_iFromOF%nBladeNodes = Turbine(iTurb)%ExtLd%u%DX_u%c_obj%nBladeNodes

ExtLoads_oToOF%twrLd_Len = Turbine(iTurb)%ExtLoads%y%DX_y%c_obj%twrLd_Len; ExtLoads_oToOF%twrLd = Turbine(iTurb)%ExtLoads%y%DX_y%c_obj%twrLd
ExtLoads_oToOF%bldLd_Len = Turbine(iTurb)%ExtLoads%y%DX_y%c_obj%bldLd_Len; ExtLoads_oToOF%bldLd = Turbine(iTurb)%ExtLoads%y%DX_y%c_obj%bldLd
ExtLd_oToOF%twrLd_Len = Turbine(iTurb)%ExtLd%y%DX_y%c_obj%twrLd_Len; ExtLd_oToOF%twrLd = Turbine(iTurb)%ExtLd%y%DX_y%c_obj%twrLd
ExtLd_oToOF%bldLd_Len = Turbine(iTurb)%ExtLd%y%DX_y%c_obj%bldLd_Len; ExtLd_oToOF%bldLd = Turbine(iTurb)%ExtLd%y%DX_y%c_obj%bldLd


end subroutine SetExtLoads_pointers
Expand Down
24 changes: 13 additions & 11 deletions modules-local/fast-library/src/FAST_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ param ^ - INTEGER Module_ED - 3 - "ElastoDyn" -
param ^ - INTEGER Module_BD - 4 - "BeamDyn" -
param ^ - INTEGER Module_AD14 - 5 - "AeroDyn14" -
param ^ - INTEGER Module_AD - 6 - "AeroDyn" -
param ^ - INTEGER Module_ExtLoads - 7 - "Externally specified loads" -
param ^ - INTEGER Module_ExtLd - 7 - "Externally specified loads" -
param ^ - INTEGER Module_SrvD - 8 - "ServoDyn" -
param ^ - INTEGER Module_HD - 9 - "HydroDyn" -
param ^ - INTEGER Module_SD - 10 - "SubDyn" -
Expand Down Expand Up @@ -273,15 +273,15 @@ typedef ^ ^ AD_InputType Input {:} - - "Array of inputs associated with InputTim
typedef ^ ^ DbKi InputTimes {:} - - "Array of times associated with Input Array"

# ..... ExtLoads data .......................................................................................................
typedef FAST ExtLoads_Data ExtLoads_ContinuousStateType x {2} - - "Continuous states"
typedef ^ ^ ExtLoads_DiscreteStateType xd {2} - - "Discrete states"
typedef ^ ^ ExtLoads_ConstraintStateType z {2} - - "Constraint states"
typedef ^ ^ ExtLoads_OtherStateType OtherSt {2} - - "Other states"
typedef ^ ^ ExtLoads_ParameterType p - - - "Parameters"
typedef ^ ^ ExtLoads_InputType u - - - "System inputs"
typedef ^ ^ ExtLoads_OutputType y - - - "System outputs"
typedef ^ ^ ExtLoads_MiscVarType m - - - "Misc/optimization variables"
typedef ^ ^ ExtLoads_InputType Input {:} - - "Array of inputs associated with InputTimes"
typedef FAST ExtLoads_Data ExtLd_ContinuousStateType x {2} - - "Continuous states"
typedef ^ ^ ExtLd_DiscreteStateType xd {2} - - "Discrete states"
typedef ^ ^ ExtLd_ConstraintStateType z {2} - - "Constraint states"
typedef ^ ^ ExtLd_OtherStateType OtherSt {2} - - "Other states"
typedef ^ ^ ExtLd_ParameterType p - - - "Parameters"
typedef ^ ^ ExtLd_InputType u - - - "System inputs"
typedef ^ ^ ExtLd_OutputType y - - - "System outputs"
typedef ^ ^ ExtLd_MiscVarType m - - - "Misc/optimization variables"
typedef ^ ^ ExtLd_InputType Input {:} - - "Array of inputs associated with InputTimes"
typedef ^ ^ DbKi InputTimes {:} - - "Array of times associated with Input Array"

# ..... InflowWind data .......................................................................................................
Expand Down Expand Up @@ -441,6 +441,8 @@ typedef ^ FAST_ModuleMapType MeshMapType ED_L_2_AD_L_T - - - "Map ElastoDyn Towe
typedef ^ FAST_ModuleMapType MeshMapType AD_L_2_ED_P_T - - - "Map AeroDyn14 Twr_InputMarkers or AeroDyn TowerLoad line2 mesh to ElastoDyn TowerPtLoads point mesh"
typedef ^ FAST_ModuleMapType MeshMapType ED_P_2_AD_P_R {:} - - "Map ElastoDyn BladeRootMotion point meshes to AeroDyn BladeRootMotion point meshes"
typedef ^ FAST_ModuleMapType MeshMapType ED_P_2_AD_P_H - - - "Map ElastoDyn HubPtMotion point mesh to AeroDyn HubMotion point mesh"
# ED/BD <-> ExtLd (blades)
typedef ^ FAST_ModuleMapType MeshMapType ExtLd_P_2_BDED_B {:} - - "Map ExtLoads InputMarkers to ElastoDyn BladePtLoad point meshes or BeamDyn BldMotion line2 meshes"
# IceF <-> SD
typedef ^ FAST_ModuleMapType MeshMapType IceF_P_2_SD_P - - - "Map IceFloe point mesh to SubDyn y2Mesh point mesh"
typedef ^ FAST_ModuleMapType MeshMapType SD_P_2_IceF_P - - - "Map SubDyn y2Mesh point mesh to IceFloe point mesh"
Expand Down Expand Up @@ -517,7 +519,7 @@ typedef ^ FAST_TurbineType BeamDyn_Data BD - - - "Data for the BeamDyn module" -
typedef ^ FAST_TurbineType ServoDyn_Data SrvD - - - "Data for the ServoDyn module" -
typedef ^ FAST_TurbineType AeroDyn_Data AD - - - "Data for the AeroDyn module" -
typedef ^ FAST_TurbineType AeroDyn14_Data AD14 - - - "Data for the AeroDyn14 module" -
typedef ^ FAST_TurbineType ExtLoads_Data ExtLoads - - - "Data for the External loads module" -
typedef ^ FAST_TurbineType ExtLoads_Data ExtLd - - - "Data for the External loads module" -
typedef ^ FAST_TurbineType InflowWind_Data IfW - - - "Data for InflowWind module" -
typedef ^ FAST_TurbineType OpenFOAM_Data OpFM - - - "Data for OpenFOAM integration module" -
typedef ^ FAST_TurbineType SuperController_Data SC - - - "Data for SuperController integration module" -
Expand Down
Loading

0 comments on commit c1f85d6

Please sign in to comment.