ENH: cvMesh: Update tutorials
This commit is contained in:
parent
293d651331
commit
b56d84db79
@ -125,34 +125,18 @@ motionControl
|
||||
{
|
||||
defaultCellSize 0.1;
|
||||
|
||||
//cellShapeControl constantControl;
|
||||
//cellShapeControl fileControl;
|
||||
cellShapeControl surfaceControl;
|
||||
|
||||
constantControlCoeffs
|
||||
{
|
||||
cellSize $defaultCellSize;
|
||||
cellAlignment (1 1 0 0 1 0 0 1 1);
|
||||
}
|
||||
|
||||
fileControlCoeffs
|
||||
{
|
||||
pointFile "alignmentPoints";
|
||||
sizesFile "alignmentSizes";
|
||||
alignmentsFile "alignmentTensors";
|
||||
}
|
||||
|
||||
surfaceControlCoeffs
|
||||
shapeControlFunctions
|
||||
{
|
||||
blob.stl
|
||||
{
|
||||
priority 1;
|
||||
mode bothSides;
|
||||
type searchableSurfaceControl;
|
||||
priority 1;
|
||||
mode bothSides;
|
||||
|
||||
surfaceCellSizeFunction uniformValue;
|
||||
uniformValueCoeffs
|
||||
{
|
||||
surfaceCellSize 0.1;
|
||||
surfaceCellSize $defaultCellSize;
|
||||
}
|
||||
|
||||
cellSizeFunction uniform;
|
||||
|
@ -13,7 +13,7 @@ mv log.topoSet log.topoSet.background
|
||||
runApplication subsetMesh -cellSet background -patch walls -overwrite
|
||||
|
||||
runApplication cvMesh
|
||||
#runApplication collapseEdges -time 100 -collapseFaces
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
runApplication checkMesh -latestTime -allGeometry -allTopology
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
@ -18,8 +18,9 @@ runApplication subsetMesh background -patch walls -overwrite
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel cvMesh $nProc
|
||||
runParallel collapseEdges $nProc -latestTime -collapseFaces
|
||||
runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
|
||||
|
||||
runApplication reconstructParMesh -constant
|
||||
runApplication reconstructParMesh -latestTime
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
@ -20,8 +20,8 @@ FoamFile
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
nFaces 116;
|
||||
startFace 155;
|
||||
nFaces 126;
|
||||
startFace 207;
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -36,7 +36,7 @@ deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 100;
|
||||
writeInterval 10;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
@ -117,37 +117,20 @@ motionControl
|
||||
{
|
||||
defaultCellSize 0.001;
|
||||
|
||||
//cellShapeControl constantControl;
|
||||
//cellShapeControl fileControl;
|
||||
cellShapeControl surfaceControl;
|
||||
|
||||
constantControlCoeffs
|
||||
{
|
||||
cellSize 0.05;
|
||||
cellAlignment (1 1 0 0 1 0 0 1 1);
|
||||
}
|
||||
|
||||
fileControlCoeffs
|
||||
{
|
||||
pointFile "";
|
||||
sizesFile "";
|
||||
alignmentsFile "";
|
||||
}
|
||||
|
||||
surfaceControlCoeffs
|
||||
//cellSizeControlGeometry
|
||||
shapeControlFunctions
|
||||
{
|
||||
flange.obj
|
||||
{
|
||||
priority 1;
|
||||
mode inside;
|
||||
type searchableSurfaceControl;
|
||||
priority 1;
|
||||
mode inside;
|
||||
surfaceCellSizeFunction uniformValue;
|
||||
uniformValueCoeffs
|
||||
{
|
||||
surfaceCellSize 0.001;
|
||||
surfaceCellSize $defaultCellSize;
|
||||
}
|
||||
|
||||
cellSizeFunction uniform;
|
||||
cellSizeFunction uniform;
|
||||
uniformCoeffs{}
|
||||
}
|
||||
}
|
||||
@ -170,7 +153,7 @@ motionControl
|
||||
|
||||
timeChecks no;
|
||||
|
||||
maxLoadUnbalance 0.05;
|
||||
maxLoadUnbalance 0.2;
|
||||
|
||||
alignmentSearchSpokes 36;
|
||||
|
||||
@ -203,7 +186,7 @@ motionControl
|
||||
polyMeshFiltering
|
||||
{
|
||||
filterEdges on;
|
||||
filterFaces on;
|
||||
filterFaces off;
|
||||
writeTetDualMesh false;
|
||||
}
|
||||
|
||||
|
@ -83,4 +83,4 @@ solid ascii
|
||||
vertex 1.3 -0.9 1
|
||||
endloop
|
||||
endfacet
|
||||
end solid
|
||||
endsolid
|
||||
|
52
tutorials/mesh/cvMesh/simpleShapes/system/collapseDict
Normal file
52
tutorials/mesh/cvMesh/simpleShapes/system/collapseDict
Normal file
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object collapseDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
collapseEdgesCoeffs
|
||||
{
|
||||
minimumEdgeLength 1e-6;
|
||||
maximumMergeAngle 180;
|
||||
reductionFactor 0.5;
|
||||
}
|
||||
|
||||
collapseFacesCoeffs
|
||||
{
|
||||
initialFaceLengthFactor 0.5;
|
||||
reductionFactor 0.5;
|
||||
|
||||
allowEarlyCollapseToPoint on;
|
||||
allowEarlyCollapseCoeff 0.2;
|
||||
guardFraction 0.1;
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.3;
|
||||
}
|
||||
|
||||
meshQualityCoeffs
|
||||
{
|
||||
#include "meshQualityDict";
|
||||
maximumIterations 30;
|
||||
maximumSmoothingIterations 1;
|
||||
maxPointErrorCount 5;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -34,7 +34,7 @@ deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1000; //10 to see the meshing steps
|
||||
writeInterval 80; // 10 to see the meshing steps
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
@ -126,32 +126,21 @@ surfaceConformation
|
||||
// Initial and intermediate controls
|
||||
conformationControls
|
||||
{
|
||||
// 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)
|
||||
// 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 2;
|
||||
// distance to search for near feature edges
|
||||
edgeSearchDistCoeff 2;
|
||||
|
||||
// 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;
|
||||
// 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;
|
||||
|
||||
|
||||
surfacePtExclusionDistanceCoeff 0.5;
|
||||
}
|
||||
|
||||
// Same for iterations
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.25;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
surfacePtExclusionDistanceCoeff 0.5;
|
||||
|
||||
// Stop either at maxIterations or if the number of surface pokes
|
||||
// is very small (iterationToInitialHitRatioLimit * initial number)
|
||||
@ -162,16 +151,6 @@ surfaceConformation
|
||||
iterationToInitialHitRatioLimit 0.001;
|
||||
}
|
||||
|
||||
coarseConformationControls
|
||||
{
|
||||
$conformationControls;
|
||||
}
|
||||
|
||||
fineConformationControls
|
||||
{
|
||||
$conformationControls;
|
||||
}
|
||||
|
||||
// Geometry to mesh to
|
||||
geometryToConformTo
|
||||
{
|
||||
@ -258,21 +237,20 @@ initialPoints
|
||||
motionControl
|
||||
{
|
||||
// Absolute cell size of back ground mesh. This is the maximum cell size.
|
||||
defaultCellSize 0.05;
|
||||
defaultCellSize 0.1;
|
||||
|
||||
cellShapeControl surfaceControl;
|
||||
|
||||
surfaceControlCoeffs
|
||||
shapeControlFunctions
|
||||
{
|
||||
coneAndSphere
|
||||
{
|
||||
type searchableSurfaceControl;
|
||||
priority 1;
|
||||
mode bothSides;
|
||||
|
||||
surfaceCellSizeFunction uniformValue;
|
||||
uniformValueCoeffs
|
||||
{
|
||||
surfaceCellSize $defaultCellSize;
|
||||
surfaceCellSize 0.075;
|
||||
}
|
||||
|
||||
cellSizeFunction uniform;
|
||||
@ -282,6 +260,7 @@ motionControl
|
||||
|
||||
domain
|
||||
{
|
||||
type searchableSurfaceControl;
|
||||
priority 1;
|
||||
mode bothSides;
|
||||
|
||||
@ -319,7 +298,7 @@ motionControl
|
||||
objOutput no;
|
||||
|
||||
// Timing and memory usage.
|
||||
timeChecks yes;
|
||||
timeChecks no;
|
||||
|
||||
// Number of rays in plane parallel to nearest surface. Used to detect
|
||||
// next closest surfaces. Used to work out alignment (three vectors)
|
||||
@ -380,48 +359,9 @@ motionControl
|
||||
// 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.5;
|
||||
|
||||
// Upper limit on how close two dual vertices can be before
|
||||
// being merged, fraction of the local target cell size
|
||||
mergeClosenessCoeff 1e-9;
|
||||
|
||||
edgeMergeAngle 30;
|
||||
|
||||
// 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;
|
||||
|
||||
// Write the tet-dual mesh for post-processing
|
||||
writeTetDualMesh yes;
|
||||
filterEdges on;
|
||||
filterFaces on;
|
||||
writeTetDualMesh false;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user