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

How to compile a new solver in OpenFOAM-2.1.0?

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2016, 03:30
Default compile a solver
  #21
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
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
alimea is offline   Reply With Quote

Old   July 27, 2016, 03:43
Default
  #22
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
Originally Posted by alimea View Post
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
adambarfi is offline   Reply With Quote

Old   July 27, 2016, 03:48
Default
  #23
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
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
alimea is offline   Reply With Quote

Old   July 27, 2016, 03:53
Default
  #24
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
Originally Posted by alimea View Post
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.
adambarfi is offline   Reply With Quote

Old   July 27, 2016, 04:10
Default
  #25
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
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?
alimea 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
Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam jovani OpenFOAM Running, Solving & CFD 475 January 13, 2023 08:21
Acoustic Solver with openfoam acoustica OpenFOAM Programming & Development 110 February 24, 2021 18:50
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
AMG solver in Openfoam gonski Main CFD Forum 0 November 25, 2007 05:20


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