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

[Salome] mesh conversion Salome --> OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2011, 12:32
Default
  #21
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
hi,

i am using sHM just for complex geometrys with good results.
never meshed in Salome befor ... the tutorials ? thats a good idea, where did i get those tutorials ?

regards tobi,...

PS: sure, you get 3D-geometrys but if you got just one cell in the z-direction you can use the empty patch, ... but i know what you wanna say to me


I 've found the tutorials - thx for that advice
Tobi is offline   Reply With Quote

Old   May 2, 2011, 12:43
Default
  #22
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
I linked the tutorials I refer to in the previous post. OK, you know empty patches, but you didn't create an appropriate 3D mesh in SALOME. For your purposes, you must apply a 3D algorithm on a solid or generate a 2D mesh and then extrude it. Otherwise you can't convert anything.
vaina74 is offline   Reply With Quote

Old   May 2, 2011, 12:56
Default
  #23
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
okay thx.

i always using Catia V5 and convert it to an STL ... split it into the boundarys in Salome and mesh it with sHM. So thx for your advice. I wll have a look at the tutorials.

nice evening,
tobi
Tobi is offline   Reply With Quote

Old   May 2, 2011, 13:51
Default
  #24
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,..

now its working. I did something wrong in the meshing tool in Salome
thx to you.

Tobi
Tobi is offline   Reply With Quote

Old   May 11, 2012, 14:58
Question
  #25
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi,..

now its working. I did something wrong in the meshing tool in Salome
thx to you.

Tobi
What exactly did you do wrong, I'm seeing the same thing. The .hdf is attached. I've tried meshing a NACA0015 airfoil in 2D like this:

Geometry creation:

#G1 In geometry module it is possible to define the airfoil via polynomial equations:

New entity - Basic - Curve - Analytical

and then enter the polynomial for the NACA00xx like the one described here:

http://en.wikipedia.org/wiki/NACA_airfoil

This creates the single side of the NACA00xx profile, the other side you can mirror, or multiply the polynomial with -1.

#G2 From the two polynomial curves, create a wire.

#G3 From the wire, create a face.

#G4 Create a circle that encompasses the airfoil face.

#G5 Create a frace from this circle.

#G6 Cut the circle face with the polynomial face to get the basis for the mesh: NACA0015-CircleCut in the .hdf file.

Then I've tried to generate the mesh in 2 ways:

M1 : extrusion of a planar mesh

#M1.1 Mesh NACA0015-CircleCut to create a planar triangular mesh.

#M1.2. Extrude the mesh

#M1.3 Filter based selection of face groups:

There are filters now in the new version of Salome which can be superimposed. They may be based on various criteria (parametric, relationships with other geometry, and similar).

Example of selecting the inletOutlet group using filters:

Mesh -> Create Group -> Filter Based

For a filter, if you select the Geometry to be Quadrangle, and add another filter (plus button to the right with logical AND option for the composition of filters) that states that the faces are Free faces, the result is the ring of quadrangle faces that define the inletOutlet patch.

The empty patches and the airfoil have their own settings, check them out with right click to the group, and edit.

#M1.4 Once this is done (the groups are there, and the mesh is extruded), I export to .unv, and see the same error you had.


M2 Three dimensional extrusion algorithm, on a 3D extruded geometry

#M2.1 This procedure is different from M1 in the fact that extruded geometry is produced first by extruding NACA0015-CircleCut.

#M2.2 Explosion of extruded geometry into faces: unfortunately, with analytical function that represents the polynomial, if it is linear interpolated between the points, this results with like 1000 faces. I've grouped the faces that will be used for quadrangle mapping and triangle meshing.

#M2.3. Create mesh on extruded geometry: 3D Extrusion algorithm

#M2.4 Create submesh: extruded ring (inletOutlet of the previous mesh) is submeshed with Quadrangle (mapping) and no hypothesis is set.

#M2.5 Create submesh: 2D Projection algorithm on two triangle faces (create .hdf)

M2 results in an algorithm faliure. The procedure is explained for a simpler geometry here:

http://www.caelinux.org/wiki/index.p...ELinux_2008.29

Obviously, I'm breaking my back here .... if anyone can tell me where I did a wrong step, it would be great!

I couldn't attach the .hdf because of its size, here is where you can download it:

http://www.2shared.com/file/3Yn6lIHI/NACA0015.html
tomislav_maric is offline   Reply With Quote

Old   May 14, 2012, 12:55
Default
  #26
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
hi,

i have had a look at your file and tried a bit. Would you like to have a 2D mesh with hexaedrals? Well I think its not as simple as in ANSYS. I meshed a lot of geometrys with salome using hexaedrals but thats not easy with your geometry couse salome always wants to have "a box with four lines" to create the hexaedrals (like in Ansys cfx mesher)... well, i think you are not able to make a 2D mesh with tetraedrals.


The problem is, that your airfoil has a lot of lines. Every line have to enclose a box with four lines (hope you understand me).

Tobi
Tobi is offline   Reply With Quote

Old   May 15, 2012, 07:33
Default
  #27
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by Tobi View Post
hi,

i have had a look at your file and tried a bit. Would you like to have a 2D mesh with hexaedrals? Well I think its not as simple as in ANSYS. I meshed a lot of geometrys with salome using hexaedrals but thats not easy with your geometry couse salome always wants to have "a box with four lines" to create the hexaedrals (like in Ansys cfx mesher)... well, i think you are not able to make a 2D mesh with tetraedrals.


The problem is, that your airfoil has a lot of lines. Every line have to enclose a box with four lines (hope you understand me).

Tobi
Hi Tobi,

thanks a lot for your advice... I've used an .igs/.brep CAD model of an airfoil, and then the algorithm worked properly... I'll upload the .hdf again as soon as I get to my home PC. It would be great to have a structured NACA0015 airfoil mesh if you can spare one, because of the drag coefficients computation as well...

Thanks again,
Tomislav
tomislav_maric is offline   Reply With Quote

Old   May 16, 2012, 02:19
Default
  #28
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
ufff i was a bit confused

First of all. If I mention 2D - mesh I mean a 3D mesh with one cell in one directory so you can use empty patches to do like a 2D mesh.

You are creating a planar 2D triangular mesh and then you wanted to extrude it to a 3D mesh using 1 cell in the direction of extrude, right?


I thought you wanna mesh it with hexaedrals only - sorry for miss understanding.

Tobi
Tobi is offline   Reply With Quote

Old   May 16, 2012, 05:36
Default
  #29
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by Tobi View Post
ufff i was a bit confused

First of all. If I mention 2D - mesh I mean a 3D mesh with one cell in one directory so you can use empty patches to do like a 2D mesh.

You are creating a planar 2D triangular mesh and then you wanted to extrude it to a 3D mesh using 1 cell in the direction of extrude, right?


I thought you wanna mesh it with hexaedrals only - sorry for miss understanding.

Tobi
Well, actually I do need a 3D mesh with one cell in one direction for a 2D simulation in OpenFOAM.

A hex mesh would be much better than triangular prism (extruded triangles), have you done something like this in Salome?
tomislav_maric is offline   Reply With Quote

Old   May 17, 2012, 07:03
Default
  #30
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by tomislav_maric View Post
Well, actually I do need a 3D mesh with one cell in one direction for a 2D simulation in OpenFOAM.

A hex mesh would be much better than triangular prism (extruded triangles), have you done something like this in Salome?

Hi,

yes I did it very often,...
Unfortunately I am not on my desk computer and have no hdf file to show you how to mesh with hex. I ll upload one on monday evening!

Tobi

Referencing to salome tutorials: http://www.salome-platform.org/user-...edf-exercise-1
elvis likes this.
Tobi is offline   Reply With Quote

Old   November 19, 2012, 04:03
Default
  #31
New Member
 
sebastian n
Join Date: Nov 2012
Posts: 17
Rep Power: 13
gruenertee is on a distinguished road
First of all, i want to thank everybody who keeps up this forum i am studying mechanical engineering and i try to learn CDF simulation. i created simple construction elements with salome 6.5.0, created a mesh and exported it to a unv file. My problem is that i just can simulate symmetric elements like a t shaped pipe, but once my element is asymmetric nothing happens when i start paraFoam. A Friend of mine told me i should use local coordinates; could that be the mistake? and how to use local coordinates in Salome and mesh it?

Thanks
gruenertee is offline   Reply With Quote

Old   November 19, 2012, 07:16
Default
  #32
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Sebastian and welcome to the forum,

I am not so familiar with the paraview code but in my case every geometrie is working.

Maybe try the following:

1. create a file with the ending *.foam like
Code:
touch paraview.foam
2. open paraview with the following command
Code:
paraview
and load the file you created befor.

Tobi
Tobi is offline   Reply With Quote

Old   November 21, 2012, 06:18
Default
  #33
New Member
 
sebastian n
Join Date: Nov 2012
Posts: 17
Rep Power: 13
gruenertee is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi Sebastian and welcome to the forum,

I am not so familiar with the paraview code but in my case every geometrie is working.

Maybe try the following:

1. create a file with the ending *.foam like
Code:
touch paraview.foam
2. open paraview with the following command
Code:
paraview
and load the file you created befor.

Tobi
At first i want to thank you for your post; i took notice of your advice but my cfd simulation still does not work. Are you taking a look into my upload files? www.workupload.com/file/9pdHRMR
gruenertee is offline   Reply With Quote

Old   November 21, 2012, 06:37
Default
  #34
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

like your case I think you mean, that you can not visualize your results. You mesh is very coarse but with the right settings its possible to get a solution.

I wrote you an Email.

Tobi
Tobi is offline   Reply With Quote

Old   February 21, 2013, 15:42
Default
  #35
New Member
 
Roman Gášpár
Join Date: Apr 2012
Posts: 8
Rep Power: 14
roman.gaspar is on a distinguished road
Hello foamers...

I have a very similiar problem. But a bit different. I exported the .unv file from salome Im using 6.6. and I create B-C and everything in OF folders. I tried to convert mesh to OF (2.1.1) mesh but I obtained this error code:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec   : ideasUnvToFoam segmentbc.unv
Date   : Feb 21 2013
Time   : 21:37:20
Host   : "dell"
PID    : 11581
Case   : /home/gaspar/OpenFOAM/gaspar-2.1.1/run/cavity
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



--> FOAM FATAL ERROR: 
Cannot open file "segmentbc.unv"

    From function ideasUnvToFoam
    in file ideasUnvToFoam.C at line 673.

FOAM exiting
Had anybody similar or same problem?
Thx for help.
Regards
Roman
roman.gaspar is offline   Reply With Quote

Old   February 22, 2013, 05:58
Default
  #36
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Roman,

like your output told you, OF can not find your file. Is your *.unv file in your case folder?
Tobi is offline   Reply With Quote

Old   February 26, 2013, 09:33
Default
  #37
New Member
 
Roman Gášpár
Join Date: Apr 2012
Posts: 8
Rep Power: 14
roman.gaspar is on a distinguished road
Thank you Tobi

I had my .unv file in constant folder...after that I moved it to OF case root folder and now it works...Thank you again

Roman
roman.gaspar is offline   Reply With Quote

Old   September 10, 2014, 08:43
Default Same problem to convert
  #38
Senior Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13
himanshu28 is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi Roman,

like your output told you, OF can not find your file. Is your *.unv file in your case folder?
I am also getting the same problem.
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : ideasUnvToFoam UAV_salome.unv
Date   : Sep 10 2014
Time   : 17:42:25
Host   : "mohd-CELSIUS-W510"
PID    : 12849
Case   : /home/mohd/Himanshu/test_1
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

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 1169416 points.

Processing tag:2412
Starting reading cells at line 2338855.
First occurrence of element type 22 for cell 1 at line 2338856
--> FOAM Warning : 
    From function readCells(IFstream&, label&)
    in file ideasUnvToFoam.C at line 467
    Reading "UAV_salome.unv" at line 2338856
    Cell type 22 not supported


--> FOAM FATAL IO ERROR: 
Attempt to get back from bad stream

file: IStringStream.sourceFile at line 0.

    From function void Istream::getBack(token&)
    in file db/IOstreams/IOstreams/Istream.C at line 56.

FOAM exiting
I am uploading my .hdf file with the https://drive.google.com/file/d/0B0P...it?usp=sharing

Thank you
himanshu28 is offline   Reply With Quote

Old   October 23, 2014, 08:42
Default
  #39
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
Just a minor hint, as most of you seem to prefer the unv-method: If you google for salomeToOpenFOAM.py you should find a short python-script which can be started from within Salome and which will export the marked mesh into a complete polyMesh-folder. For me it worked including pyramids as well...
Linse is offline   Reply With Quote

Old   December 21, 2017, 11:39
Default Salome mesh having pyramids to openfoam
  #40
Member
 
Ashish Kumar
Join Date: Jun 2015
Posts: 33
Rep Power: 10
ashish.svm is on a distinguished road
In my salome generated mesh I have some pyramids, but while exporting to UNV format salome ignores pyramid elements. Actually I need those pyramid cells so is there any way by which I can export that mesh to openfoam without removing pyramids?
ashish.svm is offline   Reply With Quote

Reply


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
[Salome] Problems for creating mesh in salome to OPENFOAM bye bye my blue OpenFOAM Meshing & Mesh Conversion 8 December 5, 2023 00:57
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[Commercial meshers] Mesh conversion .gtm to OpenFOAM ansab OpenFOAM Meshing & Mesh Conversion 2 December 6, 2016 13:48
[Commercial meshers] Problems with ANSYS mesh conversion tdog OpenFOAM Meshing & Mesh Conversion 1 March 31, 2016 17:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


All times are GMT -4. The time now is 09:12.