mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: blockMesh mergePatchPairs fails with edge-shared points (fixes #2589)
- remedy by performing the attach() action sequentially (as per stitchMesh changes). This ensures that the current point addressing is always used and avoids references to the already-merged points (which is what causes the failure). ENH: improve handling of empty patch removal - only remove empty *merged* patches, but leave any other empty patches untouched since they may intentional placeholders for other parts of a workflow. - remove any empty point/face zones created for patch merging
This commit is contained in:
10
tutorials/mesh/blockMesh/mergePairs/Allclean
Executable file
10
tutorials/mesh/blockMesh/mergePairs/Allclean
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
|
||||
rm -rf constant
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
8
tutorials/mesh/blockMesh/mergePairs/Allrun
Executable file
8
tutorials/mesh/blockMesh/mergePairs/Allrun
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
119
tutorials/mesh/blockMesh/mergePairs/system/blockMeshDict
Normal file
119
tutorials/mesh/blockMesh/mergePairs/system/blockMeshDict
Normal file
@ -0,0 +1,119 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
// Block d
|
||||
( 50 -17 -12.5)
|
||||
(100 -17 -12.5)
|
||||
(100 -2 -12.5)
|
||||
( 50 -2 -12.5)
|
||||
( 50 -17 12.5)
|
||||
(100 -17 12.5)
|
||||
(100 -2 12.5)
|
||||
( 50 -2 12.5)
|
||||
|
||||
// Block e
|
||||
( 0 -17 -12.5)
|
||||
( 50 -17 -12.5)
|
||||
( 50 -2 -12.5)
|
||||
( 0 -2 -12.5)
|
||||
( 0 -17 12.5)
|
||||
( 50 -17 12.5)
|
||||
( 50 -2 12.5)
|
||||
( 0 -2 12.5)
|
||||
|
||||
// Block f
|
||||
( 0 -19 -12.5)
|
||||
( 50 -19 -12.5)
|
||||
( 50 -17 -12.5)
|
||||
( 0 -17 -12.5)
|
||||
( 0 -19 12.5)
|
||||
( 50 -19 12.5)
|
||||
( 50 -17 12.5)
|
||||
( 0 -17 12.5)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// Block d
|
||||
hex (0 1 2 3 4 5 6 7) block-d (4 5 4) grading (1 1 1)
|
||||
|
||||
// Block e
|
||||
hex (8 9 10 11 12 13 14 15) block-e (4 4 4) grading (1 1 1)
|
||||
|
||||
// Block f
|
||||
hex (16 17 18 19 20 21 22 23) block-f (5 4 4) grading (1 1 1)
|
||||
);
|
||||
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
boundary
|
||||
(
|
||||
mid6
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 0) // Block d
|
||||
);
|
||||
}
|
||||
mid7
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(1 1) // Block e
|
||||
);
|
||||
}
|
||||
mid8
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(1 2) // Block e
|
||||
);
|
||||
}
|
||||
mid9
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 3) // Block e
|
||||
);
|
||||
}
|
||||
|
||||
other
|
||||
{
|
||||
type patch;
|
||||
faces ();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
(mid6 mid7)
|
||||
(mid8 mid9)
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
48
tutorials/mesh/blockMesh/mergePairs/system/controlDict
Normal file
48
tutorials/mesh/blockMesh/mergePairs/system/controlDict
Normal file
@ -0,0 +1,48 @@
|
||||
/*--------------------------------*- 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 controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application blockMesh;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0;
|
||||
|
||||
deltaT 0;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user