I am using Cubit to generate a mesh file that I use later with a LS-DYNA analysis. The finite element analysis will require knowledge of every hex8 solid element volume. Is there a way to have Cubit write the element volumes to an ASCII file?
set logging on file ‘elem_vol.txt’
quality volume all element volume list detail
set logging off
You will probably have to edit the file to get it in the format you want but all the data is there. There are ways to do this from python as well and format it exactly how you want but this is probably the easiest method.
loop through all the hexes, find the volume and print it out
for hex_id in hex_list:
tmp_list = [hex_id] # the get_mesh_volume_or_area function is looking for a list as input
volume = cubit.get_meshed_volume_or_area(“hex”, tmp_list);
# build an output string by concatenating a list of strings and write it out
output_string = "Hex: " + str(hex_id) +" volume = " + str(volume) + "\n"
fp.write( output_string)