Nucleophobe |
November 2, 2013 23:48 |
Using wedge elements
Sajad,
In order to create wedge elements with blockMesh, you must be careful to follow the guidelines provided in the OpenFOAM documentation (5.3.3):
http://www.openfoam.org/docs/user/blockMesh.php
Also, note that when specifying patches,
Quote:
The order in which the vertices are given must be such that, looking from inside the block and starting with any vertex, the face must be traversed in a clockwise direction to define the other vertices.
|
I'm not sure where the problem was, but this works:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.012;
vertices
(
(0.0999 -0.04362 0) // new 0, old 4
(0.0999 -0.04362 5) // new 1, old 5
(0.0999 0.04362 5) // new 2, old 2
(0.0999 0.04362 0) // new 3, old 1
(0 0 0) // new 4, old 0
(0 0 5) // new 5, old 3
// Old vertices:
//(0 0 0) //0
//(0.0999 0.04362 0) //1
//(0.0999 0.04362 5) //2
//(0 0 5) //3
//(0.0999 -0.04362 0) //4
//(0.0999 -0.04362 5) //5
);
blocks
(
hex (0 1 2 3 4 5 5 4) (40 1 200) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
front
{
type wedge;
faces
(
(0 1 5 4)
);
}
back
{
type wedge;
faces
(
(2 3 4 5)
);
}
fixedkWall
{
type wall;
faces
(
(0 1 2 3)
);
}
bottom
{
type patch;
faces
(
(1 2 5 5)
);
}
top
{
type patch;
faces
(
(0 3 4 4)
);
}
axis
{
type empty;
faces
(
(4 5 5 4)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
Finally, before you use this mesh in a simulation, you will want to modify the geometry such that the angle between the 'front' and 'back' patches is ~5 degrees:
Quote:
wedge
For 2 dimensional axi-symmetric cases, e.g. a cylinder, the geometry is specified as a wedge of small angle (e.g. http://www.openfoam.org/docs/user/img/user437x.png) and 1 cell thick running along the plane of symmetry, straddling one of the coordinate planes, as shown in Figure 5.4. The axi-symmetric wedge planes must be specified as separate patches of wedge type. The details of generating wedge-shaped geometries using blockMesh are described in section 5.3.3.
|
( http://www.openfoam.org/docs/user/boundaries.php)
As defined, the angle is closer to 25 degrees. You can check this with 'checkMesh' :
Code:
....
Checking geometry...
Overall domain bounding box (0 -0.00052344 0) (0.0011988 0.00052344 0.06)
Mesh (non-empty, non-wedge) directions (1 0 1)
Mesh (non-empty) directions (1 1 1)
Wedge front with angle 23.587845 degrees
Wedge back with angle 23.587845 degrees
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (-8.8718496e-14 -3.0464533e-16 -1.9670129e-19) OK.
Max cell openness = 2.5596435e-16 OK.
Max aspect ratio = 500.5005 OK.
Minimum face area = 1.5687497e-11. Maximum face area = 1.57032e-06. Face area magnitudes OK.
Min volume = 2.3531245e-14. Max volume = 9.3889668e-12. Total volume = 3.7649992e-08. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 1.0915773 OK.
Coupled point location match (average 0) OK.
Mesh OK.
End
Good luck,
-Nuc
|