mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updates to tutorial Allrun scripts
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||
blockMesh > log.blockMesh 2>&1
|
||||
runApplication blockMesh
|
||||
|
||||
@ -7,24 +7,13 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runStarToFoam()
|
||||
{
|
||||
if [ -f log.star3ToFoam -o -f log.starToFoam ]
|
||||
then
|
||||
echo "star3ToFoam already run on $PWD: remove log file to re-run"
|
||||
else
|
||||
echo "star3ToFoam: converting mesh $1"
|
||||
star3ToFoam $1 > log.star3ToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
runApplication star3ToFoam prostar/nacaAirfoil
|
||||
|
||||
runStarToFoam prostar/nacaAirfoil
|
||||
mv constant/polyMesh/boundary temp
|
||||
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
||||
temp > constant/polyMesh/boundary
|
||||
rm temp
|
||||
|
||||
runApplication $application
|
||||
|
||||
# end-of-file
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
Reference in New Issue
Block a user