CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Can't compile solver (https://www.cfd-online.com/Forums/openfoam-programming-development/197633-cant-compile-solver.html)

juanblanco January 11, 2018 10:01

Can't compile solver
 
Hi everyone,

I have a solver that can be compiled perfectly fine in another computer but it doesn't seem to work in mine. I've installed OpenFOAM-5.0 and run the tutorials successfully.
The problem is that when I try to compile my solver the following error pops up.

Code:

In file included from OFext/main.C:32:0:
OFext/OFIncludes.H:11:22: fatal error: RASModel.H: No such file or directory
 #include "RASModel.H"
                      ^
compilation terminated.

I've searched the RASModel.H in the src and it is there. Also it is used in the code simply like

Code:

#include "RASModel.H"
I've also read the thread
https://www.cfd-online.com/Forums/op...le-solver.html
but it doesn't seem to work for me.

One thing I've notice is that if I take one of the tutorials, for example simpleFoam and I move every file except the Make folder into another folder, I then modify Make/files and I have the same problem as before but with createFields.H

Code:

In file included from OF/simpleFoam.C:43:0:
/user/OpenFOAM/OpenFOAM-4.0/src/OpenFOAM/lnInclude/postProcess.H:129:49: fatal error: createFields.H: No such file or directory
            #include INCLUDE_FILE(CREATE_FIELDS)

If someone could help me out it would be great.
Thank you for your time

alexeym January 11, 2018 10:40

Hi,

When compiler can not find certain include files, in general, it means you did not set up include search paths correctly (or the files are removed). So the question is: what is the content of your Make/options?

Btw what OpenFOAM version is installed "in another computer"? The same 5.0?

juanblanco January 11, 2018 11:15

The files exist since I've found them in the OpenFOAM-5.0 folder. This is the options file

Code:

EXE_INC = \
        -IOFext \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I$(LIB_SRC)/sampling/lnInclude \
        -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/fvOptions/lnInclude \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
    -I$(LIB_SRC)/ODE/lnInclude\
    -I$(WM_PROJECT_DIR)/bin/tools/RunFunctions
       
EXE_LIBS =  -lfiniteVolume \
            -lmeshTools \
            -lsampling  \
            -lm \
    -lfvOptions \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleTransportModels \
    -lODE \
            -DFULLDEBUG -g -O0

The other computer runs on CentOS and I've tested it with versions 2.3 and 4.0.
My computer runs on Fedora and I've also tried with 4.0 and had the same problem.

Thank you for your quick answer.

alexeym January 12, 2018 02:48

Hi,

Your include paths are from 2.3.x. Here is location of RASModel.H in 5.x:

Code:

$ src
$ pwd
$HOME/OpenFOAM/OpenFOAM-5.x/src
$ find . -name 'RASModel.H'
./TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H
./TurbulenceModels/turbulenceModels/lnInclude/RASModel.H

Also this

Code:

-I$(WM_PROJECT_DIR)/bin/tools/RunFunctions
is nonsense.

So, guess, your statement "tested it with versions 2.3 and 4.0" is not quite correct. In version 4.0 old turbulence models library, to which your include paths reference, was removed.

juanblanco January 12, 2018 03:58

I've made some changes as you've said and now it doesn't find fvIOoptionList.H so I guess this is the right path for debugging.

About the version you must be right. Maybe I have them mixed.

Thank you for your help.

alexeym January 12, 2018 04:03

fvIOoptionList.H is now fvOptionList.H.

foucault April 24, 2018 10:14

Thank you very much Alexeym, I had the same pb, it is now fixed!
 
Thank you very much Alexeym, I had the same pb, it is now fixed!
Eric F

syntex November 6, 2018 09:13

I tried setting up RASmodel as well, but I sturggle to make it work.


My error code is, that the sompiler can't find TurbulenceModel.H
I don't really know how to set up my make/options file to make it work.
It would be nice if someone could help me.

Code:
Code:

EXE_INC = \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/RAS/RASModel \
    -I$(LIB_SRC)/TurbulenceModels  \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/fvOptions/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/RAS \
    -I$(LIB_SRC)/finiteVolume/cfdTools/general/include

EXE_LIBS = \
    -lincompressibleTurbulenceModels \
    -lincompressibleRASModels \
    -lincompressibleTransportModels \
    -lfiniteVolume \
    -lmeshTools \
    -lfvOptions \
    -lsampling


shahidqa32 March 19, 2019 01:37

Help need in OpenFoam by BlueCFD terminal to study Gray Scott Model
 
5 Attachment(s)
Need help to run The following Gray Scott Model by using BlueCFD terminal OpenFoam.

I am putting my path in the following way,

C drive - program files - blueCFD Core-2017- ofuser-of5- run.
Here I have two folders
1- grayScottFoam1 ( which contains .H and .C files) with Make folder (files and options)

2-gSM-1 (0 constant system)

which I try to run by blockMesh command which works but Foam is not working (solver).

Help will be highly appreciated in advance. Attachment 68947

Attachment 68948

Attachment 68949

Attachment 68950

Attachment 68951

shahidqa32 March 19, 2019 02:09

Help need in OpenFoam by BlueCFD terminal to study Gray Scott Model
 
Need help to run The following Gray Scott Model by using BlueCFD terminal OpenFoam.

I am putting my path in the following way,

C drive - program files - blueCFD Core-2017- ofuser-of5- run.
Here I have two folders
1- grayScottFoam1 ( which contains .H and .C files) with Make folder (files and options)

2-gSM-1 (0 constant system)

which I try to run by blockMesh command which works but Foam is not working (solver).

Help will be highly appreciated in advance. Files can be shared.


All times are GMT -4. The time now is 19:48.