mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more consistent shell style in tutorial run/clean scripts
This commit is contained in:
@ -1,14 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application="interFoam"
|
||||
|
||||
setDamBreakFine ()
|
||||
setDamBreakFine()
|
||||
{
|
||||
blockMeshDict="constant/polyMesh/blockMeshDict"
|
||||
controlDict="system/controlDict"
|
||||
|
||||
sed \
|
||||
-e s/"23 8"/"46 10"/g \
|
||||
-e s/"19 8"/"40 10"/g \
|
||||
@ -17,6 +20,7 @@ setDamBreakFine ()
|
||||
-e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
|
||||
$blockMeshDict > temp.$$
|
||||
mv temp.$$ $blockMeshDict
|
||||
|
||||
sed \
|
||||
-e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
|
||||
-e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
|
||||
@ -25,19 +29,24 @@ setDamBreakFine ()
|
||||
}
|
||||
|
||||
# Do damBreak
|
||||
(cd damBreak && foamRunTutorials)
|
||||
( cd damBreak && foamRunTutorials )
|
||||
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
||||
cd damBreakFine
|
||||
(
|
||||
cd damBreakFine || exit
|
||||
|
||||
# Modify case
|
||||
setDamBreakFine
|
||||
cp ../damBreak/0/alpha1.org 0/alpha1
|
||||
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $application 4
|
||||
runApplication reconstructPar
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
Reference in New Issue
Block a user