CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Salome] Problems for creating mesh in salome to OPENFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 2 Post By robinbin
  • 1 Post By Zitzeronion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2016, 03:11
Default Problems for creating mesh in salome to OPENFOAM
  #1
Member
 
bye bye my blue
Join Date: Sep 2016
Posts: 37
Rep Power: 8
bye bye my blue is an unknown quantity at this point
when I make mesh in salome with Groups of volume, only cellzones are created, not patches. so I can't see patches about outlet, inlet, walls TOT
////////////////////////////////////////////////////////////////////////////
pcl@PCL:/media/pcl/e5754578-443c-4ba6-b934-dfa4db653676/OpenFOAM/pcl-4.0/run/woogak$ ideasUnvToFoam bab2.unv
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 4.0-665f1db4c1f1
Exec : ideasUnvToFoam bab2.unv
Date : Nov 08 2016
Time : 16:03:33
Host : "PCL"
PID : 12520
Case : /media/pcl/e5754578-443c-4ba6-b934-dfa4db653676/OpenFOAM/pcl-4.0/run/woogak
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

Processing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15


Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.

Processing tag:2411
Starting reading points at line 20.
Read 31497 points.

Processing tag:2412
Starting reading cells at line 63017.
First occurrence of element type 11 for cell 1 at line 63018
First occurrence of element type 41 for cell 871 at line 65628
First occurrence of element type 111 for cell 26235 at line 116356
Read 178074 cells and 25364 boundary faces.

Processing tag:2467
Starting reading patches at line 472506.
For group 4 named outlet trying to read 44104 patch face indices.
For group 5 named inlet trying to read 78353 patch face indices.
For group 6 named walls trying to read 55617 patch face indices.

Of 25364 so-called boundary faces 6972 belong to two cells and are therefore internal
Sorting boundary faces according to group (patch)
0: outlet is cellZone
1: inlet is cellZone
2: walls is cellZone

Constructing mesh with non-default patches of size:

--> FOAM Warning :
From function Foam:olyMesh:olyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 595
Found 18392 undefined faces in mesh; adding to default patch.
Adding cell and face zones
Cell Zone outlet 44104
Cell Zone inlet 78353
Cell Zone walls 55617

End
////////////////////////////////////////////////////////////////////////



in other way, making mesh with Groups of faces, i can see
///////////////////////////
cl@PCL:/media/pcl/e5754578-443c-4ba6-b934-dfa4db653676/OpenFOAM/pcl-4.0/run/woogak$ ideasUnvToFoam mesh.unv
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 4.0-665f1db4c1f1
Exec : ideasUnvToFoam mesh.unv
Date : Nov 08 2016
Time : 15:41:11
Host : "PCL"
PID : 12097
Case : /media/pcl/e5754578-443c-4ba6-b934-dfa4db653676/OpenFOAM/pcl-4.0/run/woogak
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

Processing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15


Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.

Processing tag:2411
Starting reading points at line 20.
Read 2101 points.

Processing tag:2412
Starting reading cells at line 4225.
First occurrence of element type 11 for cell 1 at line 4226
First occurrence of element type 41 for cell 293 at line 5102
First occurrence of element type 111 for cell 2997 at line 10510
Read 9798 cells and 2704 boundary faces.

Processing tag:2467
Starting reading patches at line 30108.
For group 1 named outlet trying to read 888 patch face indices.
For group 2 named inlet trying to read 1540 patch face indices.
For group 3 named walls trying to read 1002 patch face indices.

Of 2704 so-called boundary faces 726 belong to two cells and are therefore internal
Sorting boundary faces according to group (patch)
0: outlet is faceZone
1: inlet is faceZone
2: walls is faceZone

Constructing mesh with non-default patches of size:

--> FOAM Warning :
From function Foam:olyMesh:olyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 595
Found 1978 undefined faces in mesh; adding to default patch.
Adding cell and face zones
Face Zone outlet 888
ideasUnvToFoam: ideasUnvToFoam.C:1271: int main(int, char**): Assertion `noveau > -1' failed.
중지됨 (core dumped)
///////////////////////////////////////////////////////
the core dumped -.-;;;

I already dealt with salomeToFoam but when i did it, i can only see message
"You have to select a mesh object and then run this script."


can anyone help me ??ToT.. my salome is 7.71 and OPENFOAM is 4.-

Last edited by bye bye my blue; November 8, 2016 at 03:13. Reason: just modifying
bye bye my blue is offline   Reply With Quote

Old   October 10, 2019, 01:24
Default
  #2
New Member
 
Abdulaziz Alkandari
Join Date: Apr 2019
Posts: 6
Rep Power: 6
AbdulazizAlkandari is on a distinguished road
I am getting the same second error. Did you manage to solve it?
AbdulazizAlkandari is offline   Reply With Quote

Old   November 3, 2019, 11:59
Default Salme wedge mesh to OpenFOAM
  #3
Member
 
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 8
Saleh Abuhanieh is on a distinguished road
Hi,


It seems the problem still exists for converting the wedge meshes from salome to OpenFOAM.

Salome shows the following warning during exporting any wedge mesh to .unv format:
"During export mesh with name "mesh_name" to UNV Pyramids will be missed"
So the problem started from Salome and consequently, ideasUnvToFoam doesn't work.



There was a python script (salomeToFoam) which was able to transfer directly from the mesh module of Salome to OpenFOAM mesh format, however, since the code is six years old it doesn't work now due to python version syntax issues.


It's a common problem, and I wish if anybody was able to solve it, he/she can share it ...


Regards,
Saleh Abuhanieh is offline   Reply With Quote

Old   November 4, 2019, 05:19
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 335
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
The Python script, that was referred to above, can be found on GitHub.

I have used it with Salome 8.something, or even with one of the 9.? versions. So, I guess it should still work.

There's one open Pull-Request discussing Python-3 compatibility. So, it seems that this script is actively mainained.

If anybody is using this script, please post your Salome version, under which it is working.
GerhardHolzinger is offline   Reply With Quote

Old   November 4, 2019, 06:00
Default
  #5
Member
 
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 8
Saleh Abuhanieh is on a distinguished road
Hi,


I tried this script two times, in the last trial I used Salome 9.3.0.
It didn't work, and the problem is related to the python-3 compatibility.


As an alternative, I may recommend the followings:


- Instead of the wedge mesh, create the mesh as 2D in Salome; simply use "Extrusion" instead of "Revolution" in the "Modification" tab under the mesh module.
- Make sure to name your "front" patch and "back" patch separately (you will need them for the extrudeMeshDict)

- Export now your mesh using the .unv format, no pyramids error will show
- Use "ideasUnvToFoam" command as usual
- Use the "extrudeMesh" command after filling a few required parameters in the "extrudeMeshDict" file .. if you face a negative volume error, change the sign of your angle, that worked for me.


Regards,
Saleh
Saleh Abuhanieh is offline   Reply With Quote

Old   July 2, 2021, 05:03
Default
  #6
New Member
 
Join Date: Jul 2021
Posts: 1
Rep Power: 0
robinbin is on a distinguished road
Hi



I edited the script to make it python3 compatible : https://github.com/robinbinbinbinbin...eToOpenFOAM.py
sadjad.s and djason like this.
robinbin is offline   Reply With Quote

Old   January 26, 2023, 06:37
Default
  #7
New Member
 
Stefan Zitz
Join Date: Dec 2022
Location: Denmark
Posts: 2
Rep Power: 0
Zitzeronion is on a distinguished road
Thanks for the update to python 3!


Can you add a how to if you find time?
Relatively new to meshing and having trouble with the pyramid error from Salome when I want to get an .unv file. So your script seems like a live saver, however I don't know how to use it.
fazzesco likes this.
Zitzeronion is offline   Reply With Quote

Old   September 27, 2023, 12:53
Default
  #8
New Member
 
Mishal R-Taimuri
Join Date: Jul 2023
Posts: 2
Rep Power: 0
mishal49 is on a distinguished road
Hello

Select your mesh in Salome and then go to file -->load script and select the script.

I ran this script on a deformed and remeshed geometry. I then imported the polyMesh folder generated into OpenFOAM however, when I run the command 'checkMesh -allGeometry' it gives me the following mesh error (identical to when I did not run the python script):


Quote:
Mesh stats
points: 6198
faces: 56038
internal faces: 49770
cells: 26452
faces per cell: 4
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 0

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

Checking topology...
****Problem with boundary patch 1 named outlet of type patch. The patch should start on face no 49892 and the patch specifies 55921.
Possibly consecutive patches have this same problem. Suppressing future warnings.
***Boundary definition is in error.
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 Bounding box
inlet 122 77 ok (non-closed singly connected) (-0.0074963001534343 -0.0074621299281716 0) (0.0074999998
323619 0.0074852001853287 0)
outlet 117 74 ok (non-closed singly connected) (-0.0074621299281716 -0.0074880099855363 0.15000000596046
) (0.0074999998323619 0.0074820900335908 0.15000000596046)
interface 6029 3044 ok (non-closed singly connected) (-0.0086529096588492 -0.0079967398196459 0) (0.0085657201
707363 0.007640209980309 0.15000000596046)

Checking faceZone topology for multiply connected surfaces...
No faceZones found.

Checking basic cellZone addressing...
No cellZones found.

Checking geometry...
Overall domain bounding box (-0.0086529096588492 -0.0079967398196459 0) (0.0085657201707363 0.007640209980309 0.15000000596046)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (-1.3638106678637e-16 7.2349571894975e-17 9.1973154408955e-17) OK.
Max cell openness = 2.5833250175409e-16 OK.
Max aspect ratio = 4.6158498540326 OK.
Minimum face area = 5.6310069411092e-07. Maximum face area = 7.6453249404573e-06. Face area magnitudes OK.
Min volume = 1.9249118445216e-10. Max volume = 4.7883811195729e-09. Total volume = 2.4981596723925e-05. Cell volumes OK.
Mesh non-orthogonality Max: 50.634373658235 average: 15.929198461998
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.62688454474787 OK.
Coupled point location match (average 0) OK.
Face tets OK.
Min/max edge length = 0.00098669219842273 0.0047614757425787 OK.
All angles in faces OK.
All face flatness OK.
Cell determinant (wellposedness) : minimum: 0 average: 0.164866635007
***Cells with small determinant (< 0.001) found, number of cells: 62
<<Writing 62 under-determined cells to set underdeterminedCells
Concave cell check OK.
Face interpolation weight : minimum: 0.17973768040874 average: 0.44995888570953
Face interpolation weight check OK.
Face volume ratio : minimum: 0.21912219556582 average: 0.82873528444387
Face volume ratio check OK.

Failed 1 mesh checks.

End
mishal49 is offline   Reply With Quote

Old   December 5, 2023, 01:57
Default
  #9
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 106
Rep Power: 5
dasith0001 is on a distinguished road
You could import 3D mesh from Salome to OpenFOAM and then do the extrudeMesh.

It solves all the errors and complains when you are working with wedge domains.
dasith0001 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 12:12
[Salome] Converting Salome wedge mesh to OpenFOAM anon_q OpenFOAM Meshing & Mesh Conversion 4 March 13, 2019 16:13
[Salome] Hybrid mesh from Salome to OpenFOAM Sören Sander OpenFOAM Meshing & Mesh Conversion 2 March 7, 2014 09:16
salome, openfoam and moving mesh prhlava OpenFOAM Running, Solving & CFD 8 November 9, 2009 09:59
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10


All times are GMT -4. The time now is 22:00.