|
[Sponsors] |
[Commercial meshers] Conversion of OpenFoam mesh to .msh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 14, 2019, 06:43 |
Conversion of OpenFoam mesh to .msh
|
#1 |
New Member
|
Hi,
I want to convert foam mesh to Fluent. Is there any Utility? I Have tried foamMeshTofluent but it improting my block mesh but not the main geometry. Can any one have an Idea? thank you |
|
January 14, 2019, 10:22 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
You can export it to EnSight ("foamToEnsight") and you can import EnSight into fluent. |
|
January 14, 2019, 13:19 |
Ensight Mesh Precision
|
#3 |
New Member
Join Date: Aug 2013
Posts: 12
Rep Power: 13 |
I'm working on a case with a very high mesh aspect ratio (I need to solve the boundary layer for a supersonic flow). Hence, I need to increase the writing precision for the "geometry" file when I use the application foamToEnsightParts... the default result using the -ascii option is scientific notation with 5 decimals and that's not enougth for me.
Changing the controlDict writePrecision doesn't help, neither the foamToEnsightParts -width option... Any ideas how to do that? |
|
January 15, 2019, 07:20 |
|
#4 |
New Member
|
Hello Simrego!!!
thank you for the Information... it actually worked, but I am facing same Problem. it just improting my blockMesh. Have any idea how to do it so that i could get 3D geometry? |
|
January 23, 2019, 09:34 |
Ensight mesh precision
|
#5 |
New Member
Join Date: Aug 2013
Posts: 12
Rep Power: 13 |
After a lot of work, here are some conclusions I came with:
1 - I managed to improve the precision of the geometry files generated by foamMeshToEnsight and foamMeshToEnsightParts. I did it by changing some parameters on both applications files and compiling again with wmake. But I found out that It was in vain, since Ensight geometry files must be written on 12.5e format (scientific notation with 5 decimal places) according to http://www3.ensight.com/EnSight92_Docs/UserManual.pdf... So I gor error messages when I tried to import into Fluent... 2 - The foamMeshToFluent combine all cell zones into one internal fluid region... but my case must have distinct cell zones since I'm modelling fluid-solid interation... the default precision of the generated .msh file is scientific notation with 10 decimal places. If you need to improve that just change "fluentMeshFile.precision(10);" on the fluentFvMesh.C file and compile with wmake. 3 - The best solution I got was: a) use the splitMeshRegions -cellzones -overwrite in order to generate polyMesh files for each cell zone (my original mesh was generated on SALOME and imported using ideasUnvToFoam). b) copy the polyMesh folder generated for each cell zone to the constant directory (substituting the original polyMesh folder). c) use the foamMeshToFLuent to generate the .msh file for each cell zone once at a time and save them with diferent names. d) open Fluent, read one .msh file and load the other ones by using the append option (see https://www.sharcnet.ca/Software/Flu...ug/node171.htm) e) for each interface between cell zones use the combine/fuse option. It's quite some work, but it's a solution for converting OpenFoam mesh with multiple cell zones into fluent and preserve the precision. |
|
January 23, 2019, 09:59 |
|
#6 | |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Quote:
Hi! Sorry, but i don't know what do you mean exactly under 3D geometry. You need the mesh or the geometry itself? If you need the geometry you can use the surfaceMeshTriangulate utility to export your surface mesh as an stl file. I don't think if there are any another way to export the geometry. And also not clear for me why do you have to export the geometry. |
||
January 11, 2021, 13:10 |
|
#7 | |
New Member
Join Date: Feb 2016
Posts: 21
Rep Power: 10 |
Quote:
Realizing ICS's answer #3 a-c, here is a code that does the job (exporting each cell zone as separate msh-file): Code:
#!/bin/bash . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication splitMeshRegions -cellZones -overwrite mv constant/polyMesh constant/polyMesh.bak for folder in constant/*/polyMesh/ do regionName=$(echo $folder | cut -d '/' -f2) echo "Exporting cell zone $regionName" cp -r $folder constant foamMeshToFluent >> log.foamMeshToFluent mv fluentInterface/OF1912.msh fluentInterface/$regionName.msh done mv constant/polyMesh.bak constant/polyMesh |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] 3D Mesh conversion from gmsh-2.5.0 to OpenFOAM | Ancioi | OpenFOAM Meshing & Mesh Conversion | 17 | January 9, 2019 00:50 |
[Commercial meshers] Problems with ANSYS mesh conversion | tdog | OpenFOAM Meshing & Mesh Conversion | 1 | March 31, 2016 18:36 |
[Other] vtk mesh or Abaqus mesh to OpenFOAM | bigphil | OpenFOAM Meshing & Mesh Conversion | 27 | November 23, 2015 18:31 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |