Error importing .msh to .pyfrm

I am new to PyFR and CFD in general and I am trying to a mesh for my final year project. If anyone knows this error please let me know.

(pyfr-venv) juanpablo@Z390-AORUS-PRO:~/pyfr-venv/PyFR-Test-Cases-main/intakemodel2d$ py
Traceback (most recent call last):
  File "/home/juanpablo/pyfr-venv/bin/pyfr", line 8, in <module>
    sys.exit(main())
  File "/home/juanpablo/pyfr-venv/lib/python3.10/site-packages/pyfr/__main__.py", line 84, in main
    args.process(args)
  File "/home/juanpablo/pyfr-venv/lib/python3.10/site-packages/pyfr/__main__.py", line 61, in process
    mesh = reader.to_pyfrm(args.lintol)
  File "/home/juanpablo/pyfr-venv/lib/python3.10/site-packages/pyfr/readers/gmsh.py", line 86, in to_pyfrm
    mesh = self._to_raw_pyfrm(lintol)
  File "/home/juanpablo/pyfr-venv/lib/python3.10/site-packages/pyfr/readers/gmsh.py", line 138, in _to_raw_pyfrm
    pyfrm = mesh.get_connectivity()
  File "/home/juanpablo/pyfr-venv/lib/python3.10/site-packages/pyfr/readers/base.py", line 160, in get_connectivity
    bfaces[bpent].append(resid.pop(tuple(sorted(fn))))
KeyError: (np.int64(6), np.int64(128))

Bumping this because I got the exact same error. I’m trying to simulate a flow past cylinder problem at a high Re, and I created a mesh similar to the one in the example (inner quad meshes + outer triangle meshes) but finer. The error seems to occur at the outermost quad mesh layer where it interfaces with the triangular meshes. Did you manage to find a solution?

Can you give more details about the issue that you’re having?

I was actually able to fix it by changing the direction of meshing the internal quad section from clockwise to anticlockwise

1 Like