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

Loading Libraries (e.g. new boundary conditions) Stored Locally in ControlDict

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 27, 2014, 21:20
Default Loading Libraries (e.g. new boundary conditions) Stored Locally in ControlDict
  #1
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 154
Rep Power: 9
dancfd is on a distinguished road
Hello all,

I compiled a new boundary condition that I would like to use on a server, where there is no "$FOAM_USER_LIBBIN" directory. I have compiled and run the case without difficulty when the .so (shared object library) file is in the $FOAM_USER_LIBBIN directory, however now I want to move the .so file to my case directory and somehow tell OpenFOAM to find it there so that I can use it on the server. I tried a couple of approaches:

1. Changing the reference in the controlDict to
Code:
libs ("/home/<path to .so file>/lib<BCname>.so");
2. Changing the environment variable for FOAM_USER_LIBBIN:
Code:
export FOAM_USER_LIBBIN=/home/<path to .so file>
In either case, I get the same error from decomposePar:
Code:
--> FOAM Warning : 
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : libtimeVaryingUniformInletOutlet.so: cannot open shared object file: No such file or directory
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libtimeVaryingUniformInletOutlet.so"
Where libtimeVaryingUniformInletOutlet.so is my library.

Any ideas on how to make this work? Thanks in advance.

Daniel
dancfd is offline   Reply With Quote

Old   April 27, 2014, 21:46
Default
  #2
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 154
Rep Power: 9
dancfd is on a distinguished road
It looks like my mistake was using a relative path in place of an absolute path in the libs ("<path goes here");

Works now.
dancfd is offline   Reply With Quote

Old   October 15, 2014, 03:57
Default
  #3
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 682
Rep Power: 15
vasava will become famous soon enough
I had similar problem and I could resolve it by simply copying relevant files from the lib folder in the FOAM_USER_LIBBIN to the lib folder inside the openFoam installation folder.
vasava is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 05:05
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 05:06
inlet boundary conditions newOFuser OpenFOAM 1 January 10, 2013 09:08
Boundary Conditions Jan Ramboer Main CFD Forum 11 August 16, 1999 08:59


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