|
[Sponsors] |
[snappyHexMesh] refinementBox in snappyHexMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 29, 2010, 09:23 |
refinementBox in snappyHexMesh
|
#1 |
Member
Join Date: Oct 2010
Location: Germany
Posts: 39
Rep Power: 15 |
Hi,
I am new to OpenFoam and snappyHexMesh. I am trying to do my first grid with sHM and have the following problem: I define the limits of my refinementBox in the snappyHexMeshDict file, then run sHM and then see the grid in ParaView. The refinement is done correctly but only in the directions X and Y. In the Z direction I can not see any refinement. Is this a problem of sHM or of ParaView or something different? Thanks a lot for your advices. I. |
|
October 29, 2010, 09:43 |
refinementBox in snappyHexMesh
|
#2 |
New Member
CFD user
Join Date: Apr 2010
Location: Germany
Posts: 28
Rep Power: 16 |
Can you post the snappyHexMeshDict file?
__________________
Thanks, |
|
October 29, 2010, 10:08 |
refinementBox in snappyHexMesh
|
#3 |
Member
Join Date: Oct 2010
Location: Germany
Posts: 39
Rep Power: 15 |
Hi Subhkirti,
I am working with the motorbike tutorial. You can find bellow the snappyHexMeshDict file. As you see, at the moment I am only trying to refine the zone of the refinementBox (without the motorbike). Thanks for your help. I. // Which of the steps to run castellatedMesh true; snap false; addLayers false; // Geometry. Definition of all surfaces. All surfaces are of class // searchableSurface. // Surfaces are used // - to specify refinement for any mesh cell intersecting it // - to specify refinement for any mesh cell inside/outside/near // - to 'snap' the mesh boundary to the surface geometry { motorBike.stl { type triSurfaceMesh; name motorBike; } refinementBox { type searchableBox; min (-1.0 -1.0 0.0); max ( 8.0 1.0 3.0); } }; // Settings for the castellatedMesh generation. castellatedMeshControls { // Refinement parameters // ~~~~~~~~~~~~~~~~~~~~~ // If local number of cells is >= maxLocalCells on any processor // switches from from refinement followed by balancing // (current method) to (weighted) balancing before refinement. maxLocalCells 10000; // Overall cell limit (approximately). Refinement will stop immediately // upon reaching this number so a refinement level might not complete. // 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 be a lot less. maxGlobalCells 20000; // The surface refinement loop might spend lots of iterations refining just a // few cells. This setting will cause refinement to stop if <= minimumRefine // are selected for refinement. Note: it will at least do one iteration // (unless the number of cells to refine is 0) minRefinementCells 10; // Allow a certain level of imbalance during refining // (since balancing is quite expensive) // Expressed as fraction of perfect balance (= overall number of cells / // nProcs). 0=balance always. maxLoadUnbalance 0.10; // Number of buffer layers between different levels. // 1 means normal 2:1 refinement restriction, larger means slower // refinement. nCellsBetweenLevels 3; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies a level for any cell intersected by its edges. // This is a featureEdgeMesh, read from constant/triSurface for now. features ( //{ // file "someLine.eMesh"; // level 2; //} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies two levels for every surface. The first is the minimum level, // every cell intersecting a surface gets refined up to the minimum level. // 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 { //motorBike // { // Surface-wise min and max refinement level // level (3 4); // } } // Resolve sharp angles 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 { refinementBox { mode inside; levels ((1E15 1)); } } // 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 (3 3 0.43); locationInMesh (1 0 0.5); } // Settings for the snapping. snapControls { //- Number of patch smoothing iterations before finding correspondence // to surface nSmoothPatch 3; //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. tolerance 4.0; //- Number of mesh displacement relaxation iterations. nSolveIter 30; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; } |
|
October 30, 2010, 14:12 |
|
#4 |
Senior Member
Join Date: Mar 2009
Location: My oyster
Posts: 124
Rep Power: 17 |
why is this section commented out:
refinementSurfaces { //motorBike // { // Surface-wise min and max refinement level // level (3 4); // } } by the way it is better to upload files as zipped attachments or wrap them in code tags. makes for a much cleaner and easier to read post. |
|
May 25, 2011, 07:14 |
|
#5 |
Member
Join Date: Oct 2010
Location: Germany
Posts: 39
Rep Power: 15 |
Upps, sorry. I had completely forgotten to update this post. Dear ziad, I commented out the motorbike in refinementSurfaces because I was only trying to see how the refinementRegions work. The reason why I could not see at that time the refinement in Z direction is that I did not do any slice with Paraview. Without the slice, it is not possible to see it. Well, it was just a beginners problem but I hope this can help someone else starting now with OpenFoam. Best regards Ivan
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 06:01 |
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing | peterhess | OpenFOAM Meshing & Mesh Conversion | 2 | January 3, 2018 02:54 |
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. | jasv | OpenFOAM Meshing & Mesh Conversion | 4 | May 10, 2016 02:55 |
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? | klausb | OpenFOAM Meshing & Mesh Conversion | 1 | March 7, 2015 11:55 |
[snappyHexMesh] stitchMesh and snappyHexMesh | gdbaldw | OpenFOAM Meshing & Mesh Conversion | 0 | December 23, 2009 02:09 |