Removing Specific Material

Hello,

I am creating a hex mesh from an SPN file, using PSculpt.

I was just wondering whether it is possible to remove a specific material of the mesh based on an ID, using a command in the input file.

Thanks,
Janzen

Hi Janzen,

I could not find an option to delete material by ID in the sculpt documentation. However, you can do it in Cubit. The command would be delete hex in block <your_id>

You could automate this in your python script by doing something like

filename = "your_sculpt_output_file.e"
modified_filename = "new_filename.e"
block_id = 2
import cubit
cubit.init(['cubit', '-nojournal', '-nographics'])
cubit.cmd(f'import exodus {filename} no_geom')
cubit.cmd(f'delete hex in block {block_id}')
cubit.cmd(f'export mesh {modified_filename} overwrite')

Is this helpful?
Karl

Hello Karl,

This is very helpful. I will give it a go.

Thank you very much.

Regards,
Janzen

I wanted to update this post to whomever comes across it with the same question.

I found that you can assign a specific block ID to be the ‘void’ via the void_mat option in Sculpt. More information about this option can be found here.

Works wonders.