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/)
-   -   How to compile a new solver in OpenFOAM-2.1.0? (https://www.cfd-online.com/Forums/openfoam-programming-development/96462-how-compile-new-solver-openfoam-2-1-0-a.html)

alimea July 27, 2016 03:30

compile a solver
 
Hi guys
I'm using O.F. is 2.3.1 and have done changes according to http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
But I've gotten this error:
make: *** [Make/linux64GccDPOpt/icoHeatFoam.o] Error 1

Help me, if you know the solution.
Thanks

adambarfi July 27, 2016 03:43

Quote:

Originally Posted by alimea (Post 611550)
Hi guys
I'm using O.F. is 2.3.1 and have done changes according to http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
But I've gotten this error:
make: *** [Make/linux64GccDPOpt/icoHeatFoam.o] Error 1

Help me, if you know the solution.
Thanks

Hi Ali,

please post the error description completely (what you see in the terminal).

Regards,
Mostafa

alimea July 27, 2016 03:48

Thanks Mostafa.
These are all of the messages which are printed in terminal:

SOURCE=icoHeatFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/sampling/lnInclude -IlnInclude -I. -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/icoHeatFoam.o
In file included from icoHeatFoam.C:42:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:73:1: error: expected ‘)’ before ‘D0’
D0
^
In file included from icoHeatFoam.C:53:0:
/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
const int nOuterCorr =
^
/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
const bool momentumPredictor =
^
/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
const bool transonic =
^
make: *** [Make/linux64GccDPOpt/icoHeatFoam.o] Error 1

adambarfi July 27, 2016 03:53

Quote:

Originally Posted by alimea (Post 611553)
Thanks Mostafa.
These are all of the messages which are printed in terminal:

SOURCE=icoHeatFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/sampling/lnInclude -IlnInclude -I. -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/icoHeatFoam.o
In file included from icoHeatFoam.C:42:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:73:1: error: expected ‘)’ before ‘D0’
D0

^
In file included from icoHeatFoam.C:53:0:
/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
const int nOuterCorr =
^
/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
const bool momentumPredictor =
^
/home/drnili/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
const bool transonic =
^
make: *** [Make/linux64GccDPOpt/icoHeatFoam.o] Error 1

look at the bold-red part in above.

you forgot to close the parentheses before the D0.

alimea July 27, 2016 04:10

volScalarField D
(
IOobject
(
"D",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
D0
);



I think I've forgotten a "," after mesh. isn't it?
But how can I be confident that my solver works correctly?


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