mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: snappyHexMesh: add buffer layers before snapping
This commit is contained in:
@ -18,14 +18,14 @@ scale 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-1 -1 -1)
|
||||
( 2 -1 -1)
|
||||
( 2 0 -1)
|
||||
(-1 0 -1)
|
||||
(-1 -1 1)
|
||||
( 2 -1 1)
|
||||
( 2 0 1)
|
||||
(-1 0 1)
|
||||
(-1 -0.8 -1)
|
||||
( 2 -0.8 -1)
|
||||
( 2 -0.2 -1)
|
||||
(-1 -0.2 -1)
|
||||
(-1 -0.8 1)
|
||||
( 2 -0.8 1)
|
||||
( 2 -0.2 1)
|
||||
(-1 -0.2 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
@ -44,14 +44,30 @@ boundary
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
(1 5 4 0) //back
|
||||
(2 6 5 1) //outlet
|
||||
(0 4 7 3) //inlet
|
||||
(0 3 2 1) //lowerWall
|
||||
(4 5 6 7) //upperWall
|
||||
);
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type symmetryPlane;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
);
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type symmetryPlane;
|
||||
faces
|
||||
(
|
||||
(1 5 4 0) //back
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -5,14 +5,14 @@
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
version 2;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
@ -20,6 +20,7 @@ ddtSchemes
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
@ -28,14 +29,17 @@ divSchemes
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
wallDist
|
||||
|
||||
@ -16,6 +16,13 @@ FoamFile
|
||||
|
||||
solvers
|
||||
{
|
||||
"cellDisplacement.*"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
smoother GaussSeidel;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -14,6 +14,11 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Type of mesh generation:
|
||||
// - castellated (default)
|
||||
// - castellatedBufferLayer
|
||||
//type castellatedBufferLayer;
|
||||
|
||||
// Which of the steps to run
|
||||
castellatedMesh true;
|
||||
snap true;
|
||||
@ -427,6 +432,31 @@ castellatedMeshControls
|
||||
//nCellZoneErodeIter 2;
|
||||
}
|
||||
|
||||
|
||||
// Internal macro for mesh-motion solver to use
|
||||
_meshMotionSolver
|
||||
{
|
||||
solver displacementPointSmoothing;
|
||||
displacementPointSmoothingCoeffs
|
||||
{
|
||||
//// Use geometricElementTransform to maintain relative sizes
|
||||
//pointSmoother geometricElementTransform;
|
||||
//transformationParameter 0.667;
|
||||
//nPointSmootherIter 10;
|
||||
|
||||
// Use laplacian to untangle problem areas
|
||||
pointSmoother laplacian;
|
||||
nPointSmootherIter 10;
|
||||
|
||||
//relaxationFactors (1.0 0.8 0.6 0.4 0.2 0.0);
|
||||
//meshQuality
|
||||
//{
|
||||
// #includeEtc "caseDicts/meshQualityDict"
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Settings for the snapping.
|
||||
snapControls
|
||||
{
|
||||
@ -501,6 +531,10 @@ snapControls
|
||||
//- Attract points only to the surface they originate from. Default
|
||||
// false. This can improve snapping of intersecting surfaces.
|
||||
strictRegionSnap true;
|
||||
|
||||
|
||||
// Motion solver to use (when in castellatedBufferLayer)
|
||||
${_meshMotionSolver}
|
||||
}
|
||||
|
||||
// Settings for the layer addition.
|
||||
@ -601,19 +635,27 @@ addLayersControls
|
||||
// motion solvers. It needs specification of the solver to use and
|
||||
// its control dictionary.
|
||||
//meshShrinker displacementMotionSolver;
|
||||
//solver displacementLaplacian;
|
||||
//displacementLaplacianCoeffs
|
||||
//solver multiDisplacement;
|
||||
//solvers
|
||||
//{
|
||||
// diffusivity quadratic inverseDistance
|
||||
// (
|
||||
// sphere.stl_firstSolid
|
||||
// maxY
|
||||
// );
|
||||
// displacementLaplacian
|
||||
// {
|
||||
// // Note that e.g. displacementLaplacian needs entries in
|
||||
// // fvSchemes, fvSolution. Also specify a minIter > 1 when
|
||||
// // solving
|
||||
// // cellDisplacement since otherwise solution might not be
|
||||
// // sufficiently accurate on points.
|
||||
// solver displacementLaplacian;
|
||||
// diffusivity quadratic inverseDistance
|
||||
// (
|
||||
// aerofoil
|
||||
// );
|
||||
// }
|
||||
// displacementPointSmoothing
|
||||
// {
|
||||
// ${_meshMotionSolver}
|
||||
// }
|
||||
//}
|
||||
// Note that e.g. displacementLaplacian needs entries in
|
||||
// fvSchemes, fvSolution. Also specify a minIter > 1 when solving
|
||||
// cellDisplacement since otherwise solution might not be sufficiently
|
||||
// accurate on points.
|
||||
|
||||
|
||||
// Medial axis analysis (for use with default displacementMedialAxis)
|
||||
|
||||
Reference in New Issue
Block a user