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

Error while compiling modified icoFoam: "cannot find lthermophysicalModels"

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 15, 2014, 07:36
Default Error while compiling modified icoFoam: "cannot find lthermophysicalModels"
  #1
New Member
 
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12
DuarteMagalhaes is on a distinguished road
Hi everyone!


I am using OpenFOAM 2.3.0 and trying to compile a modified version of icoFoam (with temperature equation and thermophysical properties varying with temperature) and I'm getting the following error:

"
/usr/bin/ld: cannot find -lthermophysicalModels

collect2: ld returned 1 exit status

make: *** [/home/duarte/OpenFOAM/duarte-2.3.0/platforms/linuxGccDPOpt/bin/own_icoFoamPV] Error 1
"

Can anyone tell me how can I make the program find this library?

Thank you for your help!

(I'm afraid this post is in the wrong sub-forum as I haven't seen many threads about compilation errors around here. If so, please redirect me to the correct one)
DuarteMagalhaes is offline   Reply With Quote

Old   June 15, 2014, 08:48
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

if you take a look at options files in Make folder of compressible solvers, usually it is:

Code:
...
EXE_LIBS = \
    -lfluidThermophysicalModels \
    -lspecie \
...
alexeym is offline   Reply With Quote

Old   June 15, 2014, 09:47
Default
  #3
New Member
 
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12
DuarteMagalhaes is on a distinguished road
Hi Alexey,

Thank you for your quick reply!

My Make/options file is as follows:

"
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/rhoThermo \
-I$(LIB_SRC)/thermophysicalModels/basic/fluidThermo \
-I$(LIB_SRC)/thermophysicalModels/basic/basicThermo

EXE_LIBS = \
-lfiniteVolume \
-lsampling \
-lthermophysicalModels
"

I thought this was correct. I am using rhoThermo to calculate the fields rho () and mu (). I just need these fields from rhoThermo.

Please advise, thanks a lot!
DuarteMagalhaes is offline   Reply With Quote

Old   June 15, 2014, 09:56
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well,

Code:
$ cd $FOAM_LIBBIN 
$ pwd
.../OpenFOAM-2.3.0/platforms/.../lib
$ ls | grep Thermo
libSLGThermo.dylib
libfluidThermophysicalModels.dylib
libmultiphaseMixtureThermo.dylib
libreactionThermophysicalModels.dylib
libsolidThermo.dylib
libtwoPhaseMixtureThermo.dylib
$
So change your -lthermophysicalModels to something that is available like -lfluidThermophysicalModels.
alexeym is offline   Reply With Quote

Old   June 15, 2014, 13:27
Default
  #5
New Member
 
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12
DuarteMagalhaes is on a distinguished road
Alexey,

You are right. There is a libfluidThermophysicalModels.so file in the opt/openfoam230/platforms/LinuxGccDPOpt/lib directory, and not a libthermophysicalModels.so file.

However, in opt/openfoam230/src, I cannot find a "fluidThermophysical" directory, but there is a thermophysicalModels directory

Supposedly, existing a thermophysicalModels directory in /src, a .so file would be expected to exist in opt/openfoam230/platforms/LinuxGccDPOpt/lib directory, right?
DuarteMagalhaes is offline   Reply With Quote

Old   June 15, 2014, 13:44
Default
  #6
New Member
 
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12
DuarteMagalhaes is on a distinguished road
Ok, problem solved, I was getting it all wrong, my options file ended up as:

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude


EXE_LIBS = \
-lfiniteVolume \
-lsampling \
-lfluidThermophysicalModels \
-lspecie


Thank you so much for your help Alexey!
DuarteMagalhaes is offline   Reply With Quote

Old   June 15, 2014, 15:03
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Quote:
Originally Posted by DuarteMagalhaes View Post
Supposedly, existing a thermophysicalModels directory in /src, a .so file would be expected to exist in opt/openfoam230/platforms/LinuxGccDPOpt/lib directory, right?
Not exactly. It's right, for example, for surfMesh folder in src (so it's libsurfMesh.so), turbulenceModels folder (it's turbulenceModels.so), but thermophysicalModels are split into several dynamic libraries (thermophysicalModels/basic -> libfluidThermophysicalModels.so, thermophysicalModels/SLGThermo -> libSLGThermo.so, etc.). Another example of such split is postProcessing folder.
DuarteMagalhaes likes this.
alexeym 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
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 01:52
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 13:38
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 07:32
Error "cannot find -lz" athlonshi OpenFOAM Installation 2 September 19, 2010 16:59
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30


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