OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
687 stars 457 forks source link

The "CoeffData" array was not assigned because the file is too short. #1238

Closed shipors closed 2 years ago

shipors commented 2 years ago

Bug description I tried to transfer the parameters of a balded wind turbine model of another person to the fast software, and the following error occurred when running aerodyn.

FAST InitializeAll:AD Init:Init AFIparams:AFI Init:ReadAFfile:ParseSiAry: A fatal error occurred when parsing data. The "CoeffData" array was not assigned because the file is too short.

In addition, I would like to ask you, there is a blafid parameter in aerodyn v15.00. * blade definition input file. How can I confirm which airfoil file is related to which nodes?

This is a complete error message(I know I should use the FST file. Here I use a TXT file to input the FST file. I think there is no problem)

C:\Users\13417\Desktop\bladed\LoadCases>TwinRotor_x64 TwinRotor_x64.txt


OpenFAST

Copyright (C) 2022 National Renewable Energy Laboratory Copyright (C) 2022 Envision Energy USA LTD

This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. See the "LICENSE" file distributed with this software for details.


OpenFAST-Unversioned from 42a5a8196529ae0349eda6d797a79461c2c03ff0 Compile Info:

OpenFAST input file heading: FAST Certification Test #19: IEA 15.0 MW Baseline Wind Turbine with OC3 Monopile RF Configuration, for use in offshore analysis

Running ElastoDyn. Nodal outputs section of ElastoDyn input file not found or improperly formatted. Running AeroDyn. AD15 Nodal Outputs: Nodal output section of AeroDyn input file not found or improperly formatted. Skipping nodal outputs.

FAST_InitializeAll:AD_Init:Init_AFIparams:AFI_Init:ReadAFfile:ParseSiAry:

A fatal error occurred when parsing data. The "CoeffData" array was not assigned because the file is too short.

OpenFAST encountered an error during module initialization. Simulation error level: FATAL ERROR OpenFAST encountered an error during module initialization. Simulation error level: FATAL ERROR

Aborting OpenFAST.

jjonkman commented 2 years ago

Dear @shipors,

From the error message, my guess is your airfoil data input file is not formatted properly. How does your airfoil data file compare to one of the example airfoil data files provided with OpenFAST (e.g., here: https://openfast.readthedocs.io/en/main/_downloads/5ba9cfc7b0b53c6530f7032f44cb4874/ad_polar_example.dat)?

Regarding BlAFID, the list of airfoil data files is given via AFNames in the AeroDyn primary input file. For example, BlAFID = 4 corresponds to the fourth file listed in AFNames.

Best regards,

shipors commented 2 years ago

Dear @jjonkman

I checked my airfoil data input file and found that it was not much different from the example airfoil data files provided with openfast. There are only differences in line 7, 19, 23, 24 and 27 of example airfoil data files. There are no such lines in my file. Can you find my format error? My code is attached, thank you!

Best wishes!

! ------------ AirfoilInfo v1.01.x Input File ----------------------------------
! AeroElasticSE FAST driver
! line
! line
! ------------------------------------------------------------------------------
DEFAULT                  InterpOrd   ! Interpolation order to use for quasi-steady table lookup {1=linear; 3=cubic spline; "default"} [default=3]
1                        NonDimArea  ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
@"IEA-15-240-RWT_AeroDyn15_Polar_06_Coords.txt"       NumCoords   ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
"unused"      BL_file           ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
1                        NumTabs     ! Number of airfoil tables in this file.  Each table must have lines for Re and Ctrl.
! ------------------------------------------------------------------------------
! data for table 1
! ------------------------------------------------------------------------------
              0.750000   Re          ! Reynolds number in millions
0                        UserProp    ! User property (control) setting
True                     InclUAdata  ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
!........................................SMF
             -3.390975   alpha0      ! 0-lift angle of attack, depends on airfoil.
             14.000000   alpha1      ! Angle of attack at f=0.7, (approximately the stall angle) for AOA>alpha0. (deg)
            -14.000000   alpha2      ! Angle of attack at f=0.7, (approximately the stall angle) for AOA<alpha0. (deg)
              1.000000   eta_e       ! Recovery factor in the range [0.85 - 0.95] used only for UAMOD=1, it is set to 1 in the code when flookup=True. (-)
              6.475273   C_nalpha    ! Slope of the 2D normal force coefficient curve. (1/rad)
Default                  T_f0        ! Initial value of the time constant associated with Df in the expression of Df and f. [default = 3]
Default                  T_V0        ! Initial value of the time constant associated with the vortex lift decay process; it is used in the expression of Cvn. It depends on Re,M, and airfoil class. [default = 6]
Default                  T_p         ! Boundary-layer,leading edge pressure gradient time constant in the expression of Dp. It should be tuned based on airfoil experimental data. [default = 1.7]
Default                  T_VL        ! Initial value of the time constant associated with the vortex advection process; it represents the non-dimensional time in semi-chords, needed for a vortex to travel from LE to trailing edge (TE); it is used in the expression of Cvn. It depends on Re, M (weakly), and airfoil. [valid range = 6 - 13, default = 11]
Default                  b1          ! Constant in the expression of phi_alpha^c and phi_q^c.  This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.14]
Default                  b2          ! Constant in the expression of phi_alpha^c and phi_q^c.  This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.53]
Default                  b5          ! Constant in the expression of K'''_q,Cm_q^nc, and k_m,q.  [from  experimental results, defaults to 5]
Default                  A1          ! Constant in the expression of phi_alpha^c and phi_q^c.  This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.3]
Default                  A2          ! Constant in the expression of phi_alpha^c and phi_q^c.  This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.7]
Default                  A5          ! Constant in the expression of K'''_q,Cm_q^nc, and k_m,q. [from experimental results, defaults to 1]
              0.000000   S1          ! Constant in the f curve best-fit for alpha0<=AOA<=alpha1; by definition it depends on the airfoil. [ignored if UAMod<>1]
              0.000000   S2          ! Constant in the f curve best-fit for         AOA> alpha1; by definition it depends on the airfoil. [ignored if UAMod<>1]
              0.000000   S3          ! Constant in the f curve best-fit for alpha2<=AOA< alpha0; by definition it depends on the airfoil. [ignored if UAMod<>1]
              0.000000   S4          ! Constant in the f curve best-fit for         AOA< alpha2; by definition it depends on the airfoil. [ignored if UAMod<>1]
              1.595797   Cn1         ! Critical value of C0n at leading edge separation. It should be extracted from airfoil data at a given Mach and Reynolds number. It can be calculated from the static value of Cn at either the break in the pitching moment or the loss of chord force at the onset of stall. It is close to the condition of maximum lift of the airfoil at low Mach numbers.
             -0.671826   Cn2         ! As Cn1 for negative AOAs.
Default                  St_sh       ! Strouhal's shedding frequency constant.  [default = 0.19]
              0.126617   Cd0         ! 2D drag coefficient value at 0-lift.
             -0.075340   Cm0         ! 2D pitching moment coefficient about 1/4-chord location, at 0-lift, positive if nose up. [If the aerodynamics coefficients table does not include a column for Cm, this needs to be set to 0.0]
              0.000000   k0          ! Constant in the \hat(x)_cp curve best-fit; = (\hat(x)_AC-0.25).  [ignored if UAMod<>1]
              0.000000   k1          ! Constant in the \hat(x)_cp curve best-fit.  [ignored if UAMod<>1]
              0.000000   k2          ! Constant in the \hat(x)_cp curve best-fit.  [ignored if UAMod<>1]
              0.000000   k3          ! Constant in the \hat(x)_cp curve best-fit.  [ignored if UAMod<>1]
              0.000000   k1_hat      ! Constant in the expression of Cc due to leading edge vortex effects.  [ignored if UAMod<>1]
Default                  x_cp_bar    ! Constant in the expression of \hat(x)_cp^v. [ignored if UAMod<>1, default = 0.2]
Default                  UACutout    ! Angle of attack above which unsteady aerodynamics are disabled (deg). [Specifying the string "Default" sets UACutout to 45 degrees]
Default                  filtCutOff  ! Cut-off frequency (-3 dB corner frequency) for low-pass filtering the AoA input to UA, as well as the 1st and 2nd derivatives (Hz) [default = 20]
!........................................
! Table of aerodynamics coefficients
101                      NumAlf      ! Number of data lines in the following table
!    Alpha      Cl      Cd        Cm
!    (deg)      (-)     (-)       (-)
   -180.00    0.000   0.0267   0.0000
   -175.00    0.274   0.0370   0.1379
   -170.00    0.547   0.0968   0.2778
   -160.00    0.685   0.2876   0.2740
   -155.00    0.766   0.4025   0.3118
   -150.00    0.816   0.5232   0.3411
   -145.00    0.836   0.6454   0.3631
The following content has been omitted
jjonkman commented 2 years ago

Dear @shipors,

Does adding quotes around the "DEFAULT" keyword solve the problem?

And presumably you have 101 lines in your table of aerodynamic coefficients (you only show 7 lines), from -180 to 180 degrees?

Best regards,

shipors commented 2 years ago

Dear @jjonkman

I checked it again and found that the number of lines in the aerodynamic coefficient table of the first airfoil file I set was wrong. Actually, it should be 101 lines, But I found it was 120 lines. After modification, it can run normally. Thank you for your inspiration!

Best wishes!