CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Mesh Generation & Pre-Processing (https://www.cfd-online.com/Forums/mesh-generation/)
-   -   Pyramids generated when extruding cylinder (https://www.cfd-online.com/Forums/mesh-generation/234052-pyramids-generated-when-extruding-cylinder.html)

CoolHersheys February 21, 2021 20:06

Pyramids generated when extruding cylinder
 
2 Attachment(s)
I am fairly new at generating meshes using OpenFoam's blockMesh and/or snappyHexMesh. I am attempting to generate the meshes for a geometry that consists of several cylinders moving in relation to one another. I intend to use dynamic overset meshes. As a first step, I tried to reproduce the example in .../tutorials/incompressible/overPimpleDyMFoam/cylinder using my own .stl geometry (trying to reconstruct the steps so I can do so by myself). Nevertheless, when extruding the mesh along the axis of the cylinder, what I obtain is a series of pyramidal volumes instead of hexahedrals. Does anybody know where the problem may be?


I've attached the images of my cylinder, with the pyramidal volumes along the axis of the cylinder, and that of the example, which does extrude the mesh properly.



The code of extrudeMeshDict is the following:



/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// What to extrude:
// patch : from patch of another case ('sourceCase')
// mesh : as above but with original case included
// surface : from externally read surface

//constructFrom mesh;
//constructFrom patch;
constructFrom surface;

// If construct from patch/mesh:
sourceCase "../cavity";
sourcePatches (movingWall);

// If construct from patch: patch to use for back (can be same as sourcePatch)
exposedPatchName movingWall;

// If construct from surface:
surface "constant/triSurface/c0s.stl";

// Flip surface normals before usage. Valid only for extrude from surface or
// patch.
flipNormals false;

//- Linear extrusion in point-normal direction
extrudeModel linearNormal;

//- Single layer linear extrusion in point-normal direction
// with empty patches on front and back
//extrudeModel plane;

//- Linear extrusion in specified direction
//extrudeModel linearDirection;

//- Sector extrusion
//extrudeModel sector;

//- Wedge extrusion of a single layer
// with wedge patches on front and back
//extrudeModel wedge;

//- Extrudes into sphere around (0 0 0)
//extrudeModel linearRadial;

//- Extrudes into sphere around (0 0 0) with specified radii
//extrudeModel radial;

//- Extrudes into sphere with grading according to pressure (atmospherics)
//extrudeModel sigmaRadial;

//- Extrudes by interpolating along path inbetween two (topologically identical)
// surfaces (e.g. one is an offsetted version of the other)
//extrudeModel offsetSurface;

nLayers 20;

expansionRatio 0.95;

sectorCoeffs
{
axisPt (0 0 0);
axis (0 -1 0);
angle 360;
}

linearNormalCoeffs
{
thickness 4;
}

planeCoeffs
{
// thickness 0.1;
nLayers 4;
}

linearDirectionCoeffs
{
direction (0 0 1);
thickness 1;
}

/*
linearRadialCoeffs
{
R 0.1;
// Optional inner radius
Rsurface 0.01;
}

radialCoeffs
{
// Radii specified through interpolation table
R table ((0 0.01)(3 0.03)(10 0.1));
}

sigmaRadialCoeffs
{
RTbyg 1;
pRef 1;
pStrat 1;
}
*/

offsetSurfaceCoeffs
{
// Surface that mesh has been meshed to
baseSurface "<constant>/triSurface/DTC-scaled-inflated.obj";

// Surface to fill in to
offsetSurface "<constant>/triSurface/DTC-scaled.obj";
}


// Do front and back need to be merged? Usually only makes sense for 360
// degree wedges.
mergeFaces false;

// Merge small edges. Fraction of bounding box.
mergeTol 0;


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

AtoHM March 4, 2021 04:34

I have no experience with extrude mesh, but I suspect there is no problem at all. Have you checked (checkMesh) that these are actually not hexahedral cells? You seem to use Paraview and when you have "decompose polyhedra" activated, it will show some of these cells split. Make sure its not just a representation issue in PV.


All times are GMT -4. The time now is 09:37.