CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Can't compile solver

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By alexeym
  • 2 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2018, 11:01
Default Can't compile solver
  #1
New Member
 
Juan Blanco
Join Date: May 2017
Posts: 12
Rep Power: 9
juanblanco is on a distinguished road
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
Unable to compile solver
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
juanblanco is offline   Reply With Quote

Old   January 11, 2018, 11:40
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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?
alexeym is offline   Reply With Quote

Old   January 11, 2018, 12:15
Default
  #3
New Member
 
Juan Blanco
Join Date: May 2017
Posts: 12
Rep Power: 9
juanblanco is on a distinguished road
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.
juanblanco is offline   Reply With Quote

Old   January 12, 2018, 03:48
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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.
Da Lord's likes this.
alexeym is offline   Reply With Quote

Old   January 12, 2018, 04:58
Default
  #5
New Member
 
Juan Blanco
Join Date: May 2017
Posts: 12
Rep Power: 9
juanblanco is on a distinguished road
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.
juanblanco is offline   Reply With Quote

Old   January 12, 2018, 05:03
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
fvIOoptionList.H is now fvOptionList.H.
anishtain4 and Da Lord's like this.
alexeym is offline   Reply With Quote

Old   April 24, 2018, 11:14
Default Thank you very much Alexeym, I had the same pb, it is now fixed!
  #7
New Member
 
foucault
Join Date: Jan 2018
Posts: 1
Rep Power: 0
foucault is on a distinguished road
Thank you very much Alexeym, I had the same pb, it is now fixed!
Eric F
foucault is offline   Reply With Quote

Old   November 6, 2018, 10:13
Default
  #8
Member
 
Christophk
Join Date: Oct 2018
Posts: 33
Rep Power: 8
syntex is on a distinguished road
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
syntex is offline   Reply With Quote

Old   March 19, 2019, 02:37
Default Help need in OpenFoam by BlueCFD terminal to study Gray Scott Model
  #9
New Member
 
Shahid Hasnain
Join Date: Jul 2013
Location: Islamabad
Posts: 3
Rep Power: 13
shahidqa32 is on a distinguished road
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. AEqn.H

BEqn.H

createFields.H

grayScottFoam.C

perputation.H
shahidqa32 is offline   Reply With Quote

Old   March 19, 2019, 03:09
Default Help need in OpenFoam by BlueCFD terminal to study Gray Scott Model
  #10
New Member
 
Shahid Hasnain
Join Date: Jul 2013
Location: Islamabad
Posts: 3
Rep Power: 13
shahidqa32 is on a distinguished road
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.
shahidqa32 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile a new solver in OpenFOAM-2.1.0? sandy OpenFOAM Programming & Development 24 July 27, 2016 05:10
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 12:34
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
How to compile an unsteady solver based on solver of MRFSimpleFoam? renyun0511 OpenFOAM Running, Solving & CFD 0 April 27, 2010 12:16
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08


All times are GMT -4. The time now is 13:38.