CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

Calling OpenFOAM from Scilab

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 7, 2014, 10:22
Default Calling OpenFOAM from Scilab
  #1
New Member
 
Jefferson Vieira
Join Date: Jul 2014
Location: Brazil/Scotland
Posts: 12
Rep Power: 3
Jefferson_dhv is on a distinguished road
Hi all,

I'm working on an optimization routine in Scilab that in a certain point calls OpenFOAM to do the simulation. I'm trying to use the unix function in Scilab to do this, but I'm having some problems. At first I tried to call the OpenFOAM function normally e.g. icoFoam, and then:

Code:
!--error 10000 
unix_w: The command failed with the error code "127" and the following message:
sh: 1: icoFoam: not found
Later I tried to give the full path to the OpenFOAM function, "/opt/openfoam230/platforms/linux64GccDPOpt/bin/icoFoam" in this case, and then:

Code:
 !--error 10000 
unix_w: The command failed with the error code "127" and the following message:
/opt/openfoam230/platforms/linux64GccDPOpt/bin/icoFoam: error while loading shared libraries: libfiniteVolume.so: cannot open shared object file: No such file or directory
Does anyone know how to proceed?

Thanks in advance,
Jefferson V.
Jefferson_dhv is offline   Reply With Quote

Old   August 7, 2014, 10:34
Default
  #2
Senior Member
 
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 371
Rep Power: 12
cnsidero is on a distinguished road
I've never used scilab before (but know what it is) but my wild stab in the dark is that scilab does not inherit some/any of the shell environment variables from which is was started. Meaning none of the environment variables needed by OpenFOAM (as created by $WM_PROJECT_DIR/etc/bashrc) exist.
cnsidero is offline   Reply With Quote

Old   September 24, 2014, 03:34
Default
  #3
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 6
Ruli is on a distinguished road
Dear Jefferson,

a few years ago I did perform an optimisation in Scilab using OpenFOAM and indeed it is possible. As I am currently again working on a combination of Scilab and OF, I will let you know, when I searched through my old project and found the basic instructions.

Best regards
Julian
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   September 24, 2014, 09:52
Default
  #4
New Member
 
Jefferson Vieira
Join Date: Jul 2014
Location: Brazil/Scotland
Posts: 12
Rep Power: 3
Jefferson_dhv is on a distinguished road
Hi Julian,

I've managed to do it. At first I was using a computer running Linux in a virtual machine, but when I tried in another computer without the virtual machine it worked fine using the unix function.

Regards,
Jefferson
Jefferson_dhv is offline   Reply With Quote

Reply

Tags
openfoam, scilab, unix

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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 0 January 1, 2014 20:21
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 07:18
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 9 June 22, 2011 18:59
The OpenFOAM extensions project mbeaudoin OpenFOAM 16 October 9, 2007 09:33
OpenFOAM Training and Workshop Hrvoje Jasak Main CFD Forum 0 October 7, 2005 07:14


All times are GMT -4. The time now is 08:50.