OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
654 stars 447 forks source link

How to run FAST v7/v8 and OpenFAST #268

Closed gilcastroh closed 4 years ago

gilcastroh commented 5 years ago

Greetings,

It took me a while to figure out how to run OpenFAST (or FAST v7 and v8) and get it to process input files. Maybe it’s somewhere I could not find or I just missed, but anyway I hope to make it easier for new users to learn it, so here’s a mixture of the info I found and my own trials. If it’s actually simpler than what I say or if I express myself too casually, feel free to correct me.

FAST v7 and v8 can be downloaded from the NREL website and are ready to use as I will describe (without the need to be compiled). OpenFAST, however, needs to be installed according to one of the methods in https://openfast.readthedocs.io/en/master/source/install/install_vs_windows.html. I did it with Visual Studio 2017 on Windows, with Intel® Parallel Studio XE 2019 Cluster as the Fortran compiler. In case it doesn’t work, check https://github.com/OpenFAST/openfast/issues/219 for an issue I had. Feel free to ask for more details about certain steps if you need them.

To run FAST v7 on an input file (*.fst extension), copy that file to the main folder, where the FAST.exe file is” (or instead copy FAST.exe to where the file is). On your computer’s command prompt, navigate to that folder and type “FAST Test01.fst” (file named “Test01.fst”). There are sample files on the “CertTest” folder.

As for FAST v8, the “CertTest” folder still exists, but the executable is now on the “bin” folder. Actually, there are 4 options for the executable: “FAST_Win32”, “FAST_Win32d”, “FAST_x64” and “FAST_x64d”. You need the input file and one of these executables in the same folder, but you also need one of the “MAP” files from the same “bin” folder: “MAP_Win32.dll” if you run one of the “Win32” executables, or “MAP_x64.dll” if you choose one of the “x64” executables. Having done this, navigate the command prompt to that folder and write “FAST_Win32 Test01.fst” (the name of executable used and the name of the input file).

For OpenFAST, upon installation, the precedure is still similar, only the executables (“openfast_Win32” and “openfast_x64”) and the “MAP” files (“MAP_Win32.dll” and “MAP_x64.dll”) are located in “build\bin”. Also, the folder with sample input files is now called “r-test” and available at https://github.com/OpenFAST/r-test.

With either 3 of these, a successful simulation will end with the message “OpenFAST terminated normally” (or similar) displayed on the command prompt.

Good day.

bjonkman commented 5 years ago

You actually don't need to copy the executables, dlls, or input files; they can be in different directories. In the case of FAST v8, if you are in the CertTest directory, you can type

..\bin\FAST_Win32.exe Test18.fst

and it should run without issue. You can also specify a path name in the name of the input file, so you could also be in the bin directory and write

FAST_Win32.exe ..\CertTest\Test18.fst

and that should run, too.

gilcastroh commented 5 years ago

Oh... that's indeed less sloppy. Thanks!

vuongnguyen07 commented 5 years ago

Dear Gilcastroh and bjonkman,

I am a newer for OpenFAST.

First of all, I would like to send many thanks to your topic and expression about openFAST software. To be honest, I have read and tried to install openFAST following to "Building OpenFAST on Windows with CMake and Cygwin 64-bit". However, I have just received Cygwin icon on Desktop, and could not see OpenFAST icon.

I am trying to install OpenFAST following your way using "Building OpenFAST on Windows with Visual Studio" and hope to be successfull.

Could you guys please explain more about "How to run openFAST" for me and how to use it.

Thanks in advance!

gilcastroh commented 5 years ago

You're welcome! Tell me later if you need details on installing with Visual Studio. As for how to run it, I've barely gotten any experience with it. I've had other projects to tend to, and all I did with FAST was read some PDF about its variables and learn how to execute the program. Still, I'll answer what I can.

ghost commented 5 years ago

Dear gilcastroh,

Thanks for this post ! I'm totally new to OpenFAST, trying to have it worked out for a week, and your message certainly does help :-)

I'm still having some issues while trying to install OpenFAST, mainly about the Fortran compiler. My setup is in Windows 10, with Visual Studio 2015, and MinGW as Fortran compiler.

1) Tried to install the standalone Visual Studio solution, yet the .vfproj can't build due to the absence of Fortran compiler in Visual Studio. Even though I have MinGW, I can't manage to link it to Visual Studio.

2) Tried to install with both CMake and Visual Studio. In order to build openfast, I launch a shell in the openfast\build folder, and type the following command :

C:\CMake\bin\cmake.exe .. -DCMAKE_Fortran_COMPILER=C:/MinGW/bin/gfortran.exe

I get the following message :

CMake Error at C:/CMake/share/cmake-3.14/Modules/CMakeTestFortranCompiler.cmake:45 (message): The Fortran compiler "C:/MinGW/bin/gfortran.exe" is not able to compile a simple test program.

Full error message is attached. Any insight on how to get this Fortran compiler to do his job ? Maybe should I download some other compiler ?

Thanks ! :-)

CMake_Error_Message.txt

gilcastroh commented 5 years ago

Dear @GuillouFab,

You're welcome! Sorry, but you may have to wait for someone else to answer you. I'm far from being an expert on OpenFAST (or any software, really). Still, I may have found some small things you should try:

Good luck

bjonkman commented 5 years ago

@GuillouFab: gfortran is not compatible with Visual Studio. If you want to use Visual Studio, you will need to install Intel Fortran.

You should be able to build with gfortran and gcc using cmake, though. @rafmudaf can probably help you with the syntax you'd need.

rafmudaf commented 5 years ago

Like @bjonkman mentioned, you can indeed build with MinGW using CMake. I just merged some additional updates required for building on MinGW, so be sure to get the latest commits on the dev branch.

Then, after MinGW is properly installed and you have a clean build environment (basically, delete your openfast/build directory), you can configure and build for MinGW like this:

cd ../path/to/openfast
mkdir build
cd build

# This is the configuration step
# -G"MinGW Makefiles"  tells cmake to generate makefiles for mingw32-make
# -DCMAKE_BUILD_TYPE=RelWithDebInfo  configures gfortran with O2 optimization in addition to debug flags. I recommend using this for now as O3 optimization, used in Release mode, has given me trouble on MinGW and Cygwin.
cmake ..  -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo

# and this is the final build step to actually compile
mingw32-make

Edited May 9: I fixed a typo in the cmake command above.

rafmudaf commented 5 years ago

@GuillouFab For what its worth, Cygwin is another option for a more unix-like environment on Windows. However, there's a persistent bug on that system as mentioned in #144.

rafmudaf commented 5 years ago

Also, if -DCMAKE_BUILD_TYPE=RelWithDebInfo for some reason doesn't work on your machine, retry in debug mode: -DCMAKE_BUILD_TYPE=Debug.

Please keep me updated with your status!

ghost commented 5 years ago

@rafmudaf Thanks for your answer ! With your solution, I get some path troubles (compiler identification unknown, then cmake automatically detects them), aswell as the following error : " The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program. " I would guess that my MinGW installation is not correct, since CMake never succeeds in compiling test files with MinGW, be it the gcc or gfortran compiler. I will try to re-install it, but that might take a while (I'll have to wait for an admin). In the meantime, do you know any other way to double-check if the MinGW installation is indeed faulty ? Just to make sure that MinGW is the origin of this problem. Thanks again !

PS : there is a small mistake in your first comment : cmake .. -G"MingGW Makefiles" --> Use -G"MinGW Makefiles" instead (the letter g is not doubled)

Full error message : CMake_Error_Message_2.txt

rafmudaf commented 5 years ago

For the C++ compiler issue, you can give cmake the path to your compiler like it suggests in the error:

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

To do this, either set the CXX environment variable or add a flag to your cmake command. The two options are listed below, but you should verify that the path to the g++ compiler is correct.

  1. In your cmd prompt, run this set CXX=C:/MinGW/bin/g++.exe. Remember that if you close that cmd prompt, the variable will be gone. There's another option for persistent variables, setx, but my preference is to keep my environment clean and explicit.

or

  1. Rerun your cmake command with this flag added: -DCMAKE_CXX_COMPILER=C:/MinGW/bin/g++.exe. The cmake error above suggests to change the variable in the cache because all settings are stored in CMakeCache.txt. Passing flags to the cmake command updates that file, so you can verify your settings by looking in there.

For the c compiler issue, can you try compiling a standalone c file? The hello world program below will work and the command to compile it is simply gcc helloworld.c which outputs a file a.out. This may be a trivial example, but it verifies that your c compiler works and you have proper permissions to use it.

#include <stdio.h>
int main()
{
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}
juanfernandez1 commented 5 years ago

Hello all,

I am trying to compile OpenFAST aswell, but I am getting some errors. I am using windows 10, gfortran, and CMake. I followed the guide https://openfast.readthedocs.io/en/master/source/install/install_vs_windows.html. I was not able to compile the makefile using cmake .. -G"MingGW Makefiles" in the command propt, but i could do it using the CMake interface.

image

However, when i use the mingw32-make.exe in the command propt, i get an error while building mapapi.c.obj

I can not find the source of this issue. Do you know why this error is happening? image

Best regards,

Juan

rafmudaf commented 5 years ago

Hi @juanfernandez1

There was a typo in my cmake command above, it should be: `cmake .. -G"MinGW Makefiles".

Which branch of openfast are you using? If possible, please provide the specific commit hash.

juanfernandez1 commented 5 years ago

I am using the latest master branch of OpenFAST. I was working on fixing this error, and I found post #192, which actually explains the same problem.

I tried to fix this mistake as @diegoscmo did, but i had some issues. I did the makefile as described in post #192. When executing mingw32-make.exe, I encountered this problem now. I don't know where to put my Lapack and Lblas libraries, and thus, I think i get this error. image

However, when i use CMake interface, i get a different error, which @diegoscmo also mentioned, and had it solution by modifying the options when using CMake in the command prompt: image

My guess is that my problem is the location of lblas and llpack, but I don't know how to make it right.

Thanks for your help

Juan

diegoscmo commented 5 years ago

@juanfernandez1, for the problem in the last image, can you confirm if you have changed the value of "CMAKE_C_FLAGS" to "-DCMINPACK_NO_DLL" under the CMAKE tree when using cmake-gui?

juanfernandez1 commented 5 years ago

@diegoscmo I put all the combinations I thought about: CMAKE_C_FLAGS DCMINPACK_NO_DLL CMAKE_C_FLAGS -DCMINPACK_NO_DLL DCMAKE_C_FLAGS DCMINPACK_NO_DLL DCMAKE_C_FLAGS -DCMINPACK_NO_DLL It turned out that when configuring, the only one not being deleted from the interface was: DCMAKE_C_FLAGS -DCMINPACK_NO_DLL

So I tried to run it like with this configuration, as you can see in the image.

image

And still got the same error.

Anyway, i downloaded the last dev branch #285, just to try to compile with all the bugs fixed, and it worked nice, but I still don't know why this branch couldn't be compiled as you did.

Thanks for your help

Juan

rafmudaf commented 4 years ago

Looks like this one is fixed so closing

wgsthink commented 4 years ago

You should put the running OpenFAST method in the documentation, I think that documentation at present is unfriendly to the beginners. Otherwise, the documentation talks too much about the Cmake, and ignores that most of the users are on the windows platform.

rafmudaf commented 4 years ago

@wgsthink Good idea on the addition to the documentation. There's an open issue regarding your point. Being a community-supported open-source software project, you have the power to implement your idea directly and have it included in the main OpenFAST repository. A list of open issues that are friendly to new developers can be seen here. If you do decide to make the documentation improvements, instructions for building documentation on your machine are here. And the general git workflow for contributing to OpenFAST is outlined here. The NREL team will work with external developers to aid in the process, as needed.

Finally, CMake works fine on Windows, and I even use it to compile the binaries that you may have downloaded from the release page. Keep in mind that CMake is build system so it handles compiling but doesn't deal with running OpenFAST. Where this is lacking functionality is in configuring a project's debugging environment, as mentioned in the OpenFAST documentation.

wgsthink commented 4 years ago

Thank you for your answer. Yes, I also have compiled the binaries on windows using the VS. When I download the "Simulation for Wind Turbine Generators—With FAST and MATLAB-Simulink Modules" documentation because I want to run the FAST on the Matlab. The link in the pdf is invalid. Besides, the documentation on Github about this is so short, I can get little information. Can you offer the link of the old version in the NREL website? Furthermore, I think that the documentation should introduce the .fst file, and when run the .fst file, which files are necessary. Thank you so much!

jjonkman commented 4 years ago

Dear @wgsthink,

Which link from the PDF are you referring to?

Best regards,

wgsthink commented 4 years ago

http://wind.nrel.gov/designcodes/simulators/fast/ and the pdf named Simulation for Wind Turbine Generators—With FAST and MATLAB-SimulinkModules At present, I can only download the FAST v7 and FAST v8 via Github, and I found that they can't run with Matlab well. When I try to run the FAST V8 with Matlab, it lacks the FAST_SFunc.mex64 file, so I try to use the "create_FAST_SFunc.m" to produce that file. But it lacks the "FAST_Library.lib" in folder Bin. Then, I try to compile it by the VS2017, there are 31 errors. So I gave up. Right now, I get an old version (v7) from others. I found that the documentation of "Simulation for Wind Turbine Generators—With FAST and MATLAB-Simulink Modules" is good for the new users. But it seems that we can't download the old version from the NREL Website. Thanks for your hard-working, Salute you!

jjonkman commented 4 years ago

Dear @wgsthink,

As I announced on our forum here: https://wind.nrel.gov/forum/wind/viewtopic.php?f=38&t=1001, the NWTC Information Portal has been taken down and we are working to establish a replacement website, hopefully soon. I've now shared the old archives for FAST v7.02 and FAST v8.16 via Google Drive: https://drive.google.com/drive/folders/12pNlefdwRH2u7VFFt6DPlH2a0fWw_TFV?usp=sharing.

Best regards,

Akheelakk commented 4 years ago

Hey, I am a new user of OpenFAST. Installed the code as per the Documentation file and during the 'build' operation, I found some errors as given below. image The output window is as follows 1>------ Build started: Project: MAP_dll, Configuration: Release x64 ------ 1>freedata.c 1>jacobian.c 1>lineroutines.c 1>mapapi.c 1>maperror.c 1>mapinit.c 1>numeric.c 1>outputstream.c 1>residual.c 1> Creating library ....\build\bin\MAP_x64.lib and object ....\build\bin\MAP_x64.exp 1>Generating code 1>4 of 293 functions ( 1.4%) were compiled, the rest were copied from previous compilation. 1> 0 functions were new in current compilation 1> 4 functions had inline decision re-evaluated but remain unchanged 1>Finished generating code 1>MAP_dll.vcxproj -> C:\openfast-master\vs-build\MAPlib....\build\bin\MAP_x64.dll C:\openfast-master\modules\nwtc-library\src\SysIVF.f90 : warning: Module 'x64\Release\syssubs.mod' is created by both 'C:\openfast-master\modules\nwtc-library\src\SysIVF.f90' and 'C:\openfast-master\modules\nwtc-library\src\SysMatlabWindows.f90'. 2>------ Build started: Project: FASTlib, Configuration: Release x64 ------ 2>Performing Pre-Build Event... 2>fatal: not a git repository (or any of the parent directories): .git 2>fatal: not a git repository (or any of the parent directories): .git 2>Creating library... 2> 2>Build log written to "file://C:\openfast-master\vs-build\FASTlib\x64\Release\BuildLog.htm" 2>FASTlib - 0 error(s), 0 warning(s) 3>------ Skipped Build: Project: OpenFAST-Simulink, Configuration: Release_Matlab x64 ------ 3>Project not selected to build for this solution configuration 4>------ Build started: Project: FAST, Configuration: Release x64 ------ 4>Performing Pre-Build Event... 4>fatal: not a git repository (or any of the parent directories): .git 4>fatal: not a git repository (or any of the parent directories): .git 4>Linking... 4>ipo: error #11018: Cannot open C:\openfast-master\build\bin\Registry.lib 4>LINK : fatal error LNK1181: cannot open input file 'C:\openfast-master\build\bin\Registry.lib' 4> 4>Build log written to "file://C:\openfast-master\vs-build\FAST\x64\Release\BuildLog.htm" 4>FAST - 2 error(s), 0 warning(s) ========== Build: 2 succeeded, 1 failed, 1 up-to-date, 1 skipped ==========

Thanks to Sir Jason Jonkman and team for developing FAST codes.

bjonkman commented 4 years ago

Hi, @Akheelakk.

Could you start a new issue with these questions? I know you had posted a similar question on https://github.com/OpenFAST/openfast/issues/322#issuecomment-659192558, but it's easy to overlook when you are posting new questions on closed issues.

It looks like you solved the issue with not finding the Math Kernel Libraries. What did you do to fix that issue?

Akheelakk commented 4 years ago

Thank you for the response. Actually I couldn't fix the issue completely. But still I was able to reduce the number of errors from 6 to 2. And one more thing I would like to mention is that during the installation of Parallel studio, I had checked only on ifort, c++ and MKL libraries check boxes only. Do I need to check all the boxes?

Thank you Akheel

On Wed, Jul 22, 2020 at 7:44 PM Bonnie Jonkman notifications@github.com wrote:

Hi, @Akheelakk https://github.com/Akheelakk.

Could you start a new issue with these questions? I know you had posted a similar question on #322 (comment) https://github.com/OpenFAST/openfast/issues/322#issuecomment-659192558, but it's easy to overlook when you are posting new questions on closed issues.

It looks like you solved the issue with not finding the Math Kernel Libraries. What did you do to fix that issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenFAST/openfast/issues/268#issuecomment-662478326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCIY5NHOCNJM3HYCYZ2QJDR43X43ANCNFSM4HEDZ3EQ .

bjonkman commented 4 years ago

When you install Intel Parallel Studio, you should definitely install ifort and MKL as well as whatever defaults they have selected, but I don't think you need all the boxes (it's been a while, so I'm not sure what the options there are). Installing Intel C++ is optional, though that might be a clue about the build errors.

Akheelakk commented 4 years ago

In the documentation file, it is mentioned in brackets ifort and icc. That is why I didn't check all the boxes.

On Wed, Jul 22, 2020 at 8:58 PM Bonnie Jonkman notifications@github.com wrote:

When you install Intel Parallel Studio, you should definitely install ifort and MKL as well as whatever defaults they have selected, but I don't think you need all the boxes (it's been a while, so I'm not sure what the options there are). Installing Intel C++ is optional, though that might be a clue about the build errors.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenFAST/openfast/issues/268#issuecomment-662520496, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCIY5NXA6YY42N7GVLGXBLR44ASJANCNFSM4HEDZ3EQ .

Akheelakk commented 3 years ago

Hello @gilcastroh , Is it possible to work with the binaries alone, if I am not planning to develop anything (as of now).

jjonkman commented 3 years ago

Dear @Akheelakk,

If I understand your question, you are asking if you need to compile given that you have the precompiled binaries (presumably you are using the binaries for Windows provided with a release of OpenFAST). That is correct, you don't need to recompile OpenFAST to recreate the binaries unless you need to change the OpenFAST source code. You can execute different OpenFAST simulations by changing the OpenFAST input file(s).

Best regards,

Akheelakk commented 3 years ago

Hey, I got some trouble while running the .fst file. Can someone help me to fix the same. image

Thanks in advance

jjonkman commented 3 years ago

Dear @Akheelakk,

Your Windows Command Prompt syntax is not correct. The syntax is explained in my August 7, 2020 post in the following issue: https://github.com/OpenFAST/openfast/issues/434. I see a couple errors in your syntax:

Best regards,

Akheelakk commented 3 years ago

Thank you @jjonkman, Is it necessary that the .exe files should be in C driver?

On Wed, Sep 23, 2020 at 6:13 PM jjonkman notifications@github.com wrote:

Dear @Akheelakk https://github.com/Akheelakk,

Your Windows Command Prompt syntax is not correct. The syntax is explained in my August 7, 2020 post in the following issue: #434 https://github.com/OpenFAST/openfast/issues/434. I see a couple errors in your syntax:

-

You need to state the name of the OpenFAST executable (*.exe) before the name of the primary input file (*.fst), and

Your path has white space in it, which would require that you use double quotes (") around it.

Best regards,

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenFAST/openfast/issues/268#issuecomment-697339396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCIY5NSIPFHU7FAF6ENSB3SHHUQ7ANCNFSM4HEDZ3EQ .

Akheelakk commented 3 years ago

Dear @jjonkman, I solved that issue. But my work now encountered an error during module initialization. Is there any way I can find where the error occurred?

jjonkman commented 3 years ago

Dear @Akheelakk,

You should be able to run OpenFAST from any mapped drive (not just C:).

What initialization error are you receiving?

Best regards,

Akheelakk commented 3 years ago

image

andrew-platt commented 3 years ago

It looks like your input files are out of date. The format of the main input file changed between OpenFAST-v2.2.0 and OpenFAST-v2.3.0. Take a look here for the input file format expected in OpenFAST-v2.3.0: 5MW_Land_DLL_WTurb.fst. Your input file is missing the section between lines 43-49.

Akheelakk commented 3 years ago

Hello @andrew-platt , I have attached the .fst file obtained when downloaded the binaries. It has got more parameters than the link you have shared. Section Linearization has been highlighted.

------- OpenFAST example INPUT FILE ------------------------------------------- FAST Certification Test #24: NREL 5.0 MW Baseline Wind Turbine with OC3 Hywind Configuration, for use in offshore analysis ---------------------- SIMULATION CONTROL -------------------------------------- True Echo - Echo input data to .ech (flag) "FATAL" AbortLevel - Error level when simulation should abort (string) {"WARNING", "SEVERE", "FATAL"} 60 TMax - Total run time (s) 0.0125 DT - Recommended module time step (s) 1 InterpOrder - Interpolation order for input/output time history (-) {1=linear, 2=quadratic} 0 NumCrctn - Number of correction iterations (-) {0=explicit calculation, i.e., no corrections} 1.5 DT_UJac - Time between calls to get Jacobians (s) 1E+06 UJacSclFact - Scaling factor used in Jacobians (-) ---------------------- FEATURE SWITCHES AND FLAGS ------------------------------ 1 CompElast - Compute structural dynamics (switch) {1=ElastoDyn; 2=ElastoDyn + BeamDyn for blades} 1 CompInflow - Compute inflow wind velocities (switch) {0=still air; 1=InflowWind; 2=external from OpenFOAM} 2 CompAero - Compute aerodynamic loads (switch) {0=None; 1=AeroDyn v14; 2=AeroDyn v15} 1 CompServo - Compute control and electrical-drive dynamics (switch) {0=None; 1=ServoDyn} 1 CompHydro - Compute hydrodynamic loads (switch) {0=None; 1=HydroDyn} 0 CompSub - Compute sub-structural dynamics (switch) {0=None; 1=SubDyn; 2=External Platform MCKF} 1 CompMooring - Compute mooring system (switch) {0=None; 1=MAP++; 2=FEAMooring; 3=MoorDyn; 4=OrcaFlex} 0 CompIce - Compute ice loads (switch) {0=None; 1=IceFloe; 2=IceDyn} ---------------------- INPUT FILES --------------------------------------------- "NRELOffshrBsline5MW_OC3Hywind_ElastoDyn.dat" EDFile - Name of file containing ElastoDyn input parameters (quoted string) "../5MW_Baseline/NRELOffshrBsline5MW_BeamDyn.dat" BDBldFile(1) - Name of file containing BeamDyn input parameters for blade 1 (quoted string) "../5MW_Baseline/NRELOffshrBsline5MW_BeamDyn.dat" BDBldFile(2) - Name of file containing BeamDyn input parameters for blade 2 (quoted string) "../5MW_Baseline/NRELOffshrBsline5MW_BeamDyn.dat" BDBldFile(3) - Name of file containing BeamDyn input parameters for blade 3 (quoted string) "../5MW_Baseline/NRELOffshrBsline5MW_InflowWind_12mps.dat" InflowFile - Name of file containing inflow wind input parameters (quoted string) "NRELOffshrBsline5MW_OC3Hywind_AeroDyn15.dat" AeroFile - Name of file containing aerodynamic input parameters (quoted string) "NRELOffshrBsline5MW_OC3Hywind_ServoDyn.dat" ServoFile - Name of file containing control and electrical-drive input parameters (quoted string) "NRELOffshrBsline5MW_OC3Hywind_HydroDyn.dat" HydroFile - Name of file containing hydrodynamic input parameters (quoted string) "unused" SubFile - Name of file containing sub-structural input parameters (quoted string) "NRELOffshrBsline5MW_OC3Hywind_MAP.dat" MooringFile - Name of file containing mooring system input parameters (quoted string) "unused" IceFile - Name of file containing ice input parameters (quoted string) ---------------------- OUTPUT -------------------------------------------------- True SumPrint - Print summary data to ".sum" (flag) 1 SttsTime - Amount of time between screen status messages (s) 99999 ChkptTime - Amount of time between creating checkpoint files for potential restart (s) 0.0125 DT_Out - Time step for tabular output (s) (or "default") 0 TStart - Time to begin tabular output (s) 0 OutFileFmt - Format for tabular (time-marching) output file (switch) {0: uncompressed binary [.outb], 1: text file [.out], 2: binary file [.outb], 3: both 1 and 2} True TabDelim - Use tab delimiters in text tabular output file? (flag) {uses spaces if false} "ES10.3E2" OutFmt - Format used for text tabular output, excluding the time channel. Resulting field should be 10 characters. (quoted string) ---------------------- LINEARIZATION ------------------------------------------- False Linearize - Linearization analysis (flag) False CalcSteady - Calculate a steady-state periodic operating point before linearization? [unused if Linearize=False] (flag) 3 TrimCase - Controller parameter to be trimmed {1:yaw; 2:torque; 3:pitch} [used only if CalcSteady=True] (-) 0.001 TrimTol - Tolerance for the rotational speed convergence [used only if CalcSteady=True] (-) 0.01 TrimGain - Proportional gain for the rotational speed error (>0) [used only if CalcSteady=True] (rad/(rad/s) for yaw or pitch; Nm/(rad/s) for torque) 0 Twr_Kdmp - Damping factor for the tower [used only if CalcSteady=True] (N/(m/s)) 0 Bld_Kdmp - Damping factor for the blades [used only if CalcSteady=True] (N/(m/s)) 2 NLinTimes - Number of times to linearize (-) [>=1] [unused if Linearize=False] 30, 60 LinTimes - List of times at which to linearize (s) [1 to NLinTimes] [used only when Linearize=True and CalcSteady=False] 1 LinInputs - Inputs included in linearization (switch) {0=none; 1=standard; 2=all module inputs (debug)} [unused if Linearize=False] 1 LinOutputs - Outputs included in linearization (switch) {0=none; 1=from OutList(s); 2=all module outputs (debug)} [unused if Linearize=False] False LinOutJac - Include full Jacobians in linearization output (for debug) (flag) [unused if Linearize=False; used only if LinInputs=LinOutputs=2] False LinOutMod - Write module-level linearization output files in addition to output for full system? (flag) [unused if Linearize=False] ---------------------- VISUALIZATION ------------------------------------------ 0 WrVTK - VTK visualization data output: (switch) {0=none; 1=initialization data only; 2=animation; 3=mode shapes} 2 VTK_type - Type of VTK visualization data: (switch) {1=surfaces; 2=basic meshes (lines/points); 3=all meshes (debug)} [unused if WrVTK=0] false VTK_fields - Write mesh fields to VTK data files? (flag) {true/false} [unused if WrVTK=0] 15 VTK_fps - Frame rate for VTK output (frames per second){will use closest integer multiple of DT} [used only if WrVTK=2 or WrVTK=3]

andrew-platt commented 3 years ago

The file you attached looks like it is for OpenFAST v2.4.0, but the executable you are running is OpenFAST v2.3.0.

Akheelakk commented 3 years ago

Dear @andrew-platt , It did work. But still my results are incorrect. I think it is because I am not familiar with many of the parameters. Is there any file to understand different parameters and how these are to be given depending on the situation. Thank you very much for the support.

Akheelakk commented 3 years ago

Hey, Does the following TurbSim file valid for OpenFAST V2.3.0? https://github.com/old-NWTC/TurbSim

andrew-platt commented 3 years ago

What do you mean by "results are incorrect"? Are these with your custom turbine?

There are some guides on the the readthedocs website here: https://openfast.readthedocs.io/en/dev/source/user/index.html. Another good source for information on how to setup or tune a turbine is the NWTC forum: https://wind.nrel.gov/forum/wind/ (note that the forum covers ~15 years of FAST / OpenFAST versions so the specific variable names may not be the same as v2.4.0, but the physics explanations are still valuable for understanding how the turbine is modeled).

In regards to TurbSim, the input files listed on the old-NWTC github account are still compatible with TurbSim from OpenFAST 2.x.

Akheelakk commented 3 years ago

Dear @andrew-platt, To familiarize with fast, I took a journal and input same wind and wave conditions and did the simulation. The results in the paper and which I obtained are far apart. This is what I meant by "results are incorrect". I believe that this is because very limited parameters are available from the paper, where as when working with OpenFAST lots of parameters are to be input. So, I asked if there are any supplementary files available to guide. Thank you very much

andrew-platt commented 3 years ago

Dear @Akheelakk This does not surprise me. The wind and waves are generated using random numbers with a seed, so there are a lot of things that may affect the resulting timeseries.

For your testing, I recommend running some of the regression tests and comparing those results. They will have the above effects accounted for, but may not exactly match (some numerical rounding will cause some tests, particularly offshore, to give slightly different results of order 1E-5 or less).

Akheelakk commented 3 years ago

Hey, I found an error as below. What would be the reason. Can Someone help me to fix this? G:\OpenFAST\Unzipped\openfast-2.3.0\Trial 2>"openfast_x64.exe" "5MW_OC3Spar_DLL_WTurb_WavesIrr.fst"


OpenFAST

Copyright (C) National Renewable Energy Laboratory Copyright (C) Envision Energy USA LTD

This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. See the "LICENSE" file distributed with this software for details.


OpenFAST-v2.3.0 Compile Info:

OpenFAST input file heading: FAST Certification Test #24: NREL 5.0 MW Baseline Wind Turbine with OC3 Hywind Configuration, for use in offshore analysis

Running ElastoDyn. Running AeroDyn. Running BEM. Running UnsteadyAero. Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 1, Blade = 1 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 2, Blade = 1 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 3, Blade = 1 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 4, Blade = 1 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 1, Blade = 2 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 2, Blade = 2 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 3, Blade = 2 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 4, Blade = 2 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 1, Blade = 3 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 2, Blade = 3 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 3, Blade = 3 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 4, Blade = 3 Running InflowWind.

Reading a 13x13 grid (80 m wide, 44.288 m to 124.29 m above ground) with a characteristic wind speed of 18.2 m/s. This full-field file was generated by TurbSim (v1.06.00, 21-Sep-2012) on 27-Sep-2020 at 15:12:57.

Processed 888 time steps of 20-Hz full-field data (44.35 seconds). Running ServoDyn. Running ServoDyn Interface for Bladed Controllers. Running HydroDyn. Generating incident wave kinematics and current time history. Reading in WAMIT output with root name "G:\OpenFAST\Unzipped\openfast-2.3.0\Trial 2\5MW_Baseline../5MW_Baseline/HydroData/Spar". Computing radiation impulse response functions and wave diffraction forces.

MAP++ environment properties (set externally)... Gravity constant [m/s^2] : 9.81 Sea density [kg/m^3] : 1025.00 Water depth [m] : 320.00 Vessel reference position [m] : 0.00 , 0.00 , 0.00

Time: 0 of 1000 seconds.

FAST_Solution0:CalcOutputs_And_SolveForInputs:SolveOption2:SolveOption2c_Inp2AD_SrvD:InflowWind_Ca lcOutput:CalcOutput:IfW_TSFFWind_CalcOutput [position=(-3.3687, -0.38458, 130.42) in wind-file coordinates]: FF wind array boundaries violated. Grid too small in Z direction (Z=130.42 m is above the grid). SolveOption2:SrvD_CalcOutput:Running with torque and pitch control of the NREL offshore 5MW baseline wind turbine from DISCON.dll as written by J. Jonkman of NREL/NWTC for use in the IEA Annex XXIII OC3 studies. Includes modifications for the Hywind spar.

FAST encountered an error during simulation initialization. Simulation error level: FATAL ERROR

Aborting OpenFAST.

bjonkman commented 3 years ago

It appears that you are using a wind file that is too small for the turbine you are trying to simulate. You have an 80-m wide grid (80 m wide, 44.288 m to 124.29 m above ground). If you look at the example wind file for the OC3 Spar case, it specifies a 145-m grid: https://github.com/OpenFAST/r-test/blob/master/glue-codes/openfast/5MW_Baseline/Wind/90m_12mps_twr.inp.

Akheelakk commented 3 years ago

Thank you @bjonkman, I made the modification as per the above example. But then, I received an error message as follows:

FAST_Solution0:CalcOutputs_And_SolveForInputs:SolveOption2:SolveOption2c_Inp2AD_SrvD:InflowWind_Ca lcOutput:CalcOutput:IfW_TSFFWind_CalcOutput [position=(0, 0, 10) in wind-file coordinates]: FF wind array boundaries violated. Grid too small in Z direction (height (Z=10 m) is below the grid and no tower points are defined). SolveOption2:SrvD_CalcOutput:Running with torque and pitch control of the NREL offshore 5MW baseline wind turbine from DISCON.dll as written by J. Jonkman of NREL/NWTC for use in the IEA Annex XXIII OC3 studies. Includes modifications for the Hywind spar.

jjonkman commented 3 years ago

Dear @Akheelakk,

This is essentially the same problem as you had before, but now caused by a different aerodynamic analysis node. The OC3-Hywind model has tower aerodynamic analysis nodes in AeroDyn v15 that go down to 10-m above MSL. You'll need a wind field that goes lower (close to zero / MSL) if you wish to run this model as is, or eliminate the low tower aerodynamic analysis nodes.

Best regards,

Akheelakk commented 3 years ago

Dear @jjonkman , Can you let me know where exactly in the InflowWind.inp file do I need to make the change Thank you for the quick response