sample usage of wildcards

This commit is contained in:
mattijs
2009-02-26 22:48:30 +00:00
parent e0da094bb3
commit bb74c5ae14

View File

@ -2,7 +2,7 @@
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 | | \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,9 +10,9 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class dictionary; class dictionary;
location "system"; object autoHexMeshDict;
object snappyHexMeshDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run // Which of the steps to run
@ -29,27 +29,78 @@ addLayers true;
// - to 'snap' the mesh boundary to the surface // - to 'snap' the mesh boundary to the surface
geometry geometry
{ {
fridgeA
{
type searchableBox;
min ( 2 2 0 );
max ( 3 3 2 );
}
fridgeB
{
type searchableBox;
min ( 3.5 3 0 );
max ( 4.3 3.8 1.8 );
}
igloo igloo
{ {
type searchableSphere; type searchableSphere;
centre ( 3 3 0 ); centre (3 3 0);
radius 4; radius 4;
} }
}
box1
{
type searchableBox;
min (0 0 0);
max (1 1 1);
}
fridgeFreezer
{
type searchableSurfaceCollection;
freezer
{
surface box1;
scale (1 1 1);
transform
{
type cartesian;
origin (0 0 0);
e1 (1 0 0);
e3 (0 0 1);
}
}
fridge
{
surface box1;
scale (1 1 1.1);
transform
{
type cartesian;
origin (0 0 1);
e1 (1 0 0);
e3 (0 0 1);
}
}
}
twoFridgeFreezers
{
type searchableSurfaceCollection;
seal
{
surface fridgeFreezer;
scale (1.0 1.0 1.0);
transform
{
type cartesian;
origin (2 2 0);
e1 (1 0 0);
e3 (0 0 1);
}
}
herring
{
surface fridgeFreezer;
scale (1.0 1.0 1.0);
transform
{
type cartesian;
origin (3.5 3 0);
e1 (1 0 0);
e3 (0 0 1);
}
}
}
};
@ -76,7 +127,7 @@ castellatedMeshControls
// 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)
minRefinementCells 0; minRefinementCells 100;
// 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
@ -92,10 +143,10 @@ castellatedMeshControls
// This is a featureEdgeMesh, read from constant/triSurface for now. // This is a featureEdgeMesh, read from constant/triSurface for now.
features features
( (
//{ // {
// file "someLine.eMesh"; // file "fridgeA.eMesh";
// level 2; // level 3;
//} // }
); );
@ -108,27 +159,35 @@ castellatedMeshControls
// The second level is the maximum level. Cells that 'see' multiple // The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an // intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level. // angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces refinementSurfaces
{ {
fridgeA twoFridgeFreezers
{ {
// Surface-wise min and max refinement level // Surface-wise min and max refinement level
level ( 2 2 ); level (2 2);
}
fridgeB regions
{ {
level ( 2 2 ); // Region-wise override
} "cook.*"
igloo
{ {
level ( 1 1 ); level (3 3);
}
} }
} }
"iglo.*"
{
// Surface-wise min and max refinement level
level (1 1);
}
}
// Resolve sharp angles on fridges
resolveFeatureAngle 60; resolveFeatureAngle 60;
// Region-wise refinement // Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~
@ -155,7 +214,7 @@ castellatedMeshControls
// section reachable from the locationInMesh is kept. // section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even // NOTE: This point should never be on a face, always inside a cell, even
// after refinement. // after refinement.
locationInMesh ( 3 0.28 0.43 ); locationInMesh (3 0.28 0.43);
} }
@ -170,7 +229,7 @@ snapControls
//- 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.
tolerance 4; tolerance 4.0;
//- Number of mesh displacement relaxation iterations. //- Number of mesh displacement relaxation iterations.
nSolveIter 30; nSolveIter 30;
@ -188,25 +247,18 @@ addLayersControls
// Per final patch (so not geometry!) the layer information // Per final patch (so not geometry!) the layer information
layers layers
{ {
fridgeA_region0 "two.*"
{ {
nSurfaceLayers 1; nSurfaceLayers 3;
} }
"igloo_.*"
fridgeB_region0
{
nSurfaceLayers 1;
}
igloo_region0
{ {
nSurfaceLayers 1; nSurfaceLayers 1;
} }
} }
// Expansion factor for layer mesh // Expansion factor for layer mesh
expansionRatio 1; expansionRatio 1.0;
//- Wanted thickness of final added cell layer. If multiple layers //- Wanted thickness of final added cell layer. If multiple layers
// is the // is the
@ -280,7 +332,6 @@ meshQualityControls
minFlatness 0.5; minFlatness 0.5;
//- Minimum pyramid volume. Is absolute volume of cell pyramid. //- 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. // Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13; minVol 1e-13;
@ -314,7 +365,6 @@ meshQualityControls
} }
// Advanced // Advanced
// Flags for optional output // Flags for optional output
@ -327,7 +377,6 @@ debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-06; mergeTolerance 1E-6;
// ************************************************************************* // // ************************************************************************* //