ImperialCollegeLondon / sharpy

Simulation of High Aspect Ratio aeroplanes and wind turbines in Python: a nonlinear aeroelastic code
https://imperial.ac.uk/aeroelastics/sharpy
BSD 3-Clause "New" or "Revised" License
119 stars 58 forks source link

File location error for WindTurbine case in #generate_rotor.py #258

Open THEDOCTORDHEERAJ opened 9 months ago

THEDOCTORDHEERAJ commented 9 months ago

Hello,

I have been facing an issue everytime I run the file mentioned in the topic. The main issue it seems is that the file name has been changed since the script was written;

image

I tried by myself to fix this issue by manually changing the file name in -> excel_description = {'excel_file_name': os.path.abspath('type04_db_nrel5mw_oc3_v06.xlsx'),

image

after this was done a new issue popped up as seen here:

image

kindly help me solve this issue.

Thanks and Regards, Dheeraj Chettiar

sduess commented 9 months ago

Hello Dheeraj,

I am not sure which version of SHARPy you're currently running but I could not find any script with pointing to this Excel file with os.path.abspath('type04_db_nrel5mw_oc3_v06.xlsx as in your screenshot. The file you're looking for is located in <your-sharpy-directory>+ 'docs/source/content/example_notebooks/source/type04_db_nrel5mw_oc3_v06.xlsx' and not in the <your-sharpy-directory>+ 'sharpy/cases/coupled/WindTurbine/' folder. So update the filepath and then SHARPy should be able to find the file. I hope this helps.

Kind regards!

THEDOCTORDHEERAJ commented 9 months ago

Hello sduess,

im using the version that can be downloaded from https://ic-sharpy.readthedocs.io/en/latest/content/installation.html. I have followed all the steps listed on it.

Regarding the file, the 1st image attached in the original post is the fix I initially tried as the file name: type02_db_NRELMW_v02.xlsx does not exist in my downloaded version of sharpy rather type04_db_nrel5mw_oc3_v06.xlsx does exist.

i have attached a picture of the original unaltered code below: image

moreover, the code "sharpydir.SharpyDir" which precedes the file name in os.path.abspath function is for some reason pointing to my anaconda environment, which is why I initially had to make the changes as in the 1st image.