ENH: cvMesh: Update tutorials

This commit is contained in:
laurence
2013-02-05 16:51:37 +00:00
parent 58c11b121f
commit 986532b18a
9 changed files with 252 additions and 157 deletions

View File

@ -5,49 +5,79 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object collapseDict; object collapseDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
controlMeshQuality on;
collapseEdgesCoeffs collapseEdgesCoeffs
{ {
minimumEdgeLength 1e-4; // Edges shorter than this absolute value will be merged
maximumMergeAngle 180; minimumEdgeLength 1e-6;
reductionFactor 0.5;
}
// The maximum angle between two edges that share a point attached to
// no other edges
maximumMergeAngle 180;
}
collapseFacesCoeffs collapseFacesCoeffs
{ {
// The initial face length factor
initialFaceLengthFactor 0.5; initialFaceLengthFactor 0.5;
reductionFactor 0.5;
allowEarlyCollapseToPoint on; // If the face can't be collapsed to an edge, and it has a span less than
allowEarlyCollapseCoeff 0.2; // the target face length multiplied by this coefficient, collapse it
guardFraction 0.1; // to a point.
maxCollapseFaceToPointSideLengthCoeff 0.3; maxCollapseFaceToPointSideLengthCoeff 0.3;
// Allow early collapse of edges to a point
allowEarlyCollapseToPoint on;
// Fraction to premultiply maxCollapseFaceToPointSideLengthCoeff by if
// allowEarlyCollapseToPoint is enabled
allowEarlyCollapseCoeff 0.2;
// Defining how close to the midpoint (M) of the projected
// vertices line a projected vertex (X) can be before making this
// an invalid edge collapse
//
// X---X-g----------------M----X-----------g----X--X
//
// Only allow a collapse if all projected vertices are outwith
// guardFraction (g) of the distance form the face centre to the
// furthest vertex in the considered direction
guardFraction 0.1;
} }
controlMeshQualityCoeffs
meshQualityCoeffs
{ {
// Name of the dictionary that has the mesh quality coefficients used
// by motionSmoother::checkMesh
#include "meshQualityDict"; #include "meshQualityDict";
// The amount that minimumEdgeLength will be reduced by for each
// edge if that edge's collapse generates a poor quality face
edgeReductionFactor 0.5;
// The amount that initialFaceLengthFactor will be reduced by for each
// face if its collapse generates a poor quality face
faceReductionFactor 0.5;
// Maximum number of smoothing iterations for the reductionFactors
maximumSmoothingIterations 2;
// Maximum number of outer iterations is mesh quality checking is enabled
maximumIterations 10; maximumIterations 10;
maximumSmoothingIterations 1;
maxPointErrorCount 5; // Maximum number of iterations deletion of a point can cause a bad face
// to be constructed before it is forced to not be deleted
maxPointErrorCount 3;
} }

View File

@ -5,21 +5,13 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object cvMeshDict; object cvMeshDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Any scalar with a name <name>Coeff specifies a value that will be implemented // Any scalar with a name <name>Coeff specifies a value that will be implemented
@ -29,6 +21,7 @@ geometry
{ {
blob.stl blob.stl
{ {
name blob;
type triSurfaceMesh; type triSurfaceMesh;
} }
@ -109,15 +102,14 @@ surfaceConformation
geometryToConformTo geometryToConformTo
{ {
blob.stl blob
{ {
featureMethod none; featureMethod none;
} }
} }
additionalFeatures additionalFeatures
{ {}
}
} }
@ -125,28 +117,40 @@ motionControl
{ {
defaultCellSize 0.1; defaultCellSize 0.1;
minimumCellSizeCoeff 0;
maxSmoothingIterations 0;
maxRefinementIterations 0;
shapeControlFunctions shapeControlFunctions
{ {
blob.stl /* blob*/
/* {*/
/* type searchableSurfaceControl;*/
/* priority 1;*/
/* mode bothSides;*/
/* surfaceCellSizeFunction uniformValue;*/
/* uniformValueCoeffs*/
/* {*/
/* surfaceCellSizeCoeff 1;*/
/* }*/
/* cellSizeFunction uniform;*/
/* uniformCoeffs*/
/* {}*/
/* }*/
fileControl
{ {
type searchableSurfaceControl; type fileControl;
priority 1; priority 1;
mode bothSides; pointsFile "points";
sizesFile "sizes";
surfaceCellSizeFunction uniformValue; alignmentsFile "alignments";
uniformValueCoeffs
{
surfaceCellSize $defaultCellSize;
}
cellSizeFunction uniform;
uniformCoeffs
{}
} }
} }
maxRefinementIterations 1;
cellAspectRatioControl cellAspectRatioControl
{ {
aspectRatio 1.0; aspectRatio 1.0;

View File

@ -5,21 +5,13 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object meshQualityDict; object meshQualityDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Maximum non-orthogonality allowed. Set to 180 to disable. //- Maximum non-orthogonality allowed. Set to 180 to disable.

View File

@ -5,47 +5,79 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object collapseDict; object collapseDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
controlMeshQuality on;
collapseEdgesCoeffs collapseEdgesCoeffs
{ {
// Edges shorter than this absolute value will be merged
minimumEdgeLength 1e-6; minimumEdgeLength 1e-6;
// The maximum angle between two edges that share a point attached to
// no other edges
maximumMergeAngle 180; maximumMergeAngle 180;
reductionFactor 0.5;
} }
collapseFacesCoeffs collapseFacesCoeffs
{ {
// The initial face length factor
initialFaceLengthFactor 0.5; initialFaceLengthFactor 0.5;
reductionFactor 0.5;
allowEarlyCollapseToPoint on; // If the face can't be collapsed to an edge, and it has a span less than
allowEarlyCollapseCoeff 0.2; // the target face length multiplied by this coefficient, collapse it
guardFraction 0.1; // to a point.
maxCollapseFaceToPointSideLengthCoeff 0.3; maxCollapseFaceToPointSideLengthCoeff 0.3;
// Allow early collapse of edges to a point
allowEarlyCollapseToPoint on;
// Fraction to premultiply maxCollapseFaceToPointSideLengthCoeff by if
// allowEarlyCollapseToPoint is enabled
allowEarlyCollapseCoeff 0.2;
// Defining how close to the midpoint (M) of the projected
// vertices line a projected vertex (X) can be before making this
// an invalid edge collapse
//
// X---X-g----------------M----X-----------g----X--X
//
// Only allow a collapse if all projected vertices are outwith
// guardFraction (g) of the distance form the face centre to the
// furthest vertex in the considered direction
guardFraction 0.1;
} }
meshQualityCoeffs controlMeshQualityCoeffs
{ {
// Name of the dictionary that has the mesh quality coefficients used
// by motionSmoother::checkMesh
#include "meshQualityDict"; #include "meshQualityDict";
// The amount that minimumEdgeLength will be reduced by for each
// edge if that edge's collapse generates a poor quality face
edgeReductionFactor 0.5;
// The amount that initialFaceLengthFactor will be reduced by for each
// face if its collapse generates a poor quality face
faceReductionFactor 0.5;
// Maximum number of smoothing iterations for the reductionFactors
maximumSmoothingIterations 2;
// Maximum number of outer iterations is mesh quality checking is enabled
maximumIterations 10; maximumIterations 10;
maximumSmoothingIterations 1;
maxPointErrorCount 5; // Maximum number of iterations deletion of a point can cause a bad face
// to be constructed before it is forced to not be deleted
maxPointErrorCount 3;
} }

View File

@ -5,30 +5,23 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object cvMeshDict; object cvMeshDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Any scalar with a name <name>Coeff specifies a value that will be implemented // Any scalar with a name <name>Coeff specifies a value that will be implemented
// as a faction of the local target cell size // as a faction of the target cell size
geometry geometry
{ {
flange.obj flange.obj
{ {
name flange;
type triSurfaceMesh; type triSurfaceMesh;
} }
} }
@ -78,7 +71,7 @@ surfaceConformation
geometryToConformTo geometryToConformTo
{ {
flange.obj flange
{ {
featureMethod extendedFeatureEdgeMesh; featureMethod extendedFeatureEdgeMesh;
extendedFeatureEdgeMesh "flange.extendedFeatureEdgeMesh"; extendedFeatureEdgeMesh "flange.extendedFeatureEdgeMesh";
@ -86,8 +79,7 @@ surfaceConformation
} }
additionalFeatures additionalFeatures
{ {}
}
} }
@ -96,11 +88,10 @@ initialPoints
minimumSurfaceDistanceCoeff 0.55; minimumSurfaceDistanceCoeff 0.55;
initialPointsMethod autoDensity; initialPointsMethod autoDensity;
//initialPointsMethod pointFile;
autoDensityCoeffs autoDensityCoeffs
{ {
minLevels 1; minLevels 2;
maxSizeRatio 3.0; maxSizeRatio 3.0;
sampleResolution 4; sampleResolution 4;
surfaceSampleResolution 5; surfaceSampleResolution 5;
@ -115,11 +106,18 @@ initialPoints
motionControl motionControl
{ {
defaultCellSize 0.001; defaultCellSize 0.0008;
minimumCellSizeCoeff 0;
// For background cell size and alignment grid
maxSmoothingIterations 100;
maxRefinementIterations 5;
shapeControlFunctions shapeControlFunctions
{ {
flange.obj flange
{ {
type searchableSurfaceControl; type searchableSurfaceControl;
priority 1; priority 1;
@ -127,12 +125,25 @@ motionControl
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
{ {
surfaceCellSize $defaultCellSize; surfaceCellSizeCoeff 1;
}
cellSizeFunction surfaceOffsetLinearDistance;
surfaceOffsetLinearDistanceCoeffs
{
distanceCellSizeCoeff 1;
surfaceOffsetCoeff 2.5;
linearDistanceCoeff 2.5;
}
} }
cellSizeFunction uniform; /* fileControl*/
uniformCoeffs{} /* {*/
} /* type fileControl;*/
/* priority 1;*/
/* pointsFile "points";*/
/* sizesFile "sizes";*/
/* alignmentsFile "alignments";*/
/* }*/
} }
cellAspectRatioControl cellAspectRatioControl
@ -145,7 +156,7 @@ motionControl
adaptiveLinearCoeffs adaptiveLinearCoeffs
{ {
relaxationStart 1.0; relaxationStart 0.5;
relaxationEnd 0.0; relaxationEnd 0.0;
} }

View File

@ -5,21 +5,13 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object meshQualityDict; object meshQualityDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Maximum non-orthogonality allowed. Set to 180 to disable. //- Maximum non-orthogonality allowed. Set to 180 to disable.

View File

@ -5,47 +5,79 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object collapseDict; object collapseDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
controlMeshQuality on;
collapseEdgesCoeffs collapseEdgesCoeffs
{ {
// Edges shorter than this absolute value will be merged
minimumEdgeLength 1e-6; minimumEdgeLength 1e-6;
// The maximum angle between two edges that share a point attached to
// no other edges
maximumMergeAngle 180; maximumMergeAngle 180;
reductionFactor 0.5;
} }
collapseFacesCoeffs collapseFacesCoeffs
{ {
// The initial face length factor
initialFaceLengthFactor 0.5; initialFaceLengthFactor 0.5;
reductionFactor 0.5;
allowEarlyCollapseToPoint on; // If the face can't be collapsed to an edge, and it has a span less than
allowEarlyCollapseCoeff 0.2; // the target face length multiplied by this coefficient, collapse it
guardFraction 0.1; // to a point.
maxCollapseFaceToPointSideLengthCoeff 0.3; maxCollapseFaceToPointSideLengthCoeff 0.3;
// Allow early collapse of edges to a point
allowEarlyCollapseToPoint on;
// Fraction to premultiply maxCollapseFaceToPointSideLengthCoeff by if
// allowEarlyCollapseToPoint is enabled
allowEarlyCollapseCoeff 0.2;
// Defining how close to the midpoint (M) of the projected
// vertices line a projected vertex (X) can be before making this
// an invalid edge collapse
//
// X---X-g----------------M----X-----------g----X--X
//
// Only allow a collapse if all projected vertices are outwith
// guardFraction (g) of the distance form the face centre to the
// furthest vertex in the considered direction
guardFraction 0.1;
} }
meshQualityCoeffs controlMeshQualityCoeffs
{ {
// Name of the dictionary that has the mesh quality coefficients used
// by motionSmoother::checkMesh
#include "meshQualityDict"; #include "meshQualityDict";
maximumIterations 30;
maximumSmoothingIterations 1; // The amount that minimumEdgeLength will be reduced by for each
maxPointErrorCount 5; // edge if that edge's collapse generates a poor quality face
edgeReductionFactor 0.5;
// The amount that initialFaceLengthFactor will be reduced by for each
// face if its collapse generates a poor quality face
faceReductionFactor 0.5;
// Maximum number of smoothing iterations for the reductionFactors
maximumSmoothingIterations 2;
// Maximum number of outer iterations is mesh quality checking is enabled
maximumIterations 10;
// Maximum number of iterations deletion of a point can cause a bad face
// to be constructed before it is forced to not be deleted
maxPointErrorCount 3;
} }

View File

@ -5,7 +5,6 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
@ -13,7 +12,6 @@ FoamFile
class dictionary; class dictionary;
object cvMeshDict; object cvMeshDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -45,7 +43,7 @@ See also cvControls.H in the conformalVoronoiMesh library
// Important: // Important:
// ---------- // ----------
// Any scalar with a name <name>Coeff specifies a value that will be implemented // Any scalar with a name <name>Coeff specifies a value that will be implemented
// as a faction of the local target cell size // as a faction of the target cell size
// Any scalar with a name <name>Size specifies an absolute size. // Any scalar with a name <name>Size specifies an absolute size.
@ -69,6 +67,10 @@ geometry
{ {
name domain; name domain;
type triSurfaceMesh; type triSurfaceMesh;
regions
{
ascii{ name domain_patch0; }
}
} }
} }
@ -167,7 +169,8 @@ surfaceConformation
} }
} }
additionalFeatures {} additionalFeatures
{}
} }
@ -239,6 +242,13 @@ 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.1; defaultCellSize 0.1;
minimumCellSizeCoeff 0;
// For background cell size and alignment grid
maxSmoothingIterations 100;
maxRefinementIterations 0;
shapeControlFunctions shapeControlFunctions
{ {
coneAndSphere coneAndSphere
@ -250,7 +260,7 @@ motionControl
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
{ {
surfaceCellSize 0.075; surfaceCellSizeCoeff 0.75;
} }
cellSizeFunction uniform; cellSizeFunction uniform;
@ -267,7 +277,7 @@ motionControl
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
{ {
surfaceCellSize $defaultCellSize; surfaceCellSizeCoeff 1;
} }
cellSizeFunction uniform; cellSizeFunction uniform;

View File

@ -5,21 +5,13 @@
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
root "";
case "";
instance "";
local "";
class dictionary; class dictionary;
object meshQualityDict; object meshQualityDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Maximum non-orthogonality allowed. Set to 180 to disable. //- Maximum non-orthogonality allowed. Set to 180 to disable.