write out hex elements on a surface

Discussion about meshing issues.

write out hex elements on a surface

Postby Stefan » Wed Oct 09, 2013 9:58 am

Hello users!
If you imagine a simple meshed(hex) volume and one surface of this volume: How can i write out with python all hexahedral element ids which are connecting, or bordering, this Surface?
Thank you!
Stefan
 
Posts: 2
Joined: Wed Oct 09, 2013 9:25 am

Re: write out hex elements on a surface

Postby csimsoft Moderator » Mon Oct 14, 2013 4:17 pm

You can create a group using Trelis's extending parsing capability and then get the hexes out of the group. Something like this should work.

surface_id = 1
cubit.cmd("group 'my_group' equals hex in node in surface " + str(surface_id))
group_id = cubit.get_group_id("my_group")

hex_list = cubit.get_group_hexes(group_id)
csimsoft
csimsoft Moderator
 
Posts: 236
Joined: Tue Feb 14, 2012 5:59 pm
Location: American Fork, UT

Re: write out hex elements on a surface

Postby Stefan » Tue Oct 15, 2013 1:39 am

Thank you very much, it works great!
Best regards,
Stefan
Stefan
 
Posts: 2
Joined: Wed Oct 09, 2013 9:25 am


Return to Meshing

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron

Search / Mark

User Control Panel

Login

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 50 on Mon Feb 23, 2015 7:54 pm

Users browsing this forum: Google [Bot] and 1 guest