Exporting node coordintes of HEX27 elements

Dear all,
may I ask you the following two questions:

  1. Coreform Cubit is using as a standard HEX8 elements for meshing.
    Is it possible to choose as a standard HEX27 elements in the UI?

  2. Exporting HEX27 node coordinates
    I’m currently using HEX8 elements and I’m exporting the node coordinates of the HEX mesh to a seperate file with the following code:

#!python
outucdfile = “D:\xyz.dat”
outfile = open(outucdfile,“w”)

cubit.cmd(“group ‘temp_hexes’ add hex all”)
group_id = cubit.get_id_from_name(“temp_hexes”)

hex_list = cubit.get_group_hexes(group_id)
outfile.write(str(len(hex_list))+"\n")
for hex_num in hex_list:
outfile.write(str(hex_num)+"\n")
hex_nodes = cubit.get_connectivity(“Hex”, hex_num)
i = 0
while i < 8:
coord = cubit.get_nodal_coordinates(hex_nodes[i])
outfile.write(str(coord) + “\n”)
i += 1

When I change the element type from HEX8 to HEX27 cubit shows 27 nodes in the UI.
But is it possible to export these 27 node to a separate file with a similar code as shown above?
Just changing the loop from 8 to 27 does not work.
Many thanks
BR Stefan

Hi Stefan,

There is not a single setting to specify HEX27 for all element creation. The standard method for creating higher order elements is to place elements in a block and then set the block element type. The higher-order nodes are retrieved using the CubitInterface method get_expanded_connectivity(element_type, id).

Putting this together you would do something like the following:

cubit.cmd("block 1 volume all")
cubit.cmd("block 1 element type HEX27")
...
for hex_num in hex_list:
   hex_nodes = cubit.get_expanded_connectivity("hex", hex_num)
   ...

It looks like you may be trying to create a UCD format file. Cubit does ship with a program to convert Abaqus decks to UCD, abaucd.exe. I’m sure it hasn’t been touched in some time. The code is GPL and you are welcome to look at the C++ code if you are interested.

Karl

Hi Karl,
many thanks - works now perfectly fine for me.
Yes, I’m using the UCD file format for transferring the mesh dato into another tool.
Have a good day!
BR Stefan