pymech icon indicating copy to clipboard operation
pymech copied to clipboard

open_dataset error "conflicting sizes" with gmsh extruded mesh

Open manu0600 opened this issue 4 years ago • 6 comments

Hello,

I have experienced an error when loading a Nek5000 output file with a mesh created from GMSH. A similar case with a mesh from genbox works flowlessly.

when running the following command : open_dataset('channel3D_0.f00001') I get the following error : conflicting sizes for dimension 'y': length 8 on 'xmesh' and length 9 on 'y'

Could you help me resolve this issue ?

(Visualizing it with paraview works fine in both cases, as a check)

manu0600 avatar Apr 26 '21 13:04 manu0600

open_dataset works only for cubes or cuboids. Is your mesh like that? This is because I have not found a nice way to extract the 1D coordinates from the 3D position arrays. See:

https://github.com/eX-Mech/pymech/blob/3a87b035d01836354720ef61b397e8494f92c348/pymech/dataset.py#L181-L187

and

https://github.com/eX-Mech/pymech/blob/3a87b035d01836354720ef61b397e8494f92c348/pymech/dataset.py#L206-L212

If open_dataset does not work for your case, you can use readnek and exa2vtk to visualize.

ashwinvis avatar Apr 26 '21 21:04 ashwinvis

I could help you more if you can generate a minimal example to reproduce.

ashwinvis avatar Apr 26 '21 21:04 ashwinvis

See also #13 if you are interested in non-cubical geometries.

ashwinvis avatar Apr 26 '21 21:04 ashwinvis

Here are two similar cases based on the turbChannel example, but with 2 different meshed from GMSH : https://we.tl/t-iCenFDPVpw

The case turbChannel_GMSH appears to work well, but the other one turbChannel_GMSH_1 gives the error I mentionned. Both are one box, so I am not sure why one works and not the other.

Hope this helps

manu0600 avatar May 04 '21 12:05 manu0600

We need to check if this was a duplicate of #56 which was fixed

ashwinvis avatar Oct 08 '24 23:10 ashwinvis

Some source code to reproduce this exists here, but the field files need to be generated

https://github.com/eX-Mech/pymech-test-data/blob/gmsh-bug

ashwinvis avatar Oct 09 '24 00:10 ashwinvis