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
668 stars 452 forks source link

Wind files generated using TurbSim under macOS cannot be used, but windows can. #2028

Open Melancho7ee opened 7 months ago

Melancho7ee commented 7 months ago

Dear All Bug description I am using OpenFAST+Simulink to simulate a 5MW ITIBarge offshore wind turbine in my MacBook (M1 chip). And I tried to generate turbulent wind "*.bts" file, using Turbsim in my MacBook (M1 chip). However, If I use TurbSim to generate a bts file in a macOS environment, it cannot be used. The Simulink error message is as follows. f7d6f3c4b2031723bfc2dac1f7ea0f20

By contrast, I tried to use the same *.inp file* to generate a .bts wind file in a windows environment**, and then copied it to my MacBook for use. The strange thing is that the wind file generated in this way can be used.

I don’t understand the reason for this. Is this a bug of TurbSim in the macOS environment?

Best regards,

jjonkman commented 6 months ago

Dear @Melancho7ee,

Which version of OpenFAST are you using? Does upgrading to the main branch of OpenFAST (currently release OpenFAST v3.5.2) resolve the issue?

Best regards,

Melancho7ee commented 6 months ago

Dear @Melancho7ee,

Which version of OpenFAST are you using? Does upgrading to the main branch of OpenFAST (currently release OpenFAST v3.5.2) resolve the issue?

Best regards,

I am using OpenFAST v3.5.0, and Matlab r2023b now. I do not but will try later on v3.5.2. Thanks!

Best regards,

andrew-platt commented 6 months ago

Dear @Melancho7ee,

Can you share your TurbSim input file, and exactly which compiler setup you are using on the Mac?

Melancho7ee commented 6 months ago

Dear @Melancho7ee,

Can you share your TurbSim input file, and exactly which compiler setup you are using on the Mac?

Dear @andrew-platt,

The compiler setup is:

melancholee@Pro ~ % TurbSim -v

 **************************************************************************************************
 TurbSim

 Copyright (C) 2023 National Renewable Energy Laboratory
 Copyright (C) 2023 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.
 **************************************************************************************************

 TurbSim-HEAD-HASH-NOTFOUND
 Compile Info:
  - Compiler: GCC version 13.1.0
  - Architecture: 64 bit
  - Precision: double
  - OpenMP: No
  - Date: Jun 21 2023
  - Time: 11:19:18
 Execution Info:
  - Date: 02/13/2024
  - Time: 17:24:36+0800

  TurbSim terminated normally.

GCC:

melancholee@Pro ~ % gcc -v

Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

The inp file is shown below:

---------TurbSim v2.00.* Input File------------------------
Example input file for TurbSim.
---------Runtime Options-----------------------------------
False     Echo            - Echo input data to <RootName>.ech (flag)
2318573   RandSeed1       - First random seed  (-2147483648 to 2147483647)
RANLUX    RandSeed2       - Second random seed (-2147483648 to 2147483647) for intrinsic pRNG, or an alternative pRNG: "RanLux" or "RNSNLW"
False     WrBHHTP         - Output hub-height turbulence parameters in binary form?  (Generates RootName.bin)
True     WrFHHTP         - Output hub-height turbulence parameters in formatted form?  (Generates RootName.dat)
False     WrADHH          - Output hub-height time-series data in AeroDyn form?  (Generates RootName.hh)
True      WrADFF          - Output full-field time-series data in TurbSim/AeroDyn form? (Generates RootName.bts)
True      WrBLFF          - Output full-field time-series data in BLADED/AeroDyn form?  (Generates RootName.wnd)
True      WrADTWR         - Output tower time-series data? (Generates RootName.twr)
False     WrFMTFF         - Output full-field time-series data in formatted (readable) form?  (Generates RootName.u, RootName.v, RootName.w)
False     WrACT           - Output coherent turbulence time steps in AeroDyn form? (Generates RootName.cts)
True      Clockwise       - Clockwise rotation looking downwind? (used only for full-field binary files - not necessary for AeroDyn)
 0        ScaleIEC        - Scale IEC turbulence models to exact target standard deviation? [0=no additional scaling; 1=use hub scale uniformly; 2=use individual scales]

--------Turbine/Model Specifications-----------------------
13        NumGrid_Z       - Vertical grid-point matrix dimension
13        NumGrid_Y       - Horizontal grid-point matrix dimension
0.0125      TimeStep        - Time step [seconds]
1200       AnalysisTime    - Length of analysis time series [seconds] (program will add time if necessary: AnalysisTime = MAX(AnalysisTime, UsableTime+GridWidth/MeanHHWS) )
"ALL"     UsableTime      - Usable length of output time series [seconds] (program will add GridWidth/MeanHHWS seconds unless UsableTime is "ALL")
90   HubHt           - Hub height [m] (should be > 0.5*GridHeight)
175     GridHeight      - Grid height [m]
175     GridWidth       - Grid width [m] (should be >= 2*(RotorRadius+ShaftLength))
0         VFlowAng        - Vertical mean flow (uptilt) angle [degrees]
0         HFlowAng        - Horizontal mean flow (skew) angle [degrees]

--------Meteorological Boundary Conditions-------------------
"IECKAI"  TurbModel       - Turbulence model ("IECKAI","IECVKM","GP_LLJ","NWTCUP","SMOOTH","WF_UPW","WF_07D","WF_14D","TIDAL","API","USRINP","TIMESR", or "NONE")
"unused"  UserFile        - Name of the file that contains inputs for user-defined spectra or time series inputs (used only for "USRINP" and "TIMESR" models)
"1-Ed3"   IECstandard     - Number of IEC 61400-x standard (x=1,2, or 3 with optional 61400-1 edition number (i.e. "1-Ed2") )
5         IECturbc        - IEC turbulence characteristic ("A", "B", "C" or the turbulence intensity in percent) ("KHTEST" option with NWTCUP model, not used for other models)
"NTM"     IEC_WindType    - IEC turbulence type ("NTM"=normal, "xETM"=extreme turbulence, "xEWM1"=extreme 1-year wind, "xEWM50"=extreme 50-year wind, where x=wind turbine class 1, 2, or 3)
default   ETMc            - IEC Extreme Turbulence Model "c" parameter [m/s]
"PL"      WindProfileType - Velocity profile type ("LOG";"PL"=power law;"JET";"H2L"=Log law for TIDAL model;"API";"USR";"TS";"IEC"=PL on rotor disk, LOG elsewhere; or "default")
"unused"  ProfileFile     - Name of the file that contains input profiles for WindProfileType="USR" and/or TurbModel="USRVKM" [-]
90   RefHt           - Height of the reference velocity (URef) [m]
11.4         URef            - Mean (total) velocity at the reference height [m/s] (or "default" for JET velocity profile) [must be 1-hr mean for API model; otherwise is the mean over AnalysisTime seconds]
default   ZJetMax         - Jet height [m] (used only for JET velocity profile, valid 70-490 m)
0.2       PLExp           - Power law exponent [-] (or "default")
0.03      Z0              - Surface roughness length [m] (or "default")

--------Non-IEC Meteorological Boundary Conditions------------
default   Latitude        - Site latitude [degrees] (or "default")
0.05      RICH_NO         - Gradient Richardson number [-]
default   UStar           - Friction or shear velocity [m/s] (or "default")
default   ZI              - Mixing layer depth [m] (or "default")
default   PC_UW           - Hub mean u'w' Reynolds stress [m^2/s^2] (or "default" or "none")
default   PC_UV           - Hub mean u'v' Reynolds stress [m^2/s^2] (or "default" or "none")
default   PC_VW           - Hub mean v'w' Reynolds stress [m^2/s^2] (or "default" or "none")

--------Spatial Coherence Parameters----------------------------
"IEC"   SCMod1           - u-component coherence model ("GENERAL", "IEC", "API", "NONE", or "default")
default   SCMod2           - v-component coherence model ("GENERAL", "IEC", "NONE", or "default")
default   SCMod3           - w-component coherence model ("GENERAL", "IEC", "NONE", or "default")
"12.000, 0.353E-03"   InCDec1          - u-component coherence parameters for general or IEC models [-, m^-1] (e.g. "10.0  0.3e-3" in quotes) (or "default")
default   InCDec2          - v-component coherence parameters for general or IEC models [-, m^-1] (e.g. "10.0  0.3e-3" in quotes) (or "default")
default   InCDec3          - w-component coherence parameters for general or IEC models [-, m^-1] (e.g. "10.0  0.3e-3" in quotes) (or "default")
default   CohExp           - Coherence exponent for general model [-] (or "default")

--------Coherent Turbulence Scaling Parameters-------------------
"C:/Yiwork_NREL/OffshoreWind/Turbsim/Test/EventData"  CTEventPath     - Name of the path where event data files are located
"Random"  CTEventFile     - Type of event files ("LES", "DNS", or "RANDOM")
true      Randomize       - Randomize the disturbance scale and locations? (true/false)
 1.0      DistScl         - Disturbance scale [-] (ratio of event dataset height to rotor disk). (Ignored when Randomize = true.)
 0.5      CTLy            - Fractional location of tower centerline from right [-] (looking downwind) to left side of the dataset. (Ignored when Randomize = true.)
 0.5      CTLz            - Fractional location of hub height from the bottom of the dataset. [-] (Ignored when Randomize = true.)
30.0      CTStartTime     - Minimum start time for coherent structures in RootName.cts [seconds]

====================================================
! NOTE: Do not add or remove any lines in this file!
====================================================