# Quad surface mesh import fail

**URL:** <https://pyfr.discourse.group/t/quad-surface-mesh-import-fail/551>\
**Category:** General\
**Created:** [9 February 2022 05:52 UTC](https://pyfr.discourse.group/t/quad-surface-mesh-import-fail/551 "2022-02-09T05:52:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YoonSuKyung](https://avatars.discourse-cdn.com/v4/letter/y/5e9695/32.png) [@YoonSuKyung](https://pyfr.discourse.group/u/YoonSuKyung)\
**Post date:** [9 February 2022 05:52 UTC](https://pyfr.discourse.group/t/quad-surface-mesh-import-fail/551/1 "2022-02-09T05:52:29Z")

</div>

When I import .msh to .pyfrm , I got typeError

 ![image](https://global.discourse-cdn.com/free1/uploads/pyfr/original/1X/547b12626062f86d3e1ed349eb082cb9a8feab35.jpeg)

how can i do?  
i made mesh file by pointwise V18.0R3  
when i use only triangular surface mesh, it didn’t appeared.  
but i use tri+quad mesh, it suddenly appeared…

> **[PyFR\_ex/quad\_ex at master · Yoon-SuKyung/PyFR\_ex](https://github.com/Yoon-SuKyung/PyFR_ex/tree/master/quad_ex)**
>
> master/quad\_ex

[case2.msh](https://github.com/Yoon-SuKyung/PyFR_ex/blob/6cb34ab6ae326081909f03f1d11b990e33288300/quad_ex/case2.msh)  
[case2.pw](https://github.com/Yoon-SuKyung/PyFR_ex/blob/6cb34ab6ae326081909f03f1d11b990e33288300/quad_ex/case2.pw)  
[quad.ini](https://github.com/Yoon-SuKyung/PyFR_ex/blob/6cb34ab6ae326081909f03f1d11b990e33288300/quad_ex/quad.ini)

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [9 February 2022 08:43 UTC](https://pyfr.discourse.group/t/quad-surface-mesh-import-fail/551/2 "2022-02-09T08:43:25Z")

</div>

I downloaded and tried importing your mesh, I got a slightly different message that makes more sense.

```auto
Traceback (most recent call last):
  File "/Users/wtrojak/Documents/code/pyfr_venv/bin/pyfr", line 33, in <module>
    sys.exit(load_entry_point('pyfr==1.12.3', 'console_scripts', 'pyfr')())
  File "/opt/homebrew/lib/python3.9/site-packages/pyfr/ __main__.py", line 117, in main
    args.process(args)
  File "/opt/homebrew/lib/python3.9/site-packages/pyfr/ __main__.py", line 131, in process_import
    mesh = reader.to_pyfrm(args.lintol)
  File "/opt/homebrew/lib/python3.9/site-packages/pyfr/readers/base.py", line 23, in to_pyfrm
    mesh = self._to_raw_pyfrm(lintol)
  File "/opt/homebrew/lib/python3.9/site-packages/pyfr/readers/gmsh.py", line 414, in _to_raw_pyfrm
    rawm.update(mesh.get_connectivity())
  File "/opt/homebrew/lib/python3.9/site-packages/pyfr/readers/base.py", line 176, in get_connectivity
    eles = self._to_first_order(self._elenodes)
  File "/opt/homebrew/lib/python3.9/site-packages/pyfr/readers/base.py", line 82, in _to_first_order
    self._check_pyr_parallelogram(foelemap[petype, epent])
  File "/opt/homebrew/lib/python3.9/site-packages/pyfr/readers/base.py", line 66, in _check_pyr_parallelogram
    raise ValueError('Pyramids with non-parallelogram bases are '
ValueError: Pyramids with non-parallelogram bases are currently unsupported

```

You appear to have some pyramids in your mesh that don’t have parallelogram bases.

---

<div class="post-metadata">

**Author:** ![YoonSuKyung](https://avatars.discourse-cdn.com/v4/letter/y/5e9695/32.png) [@YoonSuKyung](https://pyfr.discourse.group/u/YoonSuKyung)\
**Post date:** [9 February 2022 12:34 UTC](https://pyfr.discourse.group/t/quad-surface-mesh-import-fail/551/3 "2022-02-09T12:34:43Z")

</div>

Then… In this situation, I can’t import my .msh file to pyfrm.  
Is it the only way to create a grid in another way?  
Can you suggest me some alternatives?

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [9 February 2022 12:41 UTC](https://pyfr.discourse.group/t/quad-surface-mesh-import-fail/551/4 "2022-02-09T12:41:39Z")

</div>

So I guess you are using quads on the surface of some curved geometry? What you may be able to do it extrude those to produce a layer of hexahedral elements. I think you can then use farfield in Pointwise to help prevent the quad bases for the pyramids from being anything other than parallelograms. However, I haven’t used this procedure before and it will be dependent on your geometry.

In this post we discussed Pyramids extensively: [Errors on mesh with pyramid elements](https://pyfr.discourse.group/t/errors-on-mesh-with-pyramid-elements/501)

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [9 February 2022 12:42 UTC](https://pyfr.discourse.group/t/quad-surface-mesh-import-fail/551/5 "2022-02-09T12:42:19Z")

</div>

Otherwise, you can just stick to using triangles on the surface.
