tutorials: Rationalized the naming of the meshing script when it is separated from Allrun to Allmesh

This commit is contained in:
Henry Weller
2018-06-10 16:08:36 +01:00
parent e38bfba89e
commit 4e0f49a858
26 changed files with 39 additions and 367 deletions

View File

@ -4,11 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
runApplication $(getApplication) &
./externalSolver
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
runApplication decomposePar
@ -12,5 +12,4 @@ runParallel $(getApplication) &
./externalSolver
#------------------------------------------------------------------------------

View File

@ -1,11 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication createExternalCoupledPatchGeometry T
#------------------------------------------------------------------------------

View File

@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
runApplication $(getApplication)

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
runApplication decomposePar

View File

@ -1,14 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication topoSet -constant
# Split the mesh to generate the ACMI coupled patches
runApplication createBaffles -overwrite
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
runApplication decomposePar
runParallel $(getApplication)

View File

@ -1,26 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Copy propeller surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
# Meshing
runApplication blockMesh
runApplication surfaceFeatures
runApplication snappyHexMesh -overwrite
# Generate face/cell sets and zones
runApplication topoSet -dict system/createInletOutletSets.topoSetDict
# Create the inlet/outlet and AMI patches
runApplication createPatch -overwrite
runApplication renumberMesh -noFields -overwrite
# Test by running moveDynamicMes
#runApplication moveDynamicMesh -checkAMI
#------------------------------------------------------------------------------

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
if [ -n "$FOAMY_HEX_MESH" ]
then
./Allrun.pre
./Allmesh
runApplication $(getApplication)
fi

View File

@ -1,30 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication surfaceFeatures
runApplication foamyHexMesh
# Collapse only patch faces from incomplete conformation
runApplication -s indirectPatchFaces \
collapseEdges -collapseFaceSet indirectPatchFaces -latestTime -overwrite
# Collapse small edges and sliver faces
runApplication -s collapseFaces \
collapseEdges -collapseFaces -latestTime -overwrite
runApplication checkMesh -allTopology -allGeometry -latestTime
latestTime=`foamListTimes -latestTime`
# Move the mesh into polyMesh
rm -rf constant/polyMesh
mv "${latestTime}"/polyMesh constant
# Clean up intermediate meshes
rm -r [1-9]*
#------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
application=$(getApplication)

View File

@ -1,14 +0,0 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
#runApplication setSet -batch wallFilmRegion.setSet
runApplication topoSet
runApplication extrudeToRegionMesh -overwrite
paraFoam -touch
paraFoam -touch -region wallFilmRegion
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
cp -rf 0.orig 0

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
application=$(getApplication)

View File

@ -1,34 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -rf 0
# create the underlying block mesh
runApplication blockMesh
# create the set for the obstacles
runApplication topoSet
# create the obstacles - add obstacle patches to wallFilm patch
runApplication subsetMesh c0 -patch wallFilm -overwrite
# split the obstacle patches into cube[1-6]_patch[1-6]
runApplication ./patchifyObstacles
# Create the wall film region via extrusion
runApplication extrudeToRegionMesh -overwrite
# Copy the system settings over to the wall film region
rm -rf system/wallFilmRegion
cp -r system/wallFilmRegion.orig system/wallFilmRegion
find ./0 -maxdepth 1 -type f -exec \
sed -i -e "s/wallFilm/\"(region0_to.*)\"/g" {} \;
paraFoam -touch
paraFoam -touch -region wallFilmRegion
#------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
application=$(getApplication)

View File

@ -1,14 +0,0 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
#runApplication setSet -batch wallFilmRegion.setSet
runApplication topoSet -dict system/wallFilmRegion.topoSet
runApplication extrudeToRegionMesh -overwrite
paraFoam -touch
paraFoam -touch -region wallFilmRegion
#------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
application=$(getApplication)

View File

@ -1,31 +0,0 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
#If using batch mode
#runApplication -s wallFilmRegion \
# setSet -batch wallFilmRegion.setSet
#If using dictionary mode
runApplication -s wallFilmRegion \
topoSet -dict system/wallFilmRegion.topoSet
runApplication extrudeToRegionMesh -overwrite
#If using batch mode
#runApplication -s createWallFilmRegionPatches \
# setSet -region wallFilmRegion \
# -batch createWallFilmRegionPatches.setSet
#If using dictionary mode
runApplication -s createWallFilmRegionPatches \
topoSet -region wallFilmRegion \
-dict system/createWallFilmRegionPatches.topoSet
runApplication createPatch -region wallFilmRegion -overwrite
paraFoam -touch
paraFoam -touch -region wallFilmRegion
#------------------------------------------------------------------------------

View File

@ -5,9 +5,30 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Generate mesh
./Allrun-pre
./Allmesh
# Run simulation
./Allrun-simulation
cp system/controlDict.flow system/controlDict
# Set application name
application=$(getApplication)
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite
# Get rid of zero faced patches
runApplication createPatch -overwrite
# Initialize alpha
runApplication setFields
# Decompose
runApplication -s main \
decomposePar -force
# Run
runParallel $application
# Reconstruct
runApplication reconstructPar -noFunctionObjects
#------------------------------------------------------------------------------

View File

@ -1,99 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
intersectSurfaces()
{
outputName1=$(basename $1)
outputName1=${outputName1%.*}
outputName2=$(basename $2)
outputName2=${outputName2%.*}
runApplication -s $outputName1:$outputName2 \
surfaceBooleanFeatures "$@" intersection
}
# Set application name
application=$(getApplication)
# Run the surface preparation script
./constant/triSurface/surfaceProcess.sh > log.surfaceProcess 2>&1
# Surface intersections
intersectSurfaces \
constant/triSurface/vessel.stl \
constant/triSurface/spargerShaft.stl \
-perturb
intersectSurfaces \
constant/triSurface/vessel.stl \
constant/triSurface/shaft.stl \
-perturb
intersectSurfaces \
constant/triSurface/spargerShaft.stl \
constant/triSurface/spargerInlet.stl \
-perturb
intersectSurfaces \
constant/triSurface/stirrer.stl \
constant/triSurface/shaftRotating.stl \
-perturb
intersectSurfaces \
constant/triSurface/stirrer_baffles.stl \
constant/triSurface/stirrer.stl \
-surf1Baffle \
-perturb
intersectSurfaces \
constant/triSurface/rotating.stl \
constant/triSurface/shaft.stl \
-surf1Baffle \
-perturb
# Intersect blades with the plate
for bladeI in $(seq 1 6);
do
intersectSurfaces \
constant/triSurface/stirrer_baffles_$bladeI.obj \
constant/triSurface/stirrer_baffles_plate.obj \
-surf1Baffle \
-surf2Baffle
done
# Meshing
cp system/controlDict.mesh system/controlDict
runApplication blockMesh -region backgroundMeshDecomposition
runApplication -s backgroundMeshDecomposition \
decomposePar -region backgroundMeshDecomposition
runApplication surfaceFeatures
runParallel foamyHexMesh
runParallel -s faces \
collapseEdges -collapseFaces -latestTime \
-dict system/collapseDict.collapseFaces
#runParallel -s faceSet \
# collapseEdges -collapseFaceSet indirectPatchFaces -latestTime \
# -dict system/collapseDict.indirectPatchFaces
runParallel checkMesh -allTopology -allGeometry -latestTime
runApplication reconstructParMesh -latestTime
# Copy the mesh from the latest time folder into polyMesh and delete that
# latest time folder
latestTime=$(foamListTimes -latestTime)
cp -r $latestTime/polyMesh constant
rm -rf $latestTime
#------------------------------------------------------------------------------

View File

@ -1,31 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp system/controlDict.flow system/controlDict
# Set application name
application=$(getApplication)
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite
# Get rid of zero faced patches
runApplication createPatch -overwrite
# Initialize alpha
runApplication setFields
# Decompose
runApplication -s main \
decomposePar -force
# Run
runParallel $application
# Reconstruct
runApplication reconstructPar -noFunctionObjects
#------------------------------------------------------------------------------

View File

@ -6,8 +6,10 @@ cd ${0%/*} || exit 1 # Run from this directory
application=$(getApplication)
./Allmesh
./Allrun.pre
# Initialize alpha
runApplication setFields
# Decompose
runApplication decomposePar -force

View File

@ -1,20 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Set application name
application=$(getApplication)
# Meshing
runApplication blockMesh
runApplication surfaceFeatures
runApplication snappyHexMesh -overwrite
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite
# Initialize alpha
runApplication setFields
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
./Allmesh
runApplication decomposePar

View File

@ -1,25 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Copy propeller surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
runApplication blockMesh
runApplication surfaceFeatures
runApplication snappyHexMesh -overwrite
# Generate face/cell sets and zones
runApplication topoSet -dict system/createInletOutletSets.topoSetDict
# Create the inlet/outlet and AMI patches
runApplication createPatch -overwrite
runApplication renumberMesh -noFields -overwrite
# Test by running moveDynamicMesh
#runApplication moveDynamicMesh -checkAMI
#------------------------------------------------------------------------------