mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'cvm'
This commit is contained in:
@ -26,4 +26,3 @@ fields
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -6,4 +6,3 @@ species
|
||||
|
||||
reactions
|
||||
{}
|
||||
|
||||
|
||||
48
tutorials/mesh/cvMesh/car/Allrun
Executable file
48
tutorials/mesh/cvMesh/car/Allrun
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
surfacePointMerge constant/triSurface/m_car01_wheels.obj \
|
||||
1e-2 constant/triSurface/m_car01_wheels_merge.obj \
|
||||
> log.surfacePointMerge 2>&1
|
||||
|
||||
# Orient so point to be meshed is inside surface
|
||||
surfaceOrient \
|
||||
constant/triSurface/m_car01_wheels_merge.obj \
|
||||
-inside -usePierceTest '(13 -200 149)' \
|
||||
constant/triSurface/m_car01_wheels_merge_orient.obj \
|
||||
> log.surfaceOrient.m_car01 2>&1
|
||||
|
||||
# Same for outside
|
||||
surfaceOrient \
|
||||
constant/triSurface/domain.stl \
|
||||
-inside -usePierceTest '(13 -200 149)' \
|
||||
constant/triSurface/domain_orient.stl \
|
||||
> log.surfaceOrient.domain 2>&1
|
||||
|
||||
# Extract feature edges and points
|
||||
runApplication surfaceFeatureExtract \
|
||||
constant/triSurface/m_car01_wheels_merge_orient.obj \
|
||||
m_car01 -includedAngle 125 -writeObj
|
||||
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.m_car01
|
||||
|
||||
unset FOAM_SIGFPE
|
||||
runApplication surfaceFeatureExtract \
|
||||
constant/triSurface/domain_orient.stl \
|
||||
domain -includedAngle 125 -writeObj
|
||||
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.domain
|
||||
|
||||
# Generate aligned points (in constant/internalDelaunayVertices) and a
|
||||
# mesh from that.
|
||||
runApplication cvMesh
|
||||
|
||||
# Generate some sets for a bit of mesh inspection
|
||||
runApplication topoSet -constant -time 0:100
|
||||
|
||||
# And a field for thresholding
|
||||
writeCellCentres -constant
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
BIN
tutorials/mesh/cvMesh/car/constant/triSurface/domain.stl
Normal file
BIN
tutorials/mesh/cvMesh/car/constant/triSurface/domain.stl
Normal file
Binary file not shown.
4668
tutorials/mesh/cvMesh/car/constant/triSurface/m_car01.obj
Normal file
4668
tutorials/mesh/cvMesh/car/constant/triSurface/m_car01.obj
Normal file
File diff suppressed because it is too large
Load Diff
54
tutorials/mesh/cvMesh/car/system/controlDict
Normal file
54
tutorials/mesh/cvMesh/car/system/controlDict
Normal file
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0; //80;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1000; //10 to see the meshing steps
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
473
tutorials/mesh/cvMesh/car/system/cvMeshDict
Normal file
473
tutorials/mesh/cvMesh/car/system/cvMeshDict
Normal file
@ -0,0 +1,473 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object cvMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Control dictionary for cvMesh - polyhedral mesh generator.
|
||||
|
||||
cvMesh phases:
|
||||
1. fill volume with initial points (initialPoints subdictionary). An option
|
||||
is to reread from previous set of points.
|
||||
|
||||
2. internal point motion (motionControl subdictionary)
|
||||
|
||||
3. every once in a while add point duplets/triplets to conform to
|
||||
surfaces and features (surfaceConformation subdictionary)
|
||||
|
||||
4. back to 2
|
||||
|
||||
5. construct polyMesh.
|
||||
- filter (polyMeshFiltering subdictionary)
|
||||
- check (meshQualityControls subdictionary) and undo filtering
|
||||
|
||||
|
||||
See also cvControls.H in the conformalVoronoiMesh library
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// Important:
|
||||
// ----------
|
||||
// Any scalar with a name <name>Coeff specifies a value that will be implemented
|
||||
// as a faction of the local target cell size
|
||||
// Any scalar with a name <name>Size specifies an absolute size.
|
||||
|
||||
|
||||
// Geometry. Definition of all surfaces. All surfaces are of class
|
||||
// searchableSurface.
|
||||
// Surfaces need to be (almost) closed - use closedTriSurfaceMesh
|
||||
// if they are not topologically closed. Surfaces need to be oriented so
|
||||
// the space to be meshed is always on the inside of all surfaces. Use e.g.
|
||||
// surfaceOrient.
|
||||
geometry
|
||||
{
|
||||
// Internal shape
|
||||
m_car01_wheels_merge_orient.obj
|
||||
{
|
||||
name m_car01;
|
||||
type closedTriSurfaceMesh;
|
||||
}
|
||||
|
||||
// Outside of domain
|
||||
domain_orient.stl
|
||||
{
|
||||
name domain;
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Controls for conforming to the surfaces.
|
||||
surfaceConformation
|
||||
{
|
||||
// A point inside surfaces that is inside mesh.
|
||||
locationInMesh (13 -200 149);
|
||||
|
||||
// How far apart are point-duplets generated. Balance this between
|
||||
// - very low distance: little chance of interference from other
|
||||
// surfaces
|
||||
// - largish distance: less non-orthogonality in final cell
|
||||
// (circumcentre far away from centroid)
|
||||
pointPairDistanceCoeff 0.1;
|
||||
|
||||
// Mixed feature edges - both inside and outside edges. Recreated
|
||||
// by inserting triplets of points to recreate a single edge. Done for
|
||||
// all edges emanating from point. triplets of points get inserted
|
||||
// mixedFeaturePointPPDistanceCoeff distance away from feature point.
|
||||
mixedFeaturePointPPDistanceCoeff 5.0;
|
||||
|
||||
// Distance to a feature point within which surface and edge
|
||||
// conformation points are excluded - fraction of the local target
|
||||
// cell size
|
||||
featurePointExclusionDistanceCoeff 0.4;
|
||||
|
||||
// Distance to an existing feature edge conformation location
|
||||
// within which other edge conformation location are excluded -
|
||||
// fraction of the local target cell size
|
||||
featureEdgeExclusionDistanceCoeff 0.2;
|
||||
|
||||
// Optimisation: do not check for surface intersection (of dual edges)
|
||||
// for points near to surface.
|
||||
surfaceSearchDistanceCoeff 2.5;
|
||||
|
||||
// Maximum allowable protrusion through the surface before
|
||||
// conformation points are added - fraction of the local target
|
||||
// cell size. These small protusions are (hopefully) done by mesh filtering
|
||||
// instead.
|
||||
maxSurfaceProtrusionCoeff 0.1;
|
||||
|
||||
// If feature edge with large angle (so more than 125 degrees) introduce
|
||||
// additional points to create two half angled cells (= mitering).
|
||||
maxQuadAngle 125;
|
||||
|
||||
// Frequency to redo surface conformation (expensive).
|
||||
surfaceConformationRebuildFrequency 10;
|
||||
|
||||
// Initial and intermediate controls
|
||||
coarseConformationControls
|
||||
{
|
||||
// Initial conformation
|
||||
initial
|
||||
{
|
||||
// We've got a point poking through the surface. Don't do any
|
||||
// surface conformation if near feature edge (since feature edge
|
||||
// conformation should have priority)
|
||||
|
||||
// distance to search for near feature edges
|
||||
edgeSearchDistCoeff 1.1;
|
||||
|
||||
// Proximity to a feature edge where a surface hit is
|
||||
// not created, only the edge conformation is created
|
||||
// - fraction of the local target cell size. Coarse
|
||||
// conformation, initial protrusion tests.
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
// Same for iterations
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
// Stop either at maxIterations or if the number of surface pokes
|
||||
// is very small (iterationToInitialHitRatioLimit * initial number)
|
||||
// Note: perhaps iterationToInitialHitRatioLimit should be absolute
|
||||
// count?
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
// Final (at endTime) controls
|
||||
fineConformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 1.1;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
// Geometry to mesh to
|
||||
geometryToConformTo
|
||||
{
|
||||
m_car01
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "m_car01_merge_orient.extendedFeatureEdgeMesh";
|
||||
}
|
||||
|
||||
domain
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "domain_orient.extendedFeatureEdgeMesh";
|
||||
}
|
||||
}
|
||||
|
||||
additionalFeatures {}
|
||||
}
|
||||
|
||||
|
||||
// Controls for seeding initial points and general control of the target
|
||||
// cell size (used everywhere)
|
||||
initialPoints
|
||||
{
|
||||
// Do not place point closer than minimumSurfaceDistanceCoeff
|
||||
// to the surface. Is fraction of local target cell size (see below)
|
||||
minimumSurfaceDistanceCoeff 0.55;
|
||||
|
||||
//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
|
||||
{
|
||||
// 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 1;
|
||||
// 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
|
||||
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 10;
|
||||
|
||||
// Assign a priority to all requests for cell sizes, the highest overrules.
|
||||
defaultPriority 0;
|
||||
|
||||
cellSizeControlGeometry
|
||||
{
|
||||
nearCar
|
||||
{
|
||||
// optional name of geometry
|
||||
surface m_car01;
|
||||
priority 1;
|
||||
mode bothSides;
|
||||
cellSizeFunction linearDistance;
|
||||
|
||||
// cellSizeFunctions:
|
||||
// uniform : uniform size
|
||||
// uniformDistance : fixed size for all within distance
|
||||
// linearSpatial : grading in specified direction only
|
||||
// linearDistance : vary linearly as distance to surface
|
||||
// surfaceOffsetLinearDistance : constant close to surface then
|
||||
// fade like linearDistance
|
||||
|
||||
// Vary from surfaceCellSize (close to the surface) to
|
||||
// distanceCellSize (further than 'distance')
|
||||
linearDistanceCoeffs
|
||||
{
|
||||
surfaceCellSize 1; // absolute size
|
||||
distanceCellSize $defaultCellSize;
|
||||
distance 10.0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Underrelaxation for point motion. Simulated annealing: starts off at 1
|
||||
// and lowers to 0 (at simulation endTime) to converge points.
|
||||
// adaptiveLinear is preferred choice.
|
||||
// Points move by e.g. 10% of tet size.
|
||||
relaxationModel adaptiveLinear; //rampHoldFall
|
||||
|
||||
adaptiveLinearCoeffs
|
||||
{
|
||||
relaxationStart 1.0;
|
||||
relaxationEnd 0.0;
|
||||
}
|
||||
|
||||
// Output lots and lots of .obj files
|
||||
objOutput no;
|
||||
|
||||
// Timing and memory usage.
|
||||
timeChecks yes;
|
||||
|
||||
// Number of rays in plane parallel to nearest surface. Used to detect
|
||||
// next closest surfaces. Used to work out alignment (three vectors)
|
||||
// to surface.
|
||||
// Note that only the initial points (from the seeding) calculate this
|
||||
// information so if these are not fine enough the alignment will
|
||||
// not be correct. (any points added during the running will lookup
|
||||
// this information from the nearest initial point since it is
|
||||
// expensive)
|
||||
alignmentSearchSpokes 36;
|
||||
|
||||
// For each delaunay edge (between two vertices, becomes
|
||||
// the Voronoi face normal) snap to the alignment direction if within
|
||||
// alignmentAcceptanceAngle. Slightly > 45 is a good choice - prevents
|
||||
// flipping.
|
||||
alignmentAcceptanceAngle 48;
|
||||
|
||||
// How often to rebuild the alignment info (expensive)
|
||||
sizeAndAlignmentRebuildFrequency 20;
|
||||
|
||||
// When to insert points. Not advisable change to
|
||||
// these settings.
|
||||
pointInsertionCriteria
|
||||
{
|
||||
// If edge larger than 1.75 target cell size
|
||||
// (so tets too large/stretched) insert point
|
||||
cellCentreDistCoeff 1.75;
|
||||
// Do not insert point if voronoi face (on edge) very small.
|
||||
faceAreaRatioCoeff 0.0025;
|
||||
// Insert point only if edge closely aligned to local alignment
|
||||
// direction.
|
||||
acceptanceAngle 21.5;
|
||||
}
|
||||
|
||||
// Opposite: remove point if mesh too compressed. Do not change these
|
||||
// settings.
|
||||
pointRemovalCriteria
|
||||
{
|
||||
cellCentreDistCoeff 0.65;
|
||||
}
|
||||
|
||||
// How to determine the point motion. All edges got some direction.
|
||||
// Sum all edge contributions to determine point motion. Weigh by
|
||||
// face area so motion is preferentially determined by large faces
|
||||
// (or more importantly ignore contribution from small faces).
|
||||
// Do not change these settings.
|
||||
faceAreaWeightModel piecewiseLinearRamp;
|
||||
|
||||
piecewiseLinearRampCoeffs
|
||||
{
|
||||
lowerAreaFraction 0.5;
|
||||
upperAreaFraction 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// After simulation, when converting to polyMesh, filter out small faces/edges.
|
||||
// Do not change. See cvControls.H
|
||||
polyMeshFiltering
|
||||
{
|
||||
// Write the underlying Delaunay tet mesh at output time
|
||||
writeTetDualMesh true;
|
||||
|
||||
// Upper limit on the size of faces to be filtered.
|
||||
// fraction of the local target cell size
|
||||
filterSizeCoeff 0.2;
|
||||
|
||||
// Upper limit on how close two dual vertices can be before
|
||||
// being merged, fraction of the local target cell size
|
||||
mergeClosenessCoeff 1e-9;
|
||||
|
||||
// To not filter: set maxNonOrtho to 1 (so check fails) and then
|
||||
// set continueFilteringOnBadInitialPolyMesh to false.
|
||||
continueFilteringOnBadInitialPolyMesh false; //true;
|
||||
|
||||
// When a face is "bad", what fraction should the filterSizeCoeff be
|
||||
// reduced by. Recursive, so for a filterCount value of fC, the
|
||||
// filterSizeCoeff is reduced by pow(filterErrorReductionCoeff, fC)
|
||||
filterErrorReductionCoeff 0.5;
|
||||
|
||||
// Maximum number of filterCount applications before a face
|
||||
// is not attempted to be filtered
|
||||
filterCountSkipThreshold 4;
|
||||
|
||||
// Maximum number of permissible iterations of the face collapse
|
||||
// algorithm. The value to choose will be related the maximum number
|
||||
// of points on a face that is to be collapsed and how many faces
|
||||
// around it need to be collapsed.
|
||||
maxCollapseIterations 25;
|
||||
|
||||
// Maximum number of times an to allow an equal faceSet to be
|
||||
// returned from the face quality assessment before stopping iterations
|
||||
// to break an infinitie loop.
|
||||
maxConsecutiveEqualFaceSets 5;
|
||||
// Remove little steps (almost perp to surface) by collapsing face.
|
||||
surfaceStepFaceAngle 80;
|
||||
// Do not collapse face to edge if should become edges
|
||||
edgeCollapseGuardFraction 0.3;
|
||||
// Only collapse face to point if high aspect ratio
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.35;
|
||||
}
|
||||
|
||||
|
||||
// Generic mesh quality settings. At any undoable phase these determine
|
||||
// where to undo. Same as in snappyHexMeshDict
|
||||
meshQualityControls
|
||||
{
|
||||
//- Maximum non-orthogonality allowed. Set to 180 to disable.
|
||||
maxNonOrtho 65;
|
||||
|
||||
//- Max skewness allowed. Set to <0 to disable.
|
||||
maxBoundarySkewness 50;
|
||||
maxInternalSkewness 10;
|
||||
|
||||
//- Max concaveness allowed. Is angle (in degrees) below which concavity
|
||||
// is allowed. 0 is straight face, <0 would be convex face.
|
||||
// Set to 180 to disable.
|
||||
maxConcave 80;
|
||||
|
||||
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
|
||||
// Set to a sensible fraction of the smallest cell volume expected.
|
||||
// Set to very negative number (e.g. -1E30) to disable.
|
||||
minVol -1E30;
|
||||
|
||||
//- Minimum quality of the tet formed by the
|
||||
// variable base point minimum decomposition triangles and
|
||||
// the cell centre (so not face-centre decomposition).
|
||||
// This has to be a positive number for tracking
|
||||
// to work. Set to very negative number (e.g. -1E30) to
|
||||
// disable.
|
||||
// <0 = inside out tet,
|
||||
// 0 = flat tet
|
||||
// 1 = regular tet
|
||||
minTetQuality 1e-30;
|
||||
|
||||
//- Minimum absolute face area. Set to <0 to disable.
|
||||
minArea -1;
|
||||
|
||||
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
|
||||
//- and face centre triangles normal
|
||||
minTwist 0.001;
|
||||
|
||||
//- minimum normalised cell determinant
|
||||
//- 1 = hex, <= 0 = folded or flattened illegal cell
|
||||
minDeterminant 0.001;
|
||||
|
||||
//- minFaceWeight (0 -> 0.5)
|
||||
minFaceWeight 0.02;
|
||||
|
||||
//- minVolRatio (0 -> 1)
|
||||
minVolRatio 0.01;
|
||||
|
||||
//must be >0 for Fluent compatibility
|
||||
minTriangleTwist -1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/mesh/cvMesh/car/system/fvSchemes
Normal file
55
tutorials/mesh/cvMesh/car/system/fvSchemes
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
d2dt2Schemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default cubic;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default uncorrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
D ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
41
tutorials/mesh/cvMesh/car/system/fvSolution
Normal file
41
tutorials/mesh/cvMesh/car/system/fvSolution
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"(D|Dcorr)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-06;
|
||||
relTol 0.99;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 6;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
}
|
||||
|
||||
stressAnalysis
|
||||
{
|
||||
nCorrectors 1;
|
||||
D 1e-10;
|
||||
accelerationFactor 2;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
148
tutorials/mesh/cvMesh/car/system/topoSetDict
Normal file
148
tutorials/mesh/cvMesh/car/system/topoSetDict
Normal file
@ -0,0 +1,148 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100000 -100000 50)(100000 100000 100000);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100000 0 -100000)(100000 100000 100000);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0 -100000 -100000)(100000 100000 100000);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
24
tutorials/mesh/cvMesh/carWheel/Allclean
Executable file
24
tutorials/mesh/cvMesh/carWheel/Allclean
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -r \
|
||||
constant/extendedFeatureEdgeMesh \
|
||||
constant/internalDelaunayVertices \
|
||||
constant/ccx constant/ccy constant/ccz \
|
||||
constant/targetCellSize \
|
||||
constant/tetDualMesh \
|
||||
constant/polyMesh/boundary \
|
||||
constant/triSurface/m_car01_wheel_merge.obj \
|
||||
constant/triSurface/m_car01_wheel_merge_orient.eMesh \
|
||||
constant/triSurface/m_car01_wheel_merge_orient.obj \
|
||||
constant/triSurface/small_orient.eMesh \
|
||||
constant/triSurface/small_orient.stl \
|
||||
> /dev/null 2>&1
|
||||
rm constant/triSurface/*.eMesh > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
48
tutorials/mesh/cvMesh/carWheel/Allrun
Executable file
48
tutorials/mesh/cvMesh/carWheel/Allrun
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
surfacePointMerge constant/triSurface/m_car01_wheel.obj \
|
||||
1e-2 constant/triSurface/m_car01_wheel_merge.obj \
|
||||
> log.surfacePointMerge 2>&1
|
||||
|
||||
# Orient so point to be meshed is inside surface
|
||||
surfaceOrient \
|
||||
constant/triSurface/m_car01_wheel_merge.obj \
|
||||
-inside -usePierceTest '(-100 0 170)' \
|
||||
constant/triSurface/m_car01_wheel_merge_orient.obj \
|
||||
> log.surfaceOrient.m_car01 2>&1
|
||||
|
||||
# Same for outside
|
||||
surfaceOrient \
|
||||
constant/triSurface/small.stl \
|
||||
-inside -usePierceTest '(-100 0 170)' \
|
||||
constant/triSurface/small_orient.stl \
|
||||
> log.surfaceOrient.small 2>&1
|
||||
|
||||
# Extract feature edges and points
|
||||
runApplication surfaceFeatureExtract \
|
||||
constant/triSurface/m_car01_wheel_merge_orient.obj \
|
||||
m_car01 -includedAngle 165 -writeObj
|
||||
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.m_car01
|
||||
|
||||
unset FOAM_SIGFPE
|
||||
runApplication surfaceFeatureExtract \
|
||||
constant/triSurface/small_orient.stl \
|
||||
small -includedAngle 125 -writeObj
|
||||
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.small
|
||||
|
||||
# Generate aligned points (in constant/internalDelaunayVertices) and a
|
||||
# mesh from that.
|
||||
runApplication cvMesh
|
||||
|
||||
# Generate some sets for a bit of mesh inspection
|
||||
runApplication topoSet -constant -time 0:100
|
||||
|
||||
# And a field for thresholding
|
||||
writeCellCentres -constant
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
2502
tutorials/mesh/cvMesh/carWheel/constant/triSurface/m_car01_wheel.obj
Normal file
2502
tutorials/mesh/cvMesh/carWheel/constant/triSurface/m_car01_wheel.obj
Normal file
File diff suppressed because it is too large
Load Diff
86
tutorials/mesh/cvMesh/carWheel/constant/triSurface/small.stl
Normal file
86
tutorials/mesh/cvMesh/carWheel/constant/triSurface/small.stl
Normal file
@ -0,0 +1,86 @@
|
||||
solid ascii
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -200 -50 0
|
||||
vertex -200 -50 200
|
||||
vertex -200 250 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -200 250 200
|
||||
vertex -200 250 0
|
||||
vertex -200 -50 200
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 0 0
|
||||
outer loop
|
||||
vertex 0 -50 0
|
||||
vertex 0 250 0
|
||||
vertex 0 -50 200
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 -0 0
|
||||
outer loop
|
||||
vertex 0 250 200
|
||||
vertex 0 -50 200
|
||||
vertex 0 250 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex -200 -50 0
|
||||
vertex 0 -50 0
|
||||
vertex -200 -50 200
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 0 -50 200
|
||||
vertex -200 -50 200
|
||||
vertex 0 -50 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex -200 250 0
|
||||
vertex -200 250 200
|
||||
vertex 0 250 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 -0
|
||||
outer loop
|
||||
vertex 0 250 200
|
||||
vertex 0 250 0
|
||||
vertex -200 250 200
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex -200 -50 0
|
||||
vertex -200 250 0
|
||||
vertex 0 -50 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 0 250 0
|
||||
vertex 0 -50 0
|
||||
vertex -200 250 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 1
|
||||
outer loop
|
||||
vertex -200 -50 200
|
||||
vertex 0 -50 200
|
||||
vertex -200 250 200
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 0 1
|
||||
outer loop
|
||||
vertex 0 250 200
|
||||
vertex -200 250 200
|
||||
vertex 0 -50 200
|
||||
endloop
|
||||
endfacet
|
||||
endsolid
|
||||
54
tutorials/mesh/cvMesh/carWheel/system/controlDict
Normal file
54
tutorials/mesh/cvMesh/carWheel/system/controlDict
Normal file
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0; //80;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1000; //10 to see the meshing steps
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
474
tutorials/mesh/cvMesh/carWheel/system/cvMeshDict
Normal file
474
tutorials/mesh/cvMesh/carWheel/system/cvMeshDict
Normal file
@ -0,0 +1,474 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object cvMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Control dictionary for cvMesh - polyhedral mesh generator.
|
||||
|
||||
cvMesh phases:
|
||||
1. fill volume with initial points (initialPoints subdictionary). An option
|
||||
is to reread from previous set of points.
|
||||
|
||||
2. internal point motion (motionControl subdictionary)
|
||||
|
||||
3. every once in a while add point duplets/triplets to conform to
|
||||
surfaces and features (surfaceConformation subdictionary)
|
||||
|
||||
4. back to 2
|
||||
|
||||
5. construct polyMesh.
|
||||
- filter (polyMeshFiltering subdictionary)
|
||||
- check (meshQualityControls subdictionary) and undo filtering
|
||||
|
||||
|
||||
See also cvControls.H in the conformalVoronoiMesh library
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// Important:
|
||||
// ----------
|
||||
// Any scalar with a name <name>Coeff specifies a value that will be implemented
|
||||
// as a faction of the local target cell size
|
||||
// Any scalar with a name <name>Size specifies an absolute size.
|
||||
|
||||
|
||||
// Geometry. Definition of all surfaces. All surfaces are of class
|
||||
// searchableSurface.
|
||||
// Surfaces need to be (almost) closed - use closedTriSurfaceMesh
|
||||
// if they are not topologically closed. Surfaces need to be oriented so
|
||||
// the space to be meshed is always on the inside of all surfaces. Use e.g.
|
||||
// surfaceOrient.
|
||||
geometry
|
||||
{
|
||||
// Internal shape
|
||||
m_car01_wheel_merge_orient.obj
|
||||
{
|
||||
name m_car01;
|
||||
type closedTriSurfaceMesh;
|
||||
}
|
||||
|
||||
// Outside of domain
|
||||
small_orient.stl
|
||||
{
|
||||
name small;
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Controls for conforming to the surfaces.
|
||||
surfaceConformation
|
||||
{
|
||||
// A point inside surfaces that is inside mesh.
|
||||
locationInMesh (-100 0 170);
|
||||
|
||||
// How far apart are point-duplets generated. Balance this between
|
||||
// - very low distance: little chance of interference from other
|
||||
// surfaces
|
||||
// - largish distance: less non-orthogonality in final cell
|
||||
// (circumcentre far away from centroid)
|
||||
pointPairDistanceCoeff 0.1;
|
||||
|
||||
// Mixed feature points - connected to both inside and outside edges.
|
||||
// Recreated by inserting triplets of points to recreate a single edge.
|
||||
// Done for all edges emanating from point. triplets of points get inserted
|
||||
// mixedFeaturePointPPDistanceCoeff distance away from feature point.
|
||||
// Set to a positive number to enable.
|
||||
mixedFeaturePointPPDistanceCoeff 5.0;
|
||||
|
||||
// Distance to a feature point within which surface and edge
|
||||
// conformation points are excluded - fraction of the local target
|
||||
// cell size
|
||||
featurePointExclusionDistanceCoeff 0.4;
|
||||
|
||||
// Distance to an existing feature edge conformation location
|
||||
// within which other edge conformation location are excluded -
|
||||
// fraction of the local target cell size
|
||||
featureEdgeExclusionDistanceCoeff 0.2;
|
||||
|
||||
// Optimisation: do not check for surface intersection (of dual edges)
|
||||
// for points near to surface.
|
||||
surfaceSearchDistanceCoeff 2.5;
|
||||
|
||||
// Maximum allowable protrusion through the surface before
|
||||
// conformation points are added - fraction of the local target
|
||||
// cell size. These small protusions are (hopefully) done by mesh filtering
|
||||
// instead.
|
||||
maxSurfaceProtrusionCoeff 0.1;
|
||||
|
||||
// If feature edge with large angle (so more than 125 degrees) introduce
|
||||
// additional points to create two half angled cells (= mitering).
|
||||
maxQuadAngle 125;
|
||||
|
||||
// Frequency to redo surface conformation (expensive).
|
||||
surfaceConformationRebuildFrequency 10;
|
||||
|
||||
// Initial and intermediate controls
|
||||
coarseConformationControls
|
||||
{
|
||||
// Initial conformation
|
||||
initial
|
||||
{
|
||||
// We've got a point poking through the surface. Don't do any
|
||||
// surface conformation if near feature edge (since feature edge
|
||||
// conformation should have priority)
|
||||
|
||||
// distance to search for near feature edges
|
||||
edgeSearchDistCoeff 1.1;
|
||||
|
||||
// Proximity to a feature edge where a surface hit is
|
||||
// not created, only the edge conformation is created
|
||||
// - fraction of the local target cell size. Coarse
|
||||
// conformation, initial protrusion tests.
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
// Same for iterations
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
// Stop either at maxIterations or if the number of surface pokes
|
||||
// is very small (iterationToInitialHitRatioLimit * initial number)
|
||||
// Note: perhaps iterationToInitialHitRatioLimit should be absolute
|
||||
// count?
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
// Final (at endTime) controls
|
||||
fineConformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 1.1;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
// Geometry to mesh to
|
||||
geometryToConformTo
|
||||
{
|
||||
m_car01
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "m_car01_wheel_merge_orient.extendedFeatureEdgeMesh";
|
||||
}
|
||||
|
||||
small
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "small_orient.extendedFeatureEdgeMesh";
|
||||
}
|
||||
}
|
||||
|
||||
additionalFeatures {}
|
||||
}
|
||||
|
||||
|
||||
// Controls for seeding initial points and general control of the target
|
||||
// cell size (used everywhere)
|
||||
initialPoints
|
||||
{
|
||||
// Do not place point closer than minimumSurfaceDistanceCoeff
|
||||
// to the surface. Is fraction of local target cell size (see below)
|
||||
minimumSurfaceDistanceCoeff 0.55;
|
||||
|
||||
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
|
||||
{
|
||||
// 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 3;
|
||||
// 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
|
||||
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 10;
|
||||
|
||||
// Assign a priority to all requests for cell sizes, the highest overrules.
|
||||
defaultPriority 0;
|
||||
|
||||
cellSizeControlGeometry
|
||||
{
|
||||
nearCar
|
||||
{
|
||||
// optional name of geometry
|
||||
surface m_car01;
|
||||
priority 1;
|
||||
mode bothSides;
|
||||
cellSizeFunction linearDistance;
|
||||
|
||||
// cellSizeFunctions:
|
||||
// uniform : uniform size
|
||||
// uniformDistance : fixed size for all within distance
|
||||
// linearSpatial : grading in specified direction only
|
||||
// linearDistance : vary linearly as distance to surface
|
||||
// surfaceOffsetLinearDistance : constant close to surface then
|
||||
// fade like linearDistance
|
||||
|
||||
// Vary from surfaceCellSize (close to the surface) to
|
||||
// distanceCellSize (further than 'distance')
|
||||
linearDistanceCoeffs
|
||||
{
|
||||
surfaceCellSize 1; // absolute size
|
||||
distanceCellSize $defaultCellSize;
|
||||
distance 10.0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Underrelaxation for point motion. Simulated annealing: starts off at 1
|
||||
// and lowers to 0 (at simulation endTime) to converge points.
|
||||
// adaptiveLinear is preferred choice.
|
||||
// Points move by e.g. 10% of tet size.
|
||||
relaxationModel adaptiveLinear; //rampHoldFall
|
||||
|
||||
adaptiveLinearCoeffs
|
||||
{
|
||||
relaxationStart 1.0;
|
||||
relaxationEnd 0.0;
|
||||
}
|
||||
|
||||
// Output lots and lots of .obj files
|
||||
objOutput no;
|
||||
|
||||
// Timing and memory usage.
|
||||
timeChecks yes;
|
||||
|
||||
// Number of rays in plane parallel to nearest surface. Used to detect
|
||||
// next closest surfaces. Used to work out alignment (three vectors)
|
||||
// to surface.
|
||||
// Note that only the initial points (from the seeding) calculate this
|
||||
// information so if these are not fine enough the alignment will
|
||||
// not be correct. (any points added during the running will lookup
|
||||
// this information from the nearest initial point since it is
|
||||
// expensive)
|
||||
alignmentSearchSpokes 36;
|
||||
|
||||
// For each delaunay edge (between two vertices, becomes
|
||||
// the Voronoi face normal) snap to the alignment direction if within
|
||||
// alignmentAcceptanceAngle. Slightly > 45 is a good choice - prevents
|
||||
// flipping.
|
||||
alignmentAcceptanceAngle 48;
|
||||
|
||||
// How often to rebuild the alignment info (expensive)
|
||||
sizeAndAlignmentRebuildFrequency 20;
|
||||
|
||||
// When to insert points. Not advisable change to
|
||||
// these settings.
|
||||
pointInsertionCriteria
|
||||
{
|
||||
// If edge larger than 1.75 target cell size
|
||||
// (so tets too large/stretched) insert point
|
||||
cellCentreDistCoeff 1.75;
|
||||
// Do not insert point if voronoi face (on edge) very small.
|
||||
faceAreaRatioCoeff 0.0025;
|
||||
// Insert point only if edge closely aligned to local alignment
|
||||
// direction.
|
||||
acceptanceAngle 21.5;
|
||||
}
|
||||
|
||||
// Opposite: remove point if mesh too compressed. Do not change these
|
||||
// settings.
|
||||
pointRemovalCriteria
|
||||
{
|
||||
cellCentreDistCoeff 0.65;
|
||||
}
|
||||
|
||||
// How to determine the point motion. All edges got some direction.
|
||||
// Sum all edge contributions to determine point motion. Weigh by
|
||||
// face area so motion is preferentially determined by large faces
|
||||
// (or more importantly ignore contribution from small faces).
|
||||
// Do not change these settings.
|
||||
faceAreaWeightModel piecewiseLinearRamp;
|
||||
|
||||
piecewiseLinearRampCoeffs
|
||||
{
|
||||
lowerAreaFraction 0.5;
|
||||
upperAreaFraction 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// After simulation, when converting to polyMesh, filter out small faces/edges.
|
||||
// Do not change. See cvControls.H
|
||||
polyMeshFiltering
|
||||
{
|
||||
// Write the underlying Delaunay tet mesh at output time
|
||||
writeTetDualMesh true;
|
||||
|
||||
// Upper limit on the size of faces to be filtered.
|
||||
// fraction of the local target cell size
|
||||
filterSizeCoeff 0.2;
|
||||
|
||||
// Upper limit on how close two dual vertices can be before
|
||||
// being merged, fraction of the local target cell size
|
||||
mergeClosenessCoeff 1e-9;
|
||||
|
||||
// To not filter: set maxNonOrtho to 1 (so check fails) and then
|
||||
// set continueFilteringOnBadInitialPolyMesh to false.
|
||||
continueFilteringOnBadInitialPolyMesh true;
|
||||
|
||||
// When a face is "bad", what fraction should the filterSizeCoeff be
|
||||
// reduced by. Recursive, so for a filterCount value of fC, the
|
||||
// filterSizeCoeff is reduced by pow(filterErrorReductionCoeff, fC)
|
||||
filterErrorReductionCoeff 0.5;
|
||||
|
||||
// Maximum number of filterCount applications before a face
|
||||
// is not attempted to be filtered
|
||||
filterCountSkipThreshold 4;
|
||||
|
||||
// Maximum number of permissible iterations of the face collapse
|
||||
// algorithm. The value to choose will be related the maximum number
|
||||
// of points on a face that is to be collapsed and how many faces
|
||||
// around it need to be collapsed.
|
||||
maxCollapseIterations 25;
|
||||
|
||||
// Maximum number of times an to allow an equal faceSet to be
|
||||
// returned from the face quality assessment before stopping iterations
|
||||
// to break an infinitie loop.
|
||||
maxConsecutiveEqualFaceSets 5;
|
||||
// Remove little steps (almost perp to surface) by collapsing face.
|
||||
surfaceStepFaceAngle 80;
|
||||
// Do not collapse face to edge if should become edges
|
||||
edgeCollapseGuardFraction 0.3;
|
||||
// Only collapse face to point if high aspect ratio
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.35;
|
||||
}
|
||||
|
||||
|
||||
// Generic mesh quality settings. At any undoable phase these determine
|
||||
// where to undo. Same as in snappyHexMeshDict
|
||||
meshQualityControls
|
||||
{
|
||||
//- Maximum non-orthogonality allowed. Set to 180 to disable.
|
||||
maxNonOrtho 65;
|
||||
|
||||
//- Max skewness allowed. Set to <0 to disable.
|
||||
maxBoundarySkewness 50;
|
||||
maxInternalSkewness 10;
|
||||
|
||||
//- Max concaveness allowed. Is angle (in degrees) below which concavity
|
||||
// is allowed. 0 is straight face, <0 would be convex face.
|
||||
// Set to 180 to disable.
|
||||
maxConcave 80;
|
||||
|
||||
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
|
||||
// Set to a sensible fraction of the smallest cell volume expected.
|
||||
// Set to very negative number (e.g. -1E30) to disable.
|
||||
minVol -1E30;
|
||||
|
||||
//- Minimum quality of the tet formed by the
|
||||
// variable base point minimum decomposition triangles and
|
||||
// the cell centre (so not face-centre decomposition).
|
||||
// This has to be a positive number for tracking
|
||||
// to work. Set to very negative number (e.g. -1E30) to
|
||||
// disable.
|
||||
// <0 = inside out tet,
|
||||
// 0 = flat tet
|
||||
// 1 = regular tet
|
||||
minTetQuality 1e-30;
|
||||
|
||||
//- Minimum absolute face area. Set to <0 to disable.
|
||||
minArea -1;
|
||||
|
||||
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
|
||||
//- and face centre triangles normal
|
||||
minTwist 0.001;
|
||||
|
||||
//- minimum normalised cell determinant
|
||||
//- 1 = hex, <= 0 = folded or flattened illegal cell
|
||||
minDeterminant 0.001;
|
||||
|
||||
//- minFaceWeight (0 -> 0.5)
|
||||
minFaceWeight 0.02;
|
||||
|
||||
//- minVolRatio (0 -> 1)
|
||||
minVolRatio 0.01;
|
||||
|
||||
//must be >0 for Fluent compatibility
|
||||
minTriangleTwist -1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/mesh/cvMesh/carWheel/system/fvSchemes
Normal file
55
tutorials/mesh/cvMesh/carWheel/system/fvSchemes
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
d2dt2Schemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default cubic;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default uncorrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
D ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
41
tutorials/mesh/cvMesh/carWheel/system/fvSolution
Normal file
41
tutorials/mesh/cvMesh/carWheel/system/fvSolution
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"(D|Dcorr)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-06;
|
||||
relTol 0.99;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 6;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
}
|
||||
|
||||
stressAnalysis
|
||||
{
|
||||
nCorrectors 1;
|
||||
D 1e-10;
|
||||
accelerationFactor 2;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
1
tutorials/mesh/cvMesh/carWheel/system/tetDualMesh/fvSchemes
Symbolic link
1
tutorials/mesh/cvMesh/carWheel/system/tetDualMesh/fvSchemes
Symbolic link
@ -0,0 +1 @@
|
||||
../fvSchemes
|
||||
1
tutorials/mesh/cvMesh/carWheel/system/tetDualMesh/fvSolution
Symbolic link
1
tutorials/mesh/cvMesh/carWheel/system/tetDualMesh/fvSolution
Symbolic link
@ -0,0 +1 @@
|
||||
../fvSolution
|
||||
148
tutorials/mesh/cvMesh/carWheel/system/topoSetDict
Normal file
148
tutorials/mesh/cvMesh/carWheel/system/topoSetDict
Normal file
@ -0,0 +1,148 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100000 -100000 50)(100000 100000 100000);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100000 0 -100000)(100000 100000 100000);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0 -100000 -100000)(100000 100000 100000);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
13
tutorials/mesh/cvMesh/flange/Allclean
Executable file
13
tutorials/mesh/cvMesh/flange/Allclean
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices > /dev/null 2>&1
|
||||
rm constant/triSurface/flange.eMesh > /dev/null 2>&1
|
||||
rm flange system/cvMeshDict system/controlDict > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
23
tutorials/mesh/cvMesh/flange/Allrun
Executable file
23
tutorials/mesh/cvMesh/flange/Allrun
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Generate aligned points (in constant/internalDelaunayVertices) and a
|
||||
# mesh from that.
|
||||
cp system/controlDict-generatePoints system/controlDict
|
||||
cp system/cvMeshDict-generatePoints system/cvMeshDict
|
||||
runApplication surfaceFeatureExtract constant/triSurface/flange.obj flange -includedAngle 150
|
||||
runApplication cvMesh
|
||||
|
||||
# Use pre-generated aligned points (constant/internalDelaunayVertices)
|
||||
# to generate a mesh
|
||||
# cp system/controlDict-usePoints system/controlDict
|
||||
# cp system/cvMeshDict-usePoints system/cvMeshDict
|
||||
# runApplication cvMesh
|
||||
|
||||
# Generate some sets for a bit of mesh inspection
|
||||
runApplication topoSet
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
52
tutorials/mesh/cvMesh/flange/constant/polyMesh/boundary
Normal file
52
tutorials/mesh/cvMesh/flange/constant/polyMesh/boundary
Normal file
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
5
|
||||
(
|
||||
flange.obj_patch1
|
||||
{
|
||||
type wall;
|
||||
nFaces 9298;
|
||||
startFace 95552;
|
||||
}
|
||||
flange.obj_patch2
|
||||
{
|
||||
type wall;
|
||||
nFaces 1107;
|
||||
startFace 104850;
|
||||
}
|
||||
flange.obj_patch3
|
||||
{
|
||||
type wall;
|
||||
nFaces 329;
|
||||
startFace 105957;
|
||||
}
|
||||
flange.obj_patch4
|
||||
{
|
||||
type wall;
|
||||
nFaces 1473;
|
||||
startFace 106286;
|
||||
}
|
||||
cvMesh_defaultPatch
|
||||
{
|
||||
type wall;
|
||||
nFaces 41;
|
||||
startFace 107759;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
9710
tutorials/mesh/cvMesh/flange/constant/triSurface/flange.obj
Normal file
9710
tutorials/mesh/cvMesh/flange/constant/triSurface/flange.obj
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 80;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1000; //10 to see the meshing steps
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
54
tutorials/mesh/cvMesh/flange/system/controlDict-usePoints
Normal file
54
tutorials/mesh/cvMesh/flange/system/controlDict-usePoints
Normal file
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1000; //10 to see the meshing steps
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
231
tutorials/mesh/cvMesh/flange/system/cvMeshDict-generatePoints
Normal file
231
tutorials/mesh/cvMesh/flange/system/cvMeshDict-generatePoints
Normal file
@ -0,0 +1,231 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object cvMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Any scalar with a name <name>Coeff specifies a value that will be implemented
|
||||
// as a faction of the local target cell size
|
||||
|
||||
geometry
|
||||
{
|
||||
flange.obj
|
||||
{
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
surfaceConformation
|
||||
{
|
||||
locationInMesh (0 0 0);
|
||||
|
||||
pointPairDistanceCoeff 0.1;
|
||||
|
||||
mixedFeaturePointPPDistanceCoeff 5.0;
|
||||
|
||||
featurePointExclusionDistanceCoeff 0.4;
|
||||
|
||||
featureEdgeExclusionDistanceCoeff 0.2;
|
||||
|
||||
surfaceSearchDistanceCoeff 2.5;
|
||||
|
||||
maxSurfaceProtrusionCoeff 0.1;
|
||||
|
||||
maxQuadAngle 125;
|
||||
|
||||
surfaceConformationRebuildFrequency 10;
|
||||
|
||||
coarseConformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 1.1;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
fineConformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 1.1;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
geometryToConformTo
|
||||
{
|
||||
flange.obj
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "flange.extendedFeatureEdgeMesh";
|
||||
}
|
||||
}
|
||||
|
||||
additionalFeatures {}
|
||||
}
|
||||
|
||||
|
||||
initialPoints
|
||||
{
|
||||
minimumSurfaceDistanceCoeff 0.55;
|
||||
|
||||
initialPointsMethod autoDensity;
|
||||
// initialPointsMethod uniformGrid;
|
||||
// initialPointsMethod bodyCentredCubic;
|
||||
// initialPointsMethod pointFile;
|
||||
|
||||
autoDensityCoeffs
|
||||
{
|
||||
minLevels 1;
|
||||
maxSizeRatio 2.0;
|
||||
sampleResolution 5;
|
||||
surfaceSampleResolution 5;
|
||||
}
|
||||
|
||||
uniformGridCoeffs
|
||||
{
|
||||
initialCellSize 0.0015;
|
||||
randomiseInitialGrid yes;
|
||||
randomPerturbationCoeff 0.02;
|
||||
}
|
||||
|
||||
bodyCentredCubicCoeffs
|
||||
{
|
||||
initialCellSize 0.0015;
|
||||
randomiseInitialGrid no;
|
||||
randomPerturbationCoeff 0.1;
|
||||
}
|
||||
|
||||
pointFileCoeffs
|
||||
{
|
||||
pointFile "constant/internalDelaunayVertices";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
motionControl
|
||||
{
|
||||
defaultCellSize 0.00075;
|
||||
|
||||
// Assign a priority to all requests for cell sizes, the highest overrules.
|
||||
defaultPriority 0;
|
||||
|
||||
cellSizeControlGeometry
|
||||
{
|
||||
}
|
||||
|
||||
relaxationModel adaptiveLinear;
|
||||
|
||||
adaptiveLinearCoeffs
|
||||
{
|
||||
relaxationStart 1.0;
|
||||
relaxationEnd 0.0;
|
||||
}
|
||||
|
||||
objOutput no;
|
||||
|
||||
timeChecks yes;
|
||||
|
||||
alignmentSearchSpokes 36;
|
||||
|
||||
alignmentAcceptanceAngle 48;
|
||||
|
||||
sizeAndAlignmentRebuildFrequency 20;
|
||||
|
||||
pointInsertionCriteria
|
||||
{
|
||||
cellCentreDistCoeff 1.75;
|
||||
faceAreaRatioCoeff 0.0025;
|
||||
acceptanceAngle 21.5;
|
||||
}
|
||||
|
||||
pointRemovalCriteria
|
||||
{
|
||||
cellCentreDistCoeff 0.65;
|
||||
}
|
||||
|
||||
faceAreaWeightModel piecewiseLinearRamp;
|
||||
|
||||
piecewiseLinearRampCoeffs
|
||||
{
|
||||
lowerAreaFraction 0.5;
|
||||
upperAreaFraction 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
polyMeshFiltering
|
||||
{
|
||||
// Write the underlying Delaunay tet mesh at output time
|
||||
writeTetDualMesh true;
|
||||
filterSizeCoeff 0.2;
|
||||
mergeClosenessCoeff 1e-4;
|
||||
continueFilteringOnBadInitialPolyMesh true;
|
||||
filterErrorReductionCoeff 0.5;
|
||||
filterCountSkipThreshold 4;
|
||||
maxCollapseIterations 25;
|
||||
maxConsecutiveEqualFaceSets 5;
|
||||
surfaceStepFaceAngle 80;
|
||||
edgeCollapseGuardFraction 0.3;
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.35;
|
||||
}
|
||||
|
||||
|
||||
meshQualityControls
|
||||
{
|
||||
maxNonOrtho 65;
|
||||
maxBoundarySkewness 50;
|
||||
maxInternalSkewness 10;
|
||||
maxConcave 80;
|
||||
minTetQuality 1e-30;
|
||||
minVol 0;
|
||||
minArea -1;
|
||||
minTwist 0.02;
|
||||
minDeterminant 0.001;
|
||||
minFaceWeight 0.02;
|
||||
minVolRatio 0.01;
|
||||
minTriangleTwist -1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
207
tutorials/mesh/cvMesh/flange/system/cvMeshDict-usePoints
Normal file
207
tutorials/mesh/cvMesh/flange/system/cvMeshDict-usePoints
Normal file
@ -0,0 +1,207 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object cvMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Any scalar with a name <name>Coeff specifies a value that will be implemented
|
||||
// as a faction of the local target cell size
|
||||
|
||||
geometry
|
||||
{
|
||||
flange.obj
|
||||
{
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
surfaceConformation
|
||||
{
|
||||
locationInMesh (0 0 0);
|
||||
|
||||
pointPairDistanceCoeff 0.1;
|
||||
|
||||
mixedFeaturePointPPDistanceCoeff 5.0;
|
||||
|
||||
featurePointExclusionDistanceCoeff 0.4;
|
||||
|
||||
featureEdgeExclusionDistanceCoeff 0.2;
|
||||
|
||||
surfaceSearchDistanceCoeff 2.5;
|
||||
|
||||
maxSurfaceProtrusionCoeff 0.1;
|
||||
|
||||
maxQuadAngle 125;
|
||||
|
||||
surfaceConformationRebuildFrequency 10;
|
||||
|
||||
coarseConformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 1.1;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
fineConformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 1.1;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
geometryToConformTo
|
||||
{
|
||||
flange.obj
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "flange.extendedFeatureEdgeMesh";
|
||||
}
|
||||
}
|
||||
|
||||
additionalFeatures {}
|
||||
}
|
||||
|
||||
|
||||
initialPoints
|
||||
{
|
||||
minimumSurfaceDistanceCoeff 0.55;
|
||||
|
||||
initialPointsMethod pointFile;
|
||||
|
||||
pointFileCoeffs
|
||||
{
|
||||
pointFile "constant/internalDelaunayVertices";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
motionControl
|
||||
{
|
||||
defaultCellSize 0.00075;
|
||||
|
||||
// Assign a priority to all requests for cell sizes, the highest overrules.
|
||||
defaultPriority 0;
|
||||
|
||||
cellSizeControlGeometry
|
||||
{
|
||||
}
|
||||
|
||||
relaxationModel adaptiveLinear;
|
||||
|
||||
adaptiveLinearCoeffs
|
||||
{
|
||||
relaxationStart 1.0;
|
||||
relaxationEnd 0.0;
|
||||
}
|
||||
|
||||
objOutput no;
|
||||
|
||||
timeChecks yes;
|
||||
|
||||
alignmentSearchSpokes 36;
|
||||
|
||||
alignmentAcceptanceAngle 48;
|
||||
|
||||
sizeAndAlignmentRebuildFrequency 20;
|
||||
|
||||
pointInsertionCriteria
|
||||
{
|
||||
cellCentreDistCoeff 1.75;
|
||||
faceAreaRatioCoeff 0.0025;
|
||||
acceptanceAngle 21.5;
|
||||
}
|
||||
|
||||
pointRemovalCriteria
|
||||
{
|
||||
cellCentreDistCoeff 0.65;
|
||||
}
|
||||
|
||||
faceAreaWeightModel piecewiseLinearRamp;
|
||||
|
||||
piecewiseLinearRampCoeffs
|
||||
{
|
||||
lowerAreaFraction 0.5;
|
||||
upperAreaFraction 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
polyMeshFiltering
|
||||
{
|
||||
// Write the underlying Delaunay tet mesh at output time
|
||||
writeTetDualMesh true;
|
||||
|
||||
filterSizeCoeff 0.2;
|
||||
mergeClosenessCoeff 1e-4;
|
||||
continueFilteringOnBadInitialPolyMesh true;
|
||||
filterErrorReductionCoeff 0.5;
|
||||
filterCountSkipThreshold 4;
|
||||
maxCollapseIterations 25;
|
||||
maxConsecutiveEqualFaceSets 5;
|
||||
surfaceStepFaceAngle 80;
|
||||
edgeCollapseGuardFraction 0.3;
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.35;
|
||||
}
|
||||
|
||||
|
||||
meshQualityControls
|
||||
{
|
||||
maxNonOrtho 65;
|
||||
maxBoundarySkewness 50;
|
||||
maxInternalSkewness 10;
|
||||
maxConcave 80;
|
||||
minTetQuality 1e-30;
|
||||
minVol 0;
|
||||
minArea -1;
|
||||
minTwist 0.02;
|
||||
minDeterminant 0.001;
|
||||
minFaceWeight 0.02;
|
||||
minVolRatio 0.01;
|
||||
minTriangleTwist -1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/mesh/cvMesh/flange/system/fvSchemes
Normal file
55
tutorials/mesh/cvMesh/flange/system/fvSchemes
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
d2dt2Schemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default cubic;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default uncorrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
D ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
41
tutorials/mesh/cvMesh/flange/system/fvSolution
Normal file
41
tutorials/mesh/cvMesh/flange/system/fvSolution
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"(D|Dcorr)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-06;
|
||||
relTol 0.99;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 6;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
}
|
||||
|
||||
stressAnalysis
|
||||
{
|
||||
nCorrectors 1;
|
||||
D 1e-10;
|
||||
accelerationFactor 2;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
148
tutorials/mesh/cvMesh/flange/system/topoSetDict
Normal file
148
tutorials/mesh/cvMesh/flange/system/topoSetDict
Normal file
@ -0,0 +1,148 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100 -100 -0.01)(100 100 100);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100 0 -100)(100 100 100);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0 -100 -100)(100 100 100);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
18
tutorials/mesh/cvMesh/simpleShapes/Allclean
Executable file
18
tutorials/mesh/cvMesh/simpleShapes/Allclean
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices > /dev/null 2>&1
|
||||
rm constant/triSurface/*.eMesh > /dev/null 2>&1
|
||||
rm constant/triSurface/*_clean* > /dev/null 2>&1
|
||||
rm -r constant/polyMesh > /dev/null 2>&1
|
||||
rm constant/targetCellSize > /dev/null 2>&1
|
||||
rm -r constant/tetDualMesh > /dev/null 2>&1
|
||||
|
||||
rm domain coneAndSphere > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
51
tutorials/mesh/cvMesh/simpleShapes/Allrun
Executable file
51
tutorials/mesh/cvMesh/simpleShapes/Allrun
Executable file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Remove any small triangles (edges < 1e-4, sliver with Q < 1e-6) from surface
|
||||
# (cvMesh will try to conform to every feature).
|
||||
runApplication surfaceClean \
|
||||
constant/triSurface/coneAndSphere.obj \
|
||||
1e-4 1e-6 \
|
||||
constant/triSurface/coneAndSphere_clean.obj
|
||||
mv log.surfaceClean log.surfaceClean.coneAndSphere
|
||||
# Orient so point to be meshed is inside surface
|
||||
surfaceOrient \
|
||||
constant/triSurface/coneAndSphere_clean.obj \
|
||||
-inside '(0 -0.5 0)' \
|
||||
constant/triSurface/coneAndSphere_clean_orient.obj \
|
||||
> log.surfaceOrient.coneAndSphere 2>&1
|
||||
|
||||
# Same for outside
|
||||
runApplication surfaceClean \
|
||||
constant/triSurface/domain.stl \
|
||||
1e-4 1e-6 \
|
||||
constant/triSurface/domain_clean.stl
|
||||
mv log.surfaceClean log.surfaceClean.domain
|
||||
surfaceOrient \
|
||||
constant/triSurface/domain_clean.stl \
|
||||
-inside '(0 -0.5 0)' \
|
||||
constant/triSurface/domain_clean_orient.stl
|
||||
> log.surfaceOrient.domain 2>&1
|
||||
|
||||
runApplication surfaceFeatureExtract \
|
||||
constant/triSurface/coneAndSphere_clean_orient.obj \
|
||||
coneAndSphere -includedAngle 125
|
||||
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.coneAndSphere_clean
|
||||
|
||||
unset FOAM_SIGFPE
|
||||
runApplication surfaceFeatureExtract \
|
||||
constant/triSurface/domain_clean_orient.stl \
|
||||
domain -includedAngle 125
|
||||
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.domain
|
||||
|
||||
# Generate aligned points (in constant/internalDelaunayVertices) and a
|
||||
# mesh from that.
|
||||
runApplication cvMesh
|
||||
|
||||
# Generate some sets for a bit of mesh inspection
|
||||
runApplication topoSet -constant -time 0:100
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
828
tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/cone.stl
Normal file
828
tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/cone.stl
Normal file
@ -0,0 +1,828 @@
|
||||
solid ascii
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.475528 -0.154509
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.489074 -0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.489074 -0.103956
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.497261 -0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.497261 -0.0522642
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.5 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.5 0
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.497261 0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.497261 0.0522642
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.489074 0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.489074 0.103956
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.475528 0.154509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.475528 0.154509
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.456773 0.203368
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.456773 0.203368
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.433013 0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.433013 -0.25
|
||||
vertex -0.5 0.433013 0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.433013 0.25
|
||||
vertex -0.5 0.433013 -0.25
|
||||
vertex -0.5 0.404509 0.293893
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.404509 0.293893
|
||||
vertex -0.5 0.433013 -0.25
|
||||
vertex -0.5 0.371572 0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.433013 -0.25
|
||||
vertex -0.5 0.404509 -0.293893
|
||||
vertex -0.5 0.371572 0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.404509 -0.293893
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.371572 0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.371572 0.334565
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.334565 0.371572
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.334565 0.371572
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.293893 0.404509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.293893 0.404509
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.25 0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.25 0.433013
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.203368 0.456773
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.203368 0.456773
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.154509 0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.154509 0.475528
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.103956 0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.103956 0.489074
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.0522642 0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.0522642 0.497261
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -1.02552e-10 0.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -1.02552e-10 0.5
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.0522642 0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.0522642 0.497261
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.103956 0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.103956 0.489074
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.154509 0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.154509 0.475528
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.203368 0.456773
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.203368 0.456773
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.25 0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.25 0.433013
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.293893 0.404509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.293893 0.404509
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.334565 0.371572
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.334565 0.371572
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.371572 0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.371572 0.334565
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.404509 0.293893
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.404509 0.293893
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.433013 0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.433013 0.25
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.456773 0.203368
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.456773 0.203368
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.475528 0.154509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.475528 0.154509
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.489074 0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.489074 0.103956
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.497261 0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.497261 0.0522642
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.5 -2.05103e-10
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.5 -2.05103e-10
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.497261 -0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.497261 -0.0522642
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.489074 -0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.489074 -0.103956
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.475528 -0.154509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.475528 -0.154509
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.456773 -0.203368
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.456773 -0.203368
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.433013 -0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.433013 -0.25
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.404509 -0.293893
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.404509 -0.293893
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.371572 -0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 -0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.371572 -0.334565
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.334565 -0.371572
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.334565 -0.371572
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.293893 -0.404509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.293893 -0.404509
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.25 -0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.25 -0.433013
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.203368 -0.456773
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.203368 -0.456773
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.154509 -0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.154509 -0.475528
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.103956 -0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.103956 -0.489074
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 -0.0522642 -0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 -0.0522642 -0.497261
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 3.07655e-10 -0.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 3.07655e-10 -0.5
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.0522642 -0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.0522642 -0.497261
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.103956 -0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.103956 -0.489074
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.154509 -0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 -0 0
|
||||
outer loop
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.334565 -0.371572
|
||||
vertex -0.5 0.154509 -0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 -0 0
|
||||
outer loop
|
||||
vertex -0.5 0.334565 -0.371572
|
||||
vertex -0.5 0.293893 -0.404509
|
||||
vertex -0.5 0.154509 -0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 -0 0
|
||||
outer loop
|
||||
vertex -0.5 0.293893 -0.404509
|
||||
vertex -0.5 0.25 -0.433013
|
||||
vertex -0.5 0.154509 -0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex -0.5 0.203368 -0.456773
|
||||
vertex -0.5 0.154509 -0.475528
|
||||
vertex -0.5 0.25 -0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.893446 0.0468234
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.5 0
|
||||
vertex -0.5 0.497261 0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.883657 0.139958
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.497261 0.0522642
|
||||
vertex -0.5 0.489074 0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.864187 0.231558
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.489074 0.103956
|
||||
vertex -0.5 0.475528 0.154509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.835248 0.320622
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.475528 0.154509
|
||||
vertex -0.5 0.456773 0.203368
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.797159 0.406173
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.456773 0.203368
|
||||
vertex -0.5 0.433013 0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.750335 0.487273
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.433013 0.25
|
||||
vertex -0.5 0.404509 0.293893
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.695291 0.563036
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.404509 0.293893
|
||||
vertex -0.5 0.371572 0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.632629 0.632629
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.371572 0.334565
|
||||
vertex -0.5 0.334565 0.371572
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.563036 0.695291
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.334565 0.371572
|
||||
vertex -0.5 0.293893 0.404509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.487273 0.750335
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.293893 0.404509
|
||||
vertex -0.5 0.25 0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.406173 0.797159
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.25 0.433013
|
||||
vertex -0.5 0.203368 0.456773
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.320622 0.835248
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.203368 0.456773
|
||||
vertex -0.5 0.154509 0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.231558 0.864187
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.154509 0.475528
|
||||
vertex -0.5 0.103956 0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.139958 0.883657
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.103956 0.489074
|
||||
vertex -0.5 0.0522642 0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.0468234 0.893446
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.0522642 0.497261
|
||||
vertex -0.5 -1.02552e-10 0.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.0468234 0.893446
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -1.02552e-10 0.5
|
||||
vertex -0.5 -0.0522642 0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.139958 0.883657
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.0522642 0.497261
|
||||
vertex -0.5 -0.103956 0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.231558 0.864187
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.103956 0.489074
|
||||
vertex -0.5 -0.154509 0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.320622 0.835248
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.154509 0.475528
|
||||
vertex -0.5 -0.203368 0.456773
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.406173 0.797159
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.203368 0.456773
|
||||
vertex -0.5 -0.25 0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.487273 0.750335
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.25 0.433013
|
||||
vertex -0.5 -0.293893 0.404509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.563036 0.695291
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.293893 0.404509
|
||||
vertex -0.5 -0.334565 0.371572
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.632629 0.632629
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.334565 0.371572
|
||||
vertex -0.5 -0.371572 0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.695291 0.563036
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.371572 0.334565
|
||||
vertex -0.5 -0.404509 0.293893
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.750335 0.487273
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.404509 0.293893
|
||||
vertex -0.5 -0.433013 0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.797159 0.406173
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.433013 0.25
|
||||
vertex -0.5 -0.456773 0.203368
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.835248 0.320622
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.456773 0.203368
|
||||
vertex -0.5 -0.475528 0.154509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.864187 0.231558
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.475528 0.154509
|
||||
vertex -0.5 -0.489074 0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.883657 0.139958
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.489074 0.103956
|
||||
vertex -0.5 -0.497261 0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.893446 0.0468234
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.497261 0.0522642
|
||||
vertex -0.5 -0.5 -2.05103e-10
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.893446 -0.0468234
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.5 -2.05103e-10
|
||||
vertex -0.5 -0.497261 -0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.883657 -0.139958
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.497261 -0.0522642
|
||||
vertex -0.5 -0.489074 -0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.864187 -0.231558
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.489074 -0.103956
|
||||
vertex -0.5 -0.475528 -0.154509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.835248 -0.320622
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.475528 -0.154509
|
||||
vertex -0.5 -0.456773 -0.203368
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.797159 -0.406173
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.456773 -0.203368
|
||||
vertex -0.5 -0.433013 -0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.750335 -0.487273
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.433013 -0.25
|
||||
vertex -0.5 -0.404509 -0.293893
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.695291 -0.563036
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.404509 -0.293893
|
||||
vertex -0.5 -0.371572 -0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.632629 -0.632629
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.371572 -0.334565
|
||||
vertex -0.5 -0.334565 -0.371572
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.563036 -0.695291
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.334565 -0.371572
|
||||
vertex -0.5 -0.293893 -0.404509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.487273 -0.750335
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.293893 -0.404509
|
||||
vertex -0.5 -0.25 -0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.406173 -0.797159
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.25 -0.433013
|
||||
vertex -0.5 -0.203368 -0.456773
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.320622 -0.835248
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.203368 -0.456773
|
||||
vertex -0.5 -0.154509 -0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.231558 -0.864187
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.154509 -0.475528
|
||||
vertex -0.5 -0.103956 -0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.139958 -0.883657
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.103956 -0.489074
|
||||
vertex -0.5 -0.0522642 -0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 -0.0468234 -0.893446
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 -0.0522642 -0.497261
|
||||
vertex -0.5 3.07655e-10 -0.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.0468234 -0.893446
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 3.07655e-10 -0.5
|
||||
vertex -0.5 0.0522642 -0.497261
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.139958 -0.883657
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.0522642 -0.497261
|
||||
vertex -0.5 0.103956 -0.489074
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.231558 -0.864187
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.103956 -0.489074
|
||||
vertex -0.5 0.154509 -0.475528
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.320622 -0.835248
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.154509 -0.475528
|
||||
vertex -0.5 0.203368 -0.456773
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.406173 -0.797159
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.203368 -0.456773
|
||||
vertex -0.5 0.25 -0.433013
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.487273 -0.750335
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.25 -0.433013
|
||||
vertex -0.5 0.293893 -0.404509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.563036 -0.695291
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.293893 -0.404509
|
||||
vertex -0.5 0.334565 -0.371572
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.632629 -0.632629
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.334565 -0.371572
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.695291 -0.563036
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.371572 -0.334565
|
||||
vertex -0.5 0.404509 -0.293893
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.750335 -0.487273
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.404509 -0.293893
|
||||
vertex -0.5 0.433013 -0.25
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.797159 -0.406173
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.433013 -0.25
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.835248 -0.320622
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.456773 -0.203368
|
||||
vertex -0.5 0.475528 -0.154509
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.864187 -0.231558
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.475528 -0.154509
|
||||
vertex -0.5 0.489074 -0.103956
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.883657 -0.139958
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.489074 -0.103956
|
||||
vertex -0.5 0.497261 -0.0522642
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.446723 0.893446 -0.0468234
|
||||
outer loop
|
||||
vertex 0.5 0 0
|
||||
vertex -0.5 0.497261 -0.0522642
|
||||
vertex -0.5 0.5 0
|
||||
endloop
|
||||
endfacet
|
||||
endsolid
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,86 @@
|
||||
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
|
||||
5042
tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/sphere.stl
Normal file
5042
tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/sphere.stl
Normal file
File diff suppressed because it is too large
Load Diff
54
tutorials/mesh/cvMesh/simpleShapes/system/controlDict
Normal file
54
tutorials/mesh/cvMesh/simpleShapes/system/controlDict
Normal file
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 80;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1000; //10 to see the meshing steps
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
444
tutorials/mesh/cvMesh/simpleShapes/system/cvMeshDict
Normal file
444
tutorials/mesh/cvMesh/simpleShapes/system/cvMeshDict
Normal file
@ -0,0 +1,444 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object cvMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Control dictionary for cvMesh - polyhedral mesh generator.
|
||||
|
||||
cvMesh phases:
|
||||
1. fill volume with initial points (initialPoints subdictionary). An option
|
||||
is to reread from previous set of points.
|
||||
|
||||
2. internal point motion (motionControl subdictionary)
|
||||
|
||||
3. every once in a while add point duplets/triplets to conform to
|
||||
surfaces and features (surfaceConformation subdictionary)
|
||||
|
||||
4. back to 2
|
||||
|
||||
5. construct polyMesh.
|
||||
- filter (polyMeshFiltering subdictionary)
|
||||
- check (meshQualityControls subdictionary) and undo filtering
|
||||
|
||||
|
||||
See also cvControls.H in the conformalVoronoiMesh library
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// Important:
|
||||
// ----------
|
||||
// Any scalar with a name <name>Coeff specifies a value that will be implemented
|
||||
// as a faction of the local target cell size
|
||||
// Any scalar with a name <name>Size specifies an absolute size.
|
||||
|
||||
|
||||
// Geometry. Definition of all surfaces. All surfaces are of class
|
||||
// searchableSurface.
|
||||
// Surfaces need to be (almost) closed - use closedTriSurfaceMesh
|
||||
// if they are not topologically closed. Surfaces need to be oriented so
|
||||
// the space to be meshed is always on the inside of all surfaces. Use e.g.
|
||||
// surfaceOrient.
|
||||
geometry
|
||||
{
|
||||
// Internal shape
|
||||
coneAndSphere_clean_orient.obj
|
||||
{
|
||||
name coneAndSphere;
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
|
||||
// Outside of domain
|
||||
domain_clean_orient.stl
|
||||
{
|
||||
name domain;
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Controls for conforming to the surfaces.
|
||||
surfaceConformation
|
||||
{
|
||||
// A point inside surfaces that is inside mesh.
|
||||
locationInMesh (0 -0.5 0);
|
||||
|
||||
// How far apart are point-duplets generated. Balance this between
|
||||
// - very low distance: little chance of interference from other
|
||||
// surfaces
|
||||
// - largish distance: less non-orthogonality in final cell
|
||||
// (circumcentre far away from centroid)
|
||||
pointPairDistanceCoeff 0.1;
|
||||
|
||||
// Mixed feature edges - both inside and outside edges. Recreated
|
||||
// by inserting triplets of points to recreate a single edge. Done for
|
||||
// all edges emanating from point. triplets of points get inserted
|
||||
// mixedFeaturePointPPDistanceCoeff distance away from feature point.
|
||||
mixedFeaturePointPPDistanceCoeff 5.0;
|
||||
|
||||
// Distance to a feature point within which surface and edge
|
||||
// conformation points are excluded - fraction of the local target
|
||||
// cell size
|
||||
featurePointExclusionDistanceCoeff 0.4;
|
||||
|
||||
// Distance to an existing feature edge conformation location
|
||||
// within which other edge conformation location are excluded -
|
||||
// fraction of the local target cell size
|
||||
featureEdgeExclusionDistanceCoeff 0.2;
|
||||
|
||||
// Optimisation: do not check for surface intersection (of dual edges)
|
||||
// for points near to surface.
|
||||
surfaceSearchDistanceCoeff 2.5;
|
||||
|
||||
// Maximum allowable protrusion through the surface before
|
||||
// conformation points are added - fraction of the local target
|
||||
// cell size. These small protusions are (hopefully) done by mesh filtering
|
||||
// instead.
|
||||
maxSurfaceProtrusionCoeff 0.1;
|
||||
|
||||
// If feature edge with large angle (so more than 125 degrees) introduce
|
||||
// additional points to create two half angled cells (= mitering).
|
||||
maxQuadAngle 125;
|
||||
|
||||
// Frequency to redo surface conformation (expensive).
|
||||
surfaceConformationRebuildFrequency 10;
|
||||
|
||||
// Initial and intermediate controls
|
||||
coarseConformationControls
|
||||
{
|
||||
// Initial conformation
|
||||
initial
|
||||
{
|
||||
// We've got a point poking through the surface. Don't do any
|
||||
// surface conformation if near feature edge (since feature edge
|
||||
// conformation should have priority)
|
||||
|
||||
// distance to search for near feature edges
|
||||
edgeSearchDistCoeff 1.1;
|
||||
|
||||
// Proximity to a feature edge where a surface hit is
|
||||
// not created, only the edge conformation is created
|
||||
// - fraction of the local target cell size. Coarse
|
||||
// conformation, initial protrusion tests.
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
// Same for iterations
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
// Stop either at maxIterations or if the number of surface pokes
|
||||
// is very small (iterationToInitialHitRatioLimit * initial number)
|
||||
// Note: perhaps iterationToInitialHitRatioLimit should be absolute
|
||||
// count?
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
// Final (at endTime) controls
|
||||
fineConformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 1.1;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
// Geometry to mesh to
|
||||
geometryToConformTo
|
||||
{
|
||||
coneAndSphere
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "coneAndSphere_clean_orient.extendedFeatureEdgeMesh";
|
||||
}
|
||||
|
||||
domain
|
||||
{
|
||||
featureMethod extendedFeatureEdgeMesh;
|
||||
extendedFeatureEdgeMesh "domain_clean_orient.extendedFeatureEdgeMesh";
|
||||
}
|
||||
}
|
||||
|
||||
additionalFeatures {}
|
||||
}
|
||||
|
||||
|
||||
// Controls for seeding initial points and general control of the target
|
||||
// cell size (used everywhere)
|
||||
initialPoints
|
||||
{
|
||||
// Do not place point closer than minimumSurfaceDistanceCoeff
|
||||
// to the surface. Is fraction of local target cell size (see below)
|
||||
minimumSurfaceDistanceCoeff 0.55;
|
||||
|
||||
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
|
||||
{
|
||||
// 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
|
||||
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;
|
||||
|
||||
// Assign a priority to all requests for cell sizes, the highest overrules.
|
||||
defaultPriority 0;
|
||||
|
||||
cellSizeControlGeometry
|
||||
{
|
||||
}
|
||||
|
||||
// Underrelaxation for point motion. Simulated annealing: starts off at 1
|
||||
// and lowers to 0 (at simulation endTime) to converge points.
|
||||
// adaptiveLinear is preferred choice.
|
||||
// Points move by e.g. 10% of tet size.
|
||||
relaxationModel adaptiveLinear; //rampHoldFall
|
||||
|
||||
adaptiveLinearCoeffs
|
||||
{
|
||||
relaxationStart 1.0;
|
||||
relaxationEnd 0.0;
|
||||
}
|
||||
|
||||
// Output lots and lots of .obj files
|
||||
objOutput no;
|
||||
|
||||
// Timing and memory usage.
|
||||
timeChecks yes;
|
||||
|
||||
// Number of rays in plane parallel to nearest surface. Used to detect
|
||||
// next closest surfaces. Used to work out alignment (three vectors)
|
||||
// to surface.
|
||||
// Note that only the initial points (from the seeding) calculate this
|
||||
// information so if these are not fine enough the alignment will
|
||||
// not be correct. (any points added during the running will lookup
|
||||
// this information from the nearest initial point since it is
|
||||
// expensive)
|
||||
alignmentSearchSpokes 36;
|
||||
|
||||
// For each delaunay edge (between two vertices, becomes
|
||||
// the Voronoi face normal) snap to the alignment direction if within
|
||||
// alignmentAcceptanceAngle. Slightly > 45 is a good choice - prevents
|
||||
// flipping.
|
||||
alignmentAcceptanceAngle 48;
|
||||
|
||||
// How often to rebuild the alignment info (expensive)
|
||||
sizeAndAlignmentRebuildFrequency 20;
|
||||
|
||||
// When to insert points. Not advisable change to
|
||||
// these settings.
|
||||
pointInsertionCriteria
|
||||
{
|
||||
// If edge larger than 1.75 target cell size
|
||||
// (so tets too large/stretched) insert point
|
||||
cellCentreDistCoeff 1.75;
|
||||
// Do not insert point if voronoi face (on edge) very small.
|
||||
faceAreaRatioCoeff 0.0025;
|
||||
// Insert point only if edge closely aligned to local alignment
|
||||
// direction.
|
||||
acceptanceAngle 21.5;
|
||||
}
|
||||
|
||||
// Opposite: remove point if mesh too compressed. Do not change these
|
||||
// settings.
|
||||
pointRemovalCriteria
|
||||
{
|
||||
cellCentreDistCoeff 0.65;
|
||||
}
|
||||
|
||||
// How to determine the point motion. All edges got some direction.
|
||||
// Sum all edge contributions to determine point motion. Weigh by
|
||||
// face area so motion is preferentially determined by large faces
|
||||
// (or more importantly ignore contribution from small faces).
|
||||
// Do not change these settings.
|
||||
faceAreaWeightModel piecewiseLinearRamp;
|
||||
|
||||
piecewiseLinearRampCoeffs
|
||||
{
|
||||
lowerAreaFraction 0.5;
|
||||
upperAreaFraction 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// After simulation, when converting to polyMesh, filter out small faces/edges.
|
||||
// Do not change. See cvControls.H
|
||||
polyMeshFiltering
|
||||
{
|
||||
// Upper limit on the size of faces to be filtered.
|
||||
// fraction of the local target cell size
|
||||
filterSizeCoeff 0.2;
|
||||
|
||||
// Upper limit on how close two dual vertices can be before
|
||||
// being merged, fraction of the local target cell size
|
||||
mergeClosenessCoeff 1e-9;
|
||||
|
||||
// To not filter: set maxNonOrtho to 1 (so check fails) and then
|
||||
// set continueFilteringOnBadInitialPolyMesh to false.
|
||||
continueFilteringOnBadInitialPolyMesh true;
|
||||
|
||||
// When a face is "bad", what fraction should the filterSizeCoeff be
|
||||
// reduced by. Recursive, so for a filterCount value of fC, the
|
||||
// filterSizeCoeff is reduced by pow(filterErrorReductionCoeff, fC)
|
||||
filterErrorReductionCoeff 0.5;
|
||||
|
||||
// Maximum number of filterCount applications before a face
|
||||
// is not attempted to be filtered
|
||||
filterCountSkipThreshold 4;
|
||||
|
||||
// Maximum number of permissible iterations of the face collapse
|
||||
// algorithm. The value to choose will be related the maximum number
|
||||
// of points on a face that is to be collapsed and how many faces
|
||||
// around it need to be collapsed.
|
||||
maxCollapseIterations 25;
|
||||
|
||||
// Maximum number of times an to allow an equal faceSet to be
|
||||
// returned from the face quality assessment before stopping iterations
|
||||
// to break an infinitie loop.
|
||||
maxConsecutiveEqualFaceSets 5;
|
||||
// Remove little steps (almost perp to surface) by collapsing face.
|
||||
surfaceStepFaceAngle 80;
|
||||
// Do not collapse face to edge if should become edges
|
||||
edgeCollapseGuardFraction 0.3;
|
||||
// Only collapse face to point if high aspect ratio
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.35;
|
||||
}
|
||||
|
||||
|
||||
// Generic mesh quality settings. At any undoable phase these determine
|
||||
// where to undo. Same as in snappyHexMeshDict
|
||||
meshQualityControls
|
||||
{
|
||||
//- Maximum non-orthogonality allowed. Set to 180 to disable.
|
||||
maxNonOrtho 65;
|
||||
|
||||
//- Max skewness allowed. Set to <0 to disable.
|
||||
maxBoundarySkewness 50;
|
||||
maxInternalSkewness 10;
|
||||
|
||||
//- Max concaveness allowed. Is angle (in degrees) below which concavity
|
||||
// is allowed. 0 is straight face, <0 would be convex face.
|
||||
// Set to 180 to disable.
|
||||
maxConcave 80;
|
||||
|
||||
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
|
||||
// Set to a sensible fraction of the smallest cell volume expected.
|
||||
// Set to very negative number (e.g. -1E30) to disable.
|
||||
minVol -1E30;
|
||||
|
||||
//- Minimum quality of the tet formed by the
|
||||
// variable base point minimum decomposition triangles and
|
||||
// the cell centre (so not face-centre decomposition).
|
||||
// This has to be a positive number for tracking
|
||||
// to work. Set to very negative number (e.g. -1E30) to
|
||||
// disable.
|
||||
// <0 = inside out tet,
|
||||
// 0 = flat tet
|
||||
// 1 = regular tet
|
||||
minTetQuality 1e-30;
|
||||
|
||||
//- Minimum absolute face area. Set to <0 to disable.
|
||||
minArea -1;
|
||||
|
||||
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
|
||||
//- and face centre triangles normal
|
||||
minTwist 0.001;
|
||||
|
||||
//- minimum normalised cell determinant
|
||||
//- 1 = hex, <= 0 = folded or flattened illegal cell
|
||||
minDeterminant 0.001;
|
||||
|
||||
//- minFaceWeight (0 -> 0.5)
|
||||
minFaceWeight 0.02;
|
||||
|
||||
//- minVolRatio (0 -> 1)
|
||||
minVolRatio 0.01;
|
||||
|
||||
//must be >0 for Fluent compatibility
|
||||
minTriangleTwist -1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/mesh/cvMesh/simpleShapes/system/fvSchemes
Normal file
55
tutorials/mesh/cvMesh/simpleShapes/system/fvSchemes
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
d2dt2Schemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default Gauss cubic;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default cubic;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default uncorrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
D ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
41
tutorials/mesh/cvMesh/simpleShapes/system/fvSolution
Normal file
41
tutorials/mesh/cvMesh/simpleShapes/system/fvSolution
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"(D|Dcorr)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-06;
|
||||
relTol 0.99;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 6;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
}
|
||||
|
||||
stressAnalysis
|
||||
{
|
||||
nCorrectors 1;
|
||||
D 1e-10;
|
||||
accelerationFactor 2;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
148
tutorials/mesh/cvMesh/simpleShapes/system/topoSetDict
Normal file
148
tutorials/mesh/cvMesh/simpleShapes/system/topoSetDict
Normal file
@ -0,0 +1,148 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100 -100 0)(100 100 100);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name z;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name zf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set z;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100 0.1 -100)(100 100 100);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name y;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name yf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set y;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~ //
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0.3 -100 -100)(100 100 100);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name x;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name xf;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set x;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user