Documenting issues using sgio

I want to make a post to document the issues I’ve encountered while using sgio. In case others have encountered the same issues they can refer to this post.
The issues I’ve encountered using sgio are:

  1. Does not work with material orientation defined using “Orientations“ in Abaqus, but works with “Composite Layup.“ For now, only use “Composite Layup” to define material orientation in Abaqus. I think this issue will be resolved in the future according to Dr. @su.tian.22 (refer to his post ABAQUS-SwiftComp GUI Issues - #17 by su.tian.22 )

  2. Some element types may not be supported by meshio. This is not a bug from sgio but a limitation of the meshio package. You may encounter a key error like this
    Traceback (most recent call last):
    ...
    File “d:\Users\liu3856\AppData\Local\Programs\Python\Python311\Lib\site-packages\meshio_mesh.py”, line 147, in init
    cell_block = CellBlock(
    ^^^^^^^^^^
    File “d:\Users\liu3856\AppData\Local\Programs\Python\Python311\Lib\site-packages\meshio_mesh.py”, line 100, in init
    self.dim = topological_dimension[cell_type]
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
    KeyError: ‘tetra15’
    This means element type “tetra15“ is not supported. This is what I did:
    In the meshio package, go to meshio/_mesh.py, add one line to topological_dimension
    topological_dimension = {
    # …
    “tetra10”: 3,
    “tetra15”: 3, # ← add this
    “hexahedron27”: 3,
    # …
    }
    then go to meshio/_common.py, and add one line to num_nodes_per_cell
    num_nodes_per_cell = {
    # …
    “tetra10”: 10,
    “tetra15”: 15, # ← add this
    # …
    }
    This adds the element type to meshio. After doing the modification above, I still encountered this error:
    Traceback (most recent call last):

    File “d:\Users\liu3856\AppData\Local\Programs\Python\Python311\Lib\site-packages\sgio\iofunc\gmsh_gmsh41.py”, line 472, in _write_elements
    cell_type = _meshio_to_gmsh_type[cell_block.type]
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
    KeyError: ‘tetra15’
    So it turns out you can’t write the element type “tetra15” to a Gmsh .msh file because Gmsh has no element ID for a 15-node wedge element. Basically, Gmsh does not support this type of element.

  3. Cannot process inp file when the node has gap between them. For example, your node in your inp file might be “1, 2, 5, 6, 7“ but sgio always assumes no gap, which means nodes must be numbered as “1, 2, 3, 4, 5.“ If there is gap between nodes in your inp file as Abaqus sometimes writes the inp file with gaps, sgio will still run but sgio does not renumber the nodes to eliminate such gaps, so when you run SwiftComp with sc file produced by sgio, SwiftComp will complain about some nodes do not exist. This happens because in the sc file prepared by sgio, the node numbering is still “1, 2, 5, 6, 7“ but the total number of nodes is 5, so SwiftComp will try to retrieve the node with the label 6, then it exceeds the total number of nodes, thus throwing an error.

    An easy solution to this is to use Mesh Edit → Node → Renumbering (note that “Renumbering“ is only available for an orphan mesh, so you can either create an orphan mesh by disassociating the mesh from the geometry or by importing inp file as a new model) in Abaqus, and set the starting number as 1 and increment as 1. This will solve the node numbering issues using sgio.

I would suggest splitting this to different topics, keeping only one specific issue in one topic.

Additionally, in the description of an issue, please provide a simplest example or minimum steps that can reproduce the issue.

1 Like

Thanks for your suggestion. The reason that I keep it in one place is to avoid spam, so it does not look like I am making several posts on a similar topic. I wish there could be a better way to document the issues more systematically.
As for simple examples to reproduce the error, I believe the description alone should be sufficient because it details the setup, like creating quadratic wedge elements in Abaqus can lead to key error, so others can follow the same setup to reproduce the same error. The examples I’m dealing with are quite large (sometimes half a gigabyte) and sharing them all is not very convenient on this platform, unless I upload all of them to my onedrive and share the links, but the links may expire if I make changes and move the files to other directories.
If examples are necessary for debugging purposes, I can share the input files with you for your convenience.

Is it always better to use a simple file to reproduce the same issue for debugging purpose.

I think for issue #1 I already shared a much simpler example with @su.tian.22 . For issue #2 it is not a bug in sgio so it is just telling other users quadratic wedge elements don’t work on gmsh. For issue #3 I cannot easily reproduce this error because gaps in node ordering does not always happen in Abaqus, I think this is more of an Abaqus issue, and the benchmark problem I used that produced this error has already been deleted. So this is just to tell others if SwiftComp complains about the node number exceeds the total number of nodes, the gap in node numbering in inp file generated by Abaqus might be the issue.

@Wenbin Now I think of the necessity of documenting issues regarding tools like gmsh and sgio, is it possible to have a new category? Like Dr. Su Tian said it would be easier for everyone to keep track of the issues but at the same time it doesn’t look like I am trying to dominate the platform?

You can use tags. @ejunli is there a plug in for tags like #sgio #gmsh

Do you mean like this? When a topic is created you can add tags. However, I don’t see a way you can create new tags. I’ll look into this.

For linkedin, we can easily add #tags for it to be collected by topics.

I see, so instead of the UI dropdown, you want the function of just typing in the hashtags directly in the message? There isn’t an existing plugin that does this from what I can find.

There are topics posted earlier regarding tags.

@ejunli If you find solution, you can respond there.