# Problem converting Gmsh file to PyFR file

**URL:** <https://pyfr.discourse.group/t/problem-converting-gmsh-file-to-pyfr-file/101>\
**Category:** General\
**Created:** [4 February 2016 14:58 UTC](https://pyfr.discourse.group/t/problem-converting-gmsh-file-to-pyfr-file/101 "2016-02-04T14:58:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Holt](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Andrew\_Holt](https://pyfr.discourse.group/u/Andrew_Holt)\
**Post date:** [4 February 2016 14:58 UTC](https://pyfr.discourse.group/t/problem-converting-gmsh-file-to-pyfr-file/101/1 "2016-02-04T14:58:28Z")

</div>

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:

```auto
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](https://pyfr.discourse.group/uploads/short-url/mOC51CAsazSpIhwCsrFHW9hsDUC.msh) (59 KB)

---

<div class="post-metadata">

**Author:** ![bvermeir](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bvermeir](https://pyfr.discourse.group/u/bvermeir)\
**Post date:** [4 February 2016 15:17 UTC](https://pyfr.discourse.group/t/problem-converting-gmsh-file-to-pyfr-file/101/2 "2016-02-04T15:17:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andrew\_Holt](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Andrew\_Holt](https://pyfr.discourse.group/u/Andrew_Holt)\
**Post date:** [5 February 2016 17:44 UTC](https://pyfr.discourse.group/t/problem-converting-gmsh-file-to-pyfr-file/101/3 "2016-02-05T17:44:59Z")

</div>

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](https://pyfr.discourse.group/uploads/short-url/hq2GaJcrjXsML7COs2UQJQI31N8.msh) (18.9 KB)

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [5 February 2016 18:14 UTC](https://pyfr.discourse.group/t/problem-converting-gmsh-file-to-pyfr-file/101/4 "2016-02-05T18:14:09Z")

</div>

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.
