File Conversion (From FAST v6 to FAST v8)

Hi, Ignacio.

Sorry to hear you are having trouble with the conversion script. It hasn’t been rigorously tested, and there are some interesting differences between MATLAB and Fortran I/O handling that can cause it to fail. Also, if your old input files don’t call the variables the exact name the script is looking for, it will fail.

It looks to me like your v7 .fst file doesn’t have a variable called “AeroFile”. The conversion script is trying to open the AeroFile, and it’s failing on the empty array that is supposed to be a file name. I would edit your v7 input file so that it uses this variable name (AeroFile) on the line that specifies the AeroDyn input file name.

Dear Bonnie,

I am having the exact same problem, same errors, lines, everything. In my .fst file underneath AERODYN the only variable is ADFile which is “Test01_AD.ipt” and if I change the variable name from ADFile to AeroFile, it solves that problem then gives me about 5 more including parameter ADFile not found. I’m very confused about what to do, I added all 3 of those variables and set them all to 0 and it didn’t like that either. Is there a simple way to solve this problem?
Thanks

Hi Justin,

Could you post the exact error you are getting and also the input file you are trying to convert? (You can email the input file if you don’t feel comfortable posting your data.)

It’s hard to debug without more information.

Thanks.

Bonnie,

Of course, here is everything that shows up when I run it.

Converting Test01.fst:
old name: Z:\Dr. White research\OldFAST\v7\CertTest\Test01.fst
new name: Z:\Dr. White research\FAST\Test01v8\Test01.fst


GetFastPar:: Parameter CompNTMD not found.
GetFastPar:: Parameter TwrLdMod not found.
GetFastPar:: Parameter AeroFile not found.
Warning: Inputs must be character arrays or cell arrays of strings.

In ConvertFAST7to8 (line 255)
In ConvertFiles (line 76)
Error using textscan
First input can not be empty. Expected a non-empty string or a valid file-id.

Error in GetFullFileName (line 7)
fileName = textscan(inFile,‘%q’,1); % remove quotes if necessary

Error in ConvertFAST7to8 (line 256)
[FullAeroFile,ADWasRelative] = GetFullFileName( AeroFile, oldDir ); % old path + name

Error in ConvertFiles (line 76)
ConvertFAST7to8(inputfile,newDir);

And here is my .fst file, I believe this is just the stock Test01 that comes with version 7, we are practicing with this one before we do our other ones.

[code]--------------------------------------------------------------------------------
------- FAST INPUT FILE --------------------------------------------------------
FAST certification Test #01: AWT-27CR2 with many DOFs with fixed yaw error and steady wind.
Compatible with FAST v7.02.00.
---------------------- SIMULATION CONTROL --------------------------------------
False Echo - Echo input data to “echo.out” (flag)
3 ADAMSPrep - ADAMS preprocessor mode {1: Run FAST, 2: use FAST as a preprocessor to create an ADAMS model, 3: do both} (switch)
1 AnalMode - Analysis mode {1: Run a time-marching simulation, 2: create a periodic linearized model} (switch)
2 NumBl - Number of blades (-)
20.0 TMax - Total run time (s)
0.004 DT - Integration time step (s)
---------------------- TURBINE CONTROL -----------------------------------------
0 YCMode - Yaw control mode {0: none, 1: user-defined from routine UserYawCont, 2: user-defined from Simulink/Labview} (switch)
9999.9 TYCOn - Time to enable active yaw control (s) [unused when YCMode=0]
0 PCMode - Pitch control mode {0: none, 1: user-defined from routine PitchCntrl, 2: user-defined from Simulink/Labview} (switch)
9999.9 TPCOn - Time to enable active pitch control (s) [unused when PCMode=0]
0 VSContrl - Variable-speed control mode {0: none, 1: simple VS, 2: user-defined from routine UserVSCont, 3: user-defined from Simulink/Labview} (switch)
9999.9 VS_RtGnSp - Rated generator speed for simple variable-speed generator control (HSS side) (rpm) [used only when VSContrl=1]
9999.9 VS_RtTq - Rated generator torque/constant generator torque in Region 3 for simple variable-speed generator control (HSS side) (N-m) [used only when VSContrl=1]
9999.9 VS_Rgn2K - Generator torque constant in Region 2 for simple variable-speed generator control (HSS side) (N-m/rpm^2) [used only when VSContrl=1]
9999.9 VS_SlPc - Rated generator slip percentage in Region 2 1/2 for simple variable-speed generator control (%) [used only when VSContrl=1]
1 GenModel - Generator model {1: simple, 2: Thevenin, 3: user-defined from routine UserGen} (switch) [used only when VSContrl=0]
True GenTiStr - Method to start the generator {T: timed using TimGenOn, F: generator speed using SpdGenOn} (flag)
True GenTiStp - Method to stop the generator {T: timed using TimGenOf, F: when generator power = 0} (flag)
9999.9 SpdGenOn - Generator speed to turn on the generator for a startup (HSS speed) (rpm) [used only when GenTiStr=False]
0.0 TimGenOn - Time to turn on the generator for a startup (s) [used only when GenTiStr=True]
9999.9 TimGenOf - Time to turn off the generator (s) [used only when GenTiStp=True]
1 HSSBrMode - HSS brake model {1: simple, 2: user-defined from routine UserHSSBr, 3: user-defined from Labview} (switch)
9999.9 THSSBrDp - Time to initiate deployment of the HSS brake (s)
9999.9 TiDynBrk - Time to initiate deployment of the dynamic generator brake [CURRENTLY IGNORED] (s)
9999.9 TTpBrDp(1) - Time to initiate deployment of tip brake 1 (s)
9999.9 TTpBrDp(2) - Time to initiate deployment of tip brake 2 (s)
9999.9 TTpBrDp(3) - Time to initiate deployment of tip brake 3 (s) [unused for 2 blades]
9999.9 TBDepISp(1) - Deployment-initiation speed for the tip brake on blade 1 (rpm)
9999.9 TBDepISp(2) - Deployment-initiation speed for the tip brake on blade 2 (rpm)
9999.9 TBDepISp(3) - Deployment-initiation speed for the tip brake on blade 3 (rpm) [unused for 2 blades]
9999.9 TYawManS - Time to start override yaw maneuver and end standard yaw control (s)
9999.9 TYawManE - Time at which override yaw maneuver reaches final yaw angle (s)
0.0 NacYawF - Final yaw angle for yaw maneuvers (degrees)
9999.9 TPitManS(1) - Time to start override pitch maneuver for blade 1 and end standard pitch control (s)
9999.9 TPitManS(2) - Time to start override pitch maneuver for blade 2 and end standard pitch control (s)
9999.9 TPitManS(3) - Time to start override pitch maneuver for blade 3 and end standard pitch control (s) [unused for 2 blades]
9999.9 TPitManE(1) - Time at which override pitch maneuver for blade 1 reaches final pitch (s)
9999.9 TPitManE(2) - Time at which override pitch maneuver for blade 2 reaches final pitch (s)
9999.9 TPitManE(3) - Time at which override pitch maneuver for blade 3 reaches final pitch (s) [unused for 2 blades]
-1.0 BlPitch(1) - Blade 1 initial pitch (degrees)
-1.0 BlPitch(2) - Blade 2 initial pitch (degrees)
-1.0 BlPitch(3) - Blade 3 initial pitch (degrees) [unused for 2 blades]
-1.0 BlPitchF(1) - Blade 1 final pitch for pitch maneuvers (degrees)
-1.0 BlPitchF(2) - Blade 2 final pitch for pitch maneuvers (degrees)
-1.0 BlPitchF(3) - Blade 3 final pitch for pitch maneuvers (degrees) [unused for 2 blades]
---------------------- ENVIRONMENTAL CONDITIONS --------------------------------
9.80665 Gravity - Gravitational acceleration (m/s^2)
---------------------- FEATURE FLAGS -------------------------------------------
True FlapDOF1 - First flapwise blade mode DOF (flag)
True FlapDOF2 - Second flapwise blade mode DOF (flag)
True EdgeDOF - First edgewise blade mode DOF (flag)
True TeetDOF - Rotor-teeter DOF (flag) [unused for 3 blades]
True DrTrDOF - Drivetrain rotational-flexibility DOF (flag)
True GenDOF - Generator DOF (flag)
False YawDOF - Yaw DOF (flag)
True TwFADOF1 - First fore-aft tower bending-mode DOF (flag)
True TwFADOF2 - Second fore-aft tower bending-mode DOF (flag)
True TwSSDOF1 - First side-to-side tower bending-mode DOF (flag)
True TwSSDOF2 - Second side-to-side tower bending-mode DOF (flag)
True CompAero - Compute aerodynamic forces (flag)
False CompNoise - Compute aerodynamic noise (flag)
---------------------- INITIAL CONDITIONS --------------------------------------
0.0 OoPDefl - Initial out-of-plane blade-tip displacement (meters)
0.0 IPDefl - Initial in-plane blade-tip deflection (meters)
0.0 TeetDefl - Initial or fixed teeter angle (degrees) [unused for 3 blades]
0.0 Azimuth - Initial azimuth angle for blade 1 (degrees)
53.333 RotSpeed - Initial or fixed rotor speed (rpm)
-15.0 NacYaw - Initial or fixed nacelle-yaw angle (degrees)
0.0 TTDspFA - Initial fore-aft tower-top displacement (meters)
0.0 TTDspSS - Initial side-to-side tower-top displacement (meters)
---------------------- TURBINE CONFIGURATION -----------------------------------
13.757 TipRad - The distance from the rotor apex to the blade tip (meters)
1.184 HubRad - The distance from the rotor apex to the blade root (meters)
1 PSpnElN - Number of the innermost blade element which is still part of the pitchable portion of the blade for partial-span pitch control [1 to BldNodes] [CURRENTLY IGNORED] (-)
0.153 UndSling - Undersling length [distance from teeter pin to the rotor apex] (meters) [unused for 3 blades]
0.406 HubCM - Distance from rotor apex to hub mass [positive downwind] (meters)
2.432 OverHang - Distance from yaw axis to rotor apex [3 blades] or teeter pin [2 blades] (meters)
0.193 NacCMxn - Downwind distance from the tower-top to the nacelle CM (meters)
0.0 NacCMyn - Lateral distance from the tower-top to the nacelle CM (meters)
0.684 NacCMzn - Vertical distance from the tower-top to the nacelle CM (meters)
41.980 TowerHt - Height of tower above ground level [onshore] or MSL [offshore] (meters)
0.692 Twr2Shft - Vertical distance from the tower-top to the rotor shaft (meters)
0.0 TwrRBHt - Tower rigid base height (meters)
0.0 ShftTilt - Rotor shaft tilt angle (degrees)
0.0 Delta3 - Delta-3 angle for teetering rotors (degrees) [unused for 3 blades]
7.0 PreCone(1) - Blade 1 cone angle (degrees)
7.0 PreCone(2) - Blade 2 cone angle (degrees)
7.0 PreCone(3) - Blade 3 cone angle (degrees) [unused for 2 blades]
0.0 AzimB1Up - Azimuth value to use for I/O when blade 1 points up (degrees)
---------------------- MASS AND INERTIA ----------------------------------------
0.0 YawBrMass - Yaw bearing mass (kg)
5015.43 NacMass - Nacelle mass (kg)
1330.00 HubMass - Hub mass (kg)
11.34 TipMass(1) - Tip-brake mass, blade 1 (kg)
11.34 TipMass(2) - Tip-brake mass, blade 2 (kg)
11.34 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
4604.84 NacYIner - Nacelle inertia about yaw axis (kg m^2)
59.26 GenIner - Generator inertia about HSS (kg m^2)
335.34 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
---------------------- DRIVETRAIN ----------------------------------------------
100.0 GBoxEff - Gearbox efficiency (%)
100.0 GenEff - Generator efficiency [ignored by the Thevenin and user-defined generator models] (%)
22.5 GBRatio - Gearbox ratio (-)
False GBRevers - Gearbox reversal {T: if rotor and generator rotate in opposite directions} (flag)
6000.0 HSSBrTqF - Fully deployed HSS-brake torque (N-m)
0.5 HSSBrDT - Time for HSS-brake to reach full deployment once initiated (sec) [used only when HSSBrMode=1]
“unused” DynBrkFi - File containing a mech-gen-torque vs HSS-speed curve for a dynamic brake [CURRENTLY IGNORED] (quoted string)
50.0E6 DTTorSpr - Drivetrain torsional spring (N-m/rad)
1.0E6 DTTorDmp - Drivetrain torsional damper (N-m/(rad/s))
---------------------- SIMPLE INDUCTION GENERATOR ------------------------------
1.5125 SIG_SlPc - Rated generator slip percentage (%) [used only when VSContrl=0 and GenModel=1]
1200.0 SIG_SySp - Synchronous (zero-torque) generator speed (rpm) [used only when VSContrl=0 and GenModel=1]
1367.9 SIG_RtTq - Rated torque (N-m) [used only when VSContrl=0 and GenModel=1]
2.0 SIG_PORt - Pull-out ratio (Tpullout/Trated) (-) [used only when VSContrl=0 and GenModel=1]
---------------------- THEVENIN-EQUIVALENT INDUCTION GENERATOR -----------------
60.0 TEC_Freq - Line frequency [50 or 60] (Hz) [used only when VSContrl=0 and GenModel=2]
6 TEC_NPol - Number of poles [even integer > 0] (-) [used only when VSContrl=0 and GenModel=2]
0.0185 TEC_SRes - Stator resistance (ohms) [used only when VSContrl=0 and GenModel=2]
0.017 TEC_RRes - Rotor resistance (ohms) [used only when VSContrl=0 and GenModel=2]
480.0 TEC_VLL - Line-to-line RMS voltage (volts) [used only when VSContrl=0 and GenModel=2]
0.0340 TEC_SLR - Stator leakage reactance (ohms) [used only when VSContrl=0 and GenModel=2]
0.0050 TEC_RLR - Rotor leakage reactance (ohms) [used only when VSContrl=0 and GenModel=2]
0.7750 TEC_MR - Magnetizing reactance (ohms) [used only when VSContrl=0 and GenModel=2]
---------------------- PLATFORM ------------------------------------------------
0 PtfmModel - Platform model {0: none, 1: onshore, 2: fixed bottom offshore, 3: floating offshore} (switch)
“unused” PtfmFile - Name of file containing platform properties (quoted string) [unused when PtfmModel=0]
---------------------- TOWER ---------------------------------------------------
21 TwrNodes - Number of tower nodes used for analysis (-)
“AWT_Tower.dat” TwrFile - Name of file containing tower properties (quoted string)
---------------------- NACELLE-YAW ---------------------------------------------
0.0 YawSpr - Nacelle-yaw spring constant (N-m/rad)
0.0 YawDamp - Nacelle-yaw damping constant (N-m/(rad/s))
0.0 YawNeut - Neutral yaw position–yaw spring force is zero at this yaw (degrees)
---------------------- FURLING -------------------------------------------------
False Furling - Read in additional model properties for furling turbine (flag)
“unused” FurlFile - Name of file containing furling properties (quoted string) [unused when Furling=False]
---------------------- ROTOR-TEETER --------------------------------------------
1 TeetMod - Rotor-teeter spring/damper model {0: none, 1: standard, 2: user-defined from routine UserTeet} (switch) [unused for 3 blades]
0.0 TeetDmpP - Rotor-teeter damper position (degrees) [used only for 2 blades and when TeetMod=1]
4.0e4 TeetDmp - Rotor-teeter damping constant (N-m/(rad/s)) [used only for 2 blades and when TeetMod=1]
0.0 TeetCDmp - Rotor-teeter rate-independent Coulomb-damping moment (N-m) [used only for 2 blades and when TeetMod=1]
0.0 TeetSStP - Rotor-teeter soft-stop position (degrees) [used only for 2 blades and when TeetMod=1]
180.0 TeetHStP - Rotor-teeter hard-stop position (degrees) [used only for 2 blades and when TeetMod=1]
1.0 TeetSSSp - Rotor-teeter soft-stop linear-spring constant (N-m/rad) [used only for 2 blades and when TeetMod=1]
5.0e6 TeetHSSp - Rotor-teeter hard-stop linear-spring constant (N-m/rad) [used only for 2 blades and when TeetMod=1]
---------------------- TIP-BRAKE -----------------------------------------------
0.0 TBDrConN - Tip-brake drag constant during normal operation, CdArea (m^2)
0.0 TBDrConD - Tip-brake drag constant during fully-deployed operation, Cd
Area (m^2)
0.0 TpBrDT - Time for tip-brake to reach full deployment once released (sec)
---------------------- BLADE ---------------------------------------------------
“AWT_Blades.dat” BldFile(1) - Name of file containing properties for blade 1 (quoted string)
“AWT_Blades.dat” BldFile(2) - Name of file containing properties for blade 2 (quoted string)
“AWT_Blades.dat” BldFile(3) - Name of file containing properties for blade 3 (quoted string) [unused for 2 blades]
---------------------- AERODYN -------------------------------------------------
“Test01_AD.ipt” AeroFile - Name of file containing AeroDyn input parameters (quoted string)
---------------------- NOISE ---------------------------------------------------
“unused” NoiseFile - Name of file containing aerodynamic noise input parameters (quoted string) [used only when CompNoise=True]
---------------------- ADAMS ---------------------------------------------------
“AWT_ADAMS.dat” ADAMSFile - Name of file containing ADAMS-specific input parameters (quoted string) [unused when ADAMSPrep=1]
---------------------- LINEARIZATION CONTROL -----------------------------------
“AWT_Linear.dat” LinFile - Name of file containing FAST linearization parameters (quoted string) [unused when AnalMode=1]
---------------------- OUTPUT --------------------------------------------------
True SumPrint - Print summary data to “.fsm” (flag)
1 OutFileFmt - Format for tabular (time-marching) output file(s) (1: text file [.out], 2: binary file [.outb], 3: both) (switch)
True TabDelim - Use tab delimiters in text tabular output file? (flag)
“ES10.3E2” OutFmt - Format used for text tabular output (except time). Resulting field should be 10 characters. (quoted string) [not checked for validity!]
10.0 TStart - Time to begin tabular output (s)
5 DecFact - Decimation factor for tabular output {1: output every time step} (-)
1.0 SttsTime - Amount of time between screen status messages (sec)
0.0 NcIMUxn - Downwind distance from the tower-top to the nacelle IMU (meters)
0.0 NcIMUyn - Lateral distance from the tower-top to the nacelle IMU (meters)
0.0 NcIMUzn - Vertical distance from the tower-top to the nacelle IMU (meters)
-0.2 ShftGagL - Distance from rotor apex [3 blades] or teeter pin [2 blades] to shaft strain gages [positive for upwind rotors] (meters)
0 NTwGages - Number of tower nodes that have strain gages for output [0 to 9] (-)
0 TwrGagNd - List of tower nodes that have strain gages [1 to TwrNodes] (-) [unused if NTwGages=0]
3 NBlGages - Number of blade nodes that have strain gages for output [0 to 9] (-)
3,5,7 BldGagNd - List of blade nodes that have strain gages [1 to BldNodes] (-) [unused if NBlGages=0]
OutList - The next line(s) contains a list of output parameters. See OutList.xlsx for a listing of available output channels, (-)
“LSSGagPxa, TeetDefl” - LSS gage azimuth and teeter angles
“TipDxb2,TipDyb2” - Blade 2 flapwise and edgewise tip deflections
“TipALxb2,TipALyb2” - Blade 2 flapwise and edgewise tip accelerations
“Spn2ALxb1,Spn2ALyb1” - Blade 1 local flapwise and edgewise accelerations at gage #2 (Node #5)
“YawBrRDxt,YawBrRDyt” - Tower top tilt angles.
“YawBrRVxp,YawBrRVyp” - Tower top tilt rates.
“YawBrRAxp,YawBrRAyp” - Tower top tilt accelerations.
“RootMyc1, RootMxc1” - Blade 1 root OoP and IP bending moments
“RootFxc2, RootFyc2” - Blade 2 root OoP and IP shear force
“Spn3MLxb1,Spn3MLyb1” - Blade 1 local edgewise and flapwise bending moment at gage #3 (Node #7)
“RotTorq” - Rotor torque
“YawBrMzn” - Tower-top / yaw bearing yaw moment
“TwrBsMzt” - Tower base yaw moment
END of FAST input file (the word “END” must appear in the first 3 columns of this last line).

[/code]

Thanks, Justin.

I modified a few things and have your test case working now. Please use the Matlab files in this link and see if that fixes your problem.

Bonnie,

I’m sorry, there is no change in what it is saying, the errors are still there. What exactly did you have to modify? Was the problem in Matlab or in the .fst file?

One more question, what version of MatLab are you using?

I’m using Matlab R2014b. I had made some changes after releasing FAST 8.15, and when I tried to convert your file, there were a few glitches. I didn’t take the time to figure out if the 8.15 conversion script had the same errors, so I just packaged up code that worked for me. The code I posted successfully converted the primary input file you sent with the rest of the FAST v7 input files for Test01. The only difference between your file and the original FAST v7 Test01.fst was that “ADFile” was changed to “AeroFile”.

I do not know why you are getting this error with the file you sent me:

GetFastPar:: Parameter AeroFile not found.

Error using textscan
First input can not be empty. Expected a non-empty string or a valid file-id.

Error in GetFullFileName (line 7)
fileName = textscan(inFile,'%q',1); % remove quotes if necessary

Error in ConvertFAST7to8 (line 256)
[FullAeroFile,ADWasRelative] = GetFullFileName( AeroFile, oldDir ); % old path + name

This error indicates that variable “AeroFile” was not defined in your file, but I found one instance of “AeroFile” in the text file you shared, and that had a valid (non-empty) value.

Are you sure you are using the same file you sent me?

Sorry for the long post, I want to be as descriptive as possible.

Yes, you are right in that I sent you a slightly different .fst file than the one corresponding to that error, however, the errors are very similar. I have figured out that the problem is with my AeroFile, or AeroDyn, or ADFile, something like that. Here is a part of the original v7 code:

---------------------- AERODYN ------------------------------------------------- "Test01_AD.ipt" ADFile - Name of file containing AeroDyn input parameters (quoted string) ---------------------- NOISE --------------------------------------------------- "unused" NoiseFile - Name of file containing aerodynamic noise input parameters (quoted string) [used only when CompNoise=True] ---------------------- ADAMS --------------------------------------------------- "AWT_ADAMS.dat" ADAMSFile - Name of file containing ADAMS-specific input parameters (quoted string) [unused when ADAMSPrep=1] ---------------------- LINEARIZATION CONTROL ----------------------------------- "AWT_Linear.dat" LinFile - Name of file containing FAST linearization parameters (quoted string) [unused when AnalMode=1]

and here is Test01_AD.ipt

[code]AWT-27CR aerodynamic parameters for FAST certification test #1.
SI SysUnits - System of units for used for input and output [must be SI for FAST] (unquoted string)
BEDDOES StallMod - Dynamic stall included [BEDDOES or STEADY] (unquoted string)
NO_CM UseCm - Use aerodynamic pitching moment model? [USE_CM or NO_CM] (unquoted string)
DYNIN InfModel - Inflow model [DYNIN or EQUIL] (unquoted string)
SWIRL IndModel - Induction-factor model [NONE or WAKE or SWIRL] (unquoted string)
0.005 AToler - Induction-factor tolerance (convergence criteria) (-)
PRANDtl TLModel - Tip-loss model (EQUIL only) [PRANDtl, GTECH, or NONE] (unquoted string)
NONE HLModel - Hub-loss model (EQUIL only) [PRANDtl or NONE] (unquoted string)
“Wind/AWT27/Shr12_30.wnd” AeroFile - Name of file containing wind data (quoted string)
42.672 HH - Wind reference (hub) height [TowerHt+Twr2Shft+OverHang*SIN(ShftTilt)] (m)
0.3 TwrShad - Tower-shadow velocity deficit (-)
1.0 ShadHWid - Tower-shadow half width (m)
2.432 T_Shad_Refpt - Tower-shadow reference point (m)
1.225 AirDens - Air density (kg/m^3)
1.4639e-5 KinVisc - Kinematic air viscosity (m^2/sec)
0.004 DTAero - Time interval for aerodynamic calculations (sec)
10 NumFoil - Number of airfoil files (-)
“AeroData/AWT27/AWT27_05.dat” FoilNm - Names of the airfoil files [NumFoil lines] (quoted strings)
“AeroData/AWT27/AWT27_15.dat”
“AeroData/AWT27/AWT27_25.dat”
“AeroData/AWT27/AWT27_35.dat”
“AeroData/AWT27/AWT27_45.dat”
“AeroData/AWT27/AWT27_55.dat”
“AeroData/AWT27/AWT27_65.dat”
“AeroData/AWT27/AWT27_75.dat”
“AeroData/AWT27/AWT27_85.dat”
“AeroData/AWT27/AWT27_95.dat”
10 BldNodes - Number of blade nodes used for analysis (-)
RNodes AeroTwst DRNodes Chord NFoil PrnElm
1.81265 5.80 1.2573 0.859 1 NOPRINT
3.06995 5.20 1.2573 1.045 2 NOPRINT
4.32725 4.66 1.2573 1.145 3 NOPRINT
5.58455 3.73 1.2573 1.124 4 NOPRINT
6.84185 2.64 1.2573 1.054 5 NOPRINT
8.09915 1.59 1.2573 0.976 6 NOPRINT
9.35645 0.73 1.2573 0.885 7 NOPRINT
10.61375 0.23 1.2573 0.775 8 NOPRINT
11.87105 0.08 1.2573 0.651 9 NOPRINT
13.12835 0.03 1.2573 0.493 10 NOPRINT

[/code]

As you can see, there is a parameter called AeroFile in here, that corresponds to a wind file, and here is that one:

! Wind file for sheared 18 m/s wind with 30 degree direction. ! Time Wind Wind Vert. Horiz. Vert. LinV Gust ! Speed Dir Speed Shear Shear Shear Speed 0.0 12.0 30.0 0.0 0.0 0.2 0.0 0.0 0.1 12.0 30.0 0.0 0.0 0.2 0.0 0.0 999.9 12.0 30.0 0.0 0.0 0.2 0.0 0.0

Now I have tried making the parameter ADFile in Test01.fst AeroFile instead, and I get all of these:

[code]Converting Test01.fst:
old name: Z:\Dr. White research\FAST\v7\CertTest\Test01.fst
new name: Z:\Dr. White research\FAST\CertTest\Test01.fst


GetFastPar:: Parameter CompNTMD not found.
GetFastPar:: Parameter TwrLdMod not found.
GetFastPar:: Parameter ADFile not found.
GetFastPar:: Parameter InflowFile not found.
GetFastPar:: Parameter WindFile not found.
WARNING: CompElast not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
1

WARNING: CompIce not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
0

WARNING: BDBldFile(1) not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: BDBldFile(2) not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: BDBldFile(3) not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: IceFile not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: ChkptTime not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
99999

WARNING: WrVTK not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
0

WARNING: VTK_type not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
2

WARNING: VTK_fields not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
False
WARNING: VTK_fps not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
15

GetFastPar:: Parameter TwrShadow not found.
Error using Matlab2FAST (line 34)
Template file, Z:\Dr. White
research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\v8.00.x\AD_Primary_v14.04.x.dat,
not found.

Error in ConvertFAST7to8 (line 311)
Matlab2FAST(ADPar, ADtemplate, outputFile, 2); %contains 2 header lines

Error in ConvertFiles (line 66)
ConvertFAST7to8(inputfile,newDir);[/code]
So I left that the way it was and added a parameter AeroFile being the wind file, I get just about the same thing:

[code]Converting Test01.fst:
old name: Z:\Dr. White research\FAST\v7\CertTest\Test01.fst
new name: Z:\Dr. White research\FAST\CertTest\Test01.fst


GetFastPar:: Parameter CompNTMD not found.
GetFastPar:: Parameter TwrLdMod not found.
GetFastPar:: Parameter InflowFile not found.
GetFastPar:: Parameter WindFile not found.
GetFastPar:: Parameter HH not found.
GetFastPar:: Parameter RefHt not found.
WARNING: CompElast not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
1

WARNING: CompIce not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
0

WARNING: BDBldFile(1) not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: BDBldFile(2) not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: BDBldFile(3) not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: multiple occurrences of AeroFile in the FAST data structure.
WARNING: IceFile not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
“unused”
WARNING: ChkptTime not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
99999

WARNING: WrVTK not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
0

WARNING: VTK_type not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
2

WARNING: VTK_fields not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
False
WARNING: VTK_fps not found in the FAST data structure. Default value listed below (from template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\FAST_Primary_v8.15.x.dat) will be used instead:
15

GetFastPar:: Parameter TwrShadow not found.
Error using Matlab2FAST (line 34)
Template file, Z:\Dr. White
research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\v8.00.x\AD_Primary_v14.04.x.dat,
not found.

Error in ConvertFAST7to8 (line 311)
Matlab2FAST(ADPar, ADtemplate, outputFile, 2); %contains 2 header lines

Error in ConvertFiles (line 66)
ConvertFAST7to8(inputfile,newDir);

[/code]

So like I said, it is tripping up with something to do with the Aero files. Do you have any thoughts? Some of the other things I have thought about: I have tried using matlab 2015b and 2016a, perhaps those handle things a little differently than 2014b? Also, in the convertfiles.m that comes with the v8 executable file I am pretty sure that first part is only if you have 8.12 files that you’re trying to convert, is that right? Even though the comment for the second half says v7 to 8.12, I looked through the code and it looks like that was supposed to be 8.15, correct? Unless something really weird is going on where you convert v7 to 8.12 and then 8.12 to 8.15, but I don’t think that’s what it’s trying to do. Anyway, I modified it like this, do you see any problems, maybe with the directories?

[code]%Conversion of FAST v 7.x or FAST v8.12.x files to FAST v8.13.x
% by Bonnie Jonkman
% based on work by Paul Fleming
% (c) 2011, 2013-2015 National Renewable Energy Laboratory
%--------------------------------------------------------------------------
clear all;

FASTSimulationToolbox = ‘Z:\Dr. White research\FAST\Utilities\SimulationToolbox’;
addpath( genpath( FASTSimulationToolbox ) );

%% ------------------------------------------------------------------------
% Convert FAST v8.12.* files to FAST v8.15.*
% -------------------------------------------------------------------------

%% FAST CertTests
% oldDir = ‘C:\Users\bjonkman\Documents\DATA\DesignCodes\simulators\FAST\SVNdirectory\branches\BJonkman\CertTest’;
% newDir = ‘.’;
%
%
% for i= 1:26
%
% baseFileName = [‘Test’ num2str(i,‘%02.0f’) ]; %‘_noHD’
% inputfile = [oldDir filesep baseFileName ‘.fst’];
%
%
% ConvertFAST8_12to15(inputfile,newDir);
%
% end
%
%
%
%
% return
%
% ConvertFAST8_12to15([oldDir filesep ‘Test19_noHD.fst’],newDir);
% ConvertFAST8_12to15([oldDir filesep ‘Test19_withIce.fst’],newDir);
% ConvertFAST8_12to15([oldDir filesep ‘Test21_withIce.fst’],newDir);
%
% return;

%% ------------------------------------------------------------------------
% Convert FAST v7.* files to FAST v8.12.*
% -------------------------------------------------------------------------
oldDir = ‘Z:\Dr. White research\FAST\v7\CertTest’;
newDir = ‘Z:\Dr. White research\FAST\CertTest’;
outFileDir = ‘Z:\Dr. White research\FAST\v7\CertTest’;
% templateDir = ‘TemplateFiles\V8.00.x\5MW_Monopile’;
% XLS_file = ‘…\OutListParameters.xlsx’;

%test 9: YawManRat = 3.729000
%test 11: PitManRat(1) = 16.600000

for i= 1:1

    % Primary input file:
    
baseFileName  = ['Test' num2str(i,'%02.0f') ];

inputfile = [oldDir filesep baseFileName '.fst'];      

if i==9
    outputfile = [outFileDir filesep baseFileName '.out'];
    [YawManRat, PitManRat] = CalculateYawAndPitchRates(inputfile, outputfile);

% YawManRat = 3.729000;
ConvertFAST7to8(inputfile,newDir,YawManRat);
elseif i==11
outputfile = [outFileDir filesep baseFileName ‘.out’];
[YawManRat, PitManRat] = CalculateYawAndPitchRates(inputfile, outputfile);
% PitManRat(1) = 16.6;
ConvertFAST7to8(inputfile,newDir,0,PitManRat);
else
ConvertFAST7to8(inputfile,newDir);
end

end
return;
[/code]

Thank you for your patience,
Justin

Thanks for all the details.

It is highly probably that the comments in this script are out of date. Sorry for the confusion, but there is never enough time to do everything…

First, I want you to make sure you are using all of the MATLAB code that I put in the zip file the other day. The conversion from FAST 7 to 8.15 was looking for the AeroDyn template files in the wrong directory, and I fixed that. That is what is causing your error:

Error using Matlab2FAST (line 34) Template file, Z:\Dr. White research\FAST\Utilities\SimulationToolbox\ConvertFASTVersions\TemplateFiles\v8.00.x\AD_Primary_v14.04.x.dat, not found. )
The template files should not have “v8.00.x” in their names. If you get that error, you aren’t using the Matlab code I sent.

AeroFile should be the name of the AeroDyn input file. This variable is listed in the primary FAST input file.

The name of the file containing wind data should be called WindFile. This variable listed is in the AeroDyn v13 input file.

Try those changes.

Hi Bonnie,
This is my first post. My student Justin and I were interested in converting V7 files to V8 because we have some non-Certest models we need to convert. Using the Certest files would provide practice. Justin was having problems getting the code to execute and I took a look. I discovered the spots where fatal errors stemmed and I am sending you this so my code changes can be shared. Here are the changes. Once these changes were made, the conversion ran successfully for all 17 cases. Do you agree with what I did?
Thanks,
Warren White
P.S. I note in the preview that the leading spaces were removed and this makes the code harder to read - sorry. Is there a way to preserve leading spaces when posting?

In ConvertFiles.m, the lines involving the conversion of FAST 8.12 to FAST 8.15 were commented out. Does this create a problem?

The code looks for the parameter ‘AeroFile’ and ADFile is what is used in FAST 7.02. Starting at line 273 in ConvertFAST7to8.m , I made the modification:
AeroFile = GetFastPar(FP, ‘ADFile’);
ADFile = AeroFile;
Also, I did not replace ADFile in the Testxx.fst file with AeroFile because this causes problems elsewhere.

In Matlab2FAST.m, I made the modification starting at line 36:
OutputFilename = strrep(OutputFilename,‘"’,‘’);
fidOUT = fopen(OutputFilename,‘w+’);
This replaces “ with a space in the filename and the ‘w+’ will create the file if it does not exist.

In ParseFASTInputLine.m, the line below indicated by the string of asterisks was commented out and the line below was added. The code starts on line 53 of what I received in FAST 8.15.
if cnt == 0 || … % we didn’t find a number so…
( nextindex < length(line) && ~isempty(strtrim(line(nextindex))) && ~strcmp(line(nextindex),‘,’) ) % this would happen if a string started with a number and wasn’t empty afterwards: e.g. “1P0.0” gets read as “1”, but the next character is “P”, not a space separating it from a label
[testVal, position] = textscan(line,‘%q’,1); %look for a string instead
if any( strcmpi(testVal{1}{1},trueFalseValues) )
value = testVal{1}{1}; %this is a logical input
fieldType = ‘Logical’;
else
% if strcmp(testVal{1}{1}(1),‘@’) ***********************
if strcmp(testVal{1}{1},‘@’)
value = testVal{1}{1};
else
value = [‘"’ testVal{1}{1} ‘"’]; %add quotes back around the string
end
fieldType = ‘Character’;
end
nextindex = position + 1;
else
fieldType = ‘Numeric’;
end

Bonnie,

I feel like I’m blowing up this forum, so I apologize. On a separate but related note; we are trying to get a turbine model not given in the CertTest folder for any of the versions to update and run with simulink. It is a version 6 .fst file and I ran it through the convertFast7to8 program and it spit out results, albeit with quite a bit of data missing. I have been going through the old files and adding in the parameters manually to the new v8 files when the error code says what is wrong. I have been doing that for quite a while but I hit a doosie, I will explain below, but I wanted to ask in general if there is a better way to update a v6 to v8 .fst file?

The problem it has been having is with the Tower.dat file. It complained to me for a long time that the mode shape coefficients didn’t add to 1, even though I checked multiple times, and changed the numbers so they would equal 0, 1, less than 1, more than 1, still the error persisted until I shifted the lines down 1 row. That fixed that problem then it was saying:

Error using Run_750kw (line 65) Error reported by S-function 'FAST_SFunc' in 'WT_Fariba_Sliding_750_PMG/FAST Nonlinear Wind Turbine/S-Function': FAST_InitializeAll:ED_Init:ED_ReadInput:ReadTowerFile:Invalid numerical input for file "Z:\Dr. White research\FAST\CertTest\750kw\GRC_Tower.dat" occurred while trying to read TwSSM1Sh(1).
It said that while trying to read TwSSM1Sh(1), which doesn’t exist anywhere. I checked other tower files for v8 and it doesn’t exist in them either. I even made that variable up and set it equal to 0 and 1 and it didn’t change the error message. Is this problem caused by my mistaken belief that I could just convert the v6 to v8 without a major overhaul?

Thanks again.

Dear Justin,

I’ll let Bonnie comment on the source code changes proposed by Warren.

Regarding FAST v6, the input file conversion scripts should work just as well with FAST v6 input files as they do with FAST v7 input files. The only input file change between FAST v6 and FAST v7 was the addition of input parameter OutFileFmt in FAST v7.02.

The blade and tower mode shape polynomial coefficients have indices (2) through (6), but unfortunately the error message reports (1) through (5) (they are shifted by (1)). So, an error TwSSM1Sh(1) is really referring to TwSSM1Sh(2).

I hope that helps.

Best regards,

Thank you,

Yes that was what it was referring to, and with creative shifting of lines I was able to give it what it wanted. I am really not sure why this conversion had such a hard time, but there were plenty of zeros in the updated files that should not have been, and now one of the errors I am getting is

Error using Run_750kw (line 65) Error reported by S-function 'FAST_SFunc' in 'WT_Fariba_Sliding_750_PMG/FAST Nonlinear Wind Turbine/S-Function': FAST_InitializeAll:ED_Init:ED_AllocOutput:Tower Line2 Mesh cannot be created with less than 2 elements.
I have tracked how far it is through the .fst file, and it seems to have read all of the elastodyn file and not yet gotten to the inflowwind.ipt file

---------------------- INPUT FILES --------------------------------------------- "NREL750j_ElastoDyn.dat" EDFile - Name of file containing ElastoDyn input parameters (quoted string) "unused" BDBldFile(1) - Name of file containing BeamDyn input parameters for blade 1 (quoted string) "unused" BDBldFile(2) - Name of file containing BeamDyn input parameters for blade 2 (quoted string) "unused" BDBldFile(3) - Name of file containing BeamDyn input parameters for blade 3 (quoted string) "GRC_ADj_InflowWind.ipt" InflowFile - Name of file containing inflow wind input parameters (quoted string) "GRC_ADj.ipt" AeroFile - Name of file containing aerodynamic input parameters (quoted string)

Do you know what it is talking about? and how to fix that error?
Thanks

Hi, Justin.

I haven’t had time to go through the code changes from Warren, yet, but…

The error you are getting is coming from your ElastoDyn file. It is telling you that the TwrNodes input is less than 2. If TwrNodes is >= 2 (or it was in your FAST v6 or v7 input file), you should check that your conversion script is using the correct template file for ElastoDyn and that you are running the corresponding version of FAST v8. You can also set the Echo parameter in the ElastoDyn input file to TRUE so you can see what variables it is and isn’t reading properly (compare the variables it reads in the echo file with the variables in the input file you are reading).

Bonnie,

I got the file converted and running a while ago, and I was trying to compare results to get matching responses from v7 and v8. After not getting matching results from running v7 through it’s command prompt compiler and running v8 through its command prompt compiler and simulink, I have observed strange results. I have gotten the same response for every v8 simulation I have been doing: messing with integrators, parameters, and different ways of compiling and running; and all have been different from the v7 response.
I know in the previous messages you’ve said that means the conversion didn’t work quite right, but I have gone through the v7 echo file and every v8 input file and looked line by line and compared each one, and set them all equivalent, and it still gave me the same different results. What is going wrong here?

Dear Justin,

What do you mean when you say that you’ve “observed strange results.” Can you explain a bit more about the results you’ve obtained and how different they are between FAST v7 and FAST v8?

Best regards,

Sure, maybe strange wasn’t the right word, puzzling is probably better. When looking at the generator speed curve, both v7 and v8 had the same shape, (starting with a small positive slope, jumping to a high positive slope, then slowly leveling out), but v8 changed slope higher about 10-15 seconds faster than v7, and once v8 started to level out v7 crossed it and then flattened out to a higher steady-state value than v8. The SS value for v8 was about 53 rpm and for v7 was about 58 rpm, to give you an idea of the difference. Also the torque graph was exactly the same for v7 and v8- just a constant negative value.

Dear Justin,

From your description, the differences between the FAST v7 and FAST v8 sound substantial. This still tells me that something in the conversion did not work properly or that the controller is functioning differently between the two solutions. To eliminate potential issues with the controller, can you run a case comparing FAST v7 and FAST v8 without the controller? i.e. disable the generator-speed and nacelle-yaw DOFs (GenDOF = False; YawDOF = False) and disable the various torque, pitch, and yaw controllers. Do the results from FAST v7 and FAST v8 compare well for this case?

Best regards,

Well we have taken out everything feeding into the FAST block, they are all constant zeros. We tried first the v7 file that we used to get the v8 fast file, then we made sure every little thing was the same, and they both gave us the same response, and it was different than the v8 results. I will attach the v7 and v8 files that we are using, in case you want to look at them.

I had to change the .ipt files to .pit files so I could upload them, and the v7 .fst file, as I’m sure you know, needs some of the files that v8 also needs. I hope this helps clarify the problem.