Sweeping with protruding shape

I’m not very experienced in Cubit and have only done very simple shapes in the past. I am struggling with meshing a protruding pipe from a wedge (see attached picture). My initial though was to do a many-to-one starting from the protruding pipe towards the small edge of the wedge (x-axis) and then to sweep from top to bottom (y-axis) for the rest. I am unable to do this and not sure where to go from here. Any help with this will be greatly appreciated!

This is one of the fundamental complexities of hex meshing via sweeping. Volumes 1 and 3 in the figure below have perpendicular sweep directions. As you noted, that just doesn’t work. The surfaces in the sweep direction (we call them linking surfaces) must be meshable with either a map or submapped mesh. What we have to do is figure out how to decompose the model so that we can get volumes that sweep in the correct direction.

Here is one solution to the problem. There are certainly others.


# create the geometry
create cylinder radius 6 z 4
webcut vol 1 cylinder radius 2 z 5 
webcut vol 1 cylinder radius 4 z 5 
webcut vol all  plane yplane
webcut volume all with general plane y spin about axis 0 0 1 angle 45
delete Volume 7 9 8 2 3 1 6 5 4
create Cylinder height 6 radius .5 
vol 4 rotate 90 about y
vol 4 move x 8
unite body 1 4
webcut volume 1  with plane yplane offset 0 
delete Volume 1
webcut volume all with sheet extended from surface 18

# don't forget to imprint and merge
imprint all
merge all

# I have to specifically set the sweep direction on volume 1
volume 1  scheme Sweep  source surface 7    target surface 9
mesh vol all

# improve the mesh quality by smoothing the surfaces first and then the volumes
surface all smooth scheme mean ratio
smooth surface all
smooth vol all

quality volume all

1 Like

Wow, this is great. Thank you very much!