##################################################################################################################################
# Registry for FVW
# Entries are of the form
# keyword <modulename/modname> <TypeBeingDefined> <FieldType> <FieldName> <Dims> <InitialValue> <Ctrl> "<DESCRIP>" "<UNITS>"
##################################################################################################################################
include Registry_NWTC_Library.txt
usefrom AirfoilInfo_Registry.txt
usefrom UnsteadyAero_Registry.txt

#####################  Parameters        ###############
param    FVW/FVW        -  IntKi    idGridVelocity          -  1  -  "Grid stores velocity field" -
param    ^              -  IntKi    idGridVelVorticity      -  2  -  "Grid stores velocity and vorticity"                   -
#####################  Grid out          ###############
typedef  FVW/FVW           GridOutType          CHARACTER(100)                   name              -  -   - "Grid name"  -
typedef     ^                   ^               IntKi                            type              -  -  -  "Grid type" -
typedef     ^                   ^               ReKi                             tStart            -  -  -  "Time at which outputs starts" -
typedef     ^                   ^               ReKi                             tEnd              -  -  -  "Time at which outputs ends" -
typedef     ^                   ^               ReKi                             DTout             -  -  -  "Output frequency of grid" -
typedef     ^                   ^               ReKi                             xStart            -  -  -  "xStart" -
typedef     ^                   ^               ReKi                             yStart            -  -  -  "yStart" -
typedef     ^                   ^               ReKi                             zStart            -  -  -  "zStart" -
typedef     ^                   ^               ReKi                             xEnd              -  -  -  "xEnd" -
typedef     ^                   ^               ReKi                             yEnd              -  -  -  "yEnd" -
typedef     ^                   ^               ReKi                             zEnd              -  -  -  "zEnd" -
typedef     ^                   ^               IntKi                            nx                -  -  -  "nx" -
typedef     ^                   ^               IntKi                            ny                -  -  -  "ny" -
typedef     ^                   ^               IntKi                            nz                -  -  -  "nz" -
typedef     ^                   ^               ReKi                             uGrid    {:}{:}{:}{:} - -  "Grid velocity 3 x nz x ny x nx" -
typedef     ^                   ^               ReKi                             omGrid   {:}{:}{:}{:} - -  "Grid vorticity 3 x nz x ny x nx" -
typedef     ^                   ^               DbKi                             tLastOutput       -  -  -  "Last output time" -

#####################  Segments         ###############
typedef  FVW/FVW           T_Sgmt               ReKi                             Points     ::    -  -  "Points delimiting the segments" - 
typedef     ^                   ^               IntKi                            Connct     ::    -  -  "Connectivity of segments" - 
typedef     ^                   ^               ReKi                             Gamma      :     -  -  "Segment circulations" - 
typedef     ^                   ^               ReKi                             Epsilon    :     -  -  "Segment regularization parameter" - 
typedef     ^                   ^               IntKi                            RegFunction   -  -  -  "Type of regularizaion function (LambOseen, Vatistas, see FVW_BiotSavart)"          -
typedef     ^                   ^               IntKi                            nAct          -  -  -  "Number of active segments"          -
typedef     ^                   ^               IntKi                            nActP         -  -  -  "Number of active segment points"          -
# TODO add tree
#####################  Particles        ###############
typedef  FVW/FVW           T_Part               ReKi                             P          ::    -  -  "Particle Points" - 
typedef     ^                   ^               ReKi                             Alpha      ::    -  -  "Particle intensity 3 x nP" - 
typedef     ^                   ^               ReKi                             RegParam   :     -  -  "Particle regularization parameter" - 
typedef     ^                   ^               IntKi                            RegFunction   -  -  -  "Type of regularizaion function (FVW_BiotSavart)"          -
typedef     ^                   ^               IntKi                            nAct          -  -  -  "Number of active particles <=nP"          -

#####################  Registry for FVW ###############
# ..... PARAMETERS .............
typedef  FVW/FVW           Wng_ParameterType    ReKi                             chord_LL     : -  -  "Chord of each blade element from input file [idx1=BladeNode, idx2=Blade number]" - 
typedef     ^                   ^               ReKi                             chord_CP     : -  -  "Chord on LL cp " m
typedef     ^                   ^               ReKi                             s_LL         : -  -  "Spanwise coordinate of LL elements" m
typedef     ^                   ^               ReKi                             s_CP         : -  -  "Spanwise coordinate of LL CP" m
typedef     ^                   ^               IntKi                            iRotor       - -  -  "Index of rotor the wing belong to" -
typedef     ^                   ^               IntKi                            AFindx       :: -  - "Index to the airfoils from AD15 [BladeNode,BladeIndex=1]" - 
typedef     ^                   ^               IntKi                            nSpan             -  -  -  "TODO, should be defined per wing. Number of spanwise element"          -
typedef     ^                   ^               ReKi                             PrescribedCirculation    :  -  - "Prescribed circulation on all lifting lines" "m/s" 


#FVW_ParameterType  

typedef  FVW/FVW           ParameterType        IntKi                            nRotors            -  -   - "Number of Wings"  -
typedef     ^                   ^               IntKi                            nWings            -  -   - "Number of Wings"  -
#typedef     ^                   ^               IntKi                            Rot2Wings         :  -   - "Index mapping from wings to rotors"  -
typedef     ^                   ^               Wng_ParameterType                W                 :  -   - "Wings parameters"  -
typedef     ^                   ^               IntKi                            Bld2Wings        :: -  - "Index mapping from blades to wings" - 
typedef     ^                   ^               IntKi                            iNWStart          -  -  -  "Index where NW start in r_NW. (iNWStart=2, the first panel contains the lifting line panel, otherwise, start at 1)"          -
typedef     ^                   ^               IntKi                            nNWMax            -  -  -  "Maximum number of nw panels, per wing"          -
typedef     ^                   ^               IntKi                            nNWFree           -  -  -  "Number of nw panels that are free, per wing"          -
typedef     ^                   ^               IntKi                            nFWMax            -  -  -  "Maximum number of fw panels, per wing"          -
typedef     ^                   ^               IntKi                            nFWFree           -  -  -  "Number of fw panels that are free, per wing"          -
typedef     ^                   ^               Logical                          FWShedVorticity   -  -  -  "Include shed vorticity in the far wake"          -
typedef     ^                   ^               IntKi                            IntMethod         -  -  -  "Integration Method (1=RK4, 2=AB4, 3=ABM4, 5=Euler1)" -
typedef     ^                   ^               ReKi                             FreeWakeStart     -  - -   "Time when wake starts convecting (rolling up)"  s
typedef     ^                   ^               ReKi                             FullCircStart       -  - -     "Time when the circulation is full"  s
typedef     ^                   ^               IntKi                            CircSolvMethod       -  -   -  "Method to determine the circulation"  -
typedef     ^                   ^               IntKi                            CircSolvMaxIter     -     - -  "Maximum number of iterations for circulation solving"  -
typedef     ^                   ^               ReKi                             CircSolvConvCrit     -     - - "Convergence criterion for circulation solving"  -
typedef     ^                   ^               ReKi                             CircSolvRelaxation   -     - - "Relaxation factor for circulation solving"  -
typedef     ^                   ^               IntKi                            CircSolvPolar   -  -  -  "(0=Use AD polars, 1=2PiAlpha, 2=sin(2pialpha)" -
typedef     ^                   ^               IntKi                            DiffusionMethod   -  -  -  "Diffusion method (None, CoreSpreading, PSE)"          -
typedef     ^                   ^               ReKi                             CoreSpreadEddyVisc -  - -   "Eddy viscosity used in the core spreading method" 
typedef     ^                   ^               IntKi                            RegDeterMethod   -  -  -  "Regularization determinatino method (manual, automatic)"          -
typedef     ^                   ^               IntKi                            RegFunction   -  -  -  "Type of regularizaion function (LambOseen, Vatistas, see FVW_BiotSavart)"          -
typedef     ^                   ^               IntKi                            WakeRegMethod -  - -   "Method for regularization (constant, stretching, age, etc.)"  - 
typedef     ^                   ^               ReKi                             WakeRegParam -  - -   "Initial value of the regularization parameter" 
typedef     ^                   ^               ReKi                             WingRegParam -  - -   "Regularization parameter of the wing" 
typedef     ^                   ^               IntKi                            ShearModel   -  - -   "Option for shear modelling" 
typedef     ^                   ^               Logical                          TwrShadowOnWake - - -  "Include tower shadow effects on wake" 
typedef     ^                   ^               IntKi                            VelocityMethod     2   -    -  "Velocity calculation method for Full Wake and for LiftingLine" 
typedef     ^                   ^               ReKi                             TreeBranchFactor   2   -    -  "Factor used to determine if a point is far enough, for full wake and lifting line" 
typedef     ^                   ^               IntKi                            PartPerSegment     2   -    -  "Number of particles per segment, e.g. for tree method, for full wake and lifting line" 
typedef     ^                   ^               DbKi                             DTaero        -  - -   "Time interval for calls calculations"   s
typedef     ^                   ^               DbKi                             DTfvw         -  - -   "Time interval for calculating wake induced velocities"   s
typedef     ^                   ^               ReKi                             KinVisc       -  - -   "Kinematic air viscosity"   m^2/s
typedef     ^                   ^               IntKi                            MHK           -  - -   "MHK flag"   -
typedef     ^                   ^               ReKi                             WtrDpth       -  - -   "Water depth"   m
# Parameters output options
typedef     ^                   ^               IntKi                            WrVTK         -  - -   "Outputs VTK at each calcoutput call, even if main fst doesnt do it"  - 
typedef     ^                   ^               IntKi                            VTKBlades     -  - -   "Outputs VTk for each blade 0=no blade, 1=Bld 1"  - 
typedef     ^                   ^               DbKi                             DTvtk         -  - -   "DT between vtk writes" s
typedef     ^                   ^               IntKi                            VTKCoord      -  - -    "Switch for VTK outputs coordinate  system" -
typedef     ^                   ^               CHARACTER(1024)                  RootName      -  -  - "RootName for writing output files"	-
typedef     ^                   ^               CHARACTER(1024)                  VTK_OutFileRoot - - - "Rootdirectory for writing VTK files"	-
typedef     ^                   ^               CHARACTER(1024)                  VTK_OutFileBase - - - "Basename for writing VTK files"	-
typedef     ^                   ^               IntKi                            nGridOut      -  - -    "Number of VTK grid to output" -
# Parameters advanced options
typedef     ^                   ^               Logical                          InductionAtCP - .true.  -  "Compute induced velocities at nodes or CP" 
typedef     ^                   ^               Logical                          WakeAtTE      - .true.  -  "Start the wake at the trailing edge, or at the LL" 
typedef     ^                   ^               Logical                          DStallOnWake  - .false. -  "Dynamic stall has influence on wake" 
typedef     ^                   ^               Logical                          Induction     - .true.  -  "Compute induction" 
typedef     ^                   ^               ReKi                             kFrozenNWStart - 0.75   -  "Fraction of wake induced velocity at start of frozen wake. 1 seems too strong." 
typedef     ^                   ^               ReKi                             kFrozenNWEnd   - 0.5    -  "Fraction of wake induced velocity at end of frozen wake" 

#.......... ContinuousStateType ......
typedef FVW/FVW            Wng_ContinuousStateType   ReKi                        Gamma_NW     ::  -  -  "Circulation of the near wake panels (    nSpan     x nNW  )" -
typedef     ^                   ^               ReKi                             Gamma_FW     ::  -  -  "Circulation of the far  wake panels (    nFWSpan   x nFW  )" -
typedef     ^                   ^               ReKi                             Eps_NW       ::: -  -  "Reg param   of the near wake panels (3 x nSpan     x nNW  )" -
typedef     ^                   ^               ReKi                             Eps_FW       ::: -  -  "Reg param   of the far  wake panels (3 x nFWSpan   x nFW  )" -
typedef     ^                   ^               ReKi                             r_NW         ::: -  -  "Position    of the near wake panels (3 x nSpan+1   x nNW+1) " -
typedef     ^                   ^               ReKi                             r_FW         ::: -  -  "Position    of the far  wake panels (3 x nFWSpan+1 x nFW+1)" -
# FVW_ContinuousStateType
typedef FVW/FVW            ContinuousStateType  Wng_ContinuousStateType          W           :     -  -  "Circulation of the near wake panels (    nSpan     x nNW )" -
typedef   ^                      ^              UA_ContinuousStateType           UA          :  -  - "states for UnsteadyAero"        -

# ........ Output ............
typedef  FVW/FVW           Wng_OutputType       ReKi                             Vind      ::   - - "TODO mesh  - Induced velocity vector at AeroDyn nodes. "  -
# FVW_OutputType
typedef  FVW/FVW           OutputType           Wng_OutputType                   W          :     - - "Induced velocity vector at AeroDyn nodes for all wings. "  -


# ....... MiscVars ............
typedef  FVW/FVW           Wng_MiscVarType      ReKi                             LE           ::  -  -  "Leading edge points" -
typedef     ^                   ^               ReKi                             TE           ::  -  -  "Trailing edge points" -
typedef     ^                   ^               ReKi                             r_LL         ::: - -   "Position    of the Lifting line panels" -
# Variables at control point - Dimensions nSpan 
typedef     ^                   ^               ReKi                             CP           ::  -  -  "Coordinates of LL CP" -
typedef     ^                   ^               ReKi                             Tang         ::  -  -  "Unit Tangential vector on LL CP" -
typedef     ^                   ^               ReKi                             Norm         ::  -  -  "Unit Normal vector on LL CP    " -
typedef     ^                   ^               ReKi                             Orth         ::  -  -  "Unit Orthogonal vector on LL CP" -
typedef     ^                   ^               ReKi                             dl           ::  -  -  "Vector of elementary length along the LL" -
typedef     ^                   ^               ReKi                             Area         :   -  -  "Area of each LL panel" -
typedef     ^                   ^               ReKi                             diag_LL      :   -  -  "Diagonal length of each LL panel" -
#typedef     ^                   ^               Reki                             Gamma_LL     :   -  -  "Circulation on the wing lifting line (COPY of Constraint State)" -
typedef     ^                   ^               ReKi                             Vind_CP      ::  -  -  "Induced velocity on lifting line control points" m/s
typedef     ^                   ^               ReKi                             Vtot_CP      ::  -  -  "Total velocity on lifting line control points" m/s
typedef     ^                   ^               ReKi                             Vstr_CP      ::  -  -  "Structural velocity on LL CP" m/s
typedef     ^                   ^               ReKi                             Vwnd_CP      ::  -  -  "Wind on lifting line control points" m/s 
typedef     ^                   ^               ReKi                             Vwnd_NW      ::: -  -  "Wind on near wake panels" m/s 
typedef     ^                   ^               ReKi                             Vwnd_FW      ::: -  -  "Wind on far  wake panels" m/s 
typedef     ^                   ^               ReKi                             Vind_NW      ::: -  -  "Induced velocity on near wake panels" m/s 
typedef     ^                   ^               ReKi                             Vind_FW      ::: -  -  "Induced velocity on far  wake panels" m/s 
typedef     ^                   ^               ReKi                             PitchAndTwist :   -  -  "Twist angle (includes all sources of twist)  [Array of size (NumBlNds,numBlades)]" rad
typedef     ^                   ^               IntKi                            iTip          -   -  -  "Index where tip vorticity will be placed. TODO, per blade"      -
typedef     ^                   ^               IntKi                            iRoot         -   -  -  "Index where root vorticity will be placed"      -
# Convenient storage
typedef     ^                   ^               Reki                             alpha_LL      :   -  -  "Angle of attack at lifting line CP, only computed with CircPolarData method" -
typedef     ^                   ^               Reki                             Vreln_LL      :   -  -  "Norm of Vrel on the lifting line" -
# TODO UA - Should be part of AeroDyn
typedef     ^                   ^               UA_InputType                     u_UA        :: - -  "inputs to UnsteadyAero  numNode x 2 (t and t+dt)"        -
typedef     ^                   ^               UA_MiscVarType                   m_UA          -  -  -  "misc vars for UnsteadyAero"        -
typedef     ^                   ^               UA_OutputType                    y_UA          -  -  -  "outputs from UnsteadyAero"        -
typedef     ^                   ^               UA_ParameterType                 p_UA          -  -  -  "parameters for UnsteadyAero"        -
# for calculating outputs at blade nodes
typedef     ^                   ^               ReKi                             Vind_LL      ::    -  -  "Induced velocity on lifting line nodes" m/s
#typedef     ^                   ^               ReKi                             Vtot_LL      ::    -  -  "Total velocity on lifting line nodes" m/s
#typedef     ^                   ^               ReKi                             Vstr_LL      ::    -  -  "Structural velocity on LL nodes" m/s
#typedef     ^                   ^               ReKi                             Vwnd_LL      ::    -  -  "Wind on lifting line nodes" m/s 
typedef     ^                   ^               ReKi                             BN_AxInd      :    -  -  "Axial induction [size (NumBlNds,numBlades)]" -
typedef     ^                   ^               ReKi                             BN_TanInd     :    -  -  "Tangential induction [size (NumBlNds,numBlades)]" -
typedef     ^                   ^               ReKi                             BN_Vrel       :    -  -  "Relative velocity [size (NumBlNds,numBlades)]" m/s
typedef     ^                   ^               ReKi                             BN_alpha      :    -  -  "Angle of attack [size (NumBlNds,numBlades)]" rad
typedef     ^                   ^               ReKi                             BN_phi        :    -  -  "angle between the plane of rotation and the direction of the local wind [size (NumBlNds,numBlades)]" rad
typedef     ^                   ^               ReKi                             BN_Re         :    -  -  "Reynolds number [size (NumBlNds,numBlades)]" -
typedef     ^                   ^               ReKi                             BN_URelWind_s ::   -  -  "Relative wind velocity in section coordinates [size (3,NumBlNds,numBlades)]" m/s
typedef     ^                   ^               ReKi                             BN_Cl_Static  :    -  -  "Coefficient lift,   excluding unsteady aero effects" - 
typedef     ^                   ^               ReKi                             BN_Cd_Static  :    -  -  "Coefficient drag.   excluding unsteady aero effects" -
typedef     ^                   ^               ReKi                             BN_Cm_Static  :    -  -  "Coefficient moment, excluding unsteady aero effects" -
typedef     ^                   ^               ReKi                             BN_Cpmin      :    -  -  "Coefficient minimum pressure, excluding unsteady aero effects" -
typedef     ^                   ^               ReKi                             BN_Cl         :    -  -  "Coefficient lift,   including unsteady aero effects" -
typedef     ^                   ^               ReKi                             BN_Cd         :    -  -  "Coefficient drag,   including unsteady aero effects" -
typedef     ^                   ^               ReKi                             BN_Cm         :    -  -  "Coefficient moment, including unsteady aero effects" -
typedef     ^                   ^               ReKi                             BN_Cx         :    -  -  "normal force coefficient (normal to the plane, not chord) of the jth node in the kth blade"   -
typedef     ^                   ^               ReKi                             BN_Cy         :    -  -  "tangential force coefficient (tangential to the plane, not chord) of the jth node in the kth blade"   -

# FVW_MiscVarType
typedef  FVW/FVW           MiscVarType          Wng_MiscVarType                  W             :   - -   "Misc for all wings" - 
typedef  FVW/FVW           MiscVarType          Logical                          FirstCall      -  - -   "True if this is the first call to update state (used in CalcOutput)" -
# Variables at wing extent
typedef     ^                   ^               IntKi                            nNW           -   -  -  "Number of active near wake panels"      -
typedef     ^                   ^               IntKi                            nFW           -   -  -  "Number of active far  wake panels"      -
typedef     ^                   ^               IntKi                            iStep         -   -  -  "Current step number used for update state"      -
typedef     ^                   ^               IntKi                            VTKstep       -   -  -  "Current vtk output step number"      -
typedef     ^                   ^               DbKi                             VTKlastTime   -   -   -  "Time the last VTK file set was written out" s
typedef     ^                   ^               ReKi                             r_wind        ::   -  -  "List of points where wind is requested for next time step"  -
typedef     ^                   ^               Logical                          ComputeWakeInduced - - - "Compute induced velocities on this timestep" -
typedef     ^                   ^               DbKi                             OldWakeTime   -   -   -  "Time the wake induction velocities were last calculated" s
typedef     ^                   ^               FVW_ContinuousStateType          dxdt          -   -  -  "State time derivatie, stored for overcycling and convenience" - 
typedef     ^                   ^               FVW_ContinuousStateType          x1            -  -  -   "States at t (for overcycling) "        -
typedef     ^                   ^               FVW_ContinuousStateType          x2            -  -  -   "States at t+DTFVW (for overcycling)"        -
typedef     ^                   ^               DbKi                             t1            -  -  -   "Time of x1 (for overcycling) "        -
typedef     ^                   ^               DbKi                             t2            -  -  -   "Time of x2 t+DTFVW (for overcycling)"        -
typedef     ^                   ^               LOGICAL                          UA_Flag       -  -  -  "logical flag indicating whether to use UnsteadyAero"        -
# Element storage (buffers)
typedef     ^                   ^               T_Sgmt                           Sgmt           -   -  -  "Segments storage" -
typedef     ^                   ^               T_Part                           Part           -   -  -  "Particle storage" -
# Wake rollup storage (buffer)
typedef     ^                   ^               ReKi                             CPs           ::    -  -  "Control points used for wake rollup computation" - 
typedef     ^                   ^               ReKi                             Uind          ::    -  -  "Induced velocities obtained at control points" -
# Outputs
typedef     ^                   ^               GridOutType                      GridOutputs   {:}  - -    "Number of VTK grid to output" -
typedef     ^                   ^               Logical                          InfoReeval     - .true. - "Give info about Reevaluation: gets set to false after first info statement" -

# ........ Input ............
# Rotors
typedef  FVW/FVW           Rot_InputType        ReKi                             HubOrientation {3}{3} -  -  "Orientation of hub coordinate system (for output only)" -
typedef     ^                   ^               ReKi                             HubPosition    {3}    -  -  "Origin of hub (for output only)" -
# Wings 
typedef  FVW/FVW           Wng_InputType        ReKi                             Vwnd_LL      {:}{:} -  - "Disturbed wind at LL mesh points (not CP), for UA only"  -
typedef     ^                   ^               ReKi                             omega_z         {:}  -  - "rotation of no-sweep-pitch-twist coordinate system around z (for CDBEMT and CUA)" "rad/s"

# FVW_InputType
typedef  FVW/FVW           InputType            Rot_InputType                    rotors         :   -  - "Rotors inputs"
typedef     ^                   ^               Wng_InputType                    W              :   -  - "Wings inputs"
typedef     ^                   ^               MeshType                         WingsMesh      :  -  - "Input Mesh defining position and orientation of wings (nSpan+1) " -
typedef     ^                   ^               ReKi                             V_wind        ::   -  - "Wind at requested points (r_wind)"  -


#.......... DiscreteStateType ......
# FVW_DiscreteStateType
typedef FVW/FVW            DiscreteStateType    ReKi                             Dummy        -  -  - "Empty to satisfy framework"           -
typedef   ^                      ^              UA_DiscreteStateType             UA           :  -  - "states for UnsteadyAero for each Wing"        -

#.......... ConstraintStateType ......
typedef FVW/FVW            Wng_ConstraintStateType  Reki                         Gamma_LL      :  -  -  "Circulation on the wing lifting line" -

# FVW_ConstraintStateType
typedef FVW/FVW            ConstraintStateType  Wng_ConstraintStateType          W             :  -  -  "rotors constr. states" -
typedef    ^                     ^              Reki                             residual      -   -  -  "Residual" -

# ....... OtherStateType ............
# FVW_OtherStateType
typedef  FVW/FVW           OtherStateType       IntKi                            Dummy             -  -  - "Empty to satisfy framework"
typedef   ^                       ^             UA_OtherStateType                UA                :  -  -  "other states for UnsteadyAero for each wing"        -


#.......... InitInputType ......
typedef  FVW/FVW           Wng_InitInputType    IntKi                            AFindx            ::  -  - "Index to the airfoils from AD15 [idx1=BladeNode, idx2=Blade number=1]" - 
typedef     ^                   ^               ReKi                             chord             :  -  - "Chord of each blade element from input file [idx1=BladeNode, idx2=Blade number]" - 
typedef     ^                   ^               ReKi                             RElm              :  -  - "radius of center of each element"  - 
typedef     ^                   ^               IntKi                            iRotor            - -  -  "Index of rotor the wing belong to" -
typedef     ^                   ^              INTEGER                  UAOff_innerNode          - - -   "Last node on each blade where UA should be turned off based on span location from blade root (0 if always on)"    -
typedef     ^                   ^              INTEGER                  UAOff_outerNode          - - -   "First node on each blade where UA should be turned off based on span location from blade tip (>nNodesPerBlade if always on)"    -


# FVW_InitInputType
typedef  FVW/FVW           InitInputType        CHARACTER(1024)                  FVWFileName       -  -  - "Main FVW input file name"  -
typedef     ^                   ^               CHARACTER(1024)                  RootName          -  -  - "RootName for writing output files"	-
typedef     ^                   ^               Wng_InitInputType                W                 :  -  - "Number of blades"          -
typedef     ^                   ^               MeshType                         WingsMesh         :  -  - "Input Mesh defining position and orientation of wings (nSpan+1) " -
typedef     ^                   ^               IntKi                            numBladeNodes     -  -  - "Number of nodes on each blade"          -
typedef     ^                   ^               DbKi                             DTaero            -  -  - "Time interval for calls (from AD15)"   s
typedef     ^                   ^               ReKi                             KinVisc       -  - -   "Kinematic air viscosity"   m^2/s
typedef     ^                   ^               IntKi                            MHK           -  - -   "MHK flag"   -
typedef     ^                   ^               ReKi                             WtrDpth       -  - -   "Water depth"   m
# TODO UA - Should be part of AeroDyn
typedef     ^                   ^              LOGICAL                           UA_Flag           - - -   "logical flag indicating whether to use UnsteadyAero"        -
typedef     ^                   ^              UA_InitInputType                  UA_Init           - - -   "InitInput data for UA model"

#.......... InputFileType ......
# FVW_InputFile
typedef  FVW/FVW           FVW_InputFile        IntKi                            CircSolvMethod      -     - -  "Method to determine the circulation"  -
typedef     ^                   ^               CHARACTER(1024)                  CirculationFile     -     - -  "Prescribed circulation file"  -
typedef     ^                   ^               IntKi                            CircSolvMaxIter     -     - -  "Maximum number of iterations for circulation solving"  -
typedef     ^                   ^               ReKi                             CircSolvConvCrit     -     - - "Convergence criterion for circulation solving"  -
typedef     ^                   ^               ReKi                             CircSolvRelaxation   -     - - "Relaxation factor for circulation solving"  -

typedef     ^                   ^               IntKi                            IntMethod           -     - -  "Integration Method (1=RK4, 2=AB4, 3=ABM4, 5=Euler1, 7=Corrector/Predictor)" -
typedef     ^                   ^               LOGICAL                          FreeWake            -     - -  "Disable roll up, wake convects with wind only (flag)"  -
typedef     ^                   ^               ReKi                             FreeWakeStart     -  - -   "Time when wake starts convecting (rolling up)"  s
typedef     ^                   ^               ReKi                             FullCircStart      -  - -   "Time when the circulation is full"  s
typedef     ^                   ^               DbKi                             DTfvw         -  - -   "Time interval for calculating wake induced velocities"   s
typedef     ^                   ^               IntKi                            CircSolvPolar   -  -  -  "(0=Use AD polars, 1=2PiAlpha, 2=sin(2pialpha)" -
typedef     ^                   ^               IntKi                            nNWPanels            -  -  -  "Number of nw panels"          -
typedef     ^                   ^               IntKi                            nNWPanelsFree        -  -  -  "Number of nw panels"          -
typedef     ^                   ^               IntKi                            nFWPanels            -  -  -  "Number of fw panels"          -
typedef     ^                   ^               IntKi                            nFWPanelsFree        -  -  -  "Number of fw panels that are free"          -
typedef     ^                   ^               Logical                          FWShedVorticity   -  -  -  "Include shed vorticity in the far wake"          -
typedef     ^                   ^               IntKi                            DiffusionMethod   -  -  -  "Diffusion method (None, CoreSpreading, PSE)"          -
typedef     ^                   ^               ReKi                             CoreSpreadEddyVisc -  - -   "Eddy viscosity used in the core spreading method" 
typedef     ^                   ^               IntKi                            RegDeterMethod   -  -  -  "Regularization determinatino method (manual, automatic)"          -
typedef     ^                   ^               IntKi                            RegFunction   -  -  -  "Type of regularizaion function (LambOseen, Vatistas, see FVW_BiotSavart)"          -
typedef     ^                   ^               IntKi                            WakeRegMethod -  - -   "Method for regularization (constant, stretching, age, etc.)"  - 
typedef     ^                   ^               ReKi                             WakeRegParam  -  - -   "Factor used in the regularization " 
typedef     ^                   ^               ReKi                             WingRegParam  -  - -   "Factor used in the regularization " 
typedef     ^                   ^               IntKi                            ShearModel   -  - -   "Option for shear modelling" 
typedef     ^                   ^               Logical                          TwrShadowOnWake -  - -   "Include tower shadow effects on wake" 
typedef     ^                   ^               IntKi                            VelocityMethod     2   -    -  "Velocity calculation method for Full Wake and for LiftingLine" 
typedef     ^                   ^               ReKi                             TreeBranchFactor   2   -    -  "Factor used to determine if a point is far enough, for full wake and lifting line" 
typedef     ^                   ^               IntKi                            PartPerSegment     2   -    -  "Number of particles per segment, e.g. for tree method, for full wake and lifting line" 
typedef     ^                   ^               IntKi                            WrVTK         -  - -   "Outputs VTK at each calcoutput call, even if main fst doesnt do it"  - 
typedef     ^                   ^               IntKi                            VTKBlades     -  - -   "Outputs VTk for each blade 0=no blade, 1=Bld 1"  - 
typedef     ^                   ^               DbKi                             DTvtk         -  - -   "Requested timestep between VTK outputs (calculated from the VTK_fps read in)" s
typedef     ^                   ^               IntKi                            VTKCoord      -  - -    "Switch for VTK outputs coordinate  system" -

#.......... InitOutputType ......
# FVW_InitOutputType
typedef FVW/FVW            InitOutputType       IntKi                            Dummy             -  -  - "Empty parameter to satisfy framework"           -



