mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
caseDicts: added example All* workflow scripts
This commit is contained in:
17
etc/caseDicts/general/workflow/Allclean
Executable file
17
etc/caseDicts/general/workflow/Allclean
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Run from this directory
|
||||||
|
cd "${0%/*}" || exit 1
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. "$WM_PROJECT_DIR/bin/tools/CleanFunctions"
|
||||||
|
|
||||||
|
# Delete the following:
|
||||||
|
# - time directories
|
||||||
|
# - constant/polyMesh directory
|
||||||
|
# - postProcessing and VTK directories
|
||||||
|
# - log files
|
||||||
|
# - field files with a ".orig" backup
|
||||||
|
cleanCase
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
15
etc/caseDicts/general/workflow/Allmesh
Executable file
15
etc/caseDicts/general/workflow/Allmesh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Run from this directory
|
||||||
|
cd "${0%/*}" || exit 1
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
|
||||||
|
|
||||||
|
# Example workflow with meshing applications
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication topoSet
|
||||||
|
runApplication refineMesh -overwrite
|
||||||
|
runApplication transformPoints -scale "(0.01 0.01 0.01)"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
33
etc/caseDicts/general/workflow/Allrun
Executable file
33
etc/caseDicts/general/workflow/Allrun
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Run from this directory
|
||||||
|
cd "${0%/*}" || exit 1
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
|
||||||
|
|
||||||
|
# Example with runApplication:
|
||||||
|
# - runs blockMesh in background
|
||||||
|
# - redirecting standard output to log.blockMesh
|
||||||
|
# - does *not* run in log file already exists
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
# Example running topoSet and refineMesh 3 times with multiple dictionaries
|
||||||
|
# -a|-append option appends to log file
|
||||||
|
i=0
|
||||||
|
while [ "$i" -lt 3 ]
|
||||||
|
do
|
||||||
|
runApplication -a topoSet -dict "topoSetDict.${i}"
|
||||||
|
runApplication -a refineMesh -dict "refineMeshDict.${i}"
|
||||||
|
i=$(( i + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
runApplication decomposePar
|
||||||
|
|
||||||
|
# Example with runParallel to run in parallel
|
||||||
|
# getApplication finds solver name from "application" entry in controlDict
|
||||||
|
runParallel "$(getApplication)"
|
||||||
|
|
||||||
|
runApplication reconstructPar
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user