FIX: provide restore0Dir function to fix issue #159

- makes it easier to ensure the correct behaviour, consistently
This commit is contained in:
Mark Olesen
2016-06-27 16:33:55 +02:00
parent dd3fb6225f
commit dd60cfcd06
76 changed files with 205 additions and 190 deletions

View File

@ -41,7 +41,7 @@ isTest()
getNumberOfProcessors()
{
if [ -f $1 ]
if [ -f "$1" ]
then
expandDictionary $1 | sed -ne 's/^numberOfSubdomains\s*\(.*\);/\1/p'
fi
@ -166,7 +166,7 @@ compileApplication()
cloneCase()
{
if [ -d $2 ]
if [ -d "$2" ]
then
echo "Case already cloned: remove case directory $2 to clone"
else
@ -175,9 +175,22 @@ cloneCase()
cpfiles="0 system constant"
for f in $cpfiles
do
cp -r $1/$f $2
\cp -r $1/$f $2
done
fi
}
# Overwrite 0/ with the contents of 0.org/ if it exists
restore0Dir()
{
echo "Restore 0/ from 0.org/"
if [ -d 0.org ]
then
\rm -rf 0
\cp -r 0.org 0 > /dev/null 2>&1
else
echo " Warning: no 0.org/ found"
fi
}
#------------------------------------------------------------------------------

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
cp -r 0.org 0 > /dev/null 2>&1
restore0Dir
runApplication blockMesh
runApplication $application -withFunctionObjects -writePhi -writep
runApplication streamFunction

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
cp -r 0.org 0 > /dev/null 2>&1
restore0Dir
runApplication blockMesh
runApplication $application -writePhi -writep
runApplication streamFunction

View File

@ -5,8 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -rf 0
cp -r 0.org 0
restore0Dir
runApplication blockMesh
runApplication changeDictionary
runApplication topoSet

View File

@ -6,12 +6,12 @@ cd ${0%/*} || exit 1
./Allrun.mesh
rm -rf 0 && cp -r 0.org 0
restore0Dir
runApplication decomposePar -force
runParallel potentialFoam -pName pPotential -initialiseUBCs
rm -f processor*/0/phi
\rm -f processor*/0/phi
runParallel XiDyMFoam

View File

@ -4,8 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf 0
cp -r 0.org 0
\rm -rf 0
\cp -r 0.org 0
cleanCase
cleanSamples

View File

@ -9,14 +9,12 @@ runApplication surfaceFeatureExtract
runApplication blockMesh
runApplication snappyHexMesh -overwrite
if [ -d 0 ] ; then
rm -rf 0
fi
\rm -rf 0
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite
cp -r 0.org 0
restore0Dir
runApplication $(getApplication)

View File

@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf 0
cp -r 0.org 0
\rm -rf 0
\cp -r 0.org 0
cleanSamples
#------------------------------------------------------------------------------

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
runApplication blockMesh
cp 0/T.org 0/T
\cp 0/T.org 0/T
runApplication setFields
runApplication $application

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
runApplication blockMesh
cp 0/T.org 0/T
\cp 0/T.org 0/T
runApplication setFields
runApplication $application

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
cp 0/T.org 0/T
\cp 0/T.org 0/T
#------------------------------------------------------------------------------

View File

@ -6,7 +6,7 @@ application=`getApplication`
runApplication blockMesh
cp -r 0.org 0
restore0Dir
# Create 1D and 3D baffles
runApplication createBaffles -overwrite

View File

@ -21,7 +21,6 @@ rm log.topoSet
runApplication topoSet -region cabin -dict system/topoSetDictRegister
# set the initial fields
rm -rf 0
cp -rf 0.org 0
restore0Dir
runApplication $(getApplication)

View File

@ -17,5 +17,4 @@ runApplication subsetMesh c0 -patch walls -overwrite
runApplication splitMeshRegions -cellZones -overwrite
# set the initial fields
rm -rf 0
cp -rf 0.org 0
restore0Dir

View File

@ -1,5 +1,4 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
@ -25,5 +24,4 @@ rm -rf constant/air/polyMesh/sets
paraFoam -touch -region porous
paraFoam -touch -region air
cp -rf 0.org 0
restore0Dir

View File

@ -14,4 +14,4 @@ runApplication createBaffles -overwrite
# remove zero-sized patches
runApplication createPatch -overwrite
cp -rf 0.org 0
restore0Dir

View File

@ -11,11 +11,8 @@ cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
# - meshing
runApplication blockMesh
runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite
runApplication renumberMesh -overwrite
# force removal of fields generated by snappy
@ -31,4 +28,4 @@ runApplication createPatch -overwrite
#runApplication moveDynamicMesh -checkAMI
# - set the initial fields
cp -rf 0.org 0
restore0Dir

View File

@ -4,14 +4,19 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd wingMotion_snappyHexMesh
(
cd wingMotion_snappyHexMesh || exit 1
cleanCase
)
cd ../wingMotion2D_simpleFoam
(
cd wingMotion2D_simpleFoam || exit 1
cleanCase
rm -rf 0
)
cd ../wingMotion2D_pimpleDyMFoam
(
cd wingMotion2D_pimpleDyMFoam || exit 1
cleanCase
rm -rf 0
)

View File

@ -5,26 +5,36 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Make 3D mesh in slab of cells.
cd wingMotion_snappyHexMesh
(
cd wingMotion_snappyHexMesh || exit 1
runApplication blockMesh
runApplication snappyHexMesh -overwrite
)
# Make a 2D mesh by extruding a patch and solve to steady state.
cd ../wingMotion2D_simpleFoam
(
cd wingMotion2D_simpleFoam || exit 1
runApplication extrudeMesh
runApplication createPatch -overwrite
cp -r 0.org 0
restore0Dir
runApplication simpleFoam
)
# Copy the mesh from the steady state case and map the results to a
# mesh motion case, then solve transient.
cd ../wingMotion2D_pimpleDyMFoam
cp -r ../wingMotion2D_simpleFoam/constant/polyMesh constant
cp -r 0.org 0
# Copy mesh from the steady state case, map the results to a mesh motion case,
# then solve transient.
(
cd wingMotion2D_pimpleDyMFoam || exit 1
\rm -rf constant/polyMesh
\cp -r ../wingMotion2D_simpleFoam/constant/polyMesh constant
restore0Dir
runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent
mv 0/pointDisplacement.unmapped 0/pointDisplacement
\mv 0/pointDisplacement.unmapped 0/pointDisplacement
runApplication decomposePar
runParallel `getApplication`
runParallel $(getApplication)
runApplication reconstructPar
)
#------------------------------------------------------------------------------

View File

@ -11,7 +11,7 @@ runApplication blockMesh
# Create faceZones for baffles and fan
runApplication topoSet
cp -r 0.org 0
restore0Dir
# Create wall and cyclic baffles and the fields on them
runApplication createBaffles -overwrite

View File

@ -31,7 +31,7 @@ then
cloneParallelCase motorBike motorBikeLES
# Do the LES case
cp lesFiles/Allrun motorBikeLES/
\cp lesFiles/Allrun motorBikeLES/
(cd motorBikeLES && foamRunTutorials)
fi

View File

@ -4,12 +4,13 @@
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Set-up the LES case
cp ../lesFiles/fvS* ../lesFiles/controlDict system/
cp ../lesFiles/turbulenceProperties constant/
\cp ../lesFiles/fvS* ../lesFiles/controlDict system/
\cp ../lesFiles/turbulenceProperties constant/
ls -d processor* | xargs -I {} rm -rf ./{}/0 $1
ls -d processor* | xargs -I {} mv ./{}/500 ./{}/0 $1
ls -d processor* | xargs -I {} rm -rf ./{}/0/uniform $1
# $1 for special test cases?
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1
\ls -d processor* | xargs -I {} \mv ./{}/500 ./{}/0 $1
\ls -d processor* | xargs -I {} \rm -rf ./{}/0/uniform $1
runParallel pisoFoam

View File

@ -5,26 +5,27 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy motorbike surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
\cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
# Make dummy 0 directory
mkdir 0
runApplication blockMesh
# cp system/decomposeParDict.hierarchical system/decomposeParDict
# \cp system/decomposeParDict.hierarchical system/decomposeParDict
runApplication decomposePar -decomposeParDict system/decomposeParDict.hierarchical
# cp system/decomposeParDict.ptscotch system/decomposeParDict
# \cp system/decomposeParDict.ptscotch system/decomposeParDict
runParallel snappyHexMesh -decomposeParDict system/decomposeParDict.ptscotch -profiling -overwrite -parallel
find . -type f -iname "*level*" -exec rm {} \;
ls -d processor* | xargs -I {} cp -r 0.org ./{}/0 $1
#- set the initial fields
# $1 for special test cases?
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0 $1
runParallel renumberMesh -overwrite
runParallel potentialFoam -initialiseUBCs
runParallel `getApplication`
runParallel $(getApplication)
#------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy motorbike surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
\cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
@ -13,12 +13,12 @@ runApplication blockMesh
runApplication decomposePar
runParallel snappyHexMesh -overwrite
#- For non-parallel running
#cp -r 0.org 0 > /dev/null 2>&1
#- For non-parallel running: - set the initial fields
# restore0Dir
#- For parallel running
ls -d processor* | xargs -I {} rm -rf ./{}/0
ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
#- For parallel running: set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
runParallel patchSummary
runParallel potentialFoam

View File

@ -10,7 +10,8 @@ application=`getApplication`
runApplication blockMesh
runApplication topoSet
runApplication refineHexMesh c0 -overwrite
cp -r 0.org 0
restore0Dir
#runApplication $application
runApplication decomposePar -cellDist

View File

@ -16,7 +16,9 @@ runParallel snappyHexMesh -overwrite
find . -type f -iname "*level*" -exec rm {} \;
ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
# - set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
runParallel topoSet
runParallel `getApplication`

View File

@ -4,11 +4,17 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd hopperInitialState
cleanCase
(
cd hopperInitialState || exit 1
cleanCase
)
(
cd hopperEmptying || exit 1
cd ../hopperEmptying
cleanCase
rm -rf 0
)
#------------------------------------------------------------------------------

View File

@ -4,20 +4,24 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cd hopperInitialState
(
cd hopperInitialState || exit 1
runApplication blockMesh
runApplication decomposePar
runParallel `getApplication`
runParallel $(getApplication)
runApplication reconstructPar -latestTime
cd ..
)
cd hopperEmptying
rm -rf 0
cp -r 0.org 0
(
cd hopperEmptying || exit 1
restore0Dir
runApplication blockMesh
runApplication mapFields ../hopperInitialState -sourceTime latestTime
runApplication decomposePar
runParallel `getApplication`
runParallel $(getApplication)
runApplication reconstructPar
)
#------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
runApplication blockMesh
#runApplication setSet -batch wallFilmRegion.setSet

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
# create the underlying block mesh
runApplication blockMesh

View File

@ -1,7 +1,7 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
runApplication blockMesh

View File

@ -1,7 +1,7 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
runApplication blockMesh

View File

@ -6,13 +6,10 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
# remove 0 directory
rm -rf 0
# remove 0 directory and post-processing directories
\rm -rf 0 postProcessing
# remove post-processing directory
rm -rf postProcessing
# copy 0.org to 0
cp -r 0.org 0
# restore 0/ directory from 0.org/
\cp -r 0.org 0
#------------------------------------------------------------------------------

View File

@ -7,12 +7,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# create mesh
runApplication blockMesh
cp -r 0.org 0
restore0Dir
# initialise with potentialFoam solution
runApplication potentialFoam
rm -f 0/phi
\rm -f 0/phi
# run the solver
runApplication `getApplication`

View File

@ -7,12 +7,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# create mesh
runApplication blockMesh
cp -r 0.org 0
restore0Dir
# initialise with potentialFoam solution
runApplication potentialFoam
rm -f 0/phi
\rm -f 0/phi
# run the solver
runApplication `getApplication`

View File

@ -5,10 +5,10 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# remove old time and post-processing directories
rm -rf 0 *[1-9]* processor* postProcessing
\rm -rf 0 *[1-9]* processor* postProcessing
# copy 0.org to 0
cp -r 0.org 0
# restore 0/ directory from 0.org/
\cp -r 0.org 0
cleanCase

View File

@ -4,15 +4,14 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -rf 0
cp -rf 0.org 0
restore0Dir
runApplication blockMesh
runApplication potentialFoam
# remove incompatible (volumetric) flux field
rm -f 0/phi
\rm -f 0/phi 2>/dev/null
runApplication $(getApplication)

View File

@ -18,7 +18,7 @@ runApplication mergeOrSplitBaffles -split -overwrite
runApplication createPatch -overwrite
# Copy fields after meshing to avoind the generation of unnecessary patch fields
\cp -r 0.org 0
restore0Dir
# Initialize alpha
runApplication setFields

View File

@ -4,8 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp system/controlDict.rhoCentralFoam system/controlDict
cp -r 0.org 0
\cp system/controlDict.rhoCentralFoam system/controlDict
restore0Dir
runApplication decomposePar
runParallel rhoCentralFoam

View File

@ -10,7 +10,7 @@ application=$(getApplication)
runApplication blockMesh
# Copy 0.org to 0
cp -r 0.org 0
restore0Dir
# Create sets
runApplication topoSet

View File

@ -13,7 +13,7 @@ m4 system/pachuka.m4 > system/blockMeshDict
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
# create faceSet for burner inlet and faceZone for coupled wall
runApplication topoSet

View File

@ -25,7 +25,7 @@ refineMeshByCellSet()
done
}
cp -r 0.org 0
restore0Dir
runApplication blockMesh
refineMeshByCellSet 1 2 3

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
cp -r 0.org 0
restore0Dir
runApplication setFields
runApplication $(getApplication)

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
cp -r 0.org 0
restore0Dir
runApplication setFields
runApplication decomposePar
runParallel $(getApplication)

View File

@ -7,8 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
restore0Dir
runApplication blockMesh
runApplication setFields

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -5,10 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy DTC hull surface from resources folder
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
\cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
for i in 1 2 3 4 5 6
@ -21,18 +20,11 @@ do
done
runApplication snappyHexMesh -overwrite
\rm -rf 0
\cp -r 0.org 0
restore0Dir
runApplication setFields
runApplication decomposePar
runParallel renumberMesh -overwrite
runParallel $(getApplication)
runApplication reconstructPar
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -r 0.org 0 > /dev/null 2>&1
restore0Dir
runApplication blockMesh
#runApplication setSet -batch createObstacle.setSet
runApplication topoSet

View File

@ -10,7 +10,7 @@ application=`getApplication`
runApplication blockMesh
runApplication topoSet
runApplication subsetMesh -overwrite c0 -patch floatingObject
cp -r 0.org 0 > /dev/null 2>&1
restore0Dir
runApplication setFields
runApplication $application

View File

@ -16,8 +16,8 @@ runApplication snappyHexMesh -overwrite
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite
# Copy fields after meshing to avoind the generation of unnecessary patch fields
\cp -r 0.org 0
# Copy fields after meshing to avoid the generation of unnecessary patch fields
restore0Dir
# Initialize alpha
runApplication setFields

View File

@ -5,23 +5,27 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy motorbike surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
\cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
# Serial
# ------
#runApplication snappyHexMesh -overwrite
#\rm -f constant/polyMesh/refinementHistory*
# - set the initial fields
#cp -rf 0.org 0
# restore0Dir
#runApplication setFields
# Parallel
# --------
runApplication decomposePar -force
runParallel snappyHexMesh -overwrite
ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
\ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
# - set the initial fields
ls -d processor* | xargs -I {} rm -rf ./{}/0
ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
runParallel setFields

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication $application

View File

@ -34,7 +34,7 @@ cloneCase damBreak damBreakFine
# Modify case
setDamBreakFine
cp ../damBreak/0/alpha.water.org 0/alpha.water
\cp ../damBreak/0/alpha.water.org 0/alpha.water
# And execute
runApplication blockMesh
runApplication setFields

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
#------------------------------------------------------------------------------

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
runApplication ./makeMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication $application

View File

@ -22,8 +22,7 @@ done
runApplication snappyHexMesh -overwrite
\rm -rf 0
\cp -r 0.org 0
restore0Dir
runApplication setFields

View File

@ -34,7 +34,7 @@ cloneCase damBreak damBreakFine
# Modify case
setDamBreakFine
cp ../damBreak/0/alpha.water.org 0/alpha.water
\cp ../damBreak/0/alpha.water.org 0/alpha.water
# And execute
runApplication blockMesh
runApplication setFields

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
#------------------------------------------------------------------------------

View File

@ -3,11 +3,11 @@
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -r 0.org 0 > /dev/null 2>&1
restore0Dir
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
\cp 0/alpha.water.org 0/alpha.water
runApplication setFields

View File

@ -5,17 +5,14 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy propeller surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
\cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
# - meshing
runApplication blockMesh
runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite
runApplication renumberMesh -overwrite
# force removal of fields generated by snappy
@ -27,7 +24,6 @@ runApplication renumberMesh -overwrite
#runApplication setSet -batch createInletOutletSets.setSet
runApplication topoSet -dict system/createInletOutletSets.topoSetDict
# - create the inlet/outlet and AMI patches
runApplication createPatch -overwrite
@ -39,4 +35,4 @@ runApplication createPatch -overwrite
# - apply the initial fields
cp -rf 0.org 0
restore0Dir

View File

@ -13,7 +13,7 @@ runApplication blockMesh
# Generate the snappy mesh
runApplication snappyHexMesh -overwrite
cp -r 0.org 0
restore0Dir
# Initialise with potentialFoam solution
runApplication potentialFoam -pName p_rgh

View File

@ -7,8 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
restore0Dir
runApplication blockMesh
runApplication setFields

View File

@ -7,8 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
restore0Dir
runApplication blockMesh
runApplication setFields

View File

@ -8,8 +8,7 @@ application=`getApplication`
./makeMesh
rm -rf 0
cp -r 0.org 0
restore0Dir
runApplication setFields
#runApplication $application

View File

@ -7,8 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
restore0Dir
runApplication blockMesh
runApplication setFields

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name
application=`getApplication`
cp -r 0.org 0
restore0Dir
runApplication blockMesh
runApplication setFields

View File

@ -18,7 +18,7 @@ runApplication -s selectBottom \
runApplication createPatch -overwrite
cp -r 0.org 0 > /dev/null 2>&1
restore0Dir
runApplication $application

View File

@ -10,7 +10,8 @@ application=`getApplication`
runApplication blockMesh
runApplication topoSet
runApplication subsetMesh -overwrite c0 -patch floatingObject
cp -r 0.org 0 > /dev/null 2>&1
restore0Dir
runApplication $application

View File

@ -7,8 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
restore0Dir
runApplication blockMesh
runApplication setFields