Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_Testing.py issues #61

Open
ghylander opened this issue Oct 5, 2021 · 5 comments
Open

run_Testing.py issues #61

ghylander opened this issue Oct 5, 2021 · 5 comments

Comments

@ghylander
Copy link

ghylander commented Oct 5, 2021

First of all, I have to say running the script isn't very intuitive. The comments and docs help a bit, but it still took me some re-reads to figure it out.

Before continue reading, do I need to change all "# Setup ROSCO testing parameters"? If so, it should be made clearer.
If they have to be changed by the user, it's unclear what each parameter is and where should the user point them. Both 'FAST_exe' and 'wind_dir' are defined as "OpenFAST executable path"

On to the issues I'm having

I'm trying to run the "run_Testing.py" to test whether the dlls I'm compiling with Visual Studio and ifort are ok (see rosco issue 66)

I have setup ROSCO_toolbox using the guide. I set up the "run_Testing.py" script like so:

    # ---- Define test type ----
    turbine2test = 'NREL-5MW'   # IEA-15MW or NREL-5MW
    testtype     = 'lite'       # lite, heavy, binary-comp, discon-comp

I of course put my dlls to run testing on in the script-specified directory ('../ROSCO/build/libdiscon.')

The following is shown x4 (each time a different wind input file):

ofTools in ROSCO_toolbox...
EXECUTING TurbSim
Executable:      turbsim
Run directory:   /scratch/dzalkind/ROSCO_testing\wind\IEA-15_heavy
Input file:      C:\scratch\dzalkind\ROSCO_testing\wind\IEA-15_heavy\heavy_test_NTM_U5.000000_Seed971231.0.in
Exec string:     ['turbsim', 'C:\\scratch\\dzalkind\\ROSCO_testing\\wind\\IEA-15_heavy\\heavy_test_NTM_U5.000000_Seed971231.0.in']
ofTools in ROSCO_toolbox...

Then the process exits with "No such file or directory: 'turbsim'"

@nikhar-abbas
Copy link
Collaborator

Hi @ghylander,
Please keep in mind that this script is written to provide an example of how to run some of the testing capabilities in the ROSCO toolbox, and to provide a template by which to write your own scripts. It was not written as a "click and run" script in the same way that the examples are done. It is good to know that this script might be useful as a "click and run" script - we will keep that in mind going forward and try to make this more generic.

Some tips to get things running on your end:

  • You should update the rt_kwargs found here for your setup. The current paths are setup for a specific user, so you will need to change them to be your own paths.
  • FAST_exe and turbsim_exe point to your executables. If you are in a conda environment and conda install openfast=3.0, you should simply be able to set these to openfast and turbsim. Otherwise, you should point specifically to the executables in <your_root>/OpenFAST/install/bin`
  • runDir and wind_dir point to the directories in which you would like to save your OpenFAST input/output files and turbsim files. comp_dir is the output directory for the comparison files.

I think this may be everything you need to specifically define, but perhaps there are some things I am missing.

Cheers,
Nikhar

@ghylander
Copy link
Author

ghylander commented Oct 5, 2021 via email

@ghylander
Copy link
Author

ghylander commented Oct 6, 2021

I can try to make the file a bit more user friendly, but i need some help understanding it

in line 101 (and 102) you are defining rt_kwargs['comp_dir'], but then in lines 110 and 111 you define directories for the binaries and DISCON.IN files

are these 2 directory definitions redundant? what is rt_kwargs['comp_dir'] for?


I managed to make the script work, but I'm now getting an error when generating the plots:

Cannot plot Wind1VelX
Cannot plot GenPwr
Cannot plot RotSpeed
Cannot plot BldPitch1
Cannot plot GenTq

I have matplotlib installed in the env (I followed the setup guide step by step so all dependencies should be installed)

@nikhar-abbas
Copy link
Collaborator

comp_dir is the directory that any comparison outputs and plots will be saved to. The directories for the binaries and DISCON.IN files are the inputs themselves.

I'm not sure exactly why you are receiving these Cannot plot... errors. Something is not working in this try statement here. Can you check your OpenFAST input deck to make sure those channels are specified as output channels?

@ghylander
Copy link
Author

comp_dir is the directory that any comparison outputs and plots will be saved to. The directories for the binaries and DISCON.IN files are the inputs themselves.

I'm not sure exactly why you are receiving these Cannot plot... errors. Something is not working in this try statement here. Can you check your OpenFAST input deck to make sure those channels are specified as output channels?

After having a comprehensive look at the source code, I checked where the pdf files should be generated and I found them. This leads me to believe the problem is related to matplotlib opening plot windows and the OS where the script is run, rather than a problem with the toolbox.

I will continue modifying the file to make it a bit easier to setup for use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants