CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   readSIMPLEcontrols.H to simpleControl.H (http://www.cfd-online.com/Forums/openfoam/96965-readsimplecontrols-h-simplecontrol-h.html)

dinmif February 6, 2012 09:12

readSIMPLEcontrols.H to simpleControl.H
 
Dear fellow foamers,
I am relatively new in OpenFoam so I am not very familiar with this software.I have OpenFoam v2.0.1 and I would like to use an already working code from an older version of OpenFoam. The problem is that the old code used readSIMPLEcontrols.H, which my version does not have. I have tried to replace it with simpleControl.H, but still it doesn't work. Is there any idea how can I overcome this drawback? Thank you in advance for your time and interest


PS:I have attached the error message that I get when compiling:
[kmitafidisvlachakis@hpc11:fieldFoam]$ wclean
[kmitafidisvlachakis@hpc11:fieldFoam]$ wmake
Making dependency list for source file fieldFoam.C
SOURCE=fieldFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/thermophysicalModels/basic/lnInclude -I/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels -I/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels/compressible/RAS/lnInclude -I/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/cfdTools -I/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude -I/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/fieldFoam.o
In file included from /home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/simpleControl.H:36,
from fieldFoam.C:57:
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControl.H: In function 'int main(int, char**)':
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControl.H:39: error: 'namespace' definition is not allowed here
In file included from /home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControl.H:149,
from /home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/simpleControl.H:36,
from fieldFoam.C:57:
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:28: error: 'Foam::solutionControl' has not been declared
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:29: error: a function-definition is not allowed here before '{' token
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:34: error: 'Foam::solutionControl' has not been declared
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:35: error: a function-definition is not allowed here before '{' token
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:40: error: 'Foam::solutionControl' has not been declared
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:41: error: a function-definition is not allowed here before '{' token
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:46: error: 'Foam::solutionControl' has not been declared
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/solutionControlI.H:47: error: a function-definition is not allowed here before '{' token
In file included from fieldFoam.C:57:
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/simpleControl.H:40: error: 'namespace' definition is not allowed here
In file included from /home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/simpleControl.H:109,
from fieldFoam.C:57:
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/simpleControlI.H:30: error: 'Foam::simpleControl' has not been declared
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/simpleControlI.H:31: error: a function-definition is not allowed here before '{' token
fieldFoam.C:87: error: expected '}' at end of input
/home/kmitafidisvlachakis/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/initContinuityErrs.H:37: warning: unused variable 'cumulativeContErr'
setInlet.H:41: warning: unused variable 'outletU'
setInlet.H:61: warning: unused variable 'dZ'
setInlet.H:62: warning: unused variable 'dY'
fieldFoam.C:87: error: expected '}' at end of input
make: *** [Make/linux64GccDPOpt/fieldFoam.o] Error 1"

beeo September 12, 2012 16:59

Hey,

how did u fix the problem?

beeo

Tobi September 13, 2012 05:49

Quote:

Originally Posted by beeo (Post 381487)
Hey,

how did u fix the problem?

beeo

Normally you have to change the simpleControl.H with the readSimpleControl.H in the *.C file and be sure that he find that file in the Make/option file :)

Tobi

PS: Maybe its possible that you have to update more files.


All times are GMT -4. The time now is 07:56.