ENH: cvMesh: Update tutorials

This commit is contained in:
laurence
2012-12-12 16:05:03 +00:00
parent 293d651331
commit b56d84db79
10 changed files with 93 additions and 133 deletions

View File

@ -125,34 +125,18 @@ motionControl
{ {
defaultCellSize 0.1; defaultCellSize 0.1;
//cellShapeControl constantControl; shapeControlFunctions
//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
{ {
blob.stl blob.stl
{ {
priority 1; type searchableSurfaceControl;
mode bothSides; priority 1;
mode bothSides;
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
{ {
surfaceCellSize 0.1; surfaceCellSize $defaultCellSize;
} }
cellSizeFunction uniform; cellSizeFunction uniform;

View File

@ -13,7 +13,7 @@ mv log.topoSet log.topoSet.background
runApplication subsetMesh -cellSet background -patch walls -overwrite runApplication subsetMesh -cellSet background -patch walls -overwrite
runApplication cvMesh runApplication cvMesh
#runApplication collapseEdges -time 100 -collapseFaces runApplication collapseEdges -latestTime -collapseFaces
runApplication checkMesh -latestTime -allGeometry -allTopology runApplication checkMesh -latestTime -allGeometry -allTopology
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -18,8 +18,9 @@ runApplication subsetMesh background -patch walls -overwrite
runApplication decomposePar runApplication decomposePar
runParallel cvMesh $nProc runParallel cvMesh $nProc
runParallel collapseEdges $nProc -latestTime -collapseFaces
runParallel checkMesh $nProc -latestTime -allTopology -allGeometry runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
runApplication reconstructParMesh -constant runApplication reconstructParMesh -latestTime
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -20,8 +20,8 @@ FoamFile
walls walls
{ {
type wall; type wall;
nFaces 116; nFaces 126;
startFace 155; startFace 207;
} }
) )

View File

@ -36,7 +36,7 @@ deltaT 1;
writeControl timeStep; writeControl timeStep;
writeInterval 100; writeInterval 10;
purgeWrite 0; purgeWrite 0;

View File

@ -117,37 +117,20 @@ motionControl
{ {
defaultCellSize 0.001; defaultCellSize 0.001;
//cellShapeControl constantControl; shapeControlFunctions
//cellShapeControl fileControl;
cellShapeControl surfaceControl;
constantControlCoeffs
{
cellSize 0.05;
cellAlignment (1 1 0 0 1 0 0 1 1);
}
fileControlCoeffs
{
pointFile "";
sizesFile "";
alignmentsFile "";
}
surfaceControlCoeffs
//cellSizeControlGeometry
{ {
flange.obj flange.obj
{ {
priority 1; type searchableSurfaceControl;
mode inside; priority 1;
mode inside;
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
{ {
surfaceCellSize 0.001; surfaceCellSize $defaultCellSize;
} }
cellSizeFunction uniform; cellSizeFunction uniform;
uniformCoeffs{} uniformCoeffs{}
} }
} }
@ -170,7 +153,7 @@ motionControl
timeChecks no; timeChecks no;
maxLoadUnbalance 0.05; maxLoadUnbalance 0.2;
alignmentSearchSpokes 36; alignmentSearchSpokes 36;
@ -203,7 +186,7 @@ motionControl
polyMeshFiltering polyMeshFiltering
{ {
filterEdges on; filterEdges on;
filterFaces on; filterFaces off;
writeTetDualMesh false; writeTetDualMesh false;
} }

View File

@ -83,4 +83,4 @@ solid ascii
vertex 1.3 -0.9 1 vertex 1.3 -0.9 1
endloop endloop
endfacet endfacet
end solid endsolid

View 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;
}
// ************************************************************************* //

View File

@ -34,7 +34,7 @@ deltaT 1;
writeControl timeStep; writeControl timeStep;
writeInterval 1000; //10 to see the meshing steps writeInterval 80; // 10 to see the meshing steps
purgeWrite 0; purgeWrite 0;

View File

@ -126,32 +126,21 @@ surfaceConformation
// Initial and intermediate controls // Initial and intermediate controls
conformationControls conformationControls
{ {
// Initial conformation // We've got a point poking through the surface. Don't do any
initial // 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 // distance to search for near feature edges
edgeSearchDistCoeff 2; edgeSearchDistCoeff 2;
// Proximity to a feature edge where a surface hit is // Proximity to a feature edge where a surface hit is
// not created, only the edge conformation is created // not created, only the edge conformation is created
// - fraction of the local target cell size. Coarse // - fraction of the local target cell size. Coarse
// conformation, initial protrusion tests. // conformation, initial protrusion tests.
surfacePtReplaceDistCoeff 0.5; surfacePtReplaceDistCoeff 0.5;
surfacePtExclusionDistanceCoeff 0.5; surfacePtExclusionDistanceCoeff 0.5;
}
// Same for iterations
iteration
{
edgeSearchDistCoeff 1.25;
surfacePtReplaceDistCoeff 0.7;
}
// Stop either at maxIterations or if the number of surface pokes // Stop either at maxIterations or if the number of surface pokes
// is very small (iterationToInitialHitRatioLimit * initial number) // is very small (iterationToInitialHitRatioLimit * initial number)
@ -162,16 +151,6 @@ surfaceConformation
iterationToInitialHitRatioLimit 0.001; iterationToInitialHitRatioLimit 0.001;
} }
coarseConformationControls
{
$conformationControls;
}
fineConformationControls
{
$conformationControls;
}
// Geometry to mesh to // Geometry to mesh to
geometryToConformTo geometryToConformTo
{ {
@ -258,21 +237,20 @@ initialPoints
motionControl motionControl
{ {
// Absolute cell size of back ground mesh. This is the maximum cell size. // Absolute cell size of back ground mesh. This is the maximum cell size.
defaultCellSize 0.05; defaultCellSize 0.1;
cellShapeControl surfaceControl; shapeControlFunctions
surfaceControlCoeffs
{ {
coneAndSphere coneAndSphere
{ {
type searchableSurfaceControl;
priority 1; priority 1;
mode bothSides; mode bothSides;
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
{ {
surfaceCellSize $defaultCellSize; surfaceCellSize 0.075;
} }
cellSizeFunction uniform; cellSizeFunction uniform;
@ -282,6 +260,7 @@ motionControl
domain domain
{ {
type searchableSurfaceControl;
priority 1; priority 1;
mode bothSides; mode bothSides;
@ -319,7 +298,7 @@ motionControl
objOutput no; objOutput no;
// Timing and memory usage. // Timing and memory usage.
timeChecks yes; timeChecks no;
// Number of rays in plane parallel to nearest surface. Used to detect // Number of rays in plane parallel to nearest surface. Used to detect
// next closest surfaces. Used to work out alignment (three vectors) // next closest surfaces. Used to work out alignment (three vectors)
@ -380,48 +359,9 @@ motionControl
// Do not change. See cvControls.H // Do not change. See cvControls.H
polyMeshFiltering polyMeshFiltering
{ {
// Upper limit on the size of faces to be filtered. filterEdges on;
// fraction of the local target cell size filterFaces on;
filterSizeCoeff 0.5; writeTetDualMesh false;
// 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;
} }