Closed ramisetti closed 3 years ago
I'd like the runCampbell script to be reduced to a minimal amount of lines and simply call a set of reusable functions . So I'll likely update it accordingly, accounting for some of your comments.
Hi @ramisetti , if you have time, can you maybe try the Campbell/example/runCampbell.m
script located in my fork:
https://github.com/ebranlard/matlab-toolbox
I can try to incorporate your feedback, before merging this to the official repository.
Hi @ebranlard, Sure I will try it and let you know my feedback.
I tried using the runCampbell.m script from your fork. I found there are still some errors using the script on Mac OS.
I had to change ‘!’ symbol to '~' at line numbers 124 and 127 in writeLinearizationFiles.m I had to replace the double quotes to single quotes for the line "OCTAVE_VERSION", “builtin” in os_path.m file
After the above changes I could run the script but openfast simulations could not be launched. I got the below error:
dyld: Symbol not found: __gfortran_transfer_character_write Referenced from: /Desktop/OpenFAST/openfast/build/bin/openfast (which was built for Mac OS X 10.15) Expected in: /Applications/MATLAB_R2016b.app/sys/os/maci64/libgfortran.3.dylib
It seems I am unable to use openfast from matlab as I don’t have any problem using the same openfast outside matlab. I did not have this problem with previous runCampbell.m script available in the OpenFast repository.
The dyld: Symbol not found: __gfortran_transfer_character_write
error looks to me like it is a path issue. On my system, the /Applications/MATLAB_R2019a.app/sys/os/maci64/libgfortran.3.dylib
is for gcc version 4.3.0, but I compile OpenFAST using gfortran version 7.4 and 9.3 which are not compatible with that dylib. This runs fine on my setup Mac (10.14.6) leading me to suspect the path issue.
Try the following:
otool -L /path/to/openfast
This will show which what libraries your compiled openfast needs!otool -L /path/to/openfast
If these don't match, then there is an issue with your paths in the shell MATLAB spawns
Example output from !otool
in matlab (NOTE: /Applications/MATLAB...
does not appear in the list):
Thanks @andrew-platt. I've push an updated version to fix the syntax issue. Let's see what can be done for this library path. Apart from what Andy mentions, maybe the following thread will have some helpful hints: https://www.mathworks.com/matlabcentral/answers/17437-dyld_library_path-problem
Hello @ebranlard,
Thanks to the helpful hints from @andrew-platt. The runCampbell.m script is now able to run openfast simulations but there is a new problem. Only the first simulation finished and all the remaining 4 simulations failed. I get the following error for each failed simulation case.
FAST_InitializeAll:FAST_Init:ValidateInputData:OutFmt produces a column width of 20 instead of 10 characters. FAST_InitializeAll:AD_Init:ReadInputFiles:ReadPrimaryFile:Invalid logical input for file "../../_ExampleData/5MW_Land_Lin/NRELOffshrBsline5MW_Onshore_AeroDyn15.dat" occurred while trying to read UseBlCm.
FAST encountered an error during module initialization. Simulation error level: FATAL ERROR
Could you please help me in resolving this issue?
Hi, Thanks for your test. The test case should be up to date with the latest openfast (version 2.3), you might be running into this issue because you are using an older executable. Let me know if you still have issue.
Emmanuel
Hi @ebranlard,
Just to let you know I am using the latest openfast version 2.3 from the dev branch cloned in April 2020. I also tried running the script using the latest sources from dev branch (cloned on 21 July 2020) but I get the following errors:
AST_InitializeAll:FAST_Init:FAST_ReadPrimaryFile:Invalid logical input for file "../../_ExampleData/5MW_Land_Lin/ws15.0.fst" occurred while trying to read CalcSteady. FAST_ReadPrimaryFile:Invalid numerical input for file "../../_ExampleData/5MW_Land_Lin/ws15.0.fst" occurred while trying to read Twr_Kdmp. FAST_ReadPrimaryFile:Invalid numerical input for file "../../_ExampleData/5MW_Land_Lin/ws15.0.fst" occurred while trying to read Bld_Kdmp.
Just a few remarks:
Hi, thanks for trying this again.
Unfortunately, changes were added last week to the dev branch of openfast which make it incompatible with version 2.3. There are more input lines in the .fst
file, which add more linearization options. On my repo, there is a script runCampbell_Trim.m
that is compatible with these options. It uses the following input file _ExampleData/5MW_Land_Lin_Templates/Main_5MW_Land_Lin_Trim.fst
, which should be compatible with the latest dev. This input files could also be used with the runCampbell.m
.
Regarding your remarks:
.fst
files to override this. git pull
, which does not pull the submodules, the command git pull --recurse-submodule
should do it.python-toolbox
repository but it's still work in progress. It would be great to include the mbc in this repository. We have created a directory structure in the dev
branch of the python-toolbox, to add linearization in the future (see here).
Thanks again for all your testing!Thanks for the information on how to use the script by introducing the Filenames in the csv file. This is indeed helpful if the users are made aware of it.
I am happy to share my python code if this can be helpful to others. At the moment the code is not heavily tested but it can generate the Campbell diagram plot. I will first commit the code to my Github repository and then make it available after some cleanup. Hope this is okay with you.
That sounds good, thank you for sharing your repository when you get to it.
hi @ramisetti We'd like to start implementing our own version of the linearization scripts (including the MBC). It would be nice to have a look at your version as a starting point. If you don't have a repository ready, could you maybe contact me my email? My email is emmanuel[dot]branlard[at]nrel[dot]gov. Thanks!
Hello @ebranlard https://github.com/ebranlard,
I have committed my MBC python code onto a private repo in my GitHub page. It is not yet made public as I could not get time to cleanup some messy parts of the code. I wanted to test some parts of the code for speedup as well but I am afraid I may not get the time to do it anytime soon in this month. To help you I can give you access as a collaborator to my private repo and you can have a look at the code. I hope this is helpful to you. I have also replied to your nrel email so you can directly contact me in future for any help/feedback related to my python implementation of the MBC code.
On 3 Aug 2020, at 23:20, E. Branlard notifications@github.com wrote:
hi @ramisetti https://github.com/ramisetti We'd like to start implementing our own version of the linearization scripts (including the MBC). It would be nice to have a look at your version as a starting point. If you don't have a repository ready, could you maybe contact me my email? My email is emmanuel[dot]branlard[at]nrel[dot]gov. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenFAST/matlab-toolbox/issues/18#issuecomment-668157053, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFBMHU6XOYC7KPYGZJQABDR632F3ANCNFSM4M43VFSA.
Thanks a lot for that!
Hi @ebranlard,
I have now enabled access to my private repo on Github. Please let me know if you have any issue accessing the code.
I'm closing this thread, since most issues were solved by the latest version (which might come with its own issues).