mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
tutorials: Added the new Allmesh scripts
This commit is contained in:
10
tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allmesh
Executable file
10
tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allmesh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
14
tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allmesh
Executable file
14
tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allmesh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
26
tutorials/incompressible/pimpleFoam/RAS/propeller/Allmesh
Executable file
26
tutorials/incompressible/pimpleFoam/RAS/propeller/Allmesh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
30
tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allmesh
Executable file
30
tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allmesh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/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]*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
14
tutorials/lagrangian/reactingParcelFoam/cylinder/Allmesh
Executable file
14
tutorials/lagrangian/reactingParcelFoam/cylinder/Allmesh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
34
tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allmesh
Executable file
34
tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allmesh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
14
tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allmesh
Executable file
14
tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allmesh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
31
tutorials/lagrangian/reactingParcelFoam/splashPanel/Allmesh
Executable file
31
tutorials/lagrangian/reactingParcelFoam/splashPanel/Allmesh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
99
tutorials/mesh/foamyHexMesh/mixerVessel/Allmesh
Executable file
99
tutorials/mesh/foamyHexMesh/mixerVessel/Allmesh
Executable file
@ -0,0 +1,99 @@
|
||||
#!/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
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
17
tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allmesh
Executable file
17
tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allmesh
Executable file
@ -0,0 +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=$(getApplication)
|
||||
|
||||
# Meshing
|
||||
runApplication blockMesh
|
||||
runApplication surfaceFeatures
|
||||
runApplication snappyHexMesh -overwrite
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
25
tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh
Executable file
25
tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user