CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   RefineMesh does not perform 2x2 refinement through the middle of edges (https://www.cfd-online.com/Forums/openfoam-solving/59037-refinemesh-does-not-perform-2x2-refinement-through-middle-edges.html)

nicasch March 11, 2008 04:20

Dear OpenFoamers, I have no
 
Dear OpenFoamers,

I have noticed some strange behavior of refineMesh utility. I have created an axisimetric 2D slice, using blockMesh, consisting of uniform hexahedra, here how it looks like:

http://www.cfd-online.com/OpenFOAM_D...your_image.gif

After applying refineMesh I obtained a refined mesh, but it seems a little strange near the axis of symmetry. The mesh seems to be not refined in a 2x2 manner through the middle of edges, as the refineMeshDict says. I tried various combinations of HexTopology and geometricCut entries, but I was never able to get a fine 2x2 refined mesh. My refined meshes looks like this:

http://www.cfd-online.com/OpenFOAM_D...your_image.gif
http://www.cfd-online.com/OpenFOAM_D...your_image.gif
http://www.cfd-online.com/OpenFOAM_D...your_image.gif
http://www.cfd-online.com/OpenFOAM_D...your_image.gif

My blockMeshDict and refineMeshDict are:

// blockMesh mesh description file
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object blockMeshDict;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
convertToMeters 0.001;

vertices
(
(0 0 0)
(45 0 1.96474)
(45 0 -1.96474)
(0 45 0)
(45 45 1.96474)
(45 45 -1.96474)
);

blocks
(
hex (0 1 2 0 3 4 5 3) (45 1 45) simpleGrading (1 1 1)
);

patches
(
wedge wedgeFront
(
(4 3 0 1)
)
wedge wedgeBack
(
(5 2 0 3)
)
patch atmosphereTop
(
(3 4 5 3)
)
patch wallBottom
(
(0 2 1 0)
)
wall wallRightSide
(
(5 4 1 2)
)
empty centralAxis
(
(0 0 3 3)
)
);

mergePatchPairs
(
);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


// refineMesh description file
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object refineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Cells to refine; name of cell set
set c0;
// Type of coordinate system:
// - global : coordinate system same for every cell. Usually aligned with
// x,y,z axis. Specify in globalCoeffs section below.
// - patchLocal : coordinate system different for every cell. Specify in
// patchLocalCoeffs section below.
coordinateSystem global;
//coordinateSystem patchLocal;
// .. and its coefficients. x,y in this case. (normal direction is calculated
// as tan1^tan2)
globalCoeffs
{
tan1 (1 0 0);
tan2 (0 1 0);
}
patchLocalCoeffs
{
patch outside; // Normal direction is facenormal of zero'th face of patch
tan1 (1 0 0);
}
// List of directions to refine
directions
(
tan1
tan2
);
// Whether to use hex topology. This will
// - if patchLocal: all cells on selected patch should be hex
// - split all hexes in 2x2x2 through the middle of edges.
useHexTopology no;
// Cut purely geometric (will cut hexes through vertices) or take topology
// into account. Incompatible with useHexTopology
geometricCut no;
// Write meshes from intermediate steps
writeMesh yes;
// ************************************************** *********************** //

Does anyone knows what is wrong? Is this due to some internal control of OF, which does not allow 2x2 refinement of axisymetric meshes?

Best Regards

nicasch March 11, 2008 04:26

sorry, the images are here: h
 
sorry, the images are here:
http://www.cfd-online.com/OpenFOAM_D...ges/1/6964.gif
http://www.cfd-online.com/OpenFOAM_D...ges/1/6965.gif
http://www.cfd-online.com/OpenFOAM_D...ges/1/6966.gif
http://www.cfd-online.com/OpenFOAM_D...ges/1/6967.gif
http://www.cfd-online.com/OpenFOAM_D...ges/1/6968.gif

mattijs March 11, 2008 04:57

The cells at the wedge axis ar
 
The cells at the wedge axis are not hexes and that might give you problems. Either
- start off from all hexes, refine and only then make into wedge (wasn't there a makeAxialMesh on the Wiki?) or
- try the geometricCut yes to not take into account any topology. Your mesh will have to be symmetric in the x-y plane.

nicasch March 14, 2008 04:12

Thanks Mattijs! I tried out
 
Thanks Mattijs!

I tried out the makeAxialMesh utility, it worked just fine


All times are GMT -4. The time now is 16:38.