Hi Laurent,
Thanks for the quick response. This seems to have fixed the throwing of the error. But now I have another problem from the same line. During the format conversion process, it gets stuck while doing one particular cell, (cell no. 18003 out of 1738006).. When I tried to debug, it appears that this 'if' conditional is never true, so the outer 'while' loop never gets terminated.. (for the previous cells, the process didnt enter this 'while' loop, so the problem appeared only for this cell) : Code:
if (len(CommonPoints(listFaces[listCells[i][j]], listFaces[listCells[i][listLateralFacesOrdered[p]]])) == 2): Can you please help fix this. Thanks Prakriteesh |
1 Attachment(s)
It's a long time I have not used this tool and I have never tried to convert meshes with pyramids. Nevertheless, I have looked at the part of the code for the pyramids and found that there is a mistake. I have done a small correction and I hope it will help you. The new code is in attachement.
If you find other bugs, don't hesitate to correct them and share your new code with the community of SU2 users. Regards, Laurent |
Hi ,
Thanks for the new code. The bug isn't gone yet for pyramid cells, but I will try fixing it if I can. Kind regards Prakriteesh |
Very Useful
Hi Combas,
thank you for posting this script, it is very useful. May I suggest that you put it on the SU2 project, it would be a very nice contribution. However I am now facing a problem during the writing of the su2 mesh: Code:
******************************************************* |
Hi,
I am sorry but I have no idea... You should check first that you don't have a problem of hard disc full on your computer. Then, you can open the output file and check if it is empty or not. If it is not empty, you can find which part of the writing process fails. Finally, you can add some "print" commands in the script, or use a Python debugger to find what is wrong. Regards, Laurent |
Thank you, I have found what was wrong. The Open Foam mesh was not generated by extrusion, but using an app to transform it into a wedge.
Using your app before the transformation into a wedge, solved the issue. |
Quote:
Many thanks for this. I was actually looking for a *.cgns to *.su2 converter but since ICEM can also export *.msh this might work as well. |
Hi,
thanks for this nice and useful tool! Can someone quickly summarize the capabilities of the current version? If the main creator agrees, we would like to add it to the mesh tools repo (https://github.com/su2code/MeshTools). Thanks guys! Tim |
OpenFOAM mesh to .SU2
Hello friends ,
I got following message while converting OpenFOAM mesh to .SU2 format Problem during the input file reading (InputOpenFoam2SU2.dat) |
Quote:
************************************************** ***** Program to convert OpenFoam meshes to SU2 mesh format This program has been written by Laurent Berdoulat laurent.berdoulat@wolfconseil.com date: 11/12/2013 ************************************************** ***** Enter the name of the input file:input.txt Reading of the input file input.txt pathOpenFoamMesh = /home/harsha/OpenFOAM/harsha-2.4.0/steam_jet_ejector_cfMesh/constant/polyMesh pathSU2Mesh = /home/harsha/OpenFOAM/harsha-2.4.0/steam_jet_ejector_cfMesh nameSU2MeshFile = ejector.su2 kindMesh (2D/3D) = 3D Input file read correctly Reading of the 'points' file nb points = 190671 'points' file read correctly Reading of the 'faces' file nb faces = 513776 'faces' file read correctly Reading of the 'owner' file Problem during the 'owner' file reading I got this error while converting Mesh |
Quote:
|
Quote:
|
Openfoam7
Thank you!
|
To msh file
Hello. Thanks for your help.
I already created the su2 2D file from foam mesh. Now I'm trying to conver the su2 file to .msh (or any format that fluent can read). Any sugestion? Thanks |
You can convert directly from foam to fluent with FoamMeshToFluent. You can also use pypi meshio to convert meshes in python.
|
2D OpenFOAM to 2D fluent
Hello. The problem is that using foam convert, a 3D mesh is obtain in fluent (from 2D openFOAM case). Thats why I converted first to SU2 2D. Meshio doesnt works neither.
|
What is the problem with meshio? It might be that you lose the boundary conditions, but you can add them in Fluent again.
The best option is maybe (if you have the original CAD file) to export the CAD in a format that you can import in the Fluent Mesher, like cgns, and then mesh in Fluent. |
1 Attachment(s)
Hello. I attach the capture of the error of meshio from su2 to msh.
Moreover, the url for the su2 mesh if you can take a look: https://drive.google.com/file/d/1uat...ew?usp=sharing Thanks for helping. |
OK, try creating a mesh with only one cell type (either triangles or quadrilaterals), because it is complaining that you need to supply more information if you have a mixed mesh.
Can you not convert convert to a cgns? You can then read the same mesh with fluent and su2. |
It is suppose it has only quads. Moreover I tried with cgns but the only way to read that mesh in ansys is via ICEM, but it says that the cgns file was written in a recent version of cgns. I did not found information about how to upgrade the library cgns of ansys (I have the 2020 R2 ansys)
|
All times are GMT -4. The time now is 23:35. |