Problem converting Gmsh file to PyFR file

Hi
I’m new to PyFR (and Gmsh), and am trying to learn by doing a simulation of flow over a 2D cylinder. When I try to import the mesh (see attached) using

$ pyfr import cylinder.msh mesh.pyfrm

I keep getting the following error message:

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.5/bin/pyfr", line 9, in <module>
load_entry_point('pyfr==1.3.0', 'console_scripts', 'pyfr')()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyfr-1.3.0-py3.5.egg/pyfr/scripts/main.py", line 109, in main
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyfr-1.3.0-py3.5.egg/pyfr/scripts/main.py", line 120, in process_import
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyfr-1.3.0-py3.5.egg/pyfr/readers/__init__.py", line 18, in get_reader_by_extn
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyfr-1.3.0-py3.5.egg/pyfr/readers/gmsh.py", line 106, in __init__
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyfr-1.3.0-py3.5.egg/pyfr/readers/gmsh.py", line 200, in _read_eles
ValueError: Unsupported element type 15

Is this due to the gmsh file itself, or have I not got PyFR set-up properly?

Thank you

Andrew Holt

cylinder.msh (59 KB)

Hi Andrew,

In the gmsh documentation it describes element type 15 as a point. If I look inside the .msh file I do see a few points at the start of the element list, which are not supported.

My first idea is that you have not defined physical entities before exporting the mesh from gmsh. You need to define a physical surface for the “Fluid” region and physical lines for the boundaries. The names of these lines should match the boundary condition names you put in the pyfr .ini file.

Hi
I defined the physical surface for the fluid region and physical lines for the boundaries (see .msh file). However I keep getting the below error when I try to import the GMSH file into PyFR:

ValueError: Malformed physical entity

I have tried defining physical lines for all boundaries, and also for just the inlet and cylinder surface, but get the same error. I couldn’t find anything relating to this error in the GMSH documentation. Is this something I am not doing correctly when creating the mesh in GMSH?

Thank you for your help.

Andrew Holt

cylinder.msh (18.9 KB)

Hi Andrew,

Just looking at the $PhysicalNames section of the mesh I see that the
names are encased in curly (typographical) quotes. You will need to
put them in regular quotes for the reader.

Regards, Freddie.