The template is designed to work with the new foamSetupCHT utility. It works simply for cases with a single fluid region (and multiple solid regions); it can also be adapted for cases with multiple fluid regions. For more information see the included README file.
28 lines
712 B
Bash
Executable File
28 lines
712 B
Bash
Executable File
#!/bin/sh
|
|
cd "${0%/*}" || exit 1 # run from this directory
|
|
|
|
# Source tutorial clean functions
|
|
. "$WM_PROJECT_DIR/bin/tools/CleanFunctions"
|
|
|
|
removeRegionDirs () {
|
|
# HACK to get regionDirs from materialProperties
|
|
_regionDirs="$(grep -E "^[a-Z]" constant/materialProperties | tail -n +2)"
|
|
|
|
for d in system constant
|
|
do
|
|
for r in $_regionDirs
|
|
do
|
|
dir="${d}/${r}"
|
|
[ -d "$dir" ] && rm -rf "$dir"
|
|
done
|
|
done
|
|
}
|
|
|
|
cleanCase
|
|
removeRegionDirs
|
|
rm -rf 0 > /dev/null 2>&1
|
|
rm -rf constant/regionProperties > /dev/null 2>&1
|
|
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
|
|
|
# ----------------------------------------------------------------- end-of-file
|