We have generated a mesh with hexes and tets.
reset
brick x 1
webcut volume all with plane xplane offset 0
Volume 2 scheme tetmesh
imprint all
merge all
volume all size 1
mesh vol all
draw pyramid all
We want split the interface pyramid mesh into two tetrahedrons.
Would you show me how it is done with the Aprepro script?
We can do this using an external Python script.
Hi @ksugahar,
doing this with Aprepro commands won’t work, but we can use the python interface for this.
Here is a example. First we will create tets with the nodes from the pyramid and then delete the pyramid afterwards.
#!cubit
reset
brick x 1
webcut volume all with plane xplane offset 0
Volume 2 scheme tetmesh
imprint all
merge all
volume all size 0.5
mesh vol all
set dev on
#!python
volume_ids = cubit.parse_cubit_list("volume","all")
for vol_id in volume_ids:
pyramid_ids = cubit.parse_cubit_list("pyramid",f"all in volume {vol_id}")
for pyr_id in pyramid_ids:
node_id_list = cubit.get_connectivity("pyramid",pyr_id)
cubit.cmd(f"create tet node {node_id_list[0]} {node_id_list[1]} {node_id_list[2]} {node_id_list[4]} owner volume {vol_id}")
cubit.cmd(f"create tet node {node_id_list[2]} {node_id_list[3]} {node_id_list[0]} {node_id_list[4]} owner volume {vol_id}")
cubit.cmd(f"delete pyramid {pyr_id}")
#!cubit
draw pyramid all
draw tet all add
Hi @Norbert_Hofbauer ,
Thank you very much!
It worked perfectly in my case. Thanks again.