###################################################################################################################################
# Registry for ExternalInflow - CFD interface types in the FAST Modularization Framework
# Entries are of the form
# <keyword>   <ModuleName/ModName>   <TypeName>   <FieldType>   <FieldName>   <Dims>   <IO>   <DNAME>   <DESCRIP>   <UNITS>
#
# Use ^ as a shortcut for the value in the same column from the previous line.
###################################################################################################################################
# ...... Include files (definitions from NWTC Library) ............................................................................
include   Registry_NWTC_Library.txt
include IfW_FlowField.txt



# ..... ExternalInflow_InitInputType data .......................................................................................................
typedef   ExternalInflow/ExtInfw   InitInputType   IntKi   NumActForcePtsBlade   - - -  "number of actuator line force points in blade -- from extern (used to linearly interpolate along AD15 blades)"   -
typedef   ^   ^                                    IntKi   NumActForcePtsTower   - - -  "number of actuator line force points in tower -- from extern (used to linearly interpolate along AD15 tower)"   -
typedef   ^   ^                                    ReKi    StructBldRNodes     {:} - -  "Radius to structural model analysis nodes relative to hub"
typedef   ^   ^                                    ReKi    StructTwrHNodes     {:} - -  "Location of tower nodes from AD15 (relative to the tower rigid base height)"
typedef   ^   ^                                    ReKi    BladeLength           - - -  "Blade length"   meters
typedef   ^   ^                                    ReKi    TowerHeight           - - -  "Tower Height"   meters
typedef   ^   ^                                    ReKi    TowerBaseHeight       - - -  "Tower Base Height"   meters
typedef   ^   ^                                    IntKi   NodeClusterType       - - -  "Node clustering (0 - Uniform, 1 - Non-uniform clustered towards tip)"   -



# ..... ExternalInflow_InitOutputType data .......................................................................................................
# Define outputs from the initialization routine here:
typedef   ExternalInflow/ExtInfw   InitOutputType   CHARACTER(ChanLen)   WriteOutputHdr   {:} - -  "Names of the output-to-file channels"   -
typedef   ^                        InitOutputType   CHARACTER(ChanLen)   WriteOutputUnt   {:} - -  "Units of the output-to-file channels"   -
typedef   ^                        InitOutputType   ProgDesc             Ver                - - -  "This module's name, version, and date"   -
typedef   ^                        InitOutputType   FlowFieldType       *FlowField          - - -  "Pointer of flow field data type"   - 

# ..... MiscVars ................................................................................................................
typedef   ExternalInflow/ExtInfw   ExtInfw_MiscVarType   MeshType      ActForceMotionsPoints   {:} - -  "point mesh for transferring AeroDyn motions to ExternalInflow  (includes hub+blades+nacelle+tower+tailfin)"   -
typedef   ExternalInflow/ExtInfw   ExtInfw_MiscVarType   MeshType      ActForceLoadsPoints     {:} - -  "point mesh for transferring AeroDyn distributed loads to ExternalInflow (includes hub+blades+nacelle+tower+tailfin)"   -
typedef   ExternalInflow/ExtInfw   ExtInfw_MiscVarType   MeshMapType   Line2_to_Point_Loads    {:} - -  "mapping data structure to convert line2 loads to point loads"   -
typedef   ExternalInflow/ExtInfw   ExtInfw_MiscVarType   MeshMapType   Line2_to_Point_Motions  {:} - -  "mapping data structure to convert line2 loads to point motions"   -
typedef   ExternalInflow/ExtInfw   ExtInfw_MiscVarType   FlowFieldType   &FlowField             -  - -  "Flow field data type"   - 


# ..... Parameters ................................................................................................................
typedef   ExternalInflow/ExtInfw   ParameterType   ReKi    AirDens            - - -  "Air density for normalization of loads sent to ExternalInflow"   kg/m^3
typedef   ExternalInflow/ExtInfw   ParameterType   IntKi   NumBl              - - -  "Number of blades"   -
typedef   ExternalInflow/ExtInfw   ParameterType   IntKi   NMappings          - - -  "Number of mappings"   -
typedef   ExternalInflow/ExtInfw   ParameterType   IntKi   NnodesVel          - - -  "number of velocity nodes on FAST v8-ExternalInflow interface"   -
typedef   ExternalInflow/ExtInfw   ParameterType   IntKi   NnodesForce        - - -  "number of force nodes on FAST v8-ExternalInflow interface"   -
typedef   ExternalInflow/ExtInfw   ParameterType   IntKi   NnodesForceBlade   - - -  "number of force nodes on FAST v8-ExternalInflow interface"   -
typedef   ExternalInflow/ExtInfw   ParameterType   IntKi   NnodesForceTower   - - -  "number of force nodes on FAST v8-ExternalInflow interface"   -
typedef   ExternalInflow/ExtInfw   ParameterType   ReKi    forceBldRnodes   {:} - -  "Radial location of force nodes"  -
typedef   ExternalInflow/ExtInfw   ParameterType   ReKi    forceTwrHnodes   {:} - -  "Vertical location of force nodes"  -
typedef   ExternalInflow/ExtInfw   ParameterType   ReKi    BladeLength        - - -  "Blade length (same for all blades)"   "m"
typedef   ExternalInflow/ExtInfw   ParameterType   ReKi    TowerHeight        - - -  "Tower height"   "m"
typedef   ExternalInflow/ExtInfw   ParameterType   ReKi    TowerBaseHeight    - - -  "Tower base height"   "m"
typedef   ExternalInflow/ExtInfw   ParameterType   IntKi   NodeClusterType    - - -  "Node clustering (0 - Uniform, 1 - Non-uniform clustered towards tip)"   -

# ..... ExternalInflow_InputType data .......................................................................................................
typedef   ^   InputType   ReKi   pxVel             {:} - -  "x position of velocity interface (Aerodyn) nodes"   "m"
typedef   ^   InputType   ReKi   pyVel             {:} - -  "y position of velocity interface (Aerodyn) nodes"   "m"
typedef   ^   InputType   ReKi   pzVel             {:} - -  "z position of velocity interface (Aerodyn) nodes"   "m"
typedef   ^   InputType   ReKi   pxForce           {:} - -  "x position of actuator force nodes"   "m"
typedef   ^   InputType   ReKi   pyForce           {:} - -  "y position of actuator force nodes"   "m"
typedef   ^   InputType   ReKi   pzForce           {:} - -  "z position of actuator force nodes"   "m"
typedef   ^   InputType   ReKi   xdotForce         {:} - -  "x velocity of actuator force nodes"   "m/s"
typedef   ^   InputType   ReKi   ydotForce         {:} - -  "y velocity of actuator force nodes"   "m/s"
typedef   ^   InputType   ReKi   zdotForce         {:} - -  "z velocity of actuator force nodes"   "m/s"
typedef   ^   InputType   ReKi   pOrientation      {:} - -  "Direction cosine matrix to transform vectors from global frame of reference to actuator force node frame of reference" -
typedef   ^   InputType   ReKi   fx                {:} - -  "normalized x force at actuator force nodes"   "N/kg/m^3"
typedef   ^   InputType   ReKi   fy                {:} - -  "normalized y force at actuator force nodes"   "N/kg/m^3"
typedef   ^   InputType   ReKi   fz                {:} - -  "normalized z force at actuator force nodes"   "N/kg/m^3"
typedef   ^   InputType   ReKi   momentx           {:} - -  "normalized x moment at actuator force nodes"   "Nm/kg/m^3"
typedef   ^   InputType   ReKi   momenty           {:} - -  "normalized y moment at actuator force nodes"   "Nm/kg/m^3"
typedef   ^   InputType   ReKi   momentz           {:} - -  "normalized z moment at actuator force nodes"   "Nm/kg/m^3"
typedef   ^   InputType   ReKi   forceNodesChord   {:} - -  "chord distribution at the actuator force nodes"   "m"

# ..... ExternalInflow_OutputType data .......................................................................................................
typedef   ^   OutputType   ReKi   u                {:} - -  "U-component wind speed (in the X-direction) at interface nodes"   m/s
typedef   ^   OutputType   ReKi   v                {:} - -  "V-component wind speed (in the Y-direction) at interface nodes"   m/s
typedef   ^   OutputType   ReKi   w                {:} - -  "W-component wind speed (in the Z-direction) at interface nodes"   m/s
typedef   ^   OutputType   ReKi   WriteOutput      {:} - -  "Data to be written to an output file: see WriteOutputHdr for names of each variable"   "see WriteOutputUnt"
