CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Problem in Compiling the solver (

m.maneshi November 2, 2010 08:44

Problem in Compiling the solver
Dear all
Here i added one of the Header files to the solver files and compile it and i encounter this error which i cant understand it. would any one please help me what it does mean ?

In file included from mdFoam.C:67:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/temperatureEquilibration.H: In function ‘int main(int, char**)’:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/temperatureEquilibration.H:37: error: ‘targetTemperature’ was not declared in this scope
make: *** [Make/linuxGccDPOpt/mdFoam.o] Error 1


chegdan November 2, 2010 17:08

Options file in Make folder?
Did you set up your Options file in your make folder to include another header from a source outside your solver folder?

if I wanted to include something from the lagrangian basic and intermediate class, i would add the folder containing the header i wanted on the include path


  ...other include files here\
    -I$(LIB_SRC)/lagrangian/basic/lnInclude \

m.maneshi November 2, 2010 18:01

well, i didnt understand the point you mentioned completely. i do this by adding the # include <temperatureEquilibration.H> to the solver file and when trying to compile it such error happens... What is the reason for it?

chegdan November 2, 2010 18:41

that variable is undefined
try adding the header file readmdEquilibrationDict.H before the temperatureEquilibration.H file. The temperatureEquilibration.H file needs the variable targetTemperature to be defined...and that what it is complaining about. Im looking in the solver mdEquilibrationFoam in openfoam-1.5-dev...but this is probably relevant to other MD solvers in OF.


m.maneshi November 3, 2010 03:07

Thanks alot.

All times are GMT -4. The time now is 15:10.