Importing Multiple Meshes
I would like to import multiple meshes (solid and air parts) into an OpenFoam simulation. I have briefly played around with using the snappy mesh feature but was curious if i could use Salome (or other mesh software) to mesh my various objects separately and then bring them into an OpenFoam case. Any advise on this topic would be appreciated.
Thank. |
Hi Thomas,
i am not sure it works, but I am putting some effort on it based on the chtMultiRegionFoam/snappyMultiregionHeater. I made and meshed a coumpound geometry in Salome and export it as .UNV. Then: 1- UNVToFoam your_mesh.UNV 2- splitMeshRegions -cellZones -overwrite This seems to create folder similar to the chtMultiRegionFoam/snappyMultiregionHeater case. Well I still have to work on it, change the dictionary .... But this could be the start point. If I do any progress I will let you know , probably during X-mas holiday :) hope it helps Jean |
Any Updates
Jean,
I am curious if you ever found out if this process worked? I have recently (again) tried to create compound geometry mesh and convert it into openfoam with ideasUNVToFoam but have been unsuccessful. What process did you use to create the compound mesh? I am using the 'Fuse' then 'Partition' features and finally meshing the whole assembly and creating sub-meshes of each individual part. Here is the process which I have been using for meshing multiple parts in Salome, http://www.caelinux.org/wiki/index.p...ters/partition. |
Finally got it to work
I was finally able to import an assembly mesh into OpenFOAM format with the following Salome>Gmsh>OpenFOAM process:
-Using Salome: 1. Within the Geometry module explode surfaces needed for Boundary Conditions and renamed them 2. Fused all parts together into a single assembly 3. Partitioned this assembly using each of the parts included 4. Created 'Volume Groups' for each partitioned part 5. Move to the Meshing module and mesh the whole partitioned assembly (optional: make sub-meshes of the parts to better control mesh sizing) 6. Make 'Volume Groups' of each part within the mesh 7. Make 'Surface Groups' for all the boundary conditions 8. Export mesh as MED file (need to check 'Automatically Create Groups' box) -Using Gmsh 9. Open mesh file in Gmsh and 'Save As' Gmsh mesh file (.msh file extension, make sure file is saved as Version 2.0 ACSII and un-check all check boxes) 10. Move Gmsh mesh file into an empty case file (make sure to have constant->polyMesh (empty) and system folder with necessary files) -OpenFOAM mesh conversion/manipulation tools 11. Run [>> gmshToFoam] in OpenFOAM terminal within the case directory 12. Run [>> splitMeshRegions -cellZonesOnly -overwrite] (this is only used if there are multiple parts (volumes) to be split up) The following two links talk about this process: http://www.caelinux.org/wiki/index.p...ters/partition http://www.salome-platform.org/forum...10/thread_3005 |
Hi,
i want to mention that there seems to be a way to directly export from salome to openfoam. http://pythonflu.wikidot.com/hybridflu Ivor Clifford http://www.openfoamworkshop.org/6th_...ord_slides.pdf (=>slide 19"Meshing section") mentions that direct in memory Salome2OF mesh writing via pythonflu supports meshes that ideasUnvtoFoam does not support |
Hi Thomas,
Sorry for the late response i was in holiday :-) yes I was able to do it. If you need more details let me know it.
OpenFoam
|
|
Quote:
this is probably too late but how do you define on Salome the faces of the solid and fluid that will be in contact? I can convert the mesh to openFoam and it automatically separates into the different regions but I don't have the shared boundary. Thanks in advance, João |
Hello,
Quote:
Code:
parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF/chtMRF/chtMRF-$ mpirun -np 16 chtMultiRegionFoam -parallel Code:
decomposePar thanks thanks |
Steps were made for older version??? Just a guess
I haven't tried this in so long. I think I was still using OpenFOAM 1.6 at the time, so I'd assume that there is a formatting error in the converter tool that doesn't match up to what OpenFOAM 3.0 format needs. Just a guess without really looking into it. Maybe open up the files side-by-side with some from a working test case. Does it work if you don't run it in parallel?
|
Hello Thomas,
I have tried running on single processor however, i didn't get any result. will give it a try again. and update, i am currently trying the https://github.com/nicolasedh/salomeToOpenFOAM script. kind regards Nas |
Greetings to all!
@Nasir: What does this command give you? Code:
find . -type f | xargs ls -l In addition, the output from splitMeshRegions and decomposePar is also important. Best regards, Bruno |
Hello Bruno,
Thanks for getting back, after running: Code:
ideasUnvToFoam volume.unv Code:
parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF$ ideasUnvToFoam volume.unv |
followed by
Code:
find . -type f | xargs ls -l Code:
parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF$ find . -type f | xargs ls -l |
the following output is for:
Code:
splitMeshRegions -cellZones -overwrite Code:
/*---------------------------------------------------------------------------*\ |
1 Attachment(s)
the output for:
Code:
splitMeshRegions -cellZones -overwrite |
My decomposePar output:
Code:
parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF$ decomposePar |
1 Attachment(s)
and finally output from my decomposePar is attached bellow.
Thank you very much for you continuous support Bruno. Kind regards Nas |
Quote:
Either way, I believe I've figured out the problem. You need to run decomposePar like this: Code:
decomposePar -allRegions _____________ Note: Several posts that were posted between the 20th to 29th of December 2015, which were only mildly related to this topic, were mostly on problems with setting up the boundary conditions. These posts have been moved to here: http://www.cfd-online.com/Forums/ope...sh-salome.html |
All times are GMT -4. The time now is 13:07. |