Hi;
I'm moving my first steps with OF. I'm trying to mesh a simple circular cylinder. I get no error but when I run paraFoam the only thing I can get is the whole meshed domain without any body inside of it. The cylinder height is along the z axis, diameter is 60mm and height is 180mm. Here is my blockMeshDict:

In blockMesh you only have one cell in the z direction. Your hex cells are 50 mm square and your cylinder is only 60 mm in diameter. Try blocks (0 1 2 3 4 5 6 7) (40 40 40) simpleGrading (1 1 1). This is still a coarse mesh, but it will be easier to see what's going on than with 20 blocks. Make sure the cylinder dimensions locate it within the box defined in your blockMesh. If the origin is 0,0,0 you should be OK. In snappy, try refinementSurfaces level (1 1) to start and experiment when you refine your mesh by using more blocks.

Try opening the cylinder in ParaView to see the geometry the way OF will see it. You will also get to see where ParaView puts the origin. After you open the mesh, use the ParaView menu or file icon and browse to the file. If it looks OK, there's a surfaceCheck utility. I think the syntax is surfaceCheck Cilindro.stl. If the surfaceCheck thinks the surface is OK, and you're generating a hexagonal domain that's completely meshed with no cylinder in it, you probably are not locating the cylinder inside the mesh for some reason. You could try expanding the block (like from -2 to 2 in all dimensions) and see if the cylinder shows up. You could also try another .stl file. Maybe one of these things will help...

Hi everybody,
i'm trying to build a mesh with the snappyhexmesh utility.
I want to model the flow over a submerged island, but snappyhex seems to fail in snapping to island surface.
I want to use the InterFoam solver.

Maybe I did'nt prepare the dict file well, but the resulting mesh is very poor.
I prepared the background mesh with blockmesh.
This is my blockmesh file:

// Which of the steps to run
castellatedMesh true;
snap true;
addLayers true;

// 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
{
coral.stl
{
type triSurfaceMesh;
name coral;
}

// 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
// it will do just more refinement iterations to obtain a similar mesh.
maxLocalCells 1000000;

// 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 2000000;

// 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;

// 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.

// 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.

// 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 (75 35 0.5);
}

// ************************************************** *********************** //
and finally in attachment the stl file (in binary and ascii).
Can anybody help me?
I also tried to use gmsh to build the mesh but I'm not able to do a 2D case .
I make a 3D case but the mesh is too irregular for OpenFoam.
Thank you in advance
Silvia