ENH: snappyHexMesh: add buffer layers before snapping

This commit is contained in:
Mattijs Janssens
2024-12-12 16:13:32 +00:00
parent e7cf8a1d59
commit de5d34787c
231 changed files with 46574 additions and 963 deletions

View File

@ -127,16 +127,56 @@ faces
boundary
(
walls
minX
{
type wall;
type patch;
faces
(
(1 0) // block 1: x-min
);
}
maxX
{
type patch;
faces
(
(2 1) // block 2: x-max
);
}
minY
{
type patch;
faces
(
(3 2) // block 3: y-min
);
}
maxY
{
type patch;
faces
(
(4 3) // block 4: y-max
);
}
minZ
{
type patch;
faces
(
(5 4) // block 5: z-min
);
}
maxZ
{
type patch;
faces
(
(6 5) // block 6: z-max
);
}

View File

@ -14,6 +14,11 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DebugSwitches
{
pointBoundaryMesh 1;
}
application blockMesh;
startFrom startTime;
@ -22,9 +27,9 @@ startTime 0;
stopAt endTime;
endTime 0;
endTime 20;
deltaT 0;
deltaT 1;
writeControl timeStep;

View File

@ -0,0 +1,24 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- The total number of domains (mandatory)
numberOfSubdomains 2;
//- The decomposition method (mandatory)
method scotch;
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// What to extrude:
// patch : from patch of another case ('sourceCase')
// mesh : as above but with original case included
// surface : from externally read surface
constructFrom mesh;
// If construct from patch/mesh:
sourceCase "<case>";
// and one of sourcePatches or sourceFaceZones (but not both):
//sourceFaceZones (someFacesZone);
sourcePatches (".*");
// Flip surface normals before usage. Valid only for extrude from surface or
// patch.
flipNormals false;
//- Linear extrusion in point-normal direction
extrudeModel linearNormal;
nLayers 1;
expansionRatio 1.0;
linearNormalCoeffs
{
thickness 1e-6;
}
// Do front and back need to be merged? Usually only makes sense for 360
// degree wedges.
mergeFaces false;
// Merge small edges. Fraction of bounding box.
mergeTol 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -18,19 +18,27 @@ ddtSchemes
{}
gradSchemes
{}
{
default Gauss linear;
}
divSchemes
{}
laplacianSchemes
{}
{
default Gauss linear corrected;
}
interpolationSchemes
{}
{
default linear;
}
snGradSchemes
{}
{
default corrected;
}
// ************************************************************************* //

View File

@ -14,5 +14,20 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"cellDisplacement.*"
{
solver GAMG;
tolerance 1e-08;
relTol 0;
smoother GaussSeidel;
}
}
PIMPLE
{}
// ************************************************************************* //

View File

@ -0,0 +1,33 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
box222.obj
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 135;
// Write features to obj format for postprocessing
writeObj yes;
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boundaryToCell;
}
{
name c0;
type cellSet;
action subset;
source boxToCell;
sourceInfo
{
box (-100 -100 -100) (0 100 100);
}
}
{
name c0;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.3 -0.3 -0.3) (0 0 0);
}
}
);
// ************************************************************************* //