Error when using user time series in TurbSim

Hi everyone,

I tried to create a turbsim file with user input time series. I used TubSim v2.00.07 with these files:

TurbSim Input:

---------TurbSim v2.00.* Input File------------------------
Example input file for TurbSim.
---------Runtime Options-----------------------------------
False Echo - Echo input data to .ech (flag)
2316563 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)
False 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)
False 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)
True 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)
1 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-----------------------
31 NumGrid_Z - Vertical grid-point matrix dimension
31 NumGrid_Y - Horizontal grid-point matrix dimension
0.01 TimeStep - Time step [seconds]
599.99 AnalysisTime - Length of analysis time series [seconds] (program will add time if necessary: AnalysisTime = MAX(AnalysisTime, UsableTime+GridWidth/MeanHHWS) )
599.99 UsableTime - Usable length of output time series [seconds] (program will add GridWidth/MeanHHWS seconds unless UsableTime is “ALL”)
108.0 HubHt - Hub height [m] (should be > 0.5GridHeight)
150.0 GridHeight - Grid height [m]
150.0 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-------------------
“TIMESR” TurbModel - Turbulence model (“IECKAI”,“IECVKM”,“GP_LLJ”,“NWTCUP”,“SMOOTH”,“WF_UPW”,“WF_07D”,“WF_14D”,“TIDAL”,“API”,“USRINP”,“TIMESR”, or “NONE”)
“userpath” 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”) )
“B” 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]
default 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” [-]
108.0 RefHt - Height of the reference velocity (URef) [m]
4.0 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)
default PLExp - Power law exponent [-] (or “default”)
default 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----------------------------
default 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”)
default 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-------------------
“\PC-CWD070\alexander.krause\Studenten\Jakob Roth\05_Simulation\01_MKS\MKS\TurbSim\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!

User Input:

--------------TurbSim v2.00.* User Time Series Input File-----------------------
Time series input generated by MATLAB script.

      2  nComp    - Number of velocity components in the file (1=u component only; 2=u & v components; 3=u,v,w) [if < 3 other components will be generated using values from input file]
      1  nPoints  - Number of time series points contained in this file (-)
      1  RefPtID  - Index of the reference point (1-nPoints)

Pointyi Pointzi ! listed in order of increasing height
(m) (m)
0.00000 108.00000
--------Time Series-------------------------------------------------------------
Elapsed Time Point01u_108m Point01v_108m
(s) (m/s) (m/s)
0.0000 4.7325 -0.0655
0.0100 4.7389 -0.0455
0.0200 4.7429 -0.0345
0.0300 4.7500 -0.0183
0.0400 4.7545 -0.0006
0.0500 4.7623 0.0205
0.0600 4.7787 0.0497
0.0700 4.7935 0.0807
0.0800 4.8084 0.1113
0.0900 4.8249 0.1406
0.1000 4.8374 0.1695
0.1100 4.8453 0.1938
0.1200 4.8548 0.2168
0.1300 4.8626 0.2416
0.1400 4.8705 0.2659
0.1500 4.8799 0.2912
0.1600 4.8874 0.3238
0.1700 4.8950 0.3562
0.1800 4.9042 0.3869

I get the following error message:

ERROR: CreateGrid:Delta frequency in the user-input time series must be the same as the delta frequency in the simulated series. Change AnalysisTime or number of rows entered in user-defined time series file.

The delta_time in the input and user time series files are matching so that should not be a problem. Where can I adjust the Delta frequency?

Thanks a lot!
Jakob

To be more precise, I cut the user input file but the last row in the actual file contains the timestamp 599.9900

Dear @Jakob.Roth,

TurbSim will internally change the AnalysisTime such that the number of steps is a product of small primes, to ensure that the internal FFTs are efficient. This will, in turn, effect the frequency step. To get around this error, I would guess you’d need to add a few time steps to your user-specified time series.

Best regards,

Thanks for the quick reply! Sounds like this could be the source of the error. I tried adding multiple timesteps in my user input file (1-4 steps), both with and without changing the AnalysisTime in the TurbSim input file but I always get the same error. Is there an option to output the internally changed AnalysisTime? Based on my user input example, what would be a timestamp for the last user input file row you would expect to work?

Dear @Jakob.Roth,

This number is not written out by TurbSim (as far as I know), but you can access the value if you modify TurbSim. You can find a a MATLAB version of the product of small primes (PSF) function to determine how many steps to be used in TurbSim here: https://github.com/bjonkman/matlab-tools/blob/master/TurbSim/PSF.m. Use NumPrimes = 9.

Best regards,

If I understand it correctly, my user input has 600/0.01 = 60000 steps, which is a factor of small primes. Also checked it with the PSF function. I still get the same error.

Do you have an idea what else could cause the error?

Dear @Jakob.Roth,

I looked at the TurbSim source code, and see that the number of time steps (NumSteps) is calculated as follows when output is not periodic (as you’ve defined):

p_grid%NumOutSteps = CEILING( ( p_grid%UsableTime + p_grid%GridWidth / UHub )/p_grid%TimeStep )
      p_grid%NumSteps    = MAX( CEILING( p_grid%AnalysisTime / p_grid%TimeStep ), p_grid%NumOutSteps )
      
         ! make sure NumSteps is an even number and a product of small primes      
      NumSteps2          = ( p_grid%NumSteps - 1 )/2 + 1
      p_grid%NumSteps    = 2*PSF( NumSteps2 , 9, subtract=p_usr%NPoints > 0 )

In your case, UsableTime = AnalysisTime, so, GridWidth/UHub is added to the simulation length, or 37.5 s in your case.

Best regards,

1 Like

That’s it. Thank you so much, you helped me a lot!

If someone has the same problem, this worked for me:

  1. Add some amount of timesteps with length greater than GridWidth/UHub (I chose 50s) in the user input file
  2. Set AnalysisTime = last time value in user input file
  3. Set UsefulTime = AnalysisTime - 50
1 Like