mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Update foamyHexMesh tutorials
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user