blueCFD / Core

Coordination repository for the blueCFD-Core: Issue tracking, Wiki, project webpage and miscellaneous scripts
http://bluecfd.github.io/Core
53 stars 10 forks source link

olaFlow compilation error #139

Closed JoeFriend91 closed 2 years ago

JoeFriend91 commented 4 years ago

Hello everyone, I've been having trouble in compiling olaFlow in blueCFD with OF version 5. The boundary conditions compilation seems alright but I get the following error when compiling the solver (the complete log file for the allMake command and the olaDyMFlow.C file are attached):

In file included from olaDyMFlow.C:83:0: CorrectPhi.H:2:1: error: expected constructor, destructor, or type conversion before '(' token ( ^ In file included from C:/PROGRA~1/BLUECF~1/OpenFOAM-5.x/src/finiteVolume/lnInclude/continuityErrs.H:1:0, from CorrectPhi.H:11, from olaDyMFlow.C:83: C:/PROGRA~1/BLUECF~1/OpenFOAM-5.x/src/finiteVolume/cfdTools/incompressible/continuityErrs.H:32:1: error: expected unqualified-id before '{' token { ^ In file included from olaDyMFlow.C:117:0: correctPhi.H: In function 'int main(int, char**)': correctPhi.H:1:1: error: 'CorrectPhi' was not declared in this scope CorrectPhi ^~~~~~~~~~ correctPhi.H:1:1: note: suggested alternative: 'correctPhi' CorrectPhi ^~~~~~~~~~ correctPhi make[1]: *** [/home/ofuser/blueCFD/OpenFOAM-5.x/wmake/rules/General/transform:26: Make/mingw_w64GccDPInt32Opt/olaDyMFlow.o] Error 1 make[1]: se sale del directorio '/home/ofuser/blueCFD/ofuser-of5/olaFlow-master/solvers/olaFlowOF500/olaDyMFlow' make: *** [/home/ofuser/blueCFD/OpenFOAM-5.x/wmake/makefiles/apps:39: olaDyMFlow] Error 2 olaFlow solvers compilation failed log.make.gz

olaDyMFlow.gz

I would appreciate any help, thanks!

JoeFriend91 commented 4 years ago

I realized that in my version of OF, the correctPhi.H and correctPhi.C files are actually called correctPhi.T.H and correctPhi.T.C respectively, so I changed the name of these commands in the olaFlow files. Doing this, I managed to go through the error mentioned before, but the compilation still goes wrong and this time I don't understand the feedback of the log file (full file attached at the bottom).

-lm -o /home/ofuser/blueCFD/ofuser-of5/platforms/mingw_w64GccDPInt32Opt/bin/olaDyMFlow.exe Make/mingw_w64GccDPInt32Opt/olaDyMFlow.o: En la función `Foam::incompressibleTwoPhaseMixture::~incompressibleTwoPhaseMixture()': C:/PROGRA~1/BLUECF~1/OpenFOAM-5.x/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H:98: referencia a `Foam::transportModel::~transportModel()' sin definir

Some text is in spanish, here goes the translation En la función = Function referencia a = reference to sin definir = not defined

log.make.gz

Cheers

wyldckat commented 4 years ago

Quick answer: We have a wiki page dedicated on how to compile an old version of olaFlow, namely OLAFOAM: https://github.com/blueCFD/Core/wiki/Building-OLAFOAM-with-blueCFD-Core

You can find the changes we had to make to it here: https://github.com/blueCFD/OLAFOAM/commits/blueCFD-Core - namely:

JoeFriend91 commented 4 years ago

Thank you very much, you saved me a lot of time, it's working now. I managed to run some of the tutorials, but the ones that use python files throw the following error

 ./runCaseFlap
blockMesh meshing...
Preparing 0 folder...
Setting the fields...
Creating flap wavemaker movement...
Traceback (most recent call last):
  File "flapWaveGen.py", line 3, in <module>
    import numpy as np
ImportError: No module named numpy
Running...

--> FOAM FATAL IO ERROR:
Cannot open include file "C:/PROGRA~1/BLUECF~1/ofuser-of5/olaFlow-master/tutorials/wavemakerFlume/constant/wavemakerMovement.txt" while reading dictionary "C:/PROGRA~1/BLUECF~1/ofuser-of5/olaFlow-master/tutorials/wavemakerFlume/constant/wavemakerMovementDict"

file: C:/PROGRA~1/BLUECF~1/ofuser-of5/olaFlow-master/tutorials/wavemakerFlume/constant/wavemakerMovementDict at line 21.

    From function static bool Foam::functionEntries::includeEntry::execute(Foam::dictionary&, Foam::Istream&)
    in file db/dictionary/functionEntries/includeEntry/includeEntry.C at line 151.

FOAM exiting

Simulation complete.

I followed the instructions of this link https://github.com/blueCFD/Core/issues/128 for installing the python package, nevertheless the error message is the same. Do you have any suggestion? Thanks again.

wyldckat commented 4 years ago

Issue #128 has a lot of commands... did you run these two commands?

pacman -Ss pip
pacman -Ss numpy
JoeFriend91 commented 4 years ago

Hello, I tried those commands and installed python3 and numpy but the message was still the same. In the end I solved it by reinstalling blueCFD. Even though I still get the message ImportError: No module named numpy after runnning olaFlow, the simulation goes ok. Thanks.

wyldckat commented 4 years ago

If by any chance you need numpy to work, please read issues #128 and #129, because there you can find more details on how to proceed in upgrading the MSys2 installation that blueCFD-Core provides.

pjrusello commented 3 years ago

In case anyone stumbles on this and wants to compile OlaFlow for BlueCFD + OpenFOAM-8 here are the additional steps needed after cloning the OlaFlow source.

That should let the solvers compile under BlueCFD's msys2 environment. I've run a couple of the tutorials and haven't found any issues yet.