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

Compiling New Solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2013, 17:34
Default Compiling New Solver
  #1
New Member
 
David Ouellette
Join Date: Feb 2013
Location: Ottawa, Ontario, Canada
Posts: 12
Rep Power: 13
DavidOuellette is on a distinguished road
Hi All,

I'm currently attempting to compile an unaltered solver so I can eventually change the solver to the situation that I am researching. The instructions I have been following are shown in the attached file. I also followed the instructions in section 2 of the provided link (http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam), only to receive the same problem. In both cases, when I run the solver for the given tutorial case, the new name of the solver is not recognized, while the original solver name is (ie: my_icoFoam and jrFoam are not recognized, but icoFoam and pisoFoam are recognized in their respective cases).

The only explanation that I can come up with is the information I receive when I type 'wmake' into the terminal (without the apostrophes). The information that the terminal returns is shown below. Unfortunately, I am new to OpenFoam and linux, so a lot of the warnings make little sense to me.

Information returned by the terminal for the jrFoam case:

Making dependency list for source file jrFoam.C
SOURCE=jrFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/transportModels -I/opt/openfoam211/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/jrFoam.o
/opt/openfoam211/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/opt/openfoam211/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/opt/openfoam211/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/transportModels -I/opt/openfoam211/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/jrFoam.o -L/opt/openfoam211/platforms/linux64GccDPOpt/lib \
-lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -lmeshTools -lOpenFOAM -ldl -lm -o /home/fuelcell-laptop/OpenFOAM/fuelcell-laptop-2.1.1/applications/bin/linux64GccDPOpt/jrFoam



Also, I should note that I am using OpenFOAM-2.1.1 and Ubuntu 12.04 LTS. I welcome any comments or suggestions.

Thanks and all the best,
David
Attached Files
File Type: pdf Example of the Compilation of an OpenFoam Solver.pdf (93.6 KB, 47 views)
DavidOuellette is offline   Reply With Quote

Old   February 18, 2013, 03:49
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings David and welcome to the forum!

There are no error messages while building the solver (only some usual warnings), so that's not the problem.

Have you tried starting a new terminal? The reason I ask is because the path where the solver is placed, was possibly created when you first built the new solvers, which might lead to the shell not detecting sooner that the new path is now populated.

After you start a new terminal, you can also try running:
Code:
which jrFoam
which will tell you where the application is located, if found.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 18, 2013, 12:38
Default
  #3
New Member
 
David Ouellette
Join Date: Feb 2013
Location: Ottawa, Ontario, Canada
Posts: 12
Rep Power: 13
DavidOuellette is on a distinguished road
Hi Bruno,

Thank you for your reply. I attempted your suggestions. When I open a new terminal window and type

Code:
which jrFoam
I receive no feedback from the terminal; as in the terminal just moves to a new empty line that you would get before entering a new command (if that makes any sense). I also typed the same commands in the directory of the jrFoam solver as well as in the 'jrCavity' directory, with the same response from the terminal. As a check, I also tried,

Code:
which pisoFoam
and the terminal gave the output of:

/opt/openfoam211/platforms/linux64GccDPOpt/bin/pisoFoam

So, it seems to me that terminal does not recognize 'jrFoam' as a solver; even in a new terminal window. When I type jrFoam in the 'jrCavity' directory in the new terminal window, the response I receive is:

jrFoam: command not found

However, the command 'pisoFoam' does still work.

Do you have any other suggestions?

Many thanks,
David
DavidOuellette is offline   Reply With Quote

Old   February 18, 2013, 15:19
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi David,

This is very strange... check if the following command works:
Code:
ls -l /home/fuelcell-laptop/OpenFOAM/fuelcell-laptop-2.1.1/applications/bin/linux64GccDPOpt/jrFoam
You can also try running it directly, in case it does exist:
Code:
/home/fuelcell-laptop/OpenFOAM/fuelcell-laptop-2.1.1/applications/bin/linux64GccDPOpt/jrFoam
If both worked, then try:
Code:
export PATH=$PATH:/home/fuelcell-laptop/OpenFOAM/fuelcell-laptop-2.1.1/applications/bin/linux64GccDPOpt

which jrFoam
If this doesn't work, then it's because your "PATH" variable is broken. Not sure how or why... but you can check by running:
Code:
echo $PATH
For reference, a good output would be something like this (when without OpenFOAM activated):
Code:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 18, 2013, 15:34
Default
  #5
New Member
 
David Ouellette
Join Date: Feb 2013
Location: Ottawa, Ontario, Canada
Posts: 12
Rep Power: 13
DavidOuellette is on a distinguished road
Hi Bruno,

It seems to be working now! I followed your instructions for exporting the path, and the command 'jrFoam' is now working! I also compared the results to 'pisoFoam' and they both match.

Thank you very much for your help Bruno. I greatly appreciate it.

All the best,
David
DavidOuellette 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
Creating New Solver: For particle-laden compressible jets sankarv OpenFOAM Running, Solving & CFD 17 December 3, 2014 19:41
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
Problems about compiling a new solver fw407 OpenFOAM Running, Solving & CFD 1 December 27, 2007 13:52
Problems about compiling a new solver fw407 OpenFOAM Bugs 0 December 23, 2007 17:03


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