Quasi-Periodic Mesh

I am currently trying to create a quasi-periodic mesh and when I export my mesh as an exodus file, the periodic surfaces get assigned their own block. This leads my finite element software to fail. Below is the script I am using:

brick x 10 y 10 z 10
create sphere radius 2
create sphere radius 2
move Volume 2 x 5 y 5 include_merged
move Volume 3 x -5 y 5 include_merged
intersect body 1 2 keep
subtract body 2 from body 1
intersect body 1 3 keep
subtract body 3 from body 1

merge surface all
compress all
copy mesh surface 9 onto surface 4 source curve 17 source vertex 12 target curve 12 target vertex 10 smooth
copy mesh surface 12 onto surface 7 source curve 9 source vertex 7 target curve 10 target vertex 6 smooth
volume all scheme tetmesh
mesh volume all

sideset 1 surface 1
sideset 2 surface 2
sideset 3 surface 12 9
sideset 4 surface 7 4
sideset 5 surface 3
sideset 6 surface 11 5 8
block 1 volume 2 3
block 2 volume 1

The issue is clear in the images below (will add second image if needed as I am a new user):

Any suggestions on how to export just the 2 blocks that I need?

The second image:

Those surfaces end up in their own blocks due to a limitation of Exodus. A block is defined as a group of elements of the same element type. Since you are doing a tet to quadrilateral transition, Cubit has to create pyramids. On export to Exodus, the extra blocks are created to hold the pyramid elements. My suggestion would be to explicitly create a blocks for the pyramid elements. Do something of the form:

block 1 tet in volume 2 3
block 2 tet in volume 1
block 3 pyramid in face in surf 7 12
block 4 pyramid in face in surf 4 9

Then when you assign material properties in your solver make sure you assign blocks 1 and 3 and blocks 2 4 to the appropriate materials.

Alternatively, if you can figure out which blocks were automatically created on export you could just use the automatically generated blocks and assign them to the correct material type.

Thanks for the suggestion! I actually prefer to have tets, and by specifying volume all tetmesh I was able to solve this issue. Good to know how to export mixed elements as well though!

You may want to leave the smooth option off on the copy mesh commands. This will help ensure that the nodes are in the same location from side to side.