###################################################################################################################################
# Registry for AeroDyn 15 in the FAST Modularization Framework
# This Registry file is used to create AeroDyn_Types which contains data used in the AeroDyn module.
# It also contains copy, destroy, pack, and unpack routines associated with each defined data types.
# See the NWTC Programmer's Handbook for further information on the format/contents of this file.
#
# 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
usefrom	AirfoilInfo_Registry.txt
usefrom	BEMT_Registry.txt
usefrom  FVW_Registry.txt
usefrom	UnsteadyAero_Registry.txt
usefrom AeroAcoustics_Registry.txt
usefrom InflowWind.txt

param    AeroDyn/AD     -  IntKi    ModelUnknown            - -1  -  "" -
param    ^              -  IntKi    WakeMod_none            -  0  -  "Wake model - none"                                      -
param    ^              -  IntKi    WakeMod_BEMT            -  1  -  "Wake model - BEMT (blade elememnt momentum theory)"     -
#param    ^              -  IntKi    WakeMod_TODO           -  2  -  "Wake model - TBD"  -
param    ^              -  IntKi    WakeMod_FVW             -  3  -  "Wake model - FVW (free vortex wake, OLAF)"              -

param    ^              -  IntKi    TwrPotent_none          -  0  -  "no tower potential flow"                    -
param    ^              -  IntKi    TwrPotent_baseline      -  1  -  "baseline tower potential flow"              -
param    ^              -  IntKi    TwrPotent_Bak           -  2  -  "tower potential flow with Bak correction"   -

param    ^              -  IntKi    TwrShadow_none          -  0  -  "no tower shadow"                            -
param    ^              -  IntKi    TwrShadow_Powles        -  1  -  "Powles tower shadow model"                  -
param    ^              -  IntKi    TwrShadow_Eames         -  2  -  "Eames tower shadow model"                   -

param    ^              -  IntKi    TwrAero_none            -  0  -  "no tower aero"                            -
param    ^              -  IntKi    TwrAero_noVIV           -  1  -  "Tower aero model without VIV"                  -
param    ^              -  IntKi    TwrAero_VIV             -  2  -  "Tower aero model with VIV"                   -

param    ^              -  IntKi    SA_Wgt_Uniform          -  1  -  "Sector average weighting - Uniform"                            -
#param    ^              -  IntKi    SA_Wgt_Impulse          -  1  -  "Sector average weighting - Impulse"                            -

param    ^              -  IntKi    TFinAero_none           -  0  -  "no tail fin aero"                                   -
param    ^              -  IntKi    TFinAero_polar          -  1  -  "polar-based tail fin aerodynamics"                  -
param    ^              -  IntKi    TFinAero_USB            -  2  -  "unsteady slender body tail fin aerodynamics model"  -

param    ^              -  IntKi    TFinIndMod_none         -  0  -  "no induction"                                   -
param    ^              -  IntKi    TFinIndMod_rotavg       -  1  -  "rotor averaged induction"                       -
# AeroProjMod (APM)
param    ^              -  IntKi    APM_BEM_NoSweepPitchTwist - 1 -  "Original AeroDyn model where momentum balance is done in the WithoutSweepPitchTwist system"  -
param    ^              -  IntKi    APM_BEM_Polar             - 2 -  "Use staggered polar grid for momentum balance in each annulus"                               -
param    ^              -  IntKi    APM_LiftingLine           - 3 -  "Use the blade lifting line (i.e. the structural) orientation (currently for OLAF with VAWT)" -
# if more than AD_MaxBl_Out blades are used in the simulation, not all channels will have output information for the "extra" blades.
# Also, the AD input file will require more lines for the additional blades.
param    ^              -  IntKi    AD_MaxBl_Out            -  3  -  "Maximum number of blades for information output (or linearization)" -

# Tail Fin parameters 
typedef  ^  TFinParameterType   IntKi   TFinMod    -    -   0 "Tail fin aerodynamics model {0=none, 1=polar-based, 2=USB-based}" (switch)
typedef  ^  TFinParameterType   ReKi    TFinArea   -    -   - "Tail fin planform area" m^2
typedef  ^  TFinParameterType   IntKi   TFinIndMod -    -   - "Model for induced velocity calculation {0=none, 1=rotor-average}" (switch)
typedef  ^  TFinParameterType   IntKi   TFinAFID   -    -   - "Index of Tail fin airfoil number [1 to NumAFfiles]" -
typedef  ^  TFinParameterType   ReKi    TFinChord  -    -   - "Tail fin chord" m
typedef  ^  TFinParameterType   ReKi   TFinKp   -    -   - "Tail fin potential flow coefficient for unsteady aerodynamics" -
typedef  ^  TFinParameterType   ReKi   TFinSigma   3    -   - "Tail fin empirical constants characterizing the decay of separation functions" 1/deg
typedef  ^  TFinParameterType   ReKi   TFinAStar   3    -   - "Tail fin characteristics angles for separation functions" deg
typedef  ^  TFinParameterType   ReKi   TFinKv   -    -   - "Tail fin vortex lift coefficient for unsteady aerodynamics" -
typedef  ^  TFinParameterType   ReKi   TFinCDc   -    -   - "Tail fin drag coefficient for unsteady aerodynamics" -

# Tail Fin input file 
typedef  ^  TFinInputFileType   IntKi   TFinMod    -    -   0 "Tail fin aerodynamics model {0=none, 1=polar-based, 2=USB-based}" (switch)
typedef  ^  TFinInputFileType   ReKi    TFinArea   -    -   - "Tail fin planform area" m^2
typedef  ^  TFinInputFileType   ReKi    TFinRefP_n 3    -   - "Undeflected position of the tail fin reference point wrt the tower top" m 
typedef  ^  TFinInputFileType   ReKi    TFinAngles 3    -   - "Tail fin chordline skew, tilt, and bank angles about the reference point" (deg)
typedef  ^  TFinInputFileType   IntKi   TFinIndMod -    -   - "Model for induced velocity calculation {0=none, 1=rotor-average}" (switch)
typedef  ^  TFinInputFileType   IntKi   TFinAFID   -    -   - "Index of Tail fin airfoil number [1 to NumAFfiles]" -
typedef  ^  TFinInputFileType   ReKi    TFinChord  -    -   - "Tail fin chord" m
typedef  ^  TFinInputFileType   ReKi    TFinKp   -    -   - "Tail fin potential flow coefficient for unsteady aerodynamics" -
typedef  ^  TFinInputFileType   ReKi    TFinSigma   3    -   - "Tail fin empirical constants characterizing the decay of separation functions" 1/deg
typedef  ^  TFinInputFileType   ReKi    TFinAStar 3    -   - "Tail fin characteristics angles for separation functions" deg
typedef  ^  TFinInputFileType   ReKi   TFinKv   -    -   - "Tail fin vortex lift coefficient for unsteady aerodynamics" -
typedef  ^  TFinInputFileType   ReKi   TFinCDc   -    -   - "Tail fin drag coefficient for unsteady aerodynamics" -



typedef    ^    AD_VTK_BLSurfaceType     SiKi                    AirfoilCoords    {:}{:}{:} -    -    "x,y coordinates for airfoil around each blade node on a blade (relative to reference)"    -

typedef    ^    AD_VTK_RotSurfaceType    AD_VTK_BLSurfaceType    BladeShape          {:}    -    -    "AirfoilCoords for each blade"    -
typedef    ^          ^                  SiKi                    TowerRad            {:}    -    -    "radius of each ED tower node"    m

 

# ..... Initialization data .......................................................................................................
# Define inputs that the initialization routine may need here:
typedef	AeroDyn/AD	RotInitInputType	IntKi	NumBlades	-	-	-	"Number of blades on the turbine" -
typedef	^	RotInitInputType	ReKi	originInit	{3}	-	0	"X-Y-Z reference position for the turbine"	m
typedef	^	RotInitInputType	ReKi	HubPosition	{3}	-	-	"X-Y-Z reference position of hub"	m
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 nacelle"	m
typedef	^	RotInitInputType	R8Ki	NacelleOrientation	{3}{3}	-	-	"DCM reference orientation of nacelle"	-
typedef	^	RotInitInputType	IntKi	AeroProjMod   	-	1	-	"Flag to switch between different projection models"	-
typedef	^	RotInitInputType	ReKi	RotSpeed	-	-	0	"Rotor speed used when AeroDyn is computing aero maps"	"rad/s"

typedef	^	InitInputType	RotInitInputType rotors	{:}	-	-	"Init Input Types for rotors"	-
typedef	^	InitInputType	CHARACTER(1024)	InputFile	-	-	-	"Name of the input file"	-
typedef	^	InitInputType	CHARACTER(1024)	RootName	-	-	-	"RootName for writing output files"	-
typedef	^	InitInputType	LOGICAL	UsePrimaryInputFile	-	.TRUE.	-	"Read input file instead of passed data"	-
typedef	^	InitInputType	FileInfoType	PassedPrimaryInputData	-	-	-	"Primary input file as FileInfoType (set by driver/glue code)"	-
typedef	^	InitInputType	Logical	Linearize	-	.FALSE.	-	"Flag that tells this module if the glue code wants to linearize."	-
typedef	^	InitInputType	LOGICAL	CompAeroMaps   -  .FALSE. -   "flag to determine if AeroDyn is computing aero maps (true) or running a normal simulation (false)"	-
typedef	^	InitInputType	ReKi	Gravity	-	-	-	"Gravity force" Nm/s^2
typedef ^   InitInputType   IntKi   MHK     -   -   -   "MHK turbine type switch"   -
typedef ^   InitInputType   ReKi    defFldDens  -   -   -   "Default fluid density from the driver; may be overwritten" kg/m^3
typedef ^   InitInputType   ReKi    defKinVisc  -   -   -   "Default kinematic viscosity from the driver; may be overwritten" m^2/s
typedef ^   InitInputType   ReKi    defSpdSound -   -   -   "Default speed of sound from the driver; may be overwritten" m/s
typedef ^   InitInputType   ReKi    defPatm     -   -   -   "Default atmospheric pressure from the driver; may be overwritten" Pa
typedef ^   InitInputType   ReKi    defPvap     -   -   -   "Default vapor pressure from the driver; may be overwritten" Pa
typedef ^   InitInputType   ReKi    WtrDpth -  -   -    "Water depth" m
typedef ^   InitInputType   ReKi    MSL2SWL -  -   -    "Offset between still-water level and mean sea level" m
typedef ^   InitInputType   FlowFieldType *FlowField -  -   -    "Pointer of InflowWinds flow field data type" - 

# This is data defined in the Input File for this module (or could otherwise be passed in)
# ..... Blade Input file data .....................................................................................................
typedef	^	AD_BladePropsType	IntKi	NumBlNds	-	-	-	"Number of blade nodes used in the analysis"	-
typedef	^	AD_BladePropsType	ReKi	BlSpn	{:}	-	-	"Span at blade node"	m
typedef	^	AD_BladePropsType	ReKi	BlCrvAC	{:}	-	-	"Curve at blade node"	m
typedef	^	AD_BladePropsType	ReKi	BlSwpAC	{:}	-	-	"Sweep at blade node"	m
typedef	^	AD_BladePropsType	ReKi	BlCrvAng	{:}	-	-	"Curve angle at blade node"	radians
typedef	^	AD_BladePropsType	ReKi	BlTwist	{:}	-	-	"Twist at blade node"	radians
typedef	^	AD_BladePropsType	ReKi	BlChord	{:}	-	-	"Chord at blade node"	m
typedef	^	AD_BladePropsType	IntKi	BlAFID	{:}	-	-	"ID of Airfoil at blade node"	-
typedef ^   AD_BladePropsType   ReKi    BlCb    {:} -   -   "Coefficient of buoyancy at blade node"   -
typedef ^   AD_BladePropsType   ReKi    BlCenBn {:} -   -   "Center of buoyancy normal offset at blade node"   m
typedef ^   AD_BladePropsType   ReKi    BlCenBt {:} -   -   "Center of buoyancy tangential offset at blade node"   m

# Define outputs from the initialization routine here:
typedef	^	AD_BladeShape	SiKi	AirfoilCoords	{:}{:}{:}	-	-	"x-y coordinates for airfoils, relative to node"	m

# Define outputs from the initialization routine here:
typedef	^	RotInitOutputType	ReKi	AirDens	-	-	-	"Air density"	kg/m^3
typedef	^	RotInitOutputType	CHARACTER(ChanLen)	WriteOutputHdr	{:}	-	-	"Names of the output-to-file channels"	-
typedef	^	RotInitOutputType	CHARACTER(ChanLen)	WriteOutputUnt	{:}	-	-	"Units of the output-to-file channels"	-
typedef	^	RotInitOutputType	AD_BladeShape	BladeShape	{:}	-	-	"airfoil coordinates for each blade"	m
typedef	^	RotInitOutputType	CHARACTER(LinChanLen)	LinNames_y	{:}	-	-	"Names of the outputs used in linearization"	-
typedef	^	RotInitOutputType	CHARACTER(LinChanLen)	LinNames_x	{:}	-	-	"Names of the continuous states used in linearization"	-
typedef	^	RotInitOutputType	CHARACTER(LinChanLen)	LinNames_u	{:}	-	-	"Names of the inputs used in linearization"	-
typedef	^	RotInitOutputType	LOGICAL	RotFrame_y	{:}	-	-	"Flag that tells FAST/MBC3 if the outputs used in linearization are in the rotating frame"	-
typedef	^	RotInitOutputType	LOGICAL	RotFrame_x	{:}	-	-	"Flag that tells FAST/MBC3 if the continuous states used in linearization are in the rotating frame (not used for glue)"	-
typedef	^	RotInitOutputType	LOGICAL	RotFrame_u	{:}	-	-	"Flag that tells FAST/MBC3 if the inputs used in linearization are in the rotating frame"	-
typedef	^	RotInitOutputType	LOGICAL	IsLoad_u	{:}	-	-	"Flag that tells FAST if the inputs used in linearization are loads (for preconditioning matrix)"	-
typedef	^	RotInitOutputType	AD_BladePropsType	BladeProps	{:}	-	-	"blade property information from blade input files"	-
typedef	^	RotInitOutputType	IntKi	DerivOrder_x {:}	-	-	"Integer that tells FAST/MBC3 the maximum derivative order of continuous states used in linearization"	-
typedef	^	RotInitOutputType	ReKi	TwrElev	{:}	-	-	"Elevation at tower node"	m
typedef	^	RotInitOutputType	ReKi	TwrDiam	{:}	-	-	"Diameter of tower at node"	m

typedef	^	InitOutputType	RotInitOutputType	 rotors	{:}	-	-	"Rotor init output type"	-
typedef	^	InitOutputType	ProgDesc	Ver	-	-	-	"This module's name, version, and date"	-
typedef	^	InitOutputType	IntKi	nNodesVel	-	-	-	"number of nodes velocity values are needed at (for ExtLoads coupling)"	-
# ..... Input file data ...........................................................................................................

# ..... Primary Input file data ...................................................................................................
#typedef  ^  RotInputFile   IntKi BldNd_BladesOut - - - "The blades to output (AD_AllBldNdOuts)" -
typedef	^	RotInputFile	AD_BladePropsType	BladeProps	{:}	-	-	"blade property information from blade input files"	-
typedef	^	RotInputFile	IntKi	NumTwrNds	-	-	-	"Number of tower nodes used in the analysis"	-
typedef	^	RotInputFile	ReKi	TwrElev	{:}	-	-	"Elevation at tower node"	m
typedef	^	RotInputFile	ReKi	TwrDiam	{:}	-	-	"Diameter of tower at node"	m
typedef	^	RotInputFile	ReKi	TwrCd	{:}	-	-	"Coefficient of drag at tower node"	-
typedef	^	RotInputFile	ReKi	TwrTI	{:}	-	-	"Turbulence intensity for tower shadow at tower node"	-
typedef	^	RotInputFile	ReKi	TwrCb	{:}	-	-	"Coefficient of buoyancy at tower node"	-
# Hub
typedef	^	RotInputFile	ReKi	VolHub	    -	-	-	"Hub volume" m^3
typedef	^	RotInputFile	ReKi	HubCenBx    -	-	-	"Hub center of buoyancy x direction offset" m
# Nacelle
typedef	^	RotInputFile	ReKi	VolNac	    -	-	-	"Nacelle volume" m^3
typedef	^	RotInputFile	ReKi	NacCenB     3	-	-	"Position of nacelle center of buoyancy from yaw bearing in nacelle coordinates" m
typedef	^	RotInputFile	ReKi	NacArea     3	-	-	"Projected area of the nacelle in X, Y, Z in the nacelle coordinate system" m^2
typedef	^	RotInputFile	ReKi	NacCd       3	-	-	"Drag cefficient for the nacelle areas defied above" -
typedef	^	RotInputFile	ReKi	NacDragAC   3	-	-	"Position of aerodynamic center of nacelle drag in nacelle coordinates" m
# TailFin
typedef  ^  RotInputFile   LOGICAL          TFinAero  - .FALSE. -   "Calculate tail fin aerodynamics model (flag)" flag
typedef  ^  RotInputFile   CHARACTER(1024)  TFinFile  -    -    -   "Input file for tail fin aerodynamics [used only when TFinAero=True]" -
typedef  ^  RotInputFile   TFinInputFileType TFin     -    -    -   "Input file data for tail fin" -

typedef	^	AD_InputFile	Logical	Echo	-	-	-	"Echo input file to echo file"	-
typedef	^	AD_InputFile	DbKi	DTAero	-	-	-	"Time interval for aerodynamic calculations {or \"default\"}"	s
typedef	^	AD_InputFile	IntKi	Wake_Mod	-	-	-	"Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}"	-
typedef	^	AD_InputFile	IntKi	BEM_Mod	-	-	-	"Type of BEM model {1=legacy NoSweepPitchTwist, 2=polar grid}"	-
typedef	^	AD_InputFile	IntKi	TwrPotent	-	-	-	"Type of tower influence on wind based on potential flow around the tower {0=none, 1=baseline potential flow, 2=potential flow with Bak correction}"	-
typedef	^	AD_InputFile	IntKi	TwrShadow	-	-	-	"Type of tower influence on wind based on downstream tower shadow {0=none, 1=Powles model, 2=Eames model}"	-
typedef	^	AD_InputFile	IntKi	TwrAero	-	-	-	"Calculate tower aerodynamic loads? {0=none, 1=aero without VIV, 2=aero with VIV}"	-
typedef	^	AD_InputFile	Logical	CavitCheck	-	-	-	"Flag that tells us if we want to check for cavitation" -
typedef ^   AD_InputFile    Logical Buoyancy    -   -   -   "Include buoyancy effects?" flag
typedef ^   AD_InputFile    Logical NacelleDrag    -   -   -   "Include NacelleDrag effects?" flag
typedef	^	AD_InputFile	Logical	CompAA   -  -  -  "Compute AeroAcoustic noise" flag
typedef	^	AD_InputFile	CHARACTER(1024)	AA_InputFile	-	-	-	"AeroAcoustics input file name"	"quoted strings"
typedef	^	AD_InputFile	CHARACTER(1024)	ADBlFile {:}	-	-	"AD blade file (NumBl filenames)"	"quoted strings"
typedef	^	AD_InputFile	ReKi	AirDens	-	-	-	"Air density"	kg/m^3
typedef	^	AD_InputFile	ReKi	KinVisc	-	-	-	"Kinematic air viscosity"	m^2/s
typedef	^	AD_InputFile	ReKi	Patm 	-	-	-	"Atmospheric pressure" Pa
typedef	^	AD_InputFile	ReKi	Pvap 	-	-	-	"Vapour pressure" Pa
typedef	^	AD_InputFile	ReKi	SpdSound	-	-	-	"Speed of sound"	m/s
typedef	^	AD_InputFile	IntKi	Skew_Mod -	-	-	"Select skew model {0=No skew model at all, -1=Throw away non-normal component for linearization, 1=Glauert skew model}"	-
typedef	^	AD_InputFile	Logical SkewMomCorr	-	-	-	"Turn the skew momentum correction on or off [used only when SkewMod=1]" - 
typedef	^	AD_InputFile	IntKi   SkewRedistr_Mod	-	-	-	"Type of skewed-wake redistribution model (switch) {0=no redistribution, 1=Glauert/Pitt/Peters, 2=Vortex Cylinder} [unsed only when SkewMod=1]" - 
typedef	^	AD_InputFile	ReKi	SkewModFactor	-	-	-	"Constant used in Pitt/Peters skewed wake model (default is 15*pi/32)" -
typedef	^	AD_InputFile	LOGICAL	TipLoss	-	-	-	"Use the Prandtl tip-loss model? [unused when Wake_Mod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	HubLoss	-	-	-	"Use the Prandtl hub-loss model? [unused when Wake_Mod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	TanInd	-	-	-	"Include tangential induction in BEMT calculations? [unused when Wake_Mod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	AIDrag	-	-	-	"Include the drag term in the axial-induction calculation? [unused when Wake_Mod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	TIDrag	-	-	-	"Include the drag term in the tangential-induction calculation? [unused when Wake_Mod=0 or TanInd=FALSE]"	flag
typedef	^	AD_InputFile	ReKi	IndToler	-	-	-	"Convergence tolerance for BEM induction factors [unused when Wake_Mod=0]"	-
typedef	^	AD_InputFile	ReKi	MaxIter	-	-	-	"Maximum number of iteration steps [unused when Wake_Mod=0]"	-
typedef	^	AD_InputFile	Logical	SectAvg	-	.False. - 	"Use Sector average for BEM inflow velocity calculation (flag)"	-
typedef	^	     ^      	IntKi  	SA_Weighting	-	1	-	    "Sector Average - Weighting function for sector average  {1=Uniform, 2=Impulse, }  within a 360/nB sector centered on the blade (switch) [used only when SectAvg=True]" -
typedef	^	     ^      	ReKi   	SA_PsiBwd	-	-60	-	"Sector Average - Backard Azimuth (<0)"	deg
typedef	^	     ^      	ReKi   	SA_PsiFwd	-	 60	-	"Sector Average - Forward Azimuth (>0)"	deg
typedef	^	     ^      	IntKi  	SA_nPerSec	-	  5	-	"Sector average - Number of points per sectors (-) [used only when SectAvg=True]" -
typedef	^	     ^      	LOGICAL	AoA34	-	-	-	"Sample the angle of attack (AoA) at the 3/4 chord or the AC point {default=True} [always used]"	-
typedef	^	AD_InputFile	UA_InitInputType	UA_Init	-	-	-	"InitInput data for UA model"	-
typedef	^	AD_InputFile	ReKi	InCol_Alfa	-	-	-	"The column in the airfoil tables that contains the angle of attack"	-
typedef	^	AD_InputFile	ReKi	InCol_Cl	-	-	-	"The column in the airfoil tables that contains the lift coefficient"	-
typedef	^	AD_InputFile	ReKi	InCol_Cd	-	-	-	"The column in the airfoil tables that contains the drag coefficient"	-
typedef	^	AD_InputFile	ReKi	InCol_Cm	-	-	-	"The column in the airfoil tables that contains the pitching-moment coefficient; use zero if there is no Cm column"	-
typedef	^	AD_InputFile	ReKi	InCol_Cpmin	-	-	-	"The column in the airfoil tables that contains the drag coefficient; use zero if there is no Cpmin column"	-
typedef	^	AD_InputFile	IntKi AFTabMod	-	-	-	"Interpolation method for multiple airfoil tables {1 = 1D on AoA (only first table is used); 2 = 2D on AoA and Re; 3 = 2D on AoA and UserProp}" -
typedef	^	AD_InputFile	IntKi	NumAFfiles	-	-	-	"Number of airfoil files used"	-
typedef	^	AD_InputFile	CHARACTER(1024)	FVWFileName	-	-	-	"FVW input filename"	"quoted string"
typedef	^	AD_InputFile	CHARACTER(1024)	AFNames	{:}	-	-	"Airfoil file names (NumAF lines)"	"quoted strings"
typedef	^	AD_InputFile	LOGICAL	UseBlCm	-	-	-	"Include aerodynamic pitching moment in calculations?"	flag
#typedef	^	AD_InputFile	IntKi	NumBlNds	-	-	-	"Number of blade nodes used in the analysis"	-
typedef	^	AD_InputFile	LOGICAL	SumPrint	-	-	-	"Generate a summary file listing input options and interpolated properties to \"<rootname>.AD.sum\"?"	flag
typedef	^	AD_InputFile	IntKi	NBlOuts	-	-	-	"Number of blade node outputs [0 - 9]"	-
typedef	^	AD_InputFile	IntKi	BlOutNd	{9}	-	-	"Blade nodes whose values will be output"	-
typedef	^	AD_InputFile	IntKi	NTwOuts	-	-	-	"Number of tower node outputs [0 - 9]"	-
typedef	^	AD_InputFile	IntKi	TwOutNd	{9}	-	-	"Tower nodes whose values will be output"	-
typedef	^	AD_InputFile	IntKi	NumOuts	-	-	-	"Number of parameters in the output list (number of outputs requested)"	-
typedef	^	AD_InputFile	CHARACTER(ChanLen)	OutList	{:}	-	-	"List of user-requested output channels"	-
typedef	^	AD_InputFile	ReKi	tau1_const	-	-	-	"time constant for DBEMT"	s
typedef	^	AD_InputFile	IntKi	DBEMT_Mod	-	-	-	"Type of dynamic BEMT (DBEMT) model {0=No Dynamic Wake, -1=Frozen Wake for linearization, 1=constant tau1, 2=time-dependent tau1, 3=constant tau1 with continuous formulation} (-) [used only when WakeMod=1]" -
typedef	^	AD_InputFile	IntKi	BldNd_NumOuts	-	-	-	"Number of requested output channels per blade node (AD_AllBldNdOuts)"	-
typedef	^	AD_InputFile	CHARACTER(ChanLen)	BldNd_OutList	{:}	-	-	"List of user-requested output channels (AD_AllBldNdOuts)"	-
#typedef  ^  AD_InputFile   IntKi BldNd_BlOutNd {:} - - "The blade nodes to actually output (AD_AllBldNdOuts)" -
typedef  ^  AD_InputFile   CHARACTER(1024) BldNd_BlOutNd_Str - - - "String to parse for the blade nodes to actually output (AD_AllBldNdOuts)" -
typedef  ^  AD_InputFile   IntKi BldNd_BladesOut - - - "The blades to output (AD_AllBldNdOuts)" -
#typedef  ^  AD_InputFile   CHARACTER(1024) BldNd_BladesOut_Str - - - "String to parse for the he blades to output (AD_AllBldNdOuts)" -
typedef  ^  AD_InputFile   ReKi             UAStartRad  -  -  - Starting radius for dynamic stall (fraction of rotor radius)
typedef  ^  AD_InputFile   ReKi             UAEndRad    -  -  - Ending radius for dynamic stall (fraction of rotor radius)
typedef  ^  AD_InputFile   RotInputFile  rotors {:} - - "Rotor (blades and tower) input file data" -




# ..... States ....................................................................................................................
# Define continuous (differentiable) states here:
typedef	^	RotContinuousStateType	BEMT_ContinuousStateType	BEMT	-	-	-	"Continuous states from the BEMT module"	-
typedef	^	RotContinuousStateType	AA_ContinuousStateType	AA	-	-	-	"Continuous states from the AA module"	-

typedef	^	ContinuousStateType	RotContinuousStateType	rotors	{:}	-	-	"Continuous states for each rotor"	-
typedef	^	ContinuousStateType	FVW_ContinuousStateType	FVW	-	-	-	"Continuous states from the FVW module"	-


# Define discrete (nondifferentiable) states here:
typedef	^	RotDiscreteStateType	BEMT_DiscreteStateType	BEMT	-	-	-	"Discrete states from the BEMT module"	-
typedef	^	RotDiscreteStateType	AA_DiscreteStateType	AA	-	-	-	"Discrete states from the AA module"	-

typedef	^	DiscreteStateType	RotDiscreteStateType	rotors	{:}	-	-	"Discrete states for each rotor"	-
typedef	^	DiscreteStateType	FVW_DiscreteStateType	FVW	-	-	-	"Discrete states from the FVW module"	-

# Define constraint states here:
typedef	^	RotConstraintStateType	BEMT_ConstraintStateType	BEMT	-	-	-	"Constraint states from the BEMT module"	-
typedef	^	RotConstraintStateType	AA_ConstraintStateType	AA	-	-	-	"Constraint states from the AA module"	-

typedef	^	ConstraintStateType	RotConstraintStateType	rotors	{:}	-	-	"Constraint states for each rotor"	-
typedef	^	ConstraintStateType	FVW_ConstraintStateType	FVW	-	-	-	"Constraint states from the FVW module"	-

# Define "other" states here:
typedef	^	RotOtherStateType	BEMT_OtherStateType	BEMT	-	-	-	"OtherStates from the BEMT module"	-
typedef	^	RotOtherStateType	AA_OtherStateType	AA	-	-	-	"OtherStates from the AA module"	-

typedef	^	OtherStateType	RotOtherStateType	rotors	{:}	-	-	"OtherStates from the BEMT module"	-
typedef	^	OtherStateType	FVW_OtherStateType	FVW	-	-	-	"OtherStates from the FVW module"	-
typedef	^	OtherStateType	ReKi	WakeLocationPoints	{:}{:}	-	-	"wake points velocity"	m/s


# Define misc/optimization variables (any data that are not considered actual states) here:
typedef	^	RotMiscVarType	BEMT_MiscVarType	BEMT	-	-	-	"MiscVars from the BEMT module"	-
typedef	^	RotMiscVarType	BEMT_OutputType	BEMT_y	-	-	-	"Outputs from the BEMT module"	-
typedef	^	RotMiscVarType	BEMT_InputType	BEMT_u	2	-	-	"Inputs to the BEMT module"	-
typedef	^	RotMiscVarType	AA_MiscVarType	AA	-	-	-	"MiscVars from the AA module"	-
typedef	^	RotMiscVarType	AA_OutputType	AA_y	-	-	-	"Outputs from the AA module"	-
typedef	^	RotMiscVarType	AA_InputType	AA_u	-	-	-	"Inputs to the AA module"	-

typedef	^	RotMiscVarType	ReKi	DisturbedInflow	{:}{:}{:}	-	-	"InflowOnBlade values modified by tower influence"	m/s
typedef	^	RotMiscVarType	ReKi	SectAvgInflow  	{:}{:}{:}	-	-	"Sector averaged - disturbed inflow to improve BEM shear calculations"	m/s
typedef	^	RotMiscVarType	R8Ki	orientationAnnulus	{:}{:}{:}{:}	-	-	"Coordinate system equivalent to BladeMotion Orientation, but without live sweep, blade-pitch, and twist angles"	-
typedef	^	RotMiscVarType	R8Ki	R_li              	{:}{:}{:}{:}	-	-	"Transformation matrix from inertial system to the staggered polar coordinate system of a given section"	-
typedef	^	RotMiscVarType	ReKi	AllOuts	{:}	-	-	"An array holding the value of all of the calculated (not only selected) output channels"	-
typedef	^	RotMiscVarType	ReKi	W_Twr	{:}	-	-	"relative wind speed normal to the tower at node j"	m/s
typedef	^	RotMiscVarType	ReKi	X_Twr	{:}	-	-	"local x-component of force per unit length of the jth node in the tower"	m/s
typedef	^	RotMiscVarType	ReKi	Y_Twr	{:}	-	-	"local y-component of force per unit length of the jth node in the tower"	m/s
typedef	^	RotMiscVarType	ReKi	Cant	{:}{:}	-	-	"curvature angle, saved for possible output to file"	rad
typedef	^	RotMiscVarType	ReKi	Toe 	{:}{:}	-	-	"Toe angle, saved for possible output to file"	rad
typedef	^	RotMiscVarType	ReKi	TwrClrnc	{:}{:}	-	-	"Distance between tower (including tower radius) and blade node (not including blade width), saved for possible output to file"	m
typedef	^	RotMiscVarType	ReKi	X	{:}{:}	-	-	"normal force per unit length (normal to the plane, not chord) of the jth node in the kth blade"	N/m
typedef	^	RotMiscVarType	ReKi	Y	{:}{:}	-	-	"tangential force per unit length (tangential to the plane, not chord) of the jth node in the kth blade"	N/m
typedef	^	RotMiscVarType	ReKi	Z	{:}{:}	-	-	"axial force per unit length (tangential to the plane, not chord) of the jth node in the kth blade"	N/m
typedef	^	RotMiscVarType	ReKi	M	{:}{:}	-	-	"pitching moment per unit length of the jth node in the kth blade"	Nm/m
typedef	^	RotMiscVarType	ReKi	Mx	{:}{:}	-	-	"pitching moment per unit length of the jth node in the kth blade (in x direction)"	Nm/m
typedef	^	RotMiscVarType	ReKi	My	{:}{:}	-	-	"pitching moment per unit length of the jth node in the kth blade  (in y direction)"	Nm/m
typedef	^	RotMiscVarType	ReKi	Mz	{:}{:}	-	-	"pitching moment per unit length of the jth node in the kth blade  (in z direction)"	Nm/m
typedef	^	RotMiscVarType	ReKi	Vind_i	{:}{:}{:}	-	-	"Induced velocities at jth node and kth blade (3xnSpanxnB)"	m/s
typedef	^	RotMiscVarType	ReKi	V_DiskAvg	{3}	-	-	"disk-average relative wind speed"	m/s
typedef	^	RotMiscVarType	ReKi	yaw			-	-	-	    "Yaw calculated in  SetInputsForBEMT"	rad
typedef	^	RotMiscVarType	ReKi	tilt		-	-	-	    "tilt calculated in  SetInputsForBEMT"	rad
typedef	^	RotMiscVarType	ReKi	hub_theta_x_root	{:}	-	-	"angles saved for FAST.Farm"	rad
typedef	^	RotMiscVarType	ReKi	V_dot_x	-	-	-
typedef	^	RotMiscVarType	MeshType	HubLoad	-	-	-	"mesh at hub; used to compute an integral for mapping the output blade loads to a single point (for writing to file only)"	-
typedef	^	RotMiscVarType	MeshMapType	B_L_2_H_P	{:}	-	-	"mapping data structure to map each bladeLoad output mesh to the MiscVar%HubLoad mesh"
typedef	^	RotMiscVarType	ReKi	SigmaCavitCrit	{:}{:}	-	-	 "critical cavitation number-  inception value (above which cavit will occur)"   -
typedef	^	RotMiscVarType	ReKi	SigmaCavit	{:}{:}	-	-	  "cavitation number at node "   -
typedef	^	RotMiscVarType	Logical	CavitWarnSet {:}{:}	-	-	  "cavitation warning issued "   -
typedef	^	RotMiscVarType	ReKi	TwrFB	{:}{:}	    -	-	  "buoyant force per unit length at tower node"   N/m
typedef	^	RotMiscVarType	ReKi	TwrMB	{:}{:}	    -	-	  "buoyant moment per unit length at tower node"   Nm/m
typedef	^	RotMiscVarType	ReKi	HubFB	{:}	        -	-	  "buoyant force at hub node"   N
typedef	^	RotMiscVarType	ReKi	HubMB	{:}  	    -	-	  "buoyant moment at hub node"   Nm
typedef	^	RotMiscVarType	ReKi	NacFB	{:}	        -	-	  "buoyant force at nacelle (tower top) node"   N
typedef	^	RotMiscVarType	ReKi	NacMB	{:}  	    -	-	  "buoyant moment at nacelle (tower top) node"   Nm
typedef	^	RotMiscVarType	ReKi	NacDragF	{:}	        -	-	  "drag force at nacelle (tower top) node"   N
typedef	^	RotMiscVarType	ReKi	NacDragM	{:}  	    -	-	  "drag moment at nacelle (tower top) node"   Nm
typedef	^	RotMiscVarType	ReKi	NacFi	{:}	        -	-	  "Total force at nacelle (tower top) node"   N
typedef	^	RotMiscVarType	ReKi	NacMi	{:}  	    -	-	  "Total moment at nacelle (tower top) node"   Nm
typedef	^	RotMiscVarType	MeshType	BladeRootLoad	{:}	-	-	"meshes at blade root; used to compute an integral for mapping the output blade loads to single points (for writing to file only)"	-
typedef	^	RotMiscVarType	MeshMapType	B_L_2_R_P	{:}	-	-	"mapping data structure to map each bladeLoad output mesh to corresponding MiscVar%BladeRootLoad mesh"
typedef	^	RotMiscVarType	MeshType	BladeBuoyLoadPoint	{:}	-	-	"point mesh for lumped buoyant blade loads"	-
typedef	^	RotMiscVarType	MeshType	BladeBuoyLoad	{:}	-	-	"line mesh for per unit length buoyant blade loads"	-
typedef	^	RotMiscVarType	MeshMapType	B_P_2_B_L	{:}	-	-	"mapping data structure to map buoyant blade point loads (m%BladeBuoyLoadPoint) to buoyant blade line loads (m%BladeBuoyLoad)"
typedef	^	RotMiscVarType	MeshType	TwrBuoyLoadPoint	-	-	-	"point mesh for lumped buoyant tower loads"	-
typedef	^	RotMiscVarType	MeshType	TwrBuoyLoad	-	-	-	"line mesh for per unit length buoyant tower loads"	-
typedef	^	RotMiscVarType	MeshMapType	T_P_2_T_L	-	-	-	"mapping data structure to map buoyant tower point loads (m%TwrBuoyLoadPoint) to buoyant tower line loads (m%TwrBuoyLoad)"
typedef	^	RotMiscVarType	Logical	FirstWarn_TowerStrike	-	-	-	"flag to avoid printing tower strike multiple times" -
typedef	^	RotMiscVarType	ReKi	AvgDiskVel	{3}	-	-	"disk-averaged U,V,W (undisturbed)"	m/s
typedef	^	RotMiscVarType	ReKi	AvgDiskVelDist	{3}	-	-	"disk-averaged U,V,W (disturbed)"	m/s
# TailFin
typedef	^	RotMiscVarType	ReKi	TFinAlpha	-	-	-	"Angle of attack for tailfin"
typedef	^	RotMiscVarType	ReKi	TFinRe   	-	-	-	"Reynolds number for tailfin"
typedef	^	RotMiscVarType	ReKi	TFinVrel 	-	-	-	"Orthogonal relative velocity nrom at the reference point"
typedef	^	RotMiscVarType	ReKi	TFinVund_i 	3	-	-	"Undisturbed wind velocity at the reference point of the fin in the inertial system"
typedef	^	RotMiscVarType	ReKi	TFinVind_i 	3	-	-	"Induced velocity at the reference point of the fin in the inertial system"
typedef	^	RotMiscVarType	ReKi	TFinVrel_i 	3	-	-	"Relative velocity at the reference point of the fin in the inertial system"
typedef	^	RotMiscVarType	ReKi	TFinSTV_i 	3	-	-	"Structural velocity at the reference point of the fin in the inertial system"
typedef	^	RotMiscVarType	ReKi	TFinF_i 	3	-	-	"Forces at the reference point of the fin in the inertial system"
typedef	^	RotMiscVarType	ReKi	TFinM_i 	3	-	-	"Moments at the reference point of the fin in the inertial system"

# Inflow data storage
typedef	^	ElemInflowType	ReKi	InflowVel	{:}{:}	-	-	"U,V,W at nodes on element (note if we change the requirement that NumNodes is the same for each blade, this will need to change)"	m/s
typedef	^	ElemInflowType	ReKi	InflowAcc	{:}{:}	-	-	"Wind acceleration at nodes on element (blade or tower) (note if we change the requirement that NumNodes is the same for each blade, this will need to change)"	m/s
typedef	^	RotInflowType	ElemInflowType    Blade		{:}	-	-	"Blade wind inputs"	-
typedef	^	RotInflowType	ElemInflowType    Tower		-	-	-	"Blade wind inputs"	-
typedef	^	RotInflowType	ReKi	InflowOnHub 	{3}{1}	-	-	"U,V,W at hub"	m/s
typedef	^	RotInflowType	ReKi	InflowOnNacelle	{3}{1}	-	-	"U,V,W at nacelle"	m/s
typedef	^	RotInflowType	ReKi	InflowOnTailFin	{3}{1}	-	-	"U,V,W at tailfin"	m/s
typedef	^	RotInflowType	ReKi	AvgDiskVel	{3}	-	0.0	"disk-averaged U,V,W"	m/s

typedef	^	AD_InflowType	ReKi	InflowWakeVel	{:}{:}	-	-	"U,V,W at wake points"	m/s
typedef	^	AD_InflowType	RotInflowType	RotInflow	{:}	-	-	"Inflow on rotor"	-

typedef	^	MiscVarType	RotMiscVarType	rotors	{:} -	-	"MiscVars for each rotor"	-
typedef	^	MiscVarType	FVW_InputType	FVW_u	:	-	-	"Inputs to the FVW module"	-
typedef	^	MiscVarType	FVW_OutputType	FVW_y	-	-	-	"Outputs from the FVW module"	-
typedef	^	MiscVarType	FVW_MiscVarType	FVW	-	-	-	"MiscVars from the FVW module"	-
typedef	^	MiscVarType	ReKi            WindPos	{:}{:} - -	"XYZ coordinates to query for wind velocity/acceleration"	-
typedef	^	MiscVarType	ReKi            WindVel	{:}{:} - -	"XYZ components of wind velocity"	-
typedef	^	MiscVarType	ReKi            WindAcc	{:}{:} - -	"XYZ components of wind acceleration"	-
typedef	^	MiscVarType	AD_InflowType	Inflow	{:}	-	-	"Inflow storage (size of u for history of inputs)"	-


# ..... Parameters ................................................................................................................
# Define parameters here:


# Parameters for each rotor
typedef	^	Jac_u_idxStarts	IntKi	Nacelle	-	1	-	"Index to first point in u jacobian for Nacelle" -
typedef	^	Jac_u_idxStarts	IntKi	Hub	-	1	-	"Index to first point in u jacobian for Hub" -
typedef	^	Jac_u_idxStarts	IntKi	TFin	-	1	-	"Index to first point in u jacobian for TFin" -
typedef	^	Jac_u_idxStarts	IntKi	Tower	-	1	-	"Index to first point in u jacobian for Tower" -
typedef	^	Jac_u_idxStarts	IntKi	BladeRoot	-	1	-	"Index to first point in u jacobian for BladeRoot" -
typedef	^	Jac_u_idxStarts	IntKi	Blade	-	1	-	"Index to first point in u jacobian for Blade" -
typedef	^	Jac_u_idxStarts	IntKi	UserProp	-	1	-	"Index to first point in u jacobian for UserProp" -
typedef	^	Jac_u_idxStarts	IntKi	Extended	-	1	-	"Index to first point in u jacobian for Extended" -
typedef	^	Jac_y_idxStarts	IntKi	NacelleLoad	-	1	-	"Index to first point in y jacobian for NacelleLoad" -
typedef	^	Jac_y_idxStarts	IntKi	HubLoad	-	1	-	"Index to first point in y jacobian for HubLoad" -
typedef	^	Jac_y_idxStarts	IntKi	TFinLoad	-	1	-	"Index to first point in y jacobian for TFinLoad" -
typedef	^	Jac_y_idxStarts	IntKi	TowerLoad	-	1	-	"Index to first point in y jacobian for TowerLoad" -
typedef	^	Jac_y_idxStarts	IntKi	BladeLoad	-	1	-	"Index to first point in y jacobian for BladeLoad" -
typedef	^	RotParameterType	IntKi	NumBlades	-	-	-	"Number of blades on the turbine"	-
typedef	^	RotParameterType	IntKi	NumBlNds	-	-	-	"Number of nodes on each blade"	-
typedef	^	RotParameterType	IntKi	NumTwrNds	-	-	-	"Number of nodes on the tower"	-
typedef	^	RotParameterType	ReKi	TwrDiam	{:}	-	-	"Diameter of tower at node"	m
typedef	^	RotParameterType	ReKi	TwrCd	{:}	-	-	"Coefficient of drag at tower node"	-
typedef	^	RotParameterType	ReKi	TwrTI	{:}	-	-	"Turbulence intensity for tower shadow at tower node"	-
typedef  ^  ^                     ReKi                     BlTwist                         {:}{:}        -         -        "Twist at blade node" radians
typedef	^	RotParameterType	ReKi	TwrCb	{:}	-	-	"Coefficient of buoyancy at tower node"	-
typedef	^	RotParameterType	ReKi	BlCenBn	{:}{:}	-	-	"Normal offset between aerodynamic center and center of buoyancy at blade node"	m
typedef	^	RotParameterType	ReKi	BlCenBt	{:}{:}	-	-	"Tangential offset between aerodynamic center and center of buoyancy at blade node"	m
typedef	^	RotParameterType	ReKi	VolHub	    -	-	-	"Hub volume" m^3
typedef	^	RotParameterType	ReKi	HubCenBx    -	-	-	"Hub center of buoyancy x direction offset" m
typedef	^	RotParameterType	ReKi	VolNac	    -	-	-	"Nacelle volume" m^3
typedef	^	RotParameterType	ReKi	NacCenB     3	-	-	"Position of nacelle center of buoyancy from yaw bearing in nacelle coordinates" m
typedef	^	RotParameterType	ReKi	NacArea     3	-	-	"Projected area of the nacelle in X, Y, Z in the nacelle coordinate system" m^2
typedef	^	RotParameterType	ReKi	NacCd       3	-	-	"Drag cefficient for the nacelle areas defied above" -
typedef	^	RotParameterType	ReKi	NacDragAC   3	-	-	"Position of aerodynamic center of nacelle drag in nacelle coordinates" m
typedef	^	RotParameterType	ReKi	VolBl       -	-	-	"Buoyancy volume of all blades" m^3
typedef	^	RotParameterType	ReKi	VolTwr       -	-	-	"Buoyancy volume of the tower" m^3
typedef ^   RotParameterType	ReKi	BlRad     {:}{:}	-	-	"Matrix of equivalent blade radius at each node, used in buoyancy calculation" m
typedef ^   RotParameterType	ReKi	BlDL      {:}{:}	-	-	"Matrix of blade element length based on CB, used in buoyancy calculation" m
typedef ^   RotParameterType	ReKi	BlTaper   {:}{:}	-	-	"Matrix of blade element taper, used in buoyancy calculation" -
typedef ^   RotParameterType	ReKi	BlAxCent  {:}{:}	-	-	"Matrix of blade element axial centroid, used in buoyancy calculation" -
typedef ^   RotParameterType	ReKi	TwrRad    {:}    	-	-	"Array of equivalent tower radius at each node, used in buoyancy calculation" m
typedef ^   RotParameterType	ReKi	TwrDL     {:}   	-	-	"Array of tower element length, used in buoyancy calculation" m
typedef ^   RotParameterType	ReKi	TwrTaper  {:}   	-	-	"Array of tower element taper, used in buoyancy calculation" -
typedef ^   RotParameterType	ReKi	TwrAxCent {:}	    -	-	"Array of tower element axial centroid, used in buoyancy calculation" -
typedef	^	RotParameterType	BEMT_ParameterType	BEMT	-	-	-	"Parameters for BEMT module"
typedef	^	RotParameterType	AA_ParameterType	AA	-	-	-	"Parameters for AA module"
typedef	^	RotParameterType	IntKi	Jac_u_indx	{:}{:}	-	-	"matrix to help fill/pack the u vector in computing the jacobian"	-
typedef	^	RotParameterType	Jac_u_idxStarts Jac_u_idxStartList	-	-	-	"Starting indices for all Jac_u components" -
typedef	^	RotParameterType	Jac_y_idxStarts Jac_y_idxStartList	-	-	-	"Starting indices for all Jac_y components" -
typedef	^	RotParameterType	IntKi	NumExtendedInputs	-	-	-	"number of extended inputs" -
typedef	^	RotParameterType	ReKi	du	{:}	-	-	"vector that determines size of perturbation for u (inputs)"
typedef	^	RotParameterType	ReKi	dx	{:}	-	-	"vector that determines size of perturbation for x (continuous states)"
typedef	^	RotParameterType	IntKi	Jac_ny	-	-	-	"number of outputs in jacobian matrix"	-
typedef   ^     RotParameterType IntKi NumBl_Lin      -    -     -   "number of blades in the jacobian"	-

typedef	^	RotParameterType	IntKi	TwrPotent	-	-	-	"Type of tower influence on wind based on potential flow around the tower {0=none, 1=baseline potential flow, 2=potential flow with Bak correction}"	-
typedef	^	RotParameterType	IntKi	TwrShadow	-	-	-	"Type of tower influence on wind based on downstream tower shadow {0=none, 1=Powles model, 2=Eames model}"	-
typedef	^	RotParameterType	IntKi	TwrAero	-	-	-	"Calculate tower aerodynamic loads? {0=none, 1=aero without VIV, 2=aero with VIV}"	switch
typedef	^	RotParameterType	Integer	DBEMT_Mod	-	-	-	"DBEMT_Mod"	-
typedef	^	RotParameterType	Logical	CavitCheck	-	-	-	"Flag that tells us if we want to check for cavitation" -
typedef ^   RotParameterType    Logical Buoyancy    -   -   -   "Include buoyancy effects?" flag
typedef ^   RotParameterType    Logical NacelleDrag    -   -   -   "Include NacelleDrag effects?" flag
typedef ^   RotParameterType    IntKi   MHK         -   -   -   "MHK" flag
typedef	^	RotParameterType	Logical	CompAA   -  -  -  "Compute AeroAcoustic noise" flag
typedef	^	RotParameterType	ReKi	AirDens	-	-	-	"Air density"	kg/m^3
typedef	^	RotParameterType	ReKi	KinVisc	-	-	-	"Kinematic air viscosity"	m^2/s
typedef	^	RotParameterType	ReKi	SpdSound	-	-	-	"Speed of sound"	m/s
typedef	^	RotParameterType	ReKi	Gravity	-	-	-	"Gravitational acceleration"	m/s^2
typedef ^   RotParameterType    ReKi    Patm     -   -   -   "Atmospheric pressure" Pa
typedef ^   RotParameterType    ReKi    Pvap      -   -   -  "Vapour pressure" Pa
typedef ^   RotParameterType    ReKi    WtrDpth -  -   -     "Water depth" m
typedef ^   RotParameterType    ReKi    MSL2SWL -  -   -     "Offset between still-water level and mean sea level" m
typedef	^	RotParameterType	IntKi	AeroProjMod   	-	1	-	"Flag to switch between different projection models"	-
typedef	^	RotParameterType	IntKi	BEM_Mod   	-      -1	-	"Flag to switch between different BEM Model"	-
# parameters for output
typedef	^	RotParameterType	IntKi	NumOuts	-	-	-	"Number of parameters in the output list (number of outputs requested)"	-
typedef	^	RotParameterType	CHARACTER(1024)	RootName	-	-	-	"RootName for writing output files"	-
typedef	^	RotParameterType	OutParmType	OutParam	{:}	-	-	"Names and units (and other characteristics) of all requested output parameters"	-
typedef	^	RotParameterType	IntKi	NBlOuts	-	-	-	"Number of blade node outputs [0 - 9]"	-
typedef	^	RotParameterType	IntKi	BlOutNd	{9}	-	-	"Blade nodes whose values will be output"	-
typedef	^	RotParameterType	IntKi	NTwOuts	-	-	-	"Number of tower node outputs [0 - 9]"	-
typedef	^	RotParameterType	IntKi	TwOutNd	{9}	-	-	"Tower nodes whose values will be output"	-

typedef	^	RotParameterType	IntKi	BldNd_NumOuts	-	-	-	"Number of requested output channels per blade node (AD_AllBldNdOuts)"	-
typedef	^	RotParameterType	IntKi	BldNd_TotNumOuts	-	-	-	"Total number of requested output channels of blade node information (BldNd_NumOuts * BldNd_BlOutNd * BldNd_BladesOut -- AD_AllBldNdOuts)"	-
typedef	^	RotParameterType	OutParmType	BldNd_OutParam	{:}	-	-	"Names and units (and other characteristics) of all requested output parameters"	-
typedef  ^  RotParameterType  IntKi BldNd_BlOutNd {:} - - "The blade nodes to actually output (AD_AllBldNdOuts)" -
typedef  ^  RotParameterType  IntKi BldNd_BladesOut - - - "The blades to output (AD_AllBldNdOuts)" -
typedef  ^  RotParameterType  IntKi BldNd_NumNodesOut - - - "The blades to output (AD_AllBldNdOuts)" -
# Tail fin parameters (per rotor)
typedef  ^  RotParameterType  LOGICAL           TFinAero  - .FALSE. -   "Calculate tail fin aerodynamics model (flag)" flag
typedef  ^  RotParameterType  TFinParameterType TFin    -       -   -   "Parameters for tail fin of current rotor" -

# Parameters for all rotors:
typedef  ^  ParameterType  RotParameterType rotors {:} - - "Parameter types for each rotor" -
# Time step for integration of continuous states (if a fixed-step integrator is used) and update of discrete states:
typedef	^	ParameterType	DbKi	DT	-	-	-	"Time step for continuous state integration & discrete state update"	seconds
typedef	^	ParameterType	CHARACTER(1024)	RootName	-	-	-	"RootName for writing output files"	-
typedef	^	ParameterType	AFI_ParameterType	AFI	{:}	-	-	"AirfoilInfo parameters"
typedef	^	ParameterType	IntKi	Skew_Mod	-	-	-	"Type of skewed-wake correction model {-1=orthogonal, 0=None, 1=Glauert} [unused when Wake_Mod=0]"	-
typedef	^	ParameterType	IntKi	Wake_Mod	-	-	-	"Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}"	-
typedef	^	ParameterType	FVW_ParameterType	FVW	-	-	-	"Parameters for FVW module"
typedef   ^     ParameterType LOGICAL         CompAeroMaps   -  .FALSE. -   "flag to determine if AeroDyn is computing aero maps (true) or running a normal simulation (false)"	-
typedef   ^     ParameterType LOGICAL         UA_Flag       -  -  -  "logical flag indicating whether to use UnsteadyAero"        - 
typedef ^   ParameterType   FlowFieldType *FlowField -  -   -    "Pointer of InflowWinds flow field data type" - 
typedef ^      ^            Logical        SectAvg   -  -   -    "Use Sector average for BEM inflow velocity calculation"	-
typedef ^      ^            IntKi          SA_Weighting - - 1    "Sector Average - Weighting function for sector average  {1=Uniform, 2=Impulse}  within a 360/nB sector centered on the blade (switch) [used only when SectAvg=True]" -
typedef ^      ^            ReKi           SA_PsiBwd -  -   -    "Sector Average - Backard Azimuth (<0)"	deg
typedef ^      ^            ReKi           SA_PsiFwd -  -   -    "Sector Average - Forward Azimuth (>0)"	deg
typedef ^      ^            IntKi          SA_nPerSec -  -   -    "Sector Average - Number of points per sector (>1)"	-


# ..... Inputs ....................................................................................................................
# Define inputs that are contained on a mesh here:
typedef	^	RotInputType	MeshType	NacelleMotion	-	-	-	"motion on the nacelle"	-
typedef	^	RotInputType	MeshType	TowerMotion	-	-	-	"motion on the tower"	-
typedef	^	RotInputType	MeshType	HubMotion	-	-	-	"motion on the hub"	-
typedef	^	RotInputType	MeshType	BladeRootMotion	{:}	-	-	"motion on each blade root"	-
typedef	^	RotInputType	MeshType	BladeMotion	{:}	-	-	"motion on each blade"	-
typedef	^	RotInputType	MeshType	TFinMotion	- 	-	-	"motion of tail fin (at tail fin ref point)"	-
# Define inputs that are not on a mesh here:
typedef	^	RotInputType	ReKi	UserProp	{:}{:}	-	-	"Optional user property for interpolating airfoils (per element per blade)" -


typedef	^	InputType	RotInputType	rotors	{:}	-	-	"Inputs for each rotor"	-


# ..... Outputs ...................................................................................................................
# Define outputs that are contained on a mesh here:
typedef	^	RotOutputType	MeshType	NacelleLoad	-	-	-	"loads on the nacelle"	-
typedef	^	RotOutputType	MeshType	HubLoad  	-	-	-	"loads on the hub"  	-
typedef	^	RotOutputType	MeshType	TowerLoad	-	-	-	"loads on the tower"	-
typedef	^	RotOutputType	MeshType	BladeLoad	{:}	-	-	"loads on each blade"	-
typedef	^	RotOutputType	MeshType	TFinLoad 	-  	-	-	"loads on tail fin (at tail fin ref point)"	-
# Define outputs that are not on a mesh here:
typedef	^	RotOutputType	ReKi	WriteOutput	{:}	-	-	"Data to be written to an output file: see WriteOutputHdr for names of each variable"	"see WriteOutputUnt"

typedef	^	OutputType	RotOutputType	rotors	{:}	-	-	"Ouputs for each rotor"	-

