CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   can prism elements exist in 2D mesh in openfoam (http://www.cfd-online.com/Forums/openfoam-meshing/119534-can-prism-elements-exist-2d-mesh-openfoam.html)

shuoxue June 19, 2013 08:04

can prism elements exist in 2D mesh in openfoam
 
I am dealing with the 2D tutorial case, basic →potentialFoam →cylinder.

Mesh is generated in Gambit, and imported into openfoam with fluentMeshToFoam.

All hexahedra, evening is ok.
1922 hexahedra and 1 prism, an error occurs when I run the checkMesh utility.

Can prism elements exist in 2D mesh in openfoam?

Thanks!

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0-5be49240882f
Exec  : checkMesh
Date  : Jun 19 2013
Time  : 19:11:50
Host  : "luyao"
PID    : 9751
Case  : /home/luyao/OpenFOAM/luyao-2.2.0/run/case/basic-potentialFoam/1/cylinder1
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          4058
    internal points:  0
    faces:            7797
    internal faces:  3740
    cells:            1923
    faces per cell:  5.99948
    boundary patches: 6
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    1922
    prisms:        1
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch              Faces    Points  Surface topology                 
    defaultFaces        3846    4058    ok (non-closed singly connected) 
    up                  60      122      ok (non-closed singly connected) 
    right              30      62      ok (non-closed singly connected) 
    left                30      62      ok (non-closed singly connected) 
    down                56      116      ok (non-closed singly connected) 
    cylinder            35      72      ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (-2 0 -0.05) (2 2 0.05)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
 ***Number of edges not aligned with or perpendicular to non-empty directions: 292
  <<Writing 584 points on non-aligned edges to set nonAlignedEdges
    Boundary openness (-7.50327e-19 -2.79069e-18 1.27596e-18) OK.
    Max cell openness = 1.58683e-16 OK.
    Max aspect ratio = 2.29701 OK.
    Minimum face area = 0.000933415. Maximum face area = 0.00937919.  Face area magnitudes OK.
    Min volume = 9.35413e-05. Max volume = 0.000755163.  Total volume = 0.760783.  Cell volumes OK.
    Mesh non-orthogonality Max: 48.9644 average: 10.6063
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.59933 OK.
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End


tomf June 20, 2013 05:21

Hi shuoxue,

I think the outputted mesh uses points that are not exactly planar. Try to run the utility

Code:

flattenMesh
It will probably fix your errors. Just check the width in the Z-direction afterwards if you are interested in forces/coefficients.

Regards,
Tom

shuoxue June 20, 2013 23:19

Quote:

Originally Posted by tomf (Post 434996)
Hi shuoxue,

I think the outputted mesh uses points that are not exactly planar. Try to run the utility

Code:

flattenMesh
It will probably fix your errors. Just check the width in the Z-direction afterwards if you are interested in forces/coefficients.

Regards,
Tom

Hi, tomf!
Thank you so much for your hint. I have worked out the problem.:)

The error in checkMesh is
Code:

***Number of edges not aligned with or perpendicular to non-empty directions: 292
  <<Writing 584 points on non-aligned edges to set nonAlignedEdges

Hexahedra and prisms elements can exist in 2D mesh in openfoam, other element types cannot. However, edges in Z-condition have to normal to XY plane.

Tips:
To generate a surface with or without divided blocks in xy plane. Then, drag the surface in Z-condition, and a volume with or without separated blocks is built up. Mesh the volume with map or submap algorithm.

There is no error in Gambit, such as a logical cube for meshing was not able to found. CheckMesh in openfoam is also ok.:D


All times are GMT -4. The time now is 20:33.