CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   run openfoam with bash script (https://www.cfd-online.com/Forums/openfoam/115173-run-openfoam-bash-script.html)

Gosi March 25, 2013 11:47

run openfoam with bash script
 
hi everybody,

i wrote a short Fluent3DMeshtoFoam bash script.


#!/bin/sh

/sw/ansys/ansys12.1/v121/fluent/bin/fluent 3ddp -g < fluent_ascii

fluent3DMeshToFoam recalculation_re=200k_done_ascii.cas

createPatch

rm -r /home/stswi1/HiWi/OpenFOAM/8k5/constant/polyMesh

cp -a /home/stswi1/HiWi/OpenFOAM/8k5/70.02/polyMesh* /home/stswi1/HiWi/OpenFOAM/8k5/constant/

rm -r /home/stswi1/HiWi/OpenFOAM/8k5/70.02

/sw/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/rhoSimpleFoam

wallGradT


it works when i run openfoam (option openfoam-17.x) and then run the bash script.

without running openfoam at first the following fault appears.

/sw/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/rhoSimpleFoam: symbol lookup error: /sw/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/rhoSimpleFoam: undefined symbol: _ZN4Foam13fvsPatchFieldINS_6VectorIdEEE28disallowD efaultFvsPatchFieldE

is it something with the environment variables?
could anybody help me?

thanks in advance. Simon

wyldckat March 25, 2013 16:23

Greetings Simon and welcome to the forum!

I'll have to be quick to answer:
  1. I can only assume that the "openfoam" command you're talking about is a command specifically designed for loading OpenFOAM's shell variables.
  2. For more on this topic, read: Advanced tips for working with the OpenFOAM shell environment
Best regards,
Bruno

Gosi April 11, 2013 09:10

hi bruno,

thanks for your quick response.
yes the "openfoam" command i am talking about is a command for loading OpenFOAM's shell variables.
i will take a look at your link.

simon


All times are GMT -4. The time now is 10:30.