mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
updated sample dictionary
This commit is contained in:
@ -22,161 +22,171 @@ FoamFile
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Which phases to run.
|
// Which of the steps to run
|
||||||
doRefine true;
|
castellatedMesh true;
|
||||||
doSnap true;
|
snap true;
|
||||||
doLayers true; // includes autoMergeFaces
|
addLayers false;
|
||||||
|
|
||||||
|
|
||||||
// Whether to dump intermediate meshes and print lots
|
// Geometry. Definition of all surfaces. All surfaces are of class
|
||||||
// 1 : write mesh
|
// searchableSurface.
|
||||||
// 2 : write volScalarField with cellLevel for postprocessing
|
// Surfaces are used
|
||||||
// 4 : write current intersections as .obj files
|
// - to specify refinement for any mesh cell intersecting it
|
||||||
debug 0;
|
// - to specify refinement for any mesh cell inside/outside/near
|
||||||
|
// - to 'snap' the mesh boundary to the surface
|
||||||
refineDict
|
geometry
|
||||||
{
|
{
|
||||||
// Which part to keep.
|
// box1x1x1
|
||||||
// NOTE: This point should never be on a face, always inside a cell, even
|
// {
|
||||||
// after refinement.
|
// type searchableBox;
|
||||||
keepPoints ((3 0.28 0.43));
|
// min (1.5 1 -0.5);
|
||||||
|
// max (3.5 2 0.5);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// sphere.stl
|
||||||
|
// {
|
||||||
|
// type triSurfaceMesh;
|
||||||
|
//
|
||||||
|
// // Per region the patchname. If not provided will be <name>_<region>.
|
||||||
|
// regions
|
||||||
|
// {
|
||||||
|
// secondSolid
|
||||||
|
// {
|
||||||
|
// name mySecondPatch;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
// Whether to remove/split cells likely to give problems when snapping
|
sphere2
|
||||||
handleSnapProblems on;
|
{
|
||||||
|
type searchableSphere;
|
||||||
|
centre (1.5 1.5 1.5);
|
||||||
|
radius 1.03;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Merge tolerance. Is fraction of overall bounding box of initial mesh
|
|
||||||
mergeTolerance 1E-6;
|
|
||||||
|
// Settings for the castellatedMesh generation.
|
||||||
|
castellatedMeshControls
|
||||||
|
{
|
||||||
|
|
||||||
|
// Refinement parameters
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// While refining maximum number of cells per processor. This is basically
|
// While refining maximum number of cells per processor. This is basically
|
||||||
// the number of cells that fit on a processor. If you choose this too small
|
// the number of cells that fit on a processor. If you choose this too small
|
||||||
// it will do just more refinement iterations to obtain a similar mesh.
|
// it will do just more refinement iterations to obtain a similar mesh.
|
||||||
procCellLimit 1000000;
|
maxLocalCells 1000000;
|
||||||
|
|
||||||
|
|
||||||
// Overall cell limit (approximately). Refinement will stop immediately
|
// Overall cell limit (approximately). Refinement will stop immediately
|
||||||
// upon reaching this number so a refinement level might not complete.
|
// upon reaching this number so a refinement level might not complete.
|
||||||
// Note that this is the number of cells before removing the part which
|
// Note that this is the number of cells before removing the part which
|
||||||
// is not 'visible' from the keepPoint. The final number of cells might actually
|
// is not 'visible' from the keepPoint. The final number of cells might
|
||||||
// be a lot less.
|
// actually be a lot less.
|
||||||
cellLimit 2000000;
|
maxGlobalCells 2000000;
|
||||||
|
|
||||||
|
|
||||||
// The surface refinement loop might spend lots of iterations refining just a
|
// The surface refinement loop might spend lots of iterations refining just a
|
||||||
// few cells. This setting will cause refinement to stop if <= minimumRefine
|
// few cells. This setting will cause refinement to stop if <= minimumRefine
|
||||||
// are selected for refinement. Note: it will at least do one iteration
|
// are selected for refinement. Note: it will at least do one iteration
|
||||||
// (unless the number of cells to refine is 0)
|
// (unless the number of cells to refine is 0)
|
||||||
minimumRefine 0;
|
minRefinementCells 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Number of buffer layers between different levels.
|
// Number of buffer layers between different levels.
|
||||||
// 1 means normal 2:1 refinement restriction, larger means slower
|
// 1 means normal 2:1 refinement restriction, larger means slower
|
||||||
// refinement.
|
// refinement.
|
||||||
nBufferLayers 1;
|
nCellsBetweenLevels 1;
|
||||||
|
|
||||||
|
|
||||||
// Feature Edge Refinement
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
// External feature file. Read from constant/triSurface for now.
|
// Explicit feature edge refinement
|
||||||
// Limitations:
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
// - either start or edge of any feature line has to be inside domain
|
|
||||||
// and be visible from keepPoint on starting mesh.
|
// Specifies a level for any cell intersected by its edges.
|
||||||
// - refining cells containing features is separate phase before refining
|
// This is a featureEdgeMesh, read from constant/triSurface for now.
|
||||||
// based on surface.
|
|
||||||
// - no load balancing, no check for cellLimit is done while doing this.
|
|
||||||
features
|
features
|
||||||
(
|
(
|
||||||
// {
|
//{
|
||||||
// file "someLine.eMesh";
|
// file "someLine.eMesh";
|
||||||
// level 2;
|
// level 2;
|
||||||
// }
|
//}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Internal Mesh Refinement
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
// Specifies the areas where the refinement has to be a certain level.
|
|
||||||
// These surfaces have to be closed. Refinement is either inside
|
|
||||||
// (refineInside = true) or outside. (note:insideness or outsideness
|
|
||||||
// is with respect to far away)
|
|
||||||
// Note:that even using these the transition can never be faster than
|
|
||||||
// nBufferLayers!
|
|
||||||
// Note:the refinement level can never be higher than any of the surfaces
|
|
||||||
// they overlap with. See below for the surface refinement level specification.
|
|
||||||
refinementShells
|
|
||||||
(
|
|
||||||
{
|
|
||||||
//type triSurfaceMesh;
|
|
||||||
//name cube1x1x1.stl;
|
|
||||||
type searchableBox;
|
|
||||||
name box1x1x1;
|
|
||||||
min (2.5 -0.5 -0.5);
|
|
||||||
max (3.5 0.5 0.5);
|
|
||||||
|
|
||||||
level 4;
|
|
||||||
refineInside true;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Surface based refinement
|
// Surface based refinement
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Curvature. Cosine of angle between two neighbouring surface intersections.
|
// Specifies two levels for every surface. The first is the minimum level,
|
||||||
// Only used if cell level > minLevel and < maxLevel.
|
// every cell intersecting a surface gets refined up to the minimum level.
|
||||||
curvature 0.5;
|
// The second level is the maximum level. Cells that 'see' multiple
|
||||||
|
// intersections where the intersections make an
|
||||||
|
// angle > resolveFeatureAngle get refined up to the maximum level.
|
||||||
|
|
||||||
|
refinementSurfaces
|
||||||
// Overall the refinement is according to the following rules:
|
{
|
||||||
// - if the cell-cell vector intersects a surface any cell that
|
sphere.stl
|
||||||
// is less refined than the minRefinementLevel of the surface gets refined.
|
|
||||||
// - else if the refinement level of the cell is between the
|
|
||||||
// minRefinementLevel and maxRefinementLevel the cell gets refined if
|
|
||||||
// - the normal of neighbouring surface intersections differ by more
|
|
||||||
// than above curvature
|
|
||||||
// - or if neighbouring surface intersections are on different surfaces or
|
|
||||||
// different surface regions.
|
|
||||||
|
|
||||||
|
|
||||||
// surfaces
|
|
||||||
surfaces
|
|
||||||
(
|
|
||||||
{
|
{
|
||||||
name sphere;
|
// Surface-wise min and max refinement level
|
||||||
file "sphere.stl";
|
level (2 2);
|
||||||
|
|
||||||
// Surface wide refinement level
|
// Optional region-wise level specification
|
||||||
minRefinementLevel 1;
|
|
||||||
maxRefinementLevel 1;
|
|
||||||
|
|
||||||
// Layers
|
|
||||||
surfaceLayers 1;
|
|
||||||
|
|
||||||
// Region specific refinement level
|
|
||||||
regions
|
regions
|
||||||
(
|
{
|
||||||
|
secondSolid
|
||||||
{
|
{
|
||||||
name firstSolid;
|
level (3 3);
|
||||||
minRefinementLevel 3;
|
|
||||||
maxRefinementLevel 3;
|
|
||||||
surfaceLayers 2;
|
|
||||||
}
|
}
|
||||||
{
|
}
|
||||||
name secondSolid;
|
|
||||||
minRefinementLevel 1;
|
|
||||||
maxRefinementLevel 1;
|
|
||||||
surfaceLayers 1;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
|
||||||
|
resolveFeatureAngle 30;
|
||||||
|
|
||||||
|
|
||||||
|
// Region-wise refinement
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// Specifies refinement level for cells in relation to a surface. One of
|
||||||
|
// three modes
|
||||||
|
// - distance. 'levels' specifies per distance to the surface the
|
||||||
|
// wanted refinement level. The distances need to be specified in
|
||||||
|
// descending order.
|
||||||
|
// - inside. 'levels' is only one entry and only the level is used. All
|
||||||
|
// cells inside the surface get refined up to the level. The surface
|
||||||
|
// needs to be closed for this to be possible.
|
||||||
|
// - outside. Same but cells outside.
|
||||||
|
|
||||||
|
refinementRegions
|
||||||
|
{
|
||||||
|
//box1x1x1
|
||||||
|
//{
|
||||||
|
// mode inside;
|
||||||
|
// levels ((1.0 4));
|
||||||
|
//}
|
||||||
|
//sphere.stl
|
||||||
|
//{
|
||||||
|
// mode distance;
|
||||||
|
// levels ((1.0 5) (2.0 3));
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Mesh selection
|
||||||
|
// ~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// After refinement patches get added for all refinementSurfaces and
|
||||||
|
// all cells intersecting the surfaces get put into these patches. The
|
||||||
|
// section reachable from the locationInMesh is kept.
|
||||||
|
// NOTE: This point should never be on a face, always inside a cell, even
|
||||||
|
// after refinement.
|
||||||
|
locationInMesh (5 0.28 0.43);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For snapping
|
|
||||||
snapDict
|
|
||||||
|
// Settings for the snapping.
|
||||||
|
snapControls
|
||||||
{
|
{
|
||||||
//- Number of patch smoothing iterations before finding correspondence
|
//- Number of patch smoothing iterations before finding correspondence
|
||||||
// to surface
|
// to surface
|
||||||
@ -185,47 +195,64 @@ snapDict
|
|||||||
//- Relative distance for points to be attracted by surface feature point
|
//- Relative distance for points to be attracted by surface feature point
|
||||||
// or edge. True distance is this factor times local
|
// or edge. True distance is this factor times local
|
||||||
// maximum edge length.
|
// maximum edge length.
|
||||||
snapTol 4.0;
|
tolerance 4.0;
|
||||||
|
|
||||||
//- Whether to move internal mesh as well as boundary
|
//- Number of mesh displacement relaxation iterations.
|
||||||
smoothMesh true;
|
nSolveIter 30;
|
||||||
|
|
||||||
//- Number of mesh displacement smoothing iterations.
|
|
||||||
nSmoothDispl 30;
|
|
||||||
|
|
||||||
//- Maximum number of snapping relaxation iterations. Should stop
|
//- Maximum number of snapping relaxation iterations. Should stop
|
||||||
// before upon reaching a correct mesh.
|
// before upon reaching a correct mesh.
|
||||||
nSnap 5;
|
nRelaxIter 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// For cell layers
|
|
||||||
layerDict
|
// Settings for the layer addition.
|
||||||
|
addLayersControls
|
||||||
{
|
{
|
||||||
|
// Per final patch (so not geometry!) the layer information
|
||||||
|
layers
|
||||||
|
{
|
||||||
|
sphere.stl_firstSolid
|
||||||
|
{
|
||||||
|
nSurfaceLayers 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
nSurfaceLayers 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Expansion factor for layer mesh
|
||||||
|
expansionRatio 1.0;
|
||||||
|
|
||||||
|
//- Wanted thickness of final added cell layer. If multiple layers
|
||||||
|
// is the
|
||||||
|
// thickness of the layer furthest away from the wall.
|
||||||
|
// Relative to undistorted size of cell outside layer.
|
||||||
|
finalLayerRatio 0.3;
|
||||||
|
|
||||||
|
//- Minimum thickness of cell layer. If for any reason layer
|
||||||
|
// cannot be above minThickness do not add layer.
|
||||||
|
// Relative to undistorted size of cell outside layer.
|
||||||
|
minThickness 0.25;
|
||||||
|
|
||||||
|
//- If points get not extruded do nGrow layers of connected faces that are
|
||||||
|
// also not grown. This helps convergence of the layer addition process
|
||||||
|
// close to features.
|
||||||
|
nGrow 1;
|
||||||
|
|
||||||
|
|
||||||
|
// Advanced settings
|
||||||
|
|
||||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||||
// make straight angle.
|
// make straight angle.
|
||||||
featureAngle 60;
|
featureAngle 60;
|
||||||
|
|
||||||
//- Maximum number of snapping relaxation iterations. Should stop
|
//- Maximum number of snapping relaxation iterations. Should stop
|
||||||
// before upon reaching a correct mesh.
|
// before upon reaching a correct mesh.
|
||||||
nSnap 5;
|
nRelaxIter 5;
|
||||||
|
|
||||||
|
|
||||||
//- Minimum thickness of cell layer. If for any reason layer cannot be
|
|
||||||
// above minThickness do not add layer if thickness below minThickNess.
|
|
||||||
// Relative to undistorted cell size
|
|
||||||
minThickness 0.25;
|
|
||||||
|
|
||||||
//- If points get not extruded do nGrow layers of connected faces that are
|
|
||||||
// not grown. Is used to not do layers at all close to features.
|
|
||||||
nGrow 1;
|
|
||||||
|
|
||||||
// Expansion factor for layer mesh
|
|
||||||
expansionRatio 1.3;
|
|
||||||
|
|
||||||
// Ratio of cell size in final added cell layer to cell size
|
|
||||||
// outside layer
|
|
||||||
finalLayerRatio 0.3;
|
|
||||||
|
|
||||||
// Number of smoothing iterations of surface normals
|
// Number of smoothing iterations of surface normals
|
||||||
nSmoothSurfaceNormals 1;
|
nSmoothSurfaceNormals 1;
|
||||||
@ -248,20 +275,14 @@ layerDict
|
|||||||
|
|
||||||
// Create buffer region for new layer terminations
|
// Create buffer region for new layer terminations
|
||||||
nBufferCellsNoExtrude 0;
|
nBufferCellsNoExtrude 0;
|
||||||
|
|
||||||
thickness 0.5;
|
|
||||||
nSmoothDispl 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// For mesh motion
|
|
||||||
motionDict
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Mesh Quality Parameters. Decide when mesh is good enough to stop
|
|
||||||
// smoothing.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
// Generic mesh quality settings. At any undoable phase these determine
|
||||||
|
// where to undo.
|
||||||
|
meshQualityControls
|
||||||
|
{
|
||||||
//- Maximum non-orthogonality allowed. Set to 180 to disable.
|
//- Maximum non-orthogonality allowed. Set to 180 to disable.
|
||||||
maxNonOrtho 65;
|
maxNonOrtho 65;
|
||||||
|
|
||||||
@ -298,10 +319,10 @@ motionDict
|
|||||||
//- minVolRatio (0 -> 1)
|
//- minVolRatio (0 -> 1)
|
||||||
minVolRatio 0.01;
|
minVolRatio 0.01;
|
||||||
|
|
||||||
|
|
||||||
//must be >0 for Fluent compatibility
|
//must be >0 for Fluent compatibility
|
||||||
minTriangleTwist -1;
|
minTriangleTwist -1;
|
||||||
|
|
||||||
|
|
||||||
// Advanced
|
// Advanced
|
||||||
|
|
||||||
//- Number of error distribution iterations
|
//- Number of error distribution iterations
|
||||||
@ -311,4 +332,19 @@ motionDict
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Advanced
|
||||||
|
|
||||||
|
// Flags for optional output
|
||||||
|
// 0 : only write final meshes
|
||||||
|
// 1 : write intermediate meshes
|
||||||
|
// 2 : write volScalarField with cellLevel for postprocessing
|
||||||
|
// 4 : write current intersections as .obj files
|
||||||
|
debug 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
|
||||||
|
// Note: the write tolerance needs to be higher than this.
|
||||||
|
mergeTolerance 1E-6;
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user