###################################################################################################################################
# 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

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_DBEMT           -  2  -  "Wake model - DBEMT (dynamic elememnt momentum theory)"  -
param    ^              -  IntKi    WakeMod_FVW             -  3  -  "Wake model - FVW (free vortex wake, OLAF)"              -

param    ^              -  IntKi    AFAeroMod_steady        -  1  -  "steady model"                               -
param    ^              -  IntKi    AFAeroMod_BL_unsteady   -  2  -  "Beddoes-Leishman unsteady model"            -

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"                   -


# ..... 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	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   	-	0	-	"Flag to switch between different projection models"	-

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


# 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"	-

# 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"	-
# ..... 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	^	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	WakeMod	-	-	-	"Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}"	-
typedef	^	AD_InputFile	IntKi	AFAeroMod	-	-	-	"Type of blade airfoil aerodynamics model {1=steady model, 2=Beddoes-Leishman unsteady model}"	-
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	LOGICAL	TwrAero	-	-	-	"Calculate tower aerodynamic loads?"	flag
typedef	^	AD_InputFile	Logical	FrozenWake	-	-	-	"Flag that tells this module it should assume a frozen wake during linearization."	-
typedef	^	AD_InputFile	Logical	CavitCheck	-	-	-	"Flag that tells us if we want to check for cavitation" -
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	SkewMod	-	-	-	"Type of skewed-wake correction model {0=orthogonal, 1=uncoupled, 2=Pitt/Peters, 3=coupled} [unused when WakeMod=0]"	-
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 WakeMod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	HubLoss	-	-	-	"Use the Prandtl hub-loss model? [unused when WakeMod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	TanInd	-	-	-	"Include tangential induction in BEMT calculations? [unused when WakeMod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	AIDrag	-	-	-	"Include the drag term in the axial-induction calculation? [unused when WakeMod=0]"	flag
typedef	^	AD_InputFile	LOGICAL	TIDrag	-	-	-	"Include the drag term in the tangential-induction calculation? [unused when WakeMod=0 or TanInd=FALSE]"	flag
typedef	^	AD_InputFile	ReKi	IndToler	-	-	-	"Convergence tolerance for BEM induction factors [unused when WakeMod=0]"	-
typedef	^	AD_InputFile	ReKi	MaxIter	-	-	-	"Maximum number of iteration steps [unused when WakeMod=0]"	-
typedef	^	AD_InputFile	IntKi	UAMod	-	-	-	"Unsteady Aero Model Switch (switch) {1=Baseline model (Original), 2=Gonzalez's variant (changes in Cn,Cc,Cm), 3=Minnema/Pierce variant (changes in Cc and Cm)} [used only when AFAeroMod=2]"	-
typedef	^	AD_InputFile	LOGICAL	FLookup	-	-	-	"Flag to indicate whether a lookup for f' will be calculated (TRUE) or whether best-fit exponential equations will be used (FALSE); if FALSE S1-S4 must be provided in airfoil input files [used only when AFAeroMod=2]"	flag
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	INTEGER	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 [used only when WakeMod=2 and DBEMT_Mod/=2]"	s
typedef	^	AD_InputFile	IntKi	DBEMT_Mod	-	-	-	"Type of dynamic BEMT (DBEMT) model {1=constant tau1, 2=time-dependent tau1}"	-
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	WithoutSweepPitchTwist	{:}{:}{:}{:}	-	-	"Coordinate system equivalent to BladeMotion Orientation, but without live sweep, blade-pitch, and twist angles"	-
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	Curve	{:}{:}	-	-	"curvature 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	M	{:}{:}	-	-	"pitching moment per unit length of the jth node in the kth blade"	Nm/m
typedef	^	RotMiscVarType	ReKi	V_DiskAvg	{3}	-	-	"disk-average relative wind speed"	m/s
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	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	^	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"	-

# ..... Parameters ................................................................................................................
# Define parameters here:
# Parameters for each rotor
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	^	RotParameterType	BEMT_ParameterType	BEMT	-	-	-	"Parameters for BEMT module"
typedef	^	RotParameterType	AA_ParameterType	AA	-	-	-	"Parameters for AA module"
typedef	^	RotParameterType	Integer	Jac_u_indx	{:}{:}	-	-	"matrix to help fill/pack the u vector in computing the jacobian"	-
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	Integer	Jac_ny	-	-	-	"number of outputs in jacobian matrix"	-
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	LOGICAL	TwrAero	-	-	-	"Calculate tower aerodynamic loads?"	flag
typedef	^	RotParameterType	Logical	FrozenWake	-	-	-	"Flag that tells this module it should assume a frozen wake during linearization."	-
typedef	^	RotParameterType	Logical	CavitCheck	-	-	-	"Flag that tells us if we want to check for cavitation" -
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   	-	0	-	"Flag to switch between different projection models"	-
# 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)" -

# 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	SkewMod	-	-	-	"Type of skewed-wake correction model {0=orthogonal, 1=uncoupled, 2=Pitt/Peters, 3=coupled} [unused when WakeMod=0]"	-
typedef	^	ParameterType	IntKi	WakeMod	-	-	-	"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         UA_Flag       -  -  -  "logical flag indicating whether to use UnsteadyAero"        - 


# ..... 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"	-
# Define inputs that are not on a mesh here:
typedef	^	RotInputType	ReKi	InflowOnBlade	{:}{:}{:}	-	-	"U,V,W at nodes on each blade (note if we change the requirement that NumNodes is the same for each blade, this will need to change)"	m/s
typedef	^	RotInputType	ReKi	InflowOnTower	{:}{:}	-	-	"U,V,W at nodes on the tower"	m/s
typedef	^	RotInputType	ReKi	InflowOnNacelle	{3}	-	-	"U,V,W at nacelle"	m/s
typedef	^	RotInputType	ReKi	UserProp	{:}{:}	-	-	"Optional user property for interpolating airfoils (per element per blade)" -

typedef	^	InputType	RotInputType	rotors	{:}	-	-	"Inputs for each rotor"	-
typedef	^	InputType	ReKi	InflowWakeVel	{:}{:}	-	-	"U,V,W at wake points"	m/s


# ..... Outputs ...................................................................................................................
# Define outputs that are contained on a mesh here:
typedef	^	RotOutputType	MeshType	NacelleLoad	-	-	-	"loads on the nacelle"	-
typedef	^	RotOutputType	MeshType	TowerLoad	-	-	-	"loads on the tower"	-
typedef	^	RotOutputType	MeshType	BladeLoad	{:}	-	-	"loads on each blade"	-
# 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"	-

