mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: CleanFunctions refinements
- include constant/faMesh cleanup (cleanFaMesh) as part of standard cleanCase - simplify cleanPolyMesh function to now just warn about old constant/polyMesh/blockMeshDict but not try to remove anything - cleanup cellDist.vtu (decomposePar -dry-run) as well ENH: foamRunTutorials - fallback to Allrun-parallel, Allrun-serial TUT: call m4 with file argument instead of redirected stdin TUT: adjust suffixes on decomposeParDict variants
This commit is contained in:
@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
# Restore default dictionaries
|
# Restore default dictionaries
|
||||||
cp system/decomposeParDict-2 system/decomposeParDict
|
cp system/decomposeParDict.2 system/decomposeParDict
|
||||||
cp system/controlDict-startTime system/controlDict
|
cp system/controlDict-startTime system/controlDict
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,12 +5,12 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
runApplication decomposePar -decomposeParDict system/decomposeParDict-2
|
runApplication decomposePar -decomposeParDict system/decomposeParDict.2
|
||||||
|
|
||||||
runParallel -s scotch -np 5 redistributePar \
|
runParallel -s scotch -decomposeParDict system/decomposeParDict.5 \
|
||||||
-decomposeParDict system/decomposeParDict-5
|
redistributePar
|
||||||
|
|
||||||
runParallel -np 5 Test-mapDistributePolyMesh \
|
runParallel -decomposeParDict system/decomposeParDict.5 \
|
||||||
-decomposeParDict system/decomposeParDict-5
|
Test-mapDistributePolyMesh
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -7,22 +7,10 @@
|
|||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2022 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# foamCleanPolyMesh
|
# foamCleanPolyMesh
|
||||||
@ -76,34 +64,33 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
meshDir=polyMesh
|
||||||
if [ -n "$regionName" ]
|
if [ -n "$regionName" ]
|
||||||
then
|
then
|
||||||
meshDir=$regionName/polyMesh
|
meshDir="$regionName/$meshDir"
|
||||||
else
|
|
||||||
meshDir=polyMesh
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If -case was specified: insist upon 'constant/polyMesh'
|
# If -case was specified: insist upon 'constant/polyMesh'
|
||||||
if [ -n "$caseDir" ]
|
if [ -n "$caseDir" ]
|
||||||
then
|
then
|
||||||
if [ -d constant/$meshDir ]
|
if [ -d constant/"$meshDir" ]
|
||||||
then
|
then
|
||||||
# Use constant/polyMesh
|
# Use constant/polyMesh
|
||||||
meshDir=constant/$meshDir
|
meshDir=constant/"$meshDir"
|
||||||
else
|
else
|
||||||
echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2
|
echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -d constant/$meshDir ]
|
if [ -d constant/"$meshDir" ]
|
||||||
then
|
then
|
||||||
# Use constant/polyMesh
|
# Use constant/polyMesh
|
||||||
meshDir=constant/$meshDir
|
meshDir=constant/"$meshDir"
|
||||||
elif [ -d $meshDir ]
|
elif [ -d "$meshDir" ]
|
||||||
then
|
then
|
||||||
# Likely already in constant/ - do not adjust anything
|
# Likely already in constant/ - do not adjust anything
|
||||||
:
|
:
|
||||||
elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ]
|
elif [ "${PWD##*/}" = polyMesh ] && [ -z "$regionName" ]
|
||||||
then
|
then
|
||||||
# Apparently already within polyMesh/
|
# Apparently already within polyMesh/
|
||||||
meshDir=.
|
meshDir=.
|
||||||
@ -135,7 +122,7 @@ for i in \
|
|||||||
surfaceIndex \
|
surfaceIndex \
|
||||||
;
|
;
|
||||||
do
|
do
|
||||||
rm -rf $meshDir/$i $meshDir/$i.gz
|
rm -rf "$meshDir/$i" "$meshDir/$i.gz"
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
# using Allclean, Allwclean (when present) or regular cleanCase.
|
# using Allclean, Allwclean (when present) or regular cleanCase.
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
. "${WM_PROJECT_DIR:?}"/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
|
||||||
thisScript="$0"
|
thisScript="$0"
|
||||||
if [ "/${thisScript#/}" != "$thisScript" ]
|
if [ "/${thisScript#/}" != "$thisScript" ]
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# Copyright (C) 2018-2021 OpenCFD Ltd.
|
# Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
@ -24,7 +24,7 @@
|
|||||||
# When this is detected, the case will be skipped.
|
# When this is detected, the case will be skipped.
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. "${WM_PROJECT_DIR:?}"/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
|
||||||
# Normally use standard "make"
|
# Normally use standard "make"
|
||||||
make="make"
|
make="make"
|
||||||
@ -44,11 +44,12 @@ options:
|
|||||||
-serial Prefer Allrun-serial if available
|
-serial Prefer Allrun-serial if available
|
||||||
-parallel Prefer Allrun-parallel if available
|
-parallel Prefer Allrun-parallel if available
|
||||||
-test Prefer Alltest script, pass -test argument to scripts
|
-test Prefer Alltest script, pass -test argument to scripts
|
||||||
-self Avoid initial Allrun, Alltest scripts
|
-self Avoid initial Allrun / Alltest scripts
|
||||||
(prevent infinite recursion)
|
(prevent infinite recursion)
|
||||||
-help Print the usage
|
-help Print the usage
|
||||||
|
|
||||||
Recursively run Allrun/Alltest (or blockMesh + application)
|
Recursively run Alltest / Allrun / Allrun-parallel / Allrun-serial
|
||||||
|
(or simply blockMesh + application)
|
||||||
starting from the current directory or the specified -case directory.
|
starting from the current directory or the specified -case directory.
|
||||||
|
|
||||||
Equivalent options:
|
Equivalent options:
|
||||||
@ -74,7 +75,7 @@ die()
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
unset passArgs runTests runType skipSelf
|
unset passArgs runTest runType skipSelf
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
@ -95,7 +96,7 @@ do
|
|||||||
|
|
||||||
-test)
|
-test)
|
||||||
passArgs="-test"
|
passArgs="-test"
|
||||||
runTests=true
|
runTest=true
|
||||||
;;
|
;;
|
||||||
|
|
||||||
## long-option (internal dispatch form)
|
## long-option (internal dispatch form)
|
||||||
@ -139,30 +140,34 @@ done
|
|||||||
if [ -z "$skipSelf" ]
|
if [ -z "$skipSelf" ]
|
||||||
then
|
then
|
||||||
# Use specialized script(s)
|
# Use specialized script(s)
|
||||||
if [ "$runTests" = true ] && [ -f Alltest ]
|
if [ -n "$runTest" ] && [ -f ./Alltest ]
|
||||||
then
|
then
|
||||||
./Alltest $passArgs $*
|
./Alltest $passArgs $*
|
||||||
exit "$?"
|
exit "$?"
|
||||||
elif [ -f Allrun-optional ]
|
elif [ -f ./Allrun-optional ]
|
||||||
then
|
then
|
||||||
echo "Skipped optional case $PWD"
|
echo "Skipped optional case $PWD"
|
||||||
exit 0
|
exit 0
|
||||||
|
elif [ -n "$runType" ]
|
||||||
|
then
|
||||||
|
# Prefer -serial or -parallel when available?
|
||||||
|
allRun="Allrun-$runType"
|
||||||
|
if [ -f ./"$allRun" ]
|
||||||
|
then
|
||||||
|
./"$allRun" $passArgs $*
|
||||||
|
exit "$?"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prefer -serial or -parallel when available?
|
# Otherwise use Allrun or Allrun-parallel or Allrun-serial
|
||||||
if [ -n "$runType" ]
|
for allRun in Allrun Allrun-parallel Allrun-serial
|
||||||
|
do
|
||||||
|
if [ -f ./"$allRun" ]
|
||||||
then
|
then
|
||||||
if [ -f ./"Allrun-${runType}" ]
|
./"$allRun" $passArgs $*
|
||||||
then
|
|
||||||
./"Allrun-${runType}" $passArgs $*
|
|
||||||
exit "$?"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ -f ./Allrun ]
|
|
||||||
then
|
|
||||||
./Allrun $passArgs $*
|
|
||||||
exit "$?"
|
exit "$?"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# Copyright (C) 2015-2021 OpenCFD Ltd.
|
# Copyright (C) 2015-2022 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
@ -105,6 +105,54 @@ cleanPostProcessing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cleanFaMesh()
|
||||||
|
{
|
||||||
|
if [ -e constant/faMesh ]
|
||||||
|
then
|
||||||
|
if [ -e constant/faMesh/faMeshDefinition ]
|
||||||
|
then
|
||||||
|
# Old constant/faMesh location for faMeshDefinition still in use:
|
||||||
|
# - warn but don't remove anything
|
||||||
|
echo
|
||||||
|
echo "Warning: not removing constant/faMesh/"
|
||||||
|
echo " It contains a 'faMeshDefinition' file"
|
||||||
|
echo " Relocate the file(s) to system/ to avoid this warning"
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
# Can remove constant/faMesh/ entirely (no faMeshDefinition)
|
||||||
|
rm -rf constant/faMesh
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cleanPolyMesh()
|
||||||
|
{
|
||||||
|
if [ -e constant/polyMesh ]
|
||||||
|
then
|
||||||
|
if [ -e constant/polyMesh/blockMeshDict ] \
|
||||||
|
|| [ -e constant/polyMesh/blockMeshDict.m4 ]
|
||||||
|
then
|
||||||
|
# Old constant/polyMesh location for blockMeshDict still in use:
|
||||||
|
# - warn but don't remove anything
|
||||||
|
echo
|
||||||
|
echo "Warning: not removing constant/polyMesh/"
|
||||||
|
echo " It contains a 'blockMeshDict' or 'blockMeshDict.m4' file"
|
||||||
|
echo " Relocate the file(s) to system/ to avoid this warning"
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
# Can remove constant/polyMesh/ entirely (no blockMeshDict)
|
||||||
|
rm -rf constant/polyMesh
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e system/blockMeshDict.m4 ]
|
||||||
|
then
|
||||||
|
rm -f system/blockMeshDict
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cleanCase()
|
cleanCase()
|
||||||
{
|
{
|
||||||
cleanTimeDirectories
|
cleanTimeDirectories
|
||||||
@ -114,6 +162,10 @@ cleanCase()
|
|||||||
cleanOptimisation
|
cleanOptimisation
|
||||||
cleanPostProcessing
|
cleanPostProcessing
|
||||||
|
|
||||||
|
cleanFaMesh
|
||||||
|
cleanPolyMesh
|
||||||
|
cleanSnappyFiles
|
||||||
|
|
||||||
rm -rf processor*
|
rm -rf processor*
|
||||||
rm -rf TDAC
|
rm -rf TDAC
|
||||||
rm -rf probes*
|
rm -rf probes*
|
||||||
@ -122,15 +174,15 @@ cleanCase()
|
|||||||
rm -rf sets
|
rm -rf sets
|
||||||
rm -rf system/machines
|
rm -rf system/machines
|
||||||
|
|
||||||
# Possible blockMesh output
|
# Debug output (blockMesh, decomposePar)
|
||||||
rm -f blockTopology.vtu blockFaces.vtp blockTopology.obj blockCentres.obj
|
rm -f \
|
||||||
|
blockTopology.vtu blockFaces.vtp blockTopology.obj blockCentres.obj \
|
||||||
|
cellDist.vtu \
|
||||||
|
0/cellDist
|
||||||
|
|
||||||
# From mpirunDebug
|
# From mpirunDebug
|
||||||
rm -f gdbCommands mpirun.schema
|
rm -f gdbCommands mpirun.schema
|
||||||
|
|
||||||
cleanSnappyFiles
|
|
||||||
rm -f 0/cellDist
|
|
||||||
|
|
||||||
(
|
(
|
||||||
cd constant 2>/dev/null || exit 0
|
cd constant 2>/dev/null || exit 0
|
||||||
|
|
||||||
@ -138,33 +190,7 @@ cleanCase()
|
|||||||
cellDecomposition cellToRegion cellLevel* pointLevel* \
|
cellDecomposition cellToRegion cellLevel* pointLevel* \
|
||||||
tetDualMesh \
|
tetDualMesh \
|
||||||
;
|
;
|
||||||
|
|
||||||
# Old constant/polyMesh location for blockMeshDict still in use?
|
|
||||||
# - emit a gentle warning
|
|
||||||
if [ -e polyMesh/blockMeshDict.m4 ]
|
|
||||||
then
|
|
||||||
rm -f polyMesh/blockMeshDict
|
|
||||||
echo
|
|
||||||
echo "Warning: not removing constant/polyMesh/"
|
|
||||||
echo " It contains a 'blockMeshDict.m4' file."
|
|
||||||
echo " Relocate the file to system/ to avoid this warning"
|
|
||||||
echo
|
|
||||||
elif [ -e polyMesh/blockMeshDict ]
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo "Warning: not removing constant/polyMesh/"
|
|
||||||
echo " It contains a 'blockMeshDict' file."
|
|
||||||
echo " Relocate the file to system/ to avoid this warning"
|
|
||||||
else
|
|
||||||
# Remove polyMesh entirely if there is no blockMeshDict
|
|
||||||
rm -rf polyMesh
|
|
||||||
fi
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ -e system/blockMeshDict.m4 ]
|
|
||||||
then
|
|
||||||
rm -f system/blockMeshDict
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -195,29 +221,6 @@ cleanUcomponents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cleanFaMesh()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
cd constant 2>/dev/null || exit 0
|
|
||||||
|
|
||||||
# Old constant/polyMesh location for blockMeshDict still in use?
|
|
||||||
# - emit a gentle warning
|
|
||||||
if [ -e faMesh/faMeshDefinition ]
|
|
||||||
then
|
|
||||||
rm -f faMesh/faceLabels* faMesh/faBoundary*
|
|
||||||
echo
|
|
||||||
echo "Warning: not removing the constant/faMesh/ directory"
|
|
||||||
echo " It contains a 'faMeshDefinition' file"
|
|
||||||
echo " Relocate the file to system/ to avoid this warning"
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
# Remove faMesh/ entirely if there is no faMeshDefinition
|
|
||||||
rm -rf faMesh
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
cleanApplication()
|
cleanApplication()
|
||||||
{
|
{
|
||||||
echo "Cleaning application $PWD"
|
echo "Cleaning application $PWD"
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
runApplication ./Allmesh
|
runApplication ./Allmesh
|
||||||
|
|
||||||
# Run
|
|
||||||
runApplication $(getApplication)
|
runApplication $(getApplication)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
rm -rf history
|
rm -rf history
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
(cd makePerturbation && wclean)
|
(cd makePerturbation && wclean)
|
||||||
|
|
||||||
rm -rf history
|
rm -rf history
|
||||||
|
|||||||
@ -11,7 +11,7 @@ fi
|
|||||||
|
|
||||||
restore0Dir
|
restore0Dir
|
||||||
|
|
||||||
m4 < ./system/blockMeshDict.m4 > ./system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -23,5 +23,4 @@ coeffs
|
|||||||
n ( 2 1 1 );
|
n ( 2 1 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2206 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 4;
|
||||||
|
|
||||||
|
method scotch;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
m4 < system/blockMeshDict.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
(cd makeWave && wclean)
|
(cd makeWave && wclean)
|
||||||
|
|
||||||
rm -rf history
|
rm -rf history
|
||||||
|
|||||||
@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
cleanFaMesh
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,7 @@ restore0Dir
|
|||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
decompDict5="-decomposeParDict system/decomposeParDict-5"
|
decompDict5="-decomposeParDict system/decomposeParDict.5"
|
||||||
|
|
||||||
# redistributePar to do decomposition
|
# redistributePar to do decomposition
|
||||||
runParallel -s decompose redistributePar -decompose
|
runParallel -s decompose redistributePar -decompose
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
rm *.obj
|
|
||||||
|
rm -f *.obj
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
restore0Dir
|
restore0Dir
|
||||||
|
|
||||||
# Create the underlying block mesh
|
# Create the mesh
|
||||||
m4 system/pachuka.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
# Create faceSet for burner inlet and faceZone for coupled wall
|
# Create faceSet for burner inlet and faceZone for coupled wall
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
FoamFile
|
FoamFile
|
||||||
{
|
{
|
||||||
version 2.0;
|
version 2.0;
|
||||||
format ascii;
|
`format' ascii;
|
||||||
class dictionary;
|
class dictionary;
|
||||||
object blockMeshDict;
|
object blockMeshDict;
|
||||||
}
|
}
|
||||||
@ -16,8 +16,8 @@ FoamFile
|
|||||||
|
|
||||||
scale 0.001;
|
scale 0.001;
|
||||||
|
|
||||||
changecom(//)changequote([,])
|
changecom(//)changequote([,]) dnl>
|
||||||
define(calc, [esyscmd(perl -e 'printf ($1)')])
|
define(calc, [esyscmd(perl -e 'printf ($1)')]) dnl>
|
||||||
define(VCOUNT, 0)
|
define(VCOUNT, 0)
|
||||||
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
|
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
|
||||||
|
|
||||||
@ -931,3 +931,5 @@ boundary
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user