Personal tools
You are here: Home Forum How to use Salome? Spherical slice for OpenFoam simulation

Spherical slice for OpenFoam simulation

Up to How to use Salome?

Spherical slice for OpenFoam simulation

Posted by Jakob at January 09. 2014

I am trying to generate and mesh a slice of a spherical structure in Salome for an OpenFOAM simulation. I kinda managed to set it up, but I must have made some mistakes somewhere, since the converted unv produces some funky results.

What I did:
- Create symmetry face and revolute ( and explode)
- create NETGEN 1D2D submesh on symmetry face
- use mesh revolution to create prisms from submesh that match the geometry
- split pyramid into tetrahedra (pyramids cannot be exported through unv)
- create groups through filters (that got kinda messy)
- export unv and convert with ideasUnvToFoam

checkMesh gave me a whole bunch of errors:


| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.x                                 |
|   \\  /    A nd           | Web:                      |
|    \\/     M anipulation  |                                                 |
Build  : 2.2.x-3addb4f901b3
Exec   : checkMesh
Date   : Dec 27 2013
Time   : 15:25:48
Host   : "jakob-SVS1312C5E"
PID    : 4078
Case   : /home/jakob/OpenFOAM/jakob-2.2.x/run/slice
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           8210
    internal points:  1
    faces:            28044
    internal faces:   11854
    cells:            7980
    faces per cell:   4.99975
    boundary patches: 5
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     0
    prisms:        7978
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    2
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
 ***Unused points found in the mesh, number unused by faces: 1 number unused by cells: 1
  <<Writing 1 unused points to set unusedPoints
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    back                7979     4105     ok (non-closed singly connected)  
    top                 34       69       ok (non-closed singly connected)  
    bottom              113      228      ok (non-closed singly connected)  
    front               7979     4105     ok (non-closed singly connected)  
    defaultFaces        85       167      multiply connected (shared edge)  
  <<Writing 2 conflicting points to set nonManifoldPoints

Checking geometry...
    Overall domain bounding box (-4.40873e-15 -24 -8.88178e-16) (23.9994 16.9706 4.16746)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
 ***Boundary openness (2.33305e-05 2.36133e-05 2.04112e-06) possible hole in boundary description.
 ***Open cells found, max cell openness: 0.573014, number of open cells 1
  <<Writing 1 non closed cells to set nonClosedCells
  <<Writing 3 cells with high aspect ratio to set highAspectRatioCells
    Minimum face area = 2.34156e-18. Maximum face area = 2.09338.  Face area magnitudes OK.
    Min volume = 1.33333e-300. Max volume = 0.453491.  Total volume = 1507.27.  Cell volumes OK.
    Mesh non-orthogonality Max: 147.38 average: 5.11099
 ***Number of non-orthogonality errors: 2.
  <<Writing 2 non-orthogonal faces to set nonOrthoFaces
 ***Error in face pyramids: 9 faces are incorrectly oriented.
  <<Writing 8 faces with incorrect orientation to set wrongOrientedFaces
    Max skewness = 0.842957 OK.
    Coupled point location match (average 0) OK.

Failed 5 mesh checks.

And in the OF case some defaultFaces appear in the boundary file. 

Does anyone know what is going on and how to fix it? Like, what do I do with the defaultFaces (set to empty and ignore?) and where does that crazy local non-orthogonality originate from? What are wrongly oriented faces?

Would be very grateful for any help, this is how far my limited experience takes me  

Heres the study:

Re: Spherical slice for OpenFoam simulation

Posted by Saint Michael at January 09. 2014

Hi Jakob

The study link is wrong.


Re: Spherical slice for OpenFoam simulation

Posted by Christophe Bourcier at January 09. 2014


Your mesh has several issues:

- one free node

- several double nodes at the axis of revolution

- 2 elements with negative volume

I suspect your procedure to split pyramid into tetrahedra to have created them.

instead of exporting to UNV, you should better use this script to export your mesh to OpenFOAM, including pyramids:


Re: Spherical slice for OpenFoam simulation

Posted by Jakob at January 11. 2014

Thanks for your help! You and that script really helped me out. 

Re: Spherical slice for OpenFoam simulation

Posted by Mohammadmehdi Ataei at February 01. 2017

Hi Jacob,


Could you implement a 1D spherical slice mesh in OpenFoam? is this possible for you to provide me with a sample of you mesh as I am struggling with defining 1D in openFoam.





Previously Jakob wrote:

Thanks for your help! You and that script really helped me out. 


Powered by Ploneboard
Document Actions