|
[Sponsors] |
March 21, 2010, 10:19 |
mesh conversion Salome --> OpenFoam
|
#1 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I generated a grid around a blade section with Salome and I want to import it in OpenFOAM. I set the domain boundaries, as in this procedure definition (from the Salome forum):
STEP1 Create groups of faces for all patches (undefined sufaces will became in OpenFOAM as defaultFaces patch). For example, for internal simulation, we need 3 groups: inlet, outlet and walls. STEP2 Mesh geometry. STEP3 Create group of faces for mesh. This is done by using Create group command in SMESH module and selecting checkbox faces. In the appeared dialog box we must enter name for group (or patch in OpenFOAM), e.g., inlet, outlet, walls. Then, we must select Group using geometry option and click on interesting group in tree view of meshed solid. STEP4 Export your mesh to I-DEAS format file (filename.unv). This file should be saved to the root of OpenFOAM case (where directories 0, constant, system). STEP5 Run utility ideasUnvToFoam. For example, if we are using terminal in case root, we should type: Code:
ideasUnvToFoam filename.unv Code:
checkMesh Code:
transformPoints -scale '(0.001 0.001 0.001)' I have a problem. At STEP5 I obtain: Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.6-53b7f692aa41 Exec : ideasUnvToFoam mesh.unv Date : Mar 21 2010 Time : 14:40:56 Host : giulia-laptop PID : 7755 Case : /home/giulia/OpenFOAM/OpenFOAM-1.6/run/hydrofoil nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time cannot open file file: /home/giulia/OpenFOAM/OpenFOAM-1.6/run/hydrofoil/system/controlDict at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 62. FOAM exiting |
|
March 21, 2010, 10:52 |
|
#2 | |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello,
A Good Afternoon to you! In order to get: ideasUnvToFoam <filename>.unv working, you need to have a valid controlDict file present in the <case name>/system folder. Usually what is done, is to create a skeleton OpenFOAM case, with the following structure: Quote:
Hope this helps... Philippose |
||
March 21, 2010, 12:19 |
|
#3 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Thank you for your reply. I can't believe someone would help me on sunday
I read about creating a new case in the user guide, but I found 3 tutorials for SimpleFoam. The subdirectories are not all the same ones, so i got confused. For example, I could copy the pitzDaily tutorial and edit the case files, but I don't know which subdirectories or files are to be deleted. My case is about a blade section (a 'hydro' foil) and I'll apply a turbulent model. I'm a beginner, as you can see |
|
March 21, 2010, 14:13 |
|
#4 | |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello again :-)!
So... as you rightly noticed, the file structure for the different OpenFOAM cases are not always the same.... however, I am sure you would have noticed some folders and files to be always present in most OpenFOAM cases. In essence, there is a minimal setup required for running most OpenFOAM cases. In addition to this minimal setup, some special solvers or configurations may require additional files. The typical structure of an OpenFOAM case used for an incompressible, turbulent simulation (for example, simpleFoam) is as given below: Quote:
The contents of the 0 time-step folder also has to be modified depending on the boundary conditions for a particular simulation. For a specific family of simulations (such as incompressible, turbulent using simpleFoam), usually the contents of the system and constant (except for the polyMesh folder of course) folders will need only minimal modifications across simulations. For further information regarding the folder structure of an OpenFOAM simulation, and the various files used, refer to the OpenFOAM User Manual. Have a nice evening ahead! Philippose |
||
March 22, 2010, 06:13 |
|
#5 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Thanks a lot, I got it. I create a new case and the mesh seems ok
Now I'm going to edit the configuration files for my simulation. |
|
October 18, 2010, 08:34 |
|
#7 | |
Senior Member
|
Quote:
http://www.caelinux.org/wiki/downloads/docs/Pipe2007/PipeMesh.htm http://www.caelinux.org/wiki/index.p...ELinux_2007.29 tutorial is for a older version of Salome but easy to transfer to new version |
||
October 19, 2010, 03:35 |
|
#9 |
Senior Member
|
i've succeeded to create group and export it to OpenFOAM.
But i don't know how to define cyclic B.C for two face for example front and back of a backward facing step case. Any idea about this problem? |
|
November 3, 2010, 06:46 |
|
#10 | |
Member
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17 |
Quote:
Hi, you can find an example which use the kind of cyclic boundary in these tutorials: ~ OpenFOAM/hamdi-1.7.1/run/tutorials/incompressible/simpleSRFFoam/mixer/0 OR ~ OpenFOAM/hamdi-1.7.1/run/tutorials/incompressible/channelFoam/channel395 OR ~ OpenFOAM/hamdi-1.7.1/run/tutorials/incompressible/boundaryFoam/boundaryWallFunctions etc... hope that you help you Hamcer |
||
November 3, 2010, 10:35 |
|
#11 |
Senior Member
|
Thanks Hamdi,
I checked your mentioned cases. all of their meshes were created by blockMeshDict file. they are not conversion from other softwares like Salome. And as you know when we convert from other softwares, the mesh is imported and there is no need to blockMeshDict and blockMesh command. and in this situation (when importing from Salome) it doesn't understand which faces should be cyclic together . |
|
November 3, 2010, 13:03 |
|
#12 |
Member
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17 |
hi maysam
here is an example that uses cyclic boundary. Test cases are in the folder tubomachinery (especially turboMachinery/tutorials/cgnsConverters/test123 the original mesh is made with CGNS you must install the utility cgnsTofoam, see: http://openfoamwiki.net/index.php/Si...GNS_Converters or if you have Ubuntu you can install it with synaptic (also OpenFOAM, OpenFOAM-dev, and paraview openfoamparaview) and do not forget m4 pakage hope that help you. hamdi |
|
January 5, 2011, 09:41 |
|
#13 |
Senior Member
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17 |
Hi all,
Happy new year to everybody ! I'm trying to do my best to learn Salome but I'm now facing a point where I can't go any further and need some kind help The goal is simple: try to build a 3D mesh with a non-uniform revolution of 2D elements. It looks rather simple isn't it ? But I can't do it ... My workflow is as follow: 1. I build a Face 2. I use an Arc as a path for the extrusion 3. I mesh the Face with Quadrangle Mapping 4. I mesh the Arc with a Wire discretisation and a non-uniform 1D hypothesis 5. I mesh the volume using the 3D extrusion algorithm: Then menu Modification > Extrusion along a path I select the 2D elements of my Face then the path mesh, the starting node and the base point The 3D mesh is created and looks like OK but in fact it contains no Prisms (only Hexahedrons) . The suggested procedure consists of merging the duplicate nodes.This creates prisms elements but the numbers of prisms doesn't seems to be wrong. I've made a very basic mesh to illustrate this problem: * It's a square face meshed with Quadrangle Mapping which is extruded along an Arc. * I mesh the Arc with a Wire discretization and a non-uniform 1D hypothesis. * I mesh the volume using the 3D extrusion algorithm. In the screenshot of the resulting mesh using the Extrusion along the non-uniform meshed Arc before merging the duplicate nodes you can see some "holes" in the mesh: don't know if it's graphical or not. There is no prisms before merging duplicated nodes. You can see that 16 prisms were created after merging the duplicate nodes BUT this number seems to be wrong I think the correct prisms number should rather be 6*4=24 but I may be wrong here. There is still some "holes" in the mesh. The mesh shown in wireframe mode is also strange. It looks like some prisms are indeed missing. You will find the corresponding hdf file before merging duplicate nodes. What's wrong here ? I'm using the Salome_5.1.4 32 bits Universal Package Any help/advice will be greatly appreciate. Cheers François |
|
March 3, 2011, 12:17 |
|
#14 |
New Member
Alexey Kochevsky
Join Date: Nov 2010
Location: Munich, Germany
Posts: 16
Rep Power: 16 |
Hi all,
it is to be mentioned that pyramid-shaped cells are missed by exporting a mesh in an I-DEAS format file (filename.unv) (I use SALOME 5.1.5). It's a pity, otherwise I would have some success in generation of nice hexa-shaped boundary cells near walls, with tetra-cells for the core flow. Unfortunately, pyramid cells seem to be inevitably needed for transition between hexa and tetra cells. Is it possible to get pyramid cells somehow saved in the unv-file? Regards, Alexey |
|
March 3, 2011, 13:58 |
|
#15 | |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I had the same problem some time ago and I was explained that:
Quote:
|
||
March 9, 2011, 04:52 |
|
#16 |
New Member
Alexey Kochevsky
Join Date: Nov 2010
Location: Munich, Germany
Posts: 16
Rep Power: 16 |
Thank you for the explanation and the link, I have just tried the procedure described over there, the conversion was successful.
|
|
May 2, 2011, 10:08 |
|
#17 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
hey all,
i 've meshed a simple geometry like the steps below. after i export the mesh (unv) and start ideasUnvToFoam i get these error message Code:
tobi@shorty:~/OpenFOAM/tobi-1.7.x/run/test$ ideasUnvToFoam Mesh_1.unv /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7.x | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.7.x-2d00769395fa Exec : ideasUnvToFoam Mesh_1.unv Date : May 02 2011 Time : 15:03:39 Host : shorty PID : 6882 Case : /home/tobi/OpenFOAM/tobi-1.7.x/run/test nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Processing tag:2411 Starting reading points at line 3. Read 10562 points. Processing tag:2412 Starting reading cells at line 21130. First occurrence of element type 22 for cell 1 at line 21131 --> FOAM Warning : From function readCells(IFstream&, label&) in file ideasUnvToFoam.C at line 461 Reading "Mesh_1.unv" at line 21131 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 38. FOAM exiting Regards Tobi |
|
May 2, 2011, 11:02 |
|
#18 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I think something is wrong in your mesh creation: the openFOAM converter cannot manage some elements. Could you attach your case or dump it?
|
|
May 2, 2011, 12:12 |
|
#19 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
its the first time i make the mesh with Salome. I am usally using sHM but i wanna get a 2D - mesh and thats not possible with snappyHexMesh. Here my Salome hdf - file http://www.file-upload.net/download-...st.tar.gz.html Don 't know if i get everything correct. Maybe someone could help me ? Thanks for your help Regards Tobi |
|
May 2, 2011, 13:23 |
|
#20 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I think you're a bit confused about meshing in SALOME and in openFOAM. About SALOME, I suggest to try the tutorials first. About openFOAM, you should read again the pre-processing section in the User Guide. You cannot manage 2D meshes, as in your case: in OpenFOAM you always have a third dimension. Anyway, you can do a lot of things with blockMesh, snappyHexMesh and other openFOAM meshing tools. When you are ready, you can follow the above procedure (and apply colours when creating mesh groups).
Hope this helps, regards. |
|
|
|
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 01:57 |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
[Commercial meshers] Mesh conversion .gtm to OpenFOAM | ansab | OpenFOAM Meshing & Mesh Conversion | 2 | December 6, 2016 14:48 |
[Commercial meshers] Problems with ANSYS mesh conversion | tdog | OpenFOAM Meshing & Mesh Conversion | 1 | March 31, 2016 18:36 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |