Cubit Global Element ID Numbering Scheme

Hello, I have a question about the method in which Cubit appears to be assigning global element ID numbers. As an example, I have a series of hexagonal prisms that I generate and place into a hex pattern.

As you may be able to tell, the volume numbers start at the center, then get generated at 0 degrees on the next ring counter-clockwise around until completing the ring and moving to the next one.

When I visualize the Global Element IDs, I largely see this spiral pattern with the exception that the last two volumes seem to contain the lowest element IDs:

I have tried meshing with fewer hexes:

and tried meshing the volumes in different orders and schemes, but I always get this behavior where the last two volumes have the lowest element IDs. Based on these tests, it appears that it does not matter how many volumes there are or in which order the separate volumes are meshed, but I want to know if this is true, or if there is something I am missing with regard to how I am generating my geometry here. If it is the former, is there a way to enforce element ID numbers that increase with volume number?

Hi James,

My first impression matches yours, huh? Is this mesh being exported with Exodus format or something else? I will try to dive into this and see what is happening.

Thanks,
Karl

Yes, the mesh is being exported with Exodus.

Hi @jbtompkins,

How are you numbering the blocks?

I created a trivial example using cubes. The global element ID numbering is associated with the block IDs.

I create the starting cube at (0,0,0) and then go in the +X direction, -X on the next level, and then +X on the last layer. I numbered the blocks in the reverse direction.

cubit.cmd('reset')
cubit.cmd('bri x 1')
cubit.cmd('vol 1 copy move x 1 repeat 4')
cubit.cmd('vol move copy move y 1')
cubit.cmd('vol 5 copy move y 1')
cubit.cmd('vol 6 copy move x -1 repeat 4')
cubit.cmd('vol 10 copy move y 1')
cubit.cmd('vol 11 copy move x 1 repeat 4')

cubit.cmd('merge all')
cubit.cmd('vol all int 2')
cubit.cmd('mesh vol all')
for id in range(1,16):
    cubit.cmd(f"block {id} volume {16-id}")

cubit.cmd('export mesh "junk.exo" over')

Here I see the global element ID numbering in Paraview. It is ordered by the block ID.

If I place all the volumes in a single block, the element ids are ordered by volume ID.

Interesting. I actually do not specify blocks in my initial model, just go from generating the volumes to meshing. I’m not sure if cubit has a default block numbering scheme if none are specified, but I would assume it would be similar to having all volumes within one block. If this is the case, then the element IDs are not being assigned in keeping with the volume numbers because we are seeing the last two volumes (regardless of how many exist) having the lowest element numbers.

I will try to assign block IDs and see if my model’s behavior changes.

Manually setting the block numbers seemed to do the trick!

1 Like