ENH: Update foamyHexMesh tutorials
This commit is contained in:
parent
23ad2d08db
commit
9d2a0b25db
@ -36,10 +36,10 @@ geometry
|
||||
|
||||
backgroundMeshDecomposition
|
||||
{
|
||||
minLevels 0;
|
||||
sampleResolution 4;
|
||||
spanScale 20;
|
||||
maxCellWeightCoeff 20;
|
||||
minLevels 0;
|
||||
sampleResolution 4;
|
||||
spanScale 20;
|
||||
maxCellWeightCoeff 20;
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,16 @@ initialPoints
|
||||
|
||||
surfaceConformation
|
||||
{
|
||||
locationInMesh (0.1 0.1 0.2);
|
||||
locationInMesh (0.1 0.1 0.2);
|
||||
|
||||
featurePointControls
|
||||
{
|
||||
specialiseFeaturePoints off;
|
||||
edgeAiming off;
|
||||
guardFeaturePoints off;
|
||||
snapFeaturePoints off;
|
||||
circulateEdges off;
|
||||
}
|
||||
|
||||
geometryToConformTo
|
||||
{
|
||||
|
@ -4,16 +4,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication surfaceFeatureExtract
|
||||
|
||||
# Create tight-fitting background mesh
|
||||
runApplication blockMesh
|
||||
runApplication topoSet -dict system/topoSetDict-background
|
||||
mv log.topoSet log.topoSet.background
|
||||
runApplication subsetMesh background -patch walls -overwrite
|
||||
|
||||
runApplication cvMesh
|
||||
runApplication foamyHexMesh
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
runApplication checkMesh -latestTime -allGeometry -allTopology
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
@ -7,8 +7,6 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Get the number of processors to run on from system/decomposeParDict
|
||||
nProc=$(getNumberOfProcessors)
|
||||
|
||||
runApplication surfaceFeatureExtract
|
||||
|
||||
# Create tight-fitting background mesh
|
||||
runApplication blockMesh
|
||||
runApplication topoSet -dict system/topoSetDict-background
|
||||
@ -17,10 +15,11 @@ runApplication subsetMesh background -patch walls -overwrite
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel cvMesh $nProc
|
||||
runParallel foamyHexMesh $nProc
|
||||
runParallel collapseEdges $nProc -latestTime -collapseFaces
|
||||
runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
|
||||
|
||||
runApplication reconstructParMesh -latestTime
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
@ -4,11 +4,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication surfaceFeatureExtract
|
||||
|
||||
# Create tight-fitting background mesh
|
||||
runApplication blockMesh
|
||||
runApplication cvMesh
|
||||
runApplication foamyHexMesh
|
||||
|
||||
# Change collapseEdges to only do one iteration
|
||||
cp system/collapseDict system/collapseDict.org
|
||||
|
@ -26,29 +26,28 @@ geometry
|
||||
{
|
||||
name flange;
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
backgroundMeshDecomposition
|
||||
{
|
||||
minLevels 1;
|
||||
sampleResolution 4;
|
||||
spanScale 5;
|
||||
maxCellWeightCoeff 10;
|
||||
}
|
||||
|
||||
|
||||
surfaceConformation
|
||||
{
|
||||
locationInMesh (0 0 0);
|
||||
|
||||
geometryToConformTo
|
||||
{
|
||||
flange
|
||||
regions
|
||||
{
|
||||
featureMethod extractFeatures;
|
||||
includedAngle 140;
|
||||
patch1
|
||||
{
|
||||
name wall;
|
||||
}
|
||||
|
||||
patch2
|
||||
{
|
||||
name plate;
|
||||
}
|
||||
|
||||
patch3
|
||||
{
|
||||
name rings;
|
||||
}
|
||||
|
||||
patch4
|
||||
{
|
||||
name outlet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,13 +67,63 @@ initialPoints
|
||||
}
|
||||
|
||||
|
||||
surfaceConformation
|
||||
{
|
||||
locationInMesh (0 0 0);
|
||||
|
||||
geometryToConformTo
|
||||
{
|
||||
flange
|
||||
{
|
||||
featureMethod extractFeatures;
|
||||
includedAngle 140;
|
||||
|
||||
regions
|
||||
{
|
||||
wall
|
||||
{
|
||||
patchInfo
|
||||
{
|
||||
inGroups (groupFlange groupWalls);
|
||||
}
|
||||
}
|
||||
|
||||
plate
|
||||
{
|
||||
patchInfo
|
||||
{
|
||||
inGroups (groupFlange groupWalls);
|
||||
}
|
||||
}
|
||||
|
||||
rings
|
||||
{
|
||||
patchInfo
|
||||
{
|
||||
inGroups (groupFlange);
|
||||
}
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
patchInfo
|
||||
{
|
||||
type patch;
|
||||
inGroups (groupFlange);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
motionControl
|
||||
{
|
||||
defaultCellSize 0.0008;
|
||||
|
||||
minimumCellSizeCoeff 0;
|
||||
|
||||
// For background cell size and alignment grid
|
||||
maxSmoothingIterations 100;
|
||||
|
||||
maxRefinementIterations 0;
|
||||
@ -98,6 +147,28 @@ motionControl
|
||||
surfaceOffsetCoeff 2.5;
|
||||
linearDistanceCoeff 2.5;
|
||||
}
|
||||
|
||||
regions
|
||||
{
|
||||
rings
|
||||
{
|
||||
type searchableSurfaceControl;
|
||||
priority 2;
|
||||
mode inside;
|
||||
surfaceCellSizeFunction uniformValue;
|
||||
uniformValueCoeffs
|
||||
{
|
||||
surfaceCellSizeCoeff 0.5;
|
||||
}
|
||||
cellSizeFunction surfaceOffsetLinearDistance;
|
||||
surfaceOffsetLinearDistanceCoeffs
|
||||
{
|
||||
distanceCellSizeCoeff 1;
|
||||
surfaceOffsetCoeff 2;
|
||||
linearDistanceCoeff 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,6 +184,15 @@ motionControl
|
||||
}
|
||||
|
||||
|
||||
backgroundMeshDecomposition
|
||||
{
|
||||
minLevels 1;
|
||||
sampleResolution 4;
|
||||
spanScale 5;
|
||||
maxCellWeightCoeff 10;
|
||||
}
|
||||
|
||||
|
||||
meshQualityControls
|
||||
{
|
||||
#include "meshQualityDict"
|
||||
|
@ -18,26 +18,11 @@ runApplication surfaceOrient \
|
||||
constant/triSurface/coneAndSphere_clean_orient.obj
|
||||
mv log.surfaceOrient log.surfaceOrient.coneAndSphere
|
||||
|
||||
# Same for outside
|
||||
runApplication surfaceClean \
|
||||
constant/triSurface/domain.stl \
|
||||
1e-4 1e-6 \
|
||||
constant/triSurface/domain_clean.stl
|
||||
mv log.surfaceClean log.surfaceClean.domain
|
||||
runApplication surfaceOrient \
|
||||
constant/triSurface/domain_clean.stl \
|
||||
-inside '(0 -0.5 0)' \
|
||||
constant/triSurface/domain_clean_orient.stl
|
||||
mv log.surfaceOrient log.surfaceOrient.domain
|
||||
|
||||
unset FOAM_SIGFPE
|
||||
runApplication surfaceFeatureExtract
|
||||
|
||||
# Generate aligned points (in constant/internalDelaunayVertices) and a
|
||||
# mesh from that.
|
||||
runApplication foamyHexMesh
|
||||
|
||||
# Generate some sets for a bit of mesh inspection
|
||||
runApplication topoSet -time 0:100
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
@ -1,86 +0,0 @@
|
||||
solid ascii
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.7 -0.9 -1
|
||||
vertex -0.7 -0.9 1
|
||||
vertex -0.7 1.1 -1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.7 1.1 1
|
||||
vertex -0.7 1.1 -1
|
||||
vertex -0.7 -0.9 1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 0 0
|
||||
outer loop
|
||||
vertex 1.3 -0.9 -1
|
||||
vertex 1.3 1.1 -1
|
||||
vertex 1.3 -0.9 1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 -0 0
|
||||
outer loop
|
||||
vertex 1.3 1.1 1
|
||||
vertex 1.3 -0.9 1
|
||||
vertex 1.3 1.1 -1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex -0.7 -0.9 -1
|
||||
vertex 1.3 -0.9 -1
|
||||
vertex -0.7 -0.9 1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 1.3 -0.9 1
|
||||
vertex -0.7 -0.9 1
|
||||
vertex 1.3 -0.9 -1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex -0.7 1.1 -1
|
||||
vertex -0.7 1.1 1
|
||||
vertex 1.3 1.1 -1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 -0
|
||||
outer loop
|
||||
vertex 1.3 1.1 1
|
||||
vertex 1.3 1.1 -1
|
||||
vertex -0.7 1.1 1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex -0.7 -0.9 -1
|
||||
vertex -0.7 1.1 -1
|
||||
vertex 1.3 -0.9 -1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 1.3 1.1 -1
|
||||
vertex 1.3 -0.9 -1
|
||||
vertex -0.7 1.1 -1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 1
|
||||
outer loop
|
||||
vertex -0.7 -0.9 1
|
||||
vertex 1.3 -0.9 1
|
||||
vertex -0.7 1.1 1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 0 1
|
||||
outer loop
|
||||
vertex 1.3 1.1 1
|
||||
vertex -0.7 1.1 1
|
||||
vertex 1.3 -0.9 1
|
||||
endloop
|
||||
endfacet
|
||||
endsolid
|
@ -7,10 +7,11 @@
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object collapseDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object collapseDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -5,24 +5,17 @@
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
location "system";
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom latestTime;
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
|
@ -27,25 +27,29 @@ geometry
|
||||
}
|
||||
|
||||
// Outside of domain
|
||||
domain_clean_orient.stl
|
||||
domain
|
||||
{
|
||||
name domain;
|
||||
type triSurfaceMesh;
|
||||
regions
|
||||
{
|
||||
ascii{ name domain_patch0; }
|
||||
}
|
||||
type searchableBox;
|
||||
min (-0.7 -0.9 -1);
|
||||
max (1.3 1.1 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Controls for conforming to the surfaces.
|
||||
surfaceConformation
|
||||
{
|
||||
// A point inside surfaces that is inside mesh.
|
||||
locationInMesh (0 -0.5 0);
|
||||
|
||||
featurePointControls
|
||||
{
|
||||
specialiseFeaturePoints on;
|
||||
edgeAiming on;
|
||||
guardFeaturePoints off;
|
||||
snapFeaturePoints on;
|
||||
circulateEdges off;
|
||||
}
|
||||
|
||||
// Geometry to mesh to
|
||||
geometryToConformTo
|
||||
{
|
||||
@ -53,94 +57,43 @@ surfaceConformation
|
||||
{
|
||||
featureMethod extractFeatures;
|
||||
includedAngle 140;
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "coneAndSphere_clean_orient.extendedFeatureEdgeMesh";
|
||||
}
|
||||
|
||||
domain
|
||||
{
|
||||
featureMethod extractFeatures;
|
||||
includedAngle 125;
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "domain_clean_orient.extendedFeatureEdgeMesh";
|
||||
includedAngle 100;
|
||||
mode outside;
|
||||
}
|
||||
}
|
||||
|
||||
additionalFeatures
|
||||
{}
|
||||
}
|
||||
|
||||
|
||||
// Controls for seeding initial points and general control of the target
|
||||
// cell size (used everywhere)
|
||||
initialPoints
|
||||
{
|
||||
initialPointsMethod autoDensity;
|
||||
// initialPointsMethod uniformGrid;
|
||||
// initialPointsMethod bodyCentredCubic;
|
||||
// initialPointsMethod pointFile;
|
||||
|
||||
// Take boundbox of all geometry. Samples with this box. If too much
|
||||
// samples (due to target cell size) in box split box.
|
||||
autoDensityCoeffs
|
||||
{
|
||||
minCellSizeLimit 0.1;
|
||||
// Initial number of refinement levels. Needs to be enough to pick
|
||||
// up features due to size ratio. If not enough it will take longer
|
||||
// to determine point seeding.
|
||||
minLevels 4;
|
||||
// Split box if ratio of min to max cell size larger than maxSizeRatio
|
||||
maxSizeRatio 5.0;
|
||||
// Per box sample 3x3x3 internally
|
||||
sampleResolution 3;
|
||||
// Additionally per face of the box sample 3
|
||||
minCellSizeLimit 0.1;
|
||||
minLevels 4;
|
||||
maxSizeRatio 5.0;
|
||||
sampleResolution 3;
|
||||
surfaceSampleResolution 3;
|
||||
}
|
||||
|
||||
uniformGridCoeffs
|
||||
{
|
||||
// Absolute cell size.
|
||||
initialCellSize 0.0015;
|
||||
randomiseInitialGrid yes;
|
||||
randomPerturbationCoeff 0.02;
|
||||
}
|
||||
|
||||
bodyCentredCubicCoeffs
|
||||
{
|
||||
initialCellSize 0.0015;
|
||||
randomiseInitialGrid no;
|
||||
randomPerturbationCoeff 0.1;
|
||||
}
|
||||
|
||||
pointFileCoeffs
|
||||
{
|
||||
// Reads points from file. Still rejects points that are too
|
||||
// close to the surface (minimumSurfaceDistanceCoeff) or on the
|
||||
// wrong side of the surfaces.
|
||||
pointFile "constant/internalDelaunayVertices";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Control size of voronoi cells i.e. distance between points. This
|
||||
// determines the target cell size which is used everywhere.
|
||||
// It determines the cell size given a location. It then uses all
|
||||
// the rules
|
||||
// - defaultCellSize
|
||||
// - cellSizeControlGeometry
|
||||
// to determine target cell size. Rule with highest priority wins. If same
|
||||
// priority smallest cell size wins.
|
||||
motionControl
|
||||
{
|
||||
// Absolute cell size of back ground mesh. This is the maximum cell size.
|
||||
defaultCellSize 0.1;
|
||||
|
||||
minimumCellSizeCoeff 0;
|
||||
|
||||
// For background cell size and alignment grid
|
||||
maxSmoothingIterations 100;
|
||||
maxSmoothingIterations 100;
|
||||
|
||||
maxRefinementIterations 0;
|
||||
maxRefinementIterations 0;
|
||||
|
||||
shapeControlFunctions
|
||||
{
|
||||
@ -197,7 +150,10 @@ polyMeshFiltering
|
||||
}
|
||||
|
||||
|
||||
#include "meshQualityDict";
|
||||
meshQualityControls
|
||||
{
|
||||
#include "meshQualityDict"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -1,57 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object surfaceFeatureExtractDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
coneAndSphere_clean_orient.obj
|
||||
{
|
||||
extractionMethod extractFromSurface;
|
||||
|
||||
extractFromSurfaceCoeffs
|
||||
{
|
||||
// Mark edges whose adjacent surface normals are at an angle less
|
||||
// than includedAngle as features
|
||||
// - 0 : selects no edges
|
||||
// - 180: selects all edges
|
||||
includedAngle 125;
|
||||
}
|
||||
|
||||
// Write options
|
||||
|
||||
// Write features to obj format for postprocessing
|
||||
writeObj no;
|
||||
}
|
||||
|
||||
|
||||
domain_clean_orient.stl
|
||||
{
|
||||
extractionMethod extractFromSurface;
|
||||
|
||||
extractFromSurfaceCoeffs
|
||||
{
|
||||
// Mark edges whose adjacent surface normals are at an angle less
|
||||
// than includedAngle as features
|
||||
// - 0 : selects no edges
|
||||
// - 180: selects all edges
|
||||
includedAngle 125;
|
||||
}
|
||||
|
||||
// Write options
|
||||
|
||||
// Write features to obj format for postprocessing
|
||||
writeObj no;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user