Wind files creation in batch?

Hi,

I want to create the NTM wind files from 3 m/s to 25 m/s each with 5 seeds. Is there a way to create them using Turbsim as a batch file rather than manually creating it one by one which takes a long time.

Best regards,
Karthik

Dear Karthik Prakash,

I have Python script for automatically creating *.inp files (turbsim input files) for different mean wind speeds and seed numbers. Then, run TurbSim to generate *bts files.
I am not able to share here because of the file type restrictions while uploading. I can email you, please share your email id.

Regards,
Kumara

Dear Karthik Prakash,

Sent.

Regards,
Kumara

Hi Kumara

Thanks a lot. You can share it to sol4elec@gmail.com.

Best regards
Aman

Hi @KumaraRaja.Eedara

Thanks a lot for the tool. Really appreciate the effort. While was trying to run, I got the below output. It didn’t run. I ran in Idle & Anaconda. Any help is highly appreciated.


I re ran it since the Turbsim exe name was different but got this error. The .sum files were created and I am pasting the error message from it below.

This summary file was generated by TurbSim on 23-Sep-2022 at 12:13:34.

ERROR: ReadInputFile:Invalid logical input for file “Wind_NTM_11mps_seed03.inp” occurred while trying to read Echo.

ABORTING PROGRAM.

Dear Aman Ali,

Sent to your gmail.

Regards,
Kumara

Dear @KumaraRaja.Eedara

I used the “TurbSim_x64.exe” and when I compared the *.inp files used by “TurbSim_x64.exe” and the *.inp files created by the Python tool. I saw some different formatting as shown below.
The one on the right is the *.inp created by the tool and the one on left is from I what I used before.


Can this be the reason and is there anything that can be done for this.
Best regards,
Karthik

@Karthik.Prakash
You have to first run “WindFileGenWithDifferentSeedNumber.py” file before running “Run_Turbsim.py”.

I see that *.inp files are created. Are you saying that error occurred while running “Run_Turbsim.py”? If yes, have you received error after successfully creating *bts files for some cases or at the starting itself? Also, you may quickly check if commenting the yellow highlighted line and uncommenting the red arrow line helps.

Regards,
Kumara

Yes. It could cause problem, not because of anything with the Python script. But, clearly , in V20 ‘Echo’, a binary variable is expected which is missing in the V150 input file.
Here is how you can resolve it:

  1. Open the “Template_Wind_NTM_xx_mps.template” file in any text editor.
    Add/delete the extra lines (depending on the difference in the version) you are using.
    Then re run the code “WindFileGenWithDifferentSeedNumber.py” to generate *.inp files, followed by "“Run_Turbsim.py”.

OR

  1. I have used V150 from “TurbSim | Wind Research | NREL”. You can download the same and test running the codes using TurbSim64.exe in that folder.

Hope this helps!

Regards,
Kumara

1 Like

@KumaraRaja.Eedara Thanks a lot. I will try this out.

Hi @Jason.Jonkman ,

Is there a difference between the TurbSim64.exe and TurbSim_x64.exe,

Bes regards,
Karthik

@KumaraRaja.Eedara I tried the 2nd approach and it worked. Many thanks for the support and the tool.

I have just sent the code for the running TurbSimV20 i.e (TurbSim_x64.exe) in batch too.

Regards,
Kumara

1 Like

Hi Kumara,

Is there a script available to create the *.fst files for running a DLC 1.2 simulations from 3m/s to 25 m/s? If I want to run from 3m/s to 25 m/s with 6 seeds for each wind speeds, then should I need to 'manually create 23 x 1 (wind direction 0 degree only) x 6 (seeds) = 138 .*fst files?

Best regards,
Karthik

Dear @Karthik.Prakash,

I agree with the number simulations and sets of input files you would need to create if your bin size is 1 m/s. (Please note that 2 m/s is a more common wind speed bin size, which would mean 11 bins with 6 seeds = 66 simulations.) But I would never generate such a set by hand.

Regarding scripts that automate the generation of input files and executing TurbSim and OpenFAST simulations for IEC DLCs, see my post dated Aug 31, 2022 in the following forum topic: Wind & Wave data - #67 by Jason.Jonkman.

Best regards,

1 Like

Dear @Karthik.Prakash

I have attached the python code that I have written for the same purpose. As @Jason.Jonkman mentioned, everyone has their own way of writing the scripts. The attached code basically iterates over the number of *bts files present in the folder. You may have to change the folder paths before running the code.

Hope it helps!

Regards,
Kumara

1 Like

Dear @Jason.Jonkman ,

Thanks a lot for the reply. I will try out the existing scripts and see how it runs.

Best regards,
Karthik

Dear @KumaraRaja.Eedara ,

Thanks a lot for the reply and the script. May I know if this is a stand alone script that creates the wind files and then maps it to each .fst files corresponding to each wind speed from cut in to cut out and finally create a list of .fst files for wind speeds from cut in to cut out.

Or do I need to create the wind files first (all the .bts files from cut in to cut out) and then run the script?

Also, should there be a template of .fst in the folder in which the script is placed?

Will it fine if you can share with the the .py file?

Best regards,
Karthik

Dear @Karthik.Prakash ,

The *.bts files should be available first and the code changes the inflow wind file name one after the other and performs the OpenFAST simulations in series.
Yes, .fst file is needed (but not a template). The file names for inflow, elastodyn, aerodyn etc are hard coded in .fst and within inflow wind file, the *bts file name/path is changed through this code and FAST run is performed. This portal doesn’t allow us to upload *.py files. I have shared files on email that you have earlier shared on this thread.
If I may, I would suggest you to understand the code. The “template” stuff is all that i used in the automation of wind file creation, (using TurbSim) or OpenFAST runs.

Regards,
Kumara

1 Like