Issue with Mesh (msh to pyfrm)

I aim to perform simulations of an airfoil profile. When creating the mesh in ‘Gmsh’, I try to refine it as much as possible and properly define the physical groups. To ensure accuracy, I use the example meshes published in ‘PyFr test cases’ as a reference. However, despite this, I encounter an error when performing the conversion from ‘msh’ to ‘pyfrm’, and I am unsure of the cause. I am attaching the mesh files as well as screenshots of the error. NACA_0018_error

Thanks!

When I attempt to import your mesh I get errors regarding unpaired faces. Can you please share your .geo file?

Regards, Freddie.

Hello,
I don’t have the .geo file because, as I was finding it difficult to create the geometry correctly in ‘Gmsh’, I imported it already made from ‘SALOME’ and only generated the mesh and defined the physical groups using ‘Gmsh’.
I am attaching the geometry.
Thanks!!

Carla

(Attachment Partition_1.step is missing)

Hello,

I have been trying to define a mesh and convert it to a ‘pyfrm’ file. At first, I attempted to create them from scratch, but I kept encountering errors, so I decided to try using a pre-made mesh that I created with this tool:

Once I generated the mesh, I tried to convert it, but I got the same error as with the meshes I attempted to create myself.

I am attaching the error message as well as the generated mesh file (ejemplo_a.msh).

Thank you in advance.

(venv) carla@CARLAALONSO:~/Escritorio/TFG/GMSH-Airfoil-2D$ gmshairfoil2d --airfoil e211 --aoa 8 --box 12x4 --format vtk --ui --no_bl
Info    : Meshing 1D...
Info    : [  0%] Meshing curve 1 (Nurb)
Info    : [ 20%] Meshing curve 2 (Nurb)
Info    : [ 30%] Meshing curve 3 (Nurb)
Info    : [ 50%] Meshing curve 4 (Line)
Info    : [ 60%] Meshing curve 5 (Line)
Info    : [ 80%] Meshing curve 6 (Line)
Info    : [ 90%] Meshing curve 7 (Line)
Info    : Done meshing 1D (Wall 0.0239403s, CPU 0.018961s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (Plane, Frontal-Delaunay)
Info    : Done meshing 2D (Wall 0.161331s, CPU 0.154535s)
Info    : 4524 nodes 8998 elements
Info    : Optimizing mesh (Laplace2D)...
Info    : Done optimizing mesh (Wall 0.071636s, CPU 0.071606s)
-------------------------------------------------------
Version       : 4.11.1
License       : GNU General Public License
Build OS      : Linux64-sdk
Build date    : 20221221
Build host    : gmsh.info
Build options : 64Bit ALGLIB[contrib] ANN[contrib] Bamg Blas[petsc] Blossom Cgns DIntegration Dlopen DomHex Eigen[contrib] Fltk Gmm[contrib] Hxt Jpeg Kbipack Lapack[petsc] LinuxJoystick MathEx[contrib] Med Mesh Metis[contrib] Mmg Mpeg Netgen ONELAB ONELABMetamodel OpenCASCADE OpenCASCADE-CAF OpenGL OpenMP OptHom PETSc Parser Plugins Png Post QuadMeshingTools QuadTri Solver TetGen/BR Voro++[contrib] WinslowUntangler Zlib
FLTK version  : 1.4.0
PETSc version : 3.14.4 (real arithmtic)
OCC version   : 7.6.1
MED version   : 4.1.0
Packaged by   : geuzaine
Web site      : https://gmsh.info
Issue tracker : https://gitlab.onelab.info/gmsh/gmsh/issues
-------------------------------------------------------
Info    : Writing '.msh'...
Error   : Unknown output file format
Info    : Done writing '.msh'
Info    : Writing '/home/carla/Escritorio/TFG/GMSH-Airfoil-2D/ejemplo_a.msh'...
Info    : Done writing '/home/carla/Escritorio/TFG/GMSH-Airfoil-2D/ejemplo_a.msh'
Info    : Writing 'mesh_airfoil_e211.vtk'...
Info    : Done writing 'mesh_airfoil_e211.vtk'
(venv) carla@CARLAALONSO:~/Escritorio/TFG/GMSH-Airfoil-2D$ gmsh ejemplo_a.msh 
(venv) carla@CARLAALONSO:~/Escritorio/TFG/GMSH-Airfoil-2D$ deactivate
carla@CARLAALONSO:~/Escritorio/TFG/GMSH-Airfoil-2D$ activar_pyfr
(pyfr-venv) carla@CARLAALONSO:~/Escritorio/TFG/GMSH-Airfoil-2D$ ls
database       gmshairfoil2d.egg-info  mesh_airfoil_e211.vtk  tests
ejemplo_a.msh  images                  README.md              venv
example        LICENSE                 requirement.txt
gmshairfoil2d  mesh_airfoil_0012.su2   setup.py
(pyfr-venv) carla@CARLAALONSO:~/Escritorio/TFG/GMSH-Airfoil-2D$ pyfr import ejemplo_a.msh ejemplo_a.pyfrm
Traceback (most recent call last):
  File "/home/carla/pyfr-venv/bin/pyfr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/carla/pyfr-venv/lib/python3.12/site-packages/pyfr/__main__.py", line 124, in main
    args.process(args)
  File "/home/carla/pyfr-venv/lib/python3.12/site-packages/pyfr/__main__.py", line 138, in process_import
    mesh = reader.to_pyfrm(args.lintol)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carla/pyfr-venv/lib/python3.12/site-packages/pyfr/readers/base.py", line 22, in to_pyfrm
    mesh = self._to_raw_pyfrm(lintol)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carla/pyfr-venv/lib/python3.12/site-packages/pyfr/readers/gmsh.py", line 424, in _to_raw_pyfrm
    pyfrm = mesh.get_connectivity(p)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carla/pyfr-venv/lib/python3.12/site-packages/pyfr/readers/base.py", line 197, in get_connectivity
    raise ValueError('Unpaired faces in mesh')
ValueError: Unpaired faces in mesh


GMSH-AIRFOL-2D

If you open the mesh with Gmsh and then in the Tools => Options => Mesh dialogue select to only show 1D elements you’ll see a missing segment at the leading edge of the airfoil. This is the source of your issues.

Regards, Freddie.