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:
Mark Olesen
2022-06-09 09:36:30 +02:00
parent d878ca3248
commit 7f748bd5fd
30 changed files with 151 additions and 148 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0

View File

@ -1,6 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh

View File

@ -1,10 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication ./Allmesh
# Run
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
cleanFaMesh
#------------------------------------------------------------------------------

View File

@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
cleanFaMesh
#------------------------------------------------------------------------------

View File

@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase
cleanFaMesh
#------------------------------------------------------------------------------

View File

@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
cleanFaMesh
rm -rf history
#------------------------------------------------------------------------------

View File

@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
cleanFaMesh
(cd makePerturbation && wclean)
rm -rf history

View File

@ -11,7 +11,7 @@ fi
restore0Dir
m4 < ./system/blockMeshDict.m4 > ./system/blockMeshDict
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -16,12 +16,11 @@ FoamFile
numberOfSubdomains 2;
method simple;
method simple;
coeffs
{
n ( 2 1 1 );
n ( 2 1 1 );
}
// ************************************************************************* //

View File

@ -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;
// ************************************************************************* //

View File

@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase
cleanFaMesh
#------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
m4 < system/blockMeshDict.m4 > system/blockMeshDict
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh

View File

@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
cleanFaMesh
(cd makeWave && wclean)
rm -rf history

View File

@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase
cleanFaMesh
#------------------------------------------------------------------------------

View File

@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase
cleanFaMesh
#------------------------------------------------------------------------------

View File

@ -7,7 +7,7 @@ restore0Dir
runApplication blockMesh
decompDict5="-decomposeParDict system/decomposeParDict-5"
decompDict5="-decomposeParDict system/decomposeParDict.5"
# redistributePar to do decomposition
runParallel -s decompose redistributePar -decompose

View File

@ -1,8 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase
rm *.obj
rm -f *.obj
#------------------------------------------------------------------------------

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh

View File

@ -5,8 +5,8 @@ cd "${0%/*}" || exit # Run from this directory
restore0Dir
# Create the underlying block mesh
m4 system/pachuka.m4 > system/blockMeshDict
# Create the mesh
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
# Create faceSet for burner inlet and faceZone for coupled wall

View File

@ -8,7 +8,7 @@
FoamFile
{
version 2.0;
format ascii;
`format' ascii;
class dictionary;
object blockMeshDict;
}
@ -16,8 +16,8 @@ FoamFile
scale 0.001;
changecom(//)changequote([,])
define(calc, [esyscmd(perl -e 'printf ($1)')])
changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'printf ($1)')]) dnl>
define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
@ -931,3 +931,5 @@ boundary
);
}
);
// ************************************************************************* //