Git Product home page Git Product logo

Comments (14)

NeuerYao avatar NeuerYao commented on August 24, 2024

Hi,

I met same problem.

Have you solved it? If so, can you explain how you solve it?

Thank you!

Best, Neuer

from sowfa.

mchurchf avatar mchurchf commented on August 24, 2024

All,

Sorry for the lack of instructions on the compilation of the FAST8-coupled parts of SOWFA because this is a new development piece of SOWFA. It uses a customized version of FAST 8 for which all the internal FAST workings are the same, but a proper C-interface is provided. This C-interface code will soon be incorporated into what we call OpenFAST, which is basically FAST8, but will be the new name moving forward. Once that is complete, one will grab the standard OpenFAST and be able to couple with any flow code.

But, for now, here are instructions:

------ FAST 8 ------

The FAST 8 part itself may be a little tricky. The custom FAST 8 version for this purpose was made by one of our postdocs. Eventually this will be all incorporated into the main FAST branch, which will be called OpenFAST. But it works for now. So, to get it clone it from: https://github.com/gantech/fastv8DriverProgram.git. After you clone the FAST 8 from Ganesh’s repository, you need to do “git checkout OpenFOAMcoupling”. It is setup to compile well on our supercomputer, so we may have to work on this a bit, but I’m sure we can get it to compile on your machine too. To build it, go into the directory that you clone, and do the following:

COMPILER=gnu BUILD=release LAPACK=mkl ./install.sh

OR

COMPILER=gnu BUILD=release LAPACK=lapack ./install.sh

depending on what you have for Lapack. This assumes you are using the gnu compilers (it needs gfortran, gcc, openmpi, mkl (or lapack), and hdf5). However, you’ll see that install.sh does something called prepareSourceMods, which creates and runs this file called sourceMods.sh, which is created from .sourceMods.sh. (Yes, this process needs to be cleaned up—OpenFAST uses cmake, so it is much better.) Take a look at .sourceMods.sh. It loads modules on our machine as follows:

module load gcc/4.8.2 mkl cmake/3.3.2 openmpi-gcc/1.7.3-4.8.2
hdf5/1.8.12/openmpi-gcc

If your machine has modules, then you’ll want to adjust this accordingly. If you don’t have modules, you’ll have to manually make sure all this stuff is in your path, etc.

------ SOWFA ------

You’ll also need to create an environment variable FAST_DIR. SOWFA will use this when it compiles the FAST coupled parts. For example, mine is set like this:

FAST_DIR=$HOME/bin/OpenFOAM/fastv8DriverProgram/fastv8

Once that is done, and you’ve pulled the new SOWFA commits, I think if you run makeNewWorkingDir, it will put any new stuff in your $USER-2.4.x directory. It may be safer to just remove your current $USER-2.4.x directory and make a fresh one with makeNewWorkingDir. Then go to your $USER-2.4.x directory and do Allwclean and Allwmake like normal, and hopefully all should be good.

In the exampleCases directory, you’ll see a new FAST 8 coupled example. It is an NREL 5 MW turbine in a big box of uniform 8 m/s flow. There is no ground. The runscript.preprocess script will make a big coarse block mesh, and then refineHexMesh will add cylindrical refinement regions around the turbine and wake. A neat thing you’ll see in the .fst files (1 for each turbine — this example is set up for 2 turbines, but in the turbineArrayProperties, the 2nd turbine is commented out to make your first try simpler) that FAST write out VTK files, so you can easily load these into Paraview to visualize the blades (either as lines or fullgeometry) and their deformation and rotation. Same for the tower.

I apologize for the somewhat complicated compilation with FAST 8. The FAST developers are trying to make this much simpler, so hopefully that happens in the next few months.

from sowfa.

NeuerYao avatar NeuerYao commented on August 24, 2024

Hi mchurchf, thanks for your help. I'll try the compilation again.
Thank you.

from sowfa.

casedano1167 avatar casedano1167 commented on August 24, 2024

Hi,
I have successfully compiled the FAST tool from the repository above. However, when I run the Allwmake script to compile SOWFA, i get the following error when compiling 'horizontalAxisWindTurbinesALMfastv8':
horizontalAxisWindTurbinesALMfastv8/horizontalAxisWindTurbinesALMfastv8.C:416:11: error: ‘class FAST_cInterface’ has no member named ‘setGlobalInputs’
This is not the only error of this type. There are several other members missing such as 'setTurbineData' or 'getHubShftDir' amongst others.
How can I solve this issues?

Thanks. Best regards,
casedano

from sowfa.

mchurchf avatar mchurchf commented on August 24, 2024

I recommend moving to OpenFAST, which you can get at github.com/OpenFAST. It is basically FAST 8 in a new framework that will enhance community collaboration going forward, and the interface to CFD solvers is streamlined. Then, we currently have an OpenFAST branch of SOWFA that has the OpenFAST coupled actuator line. Please try this. Eventually, and hopefully soon, this OpenFAST branch will be merged to the main branch to avoid confusion. As soon as I get time to further test things, I'll clean this up.

from sowfa.

JackPerdue avatar JackPerdue commented on August 24, 2024

I've been working this for a week now and started with OpenFAST but went to fastv8DriverProgram due to a lack of FAST_cInterface.c. But I can't get the OpenFOAMcoupling branch to compile because it wants something that only defined in the master branch.

So.... what should I use.... the latest OpenFAST or the SOWFA OpenFAST.... if the latter, where do I get that???

Where is this documented in the README (or elsewhere)?

I'm not convinced this issue is closed (it isn't for me).

from sowfa.

Bartdoekemeijer avatar Bartdoekemeijer commented on August 24, 2024

@JackPerdue I've made some attempts too, but unfortunately have not succeeded either.

As far as I could understand it, you need to download OpenFAST from the official repo) and compile this including the C++ API. More details about compiling OpenFAST can be found here. Basically, it comes down to adding it to the cmake command:
cmake -DBUILD_FAST_CPP_API:BOOL=ON ..
Note that you will need to have YAML-CPP and HDF5 installed.

Then, you should be able to compile the OpenFAST branch from this SOWFA repository using the compiled OpenFAST libraries. I myself needed to redefine the dependencies in src/turbineModels/... and in the /applications/solvers/ folders. I managed to compile the turbine codes inside SOWFA using the latest OpenFAST version, but without the C++ API the solvers won't compile.

Could you please let me know if you can compile OpenFAST with the C++ API enabled? If not, then we should open a ticket there, rather than in SOWFA. I myself have been having issues with the compilation of the C++ API. OpenFAST first needs to compile successfully before we attempt to compile it together with SOWFA.

from sowfa.

JackPerdue avatar JackPerdue commented on August 24, 2024

Here's the EasyBuild recipe I came up with for OpenFAST 1.0.0. If not familiar with EB, it basically just runs cmake && make && make install.

Still no joy with SOWFA though... e.g.

In file included from pisoFoamTurbine.C(38):
/scratch/user/j-perdue/SOWFA/20171008/src/turbineModels/turbineModelsFASTv8/lnInclude/horizontalAxisWindTurbinesALMfastv8.H(68): catastrophic error: cannot open source file "FAST_cInterface.h"
#include "FAST_cInterface.h"

What other changes did you make?

OpenFAST-1.0.0-intel-2017A.eb.txt

from sowfa.

JackPerdue avatar JackPerdue commented on August 24, 2024

Build script (ignore the OpenFAST/FAST8 bits.... they are disabled.... uses the OpenFAST module above).
build_SOWFA.sh.txt

from sowfa.

JackPerdue avatar JackPerdue commented on August 24, 2024

A little progress... unset FAST_DIR and set OPENFAST_DIR instead.... didn't realize I needed to change that. Having some link errors at the moment but its progress.

from sowfa.

Bartdoekemeijer avatar Bartdoekemeijer commented on August 24, 2024

Hi Jack. Nice to see progress! I'll take a look at the EB code and give it another try. Something important you may have to take a look at, especially if you're missing certain turbine files, is what I addressed in this pull request: #16 . There are some dependencies which I guess differ per platform.

from sowfa.

ewquon avatar ewquon commented on August 24, 2024

from sowfa.

Bartdoekemeijer avatar Bartdoekemeijer commented on August 24, 2024

@ewquon Thanks Eliot! Just a quick question -- can you tell me which OpenFOAM version and which compiler versions you are using on Peregrine? Unfortunately, I have had only little success with a variety of GNU GCC compiler versions in combination with OpenFOAM 2.4.0.

from sowfa.

mchurchf avatar mchurchf commented on August 24, 2024

@Bartdoekemeijer We are using OpenFOAM 2.4.x with the following compiler info:

gcc 4.8.2
openmpi 1.7.3

from sowfa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.