CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   can't read the librairy of a modified inlet condition (https://www.cfd-online.com/Forums/openfoam-solving/119113-cant-read-librairy-modified-inlet-condition.html)

Eloise June 10, 2013 07:35

can't read the librairy of a modified inlet condition
 
Hello,

I am trying to run a simpleFoam simulation with a modified inlet condition, but it seems I can't read the library in which the inlet condition is defined. I get the following error message
Code:

--> FOAM Warning :
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
    could not load "VelRH.so"

and of course the simulation crashes
Code:

--> FOAM FATAL IO ERROR: Unknown patchField type VelRH for patch type patch
Here is the description of my setup:
I run with OpenFOAM 2.0.x. I created a velRH directory which contains the files functionVelRHFvPatchVectorField.C, functionVelRHFvPatchVectorField.H, and the Make directory which contains the files files and options (respectively below).
Code:

functionVelRHFvPatchVectorField.C
LIB = $(FOAM_USER_LIBBIN)/velRH

Code:

EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS =

The command wmake libso generate the following output and creates velRH in the location corresponding to $FOAM_USER_LIBBIN
Code:

wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file functionVelRHFvPatchVectorField.C
SOURCE=functionVelRHFvPatchVectorField.C ;  g++44 -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/share/apps/OpenFOAM-2.0.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/share/apps/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/share/apps/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/functionVelRHFvPatchVectorField.o
'.../eloisec-2.0.x/platforms/linux64GccDPOpt/lib/velRH.so' is up to date.

Can someone help me to find out why the simulation can't load the library?
Thanks for reading this long message :)
Eloïse

wyldckat June 10, 2013 07:53

Greetings Eloïse,

Try the following command, to check if the library path is within visible reach:
Code:

echo $LD_LIBRARY_PATH | grep "eloisec-2.0.x/platforms/linux64GccDPOpt/lib"
Secondly, double check if the file is really there.

And I'm assuming that you edited out what was at the "..." in ".../eloisec-2.0.x", because otherwise, that would be a real problem, since it's not a standard path ;)

Best regards,
Bruno

Eloise June 10, 2013 08:22

Hello Bruno,
Thanks for your fast answer :)
1) The path is present in the $LD_LIBRARY_PATH
2) The file velRH.so actually exist, and it is located in the proper directory
Do you have any other idea?

And you are right, I "shortened" the path the the library directory :)
Regards,
Eloïse

wyldckat June 10, 2013 08:46

Hi Eloïse,

Then the problem must be in the code itself. Without looking at it, it could any number of possibilities.

The only other possibility that comes to mind is the name of the library, because the traditional naming (at least from what I've seen on Linux) is to prepend "lib" to the name:
Code:

LIB = $(FOAM_USER_LIBBIN)/libvelRH
Best regards,
Bruno

Eloise June 10, 2013 09:59

Problem solved!
I shouldn't have looked that far... I just called VelRH.so instead of velRH.so in the controlDict. So classic :rolleyes:

Thanks for the help anyway!
Regards,
Eloïse


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