How to merge three cylinderical shells with different diameters intersecting each other?

I have three cylindrical shells of which one is of different diameter then the others. The centers of the one end of all of these meet at a point. How to I create a smooth transition to connect them with each other i.e. creating a generic Y-shape joint given the diameters of each pipe. Also, I am trying to do this through journal as I have many joints and can’t spend time on each of them through GUI.

Hi @dvijay,

Once again, I would just build the geometry with solids and then either copy the surfaces you want or just mesh the surfaces that are desired. This script demonstrates several features in Cubit.

  1. Naming entities can be very useful.
  2. Topologies can be referenced with up or down dimensions using the “in” keyword.
  3. Entities can be filtered by attributes using the “with” keyword. A full list of attributes can be found in 3.5 Entity Selection And Filtering (coreform.com) under the Functions section.
cubit.cmd('reset')
cubit.cmd('# create the volumes as a set up.')
cubit.cmd('create cylinder radius 1.5 z 10')
cubit.cmd('create cylinder radius 1 z 10')
cubit.cmd('vol 2 copy ')
cubit.cmd('# it may be useful to translate the cylinders to the origin')
cubit.cmd('vol all move z -5')
cubit.cmd('vol 2 3 move z 10')
cubit.cmd('rotate Volume 2 angle 30  about Y include_merged preview ')
cubit.cmd('rotate Volume 2 angle 30  about Y include_merged ')
cubit.cmd('rotate Volume 3 angle -30  about Y include_merged')

cubit.cmd('# Volume 1 is the largest cylinder. We will take that as a given. ')
cubit.cmd('surface in volume 1 with z_coord = 0 name "large_end"')

cubit.cmd('surface with is_plane in volume 2 except surface with z_coord=0 name "other2"')
cubit.cmd('surface with is_plane in volume 3 except surface with z_coord=0 name "other3"')
first_volume = cubit.get_last_id("volume")
cubit.cmd('webcut volume 2 3  with sheet extended from large_end')
last_volume = cubit.get_last_id("volume")
cubit.cmd(f'del vol {first_volume+1} to {last_volume}')
cubit.cmd('unite vol 2 3')
cubit.cmd('# you need some offset to create the smooth transition')
cubit.cmd('tweak large_end offset -1 ')
cubit.cmd('surf in volume 2 with z_coord=0 name "small_end"')
cubit.cmd('create volume loft large_end small_end')

I hope this is helpful,
Karl

1 Like

Thanks for your response, I have been able to write a script using webcut and deleting the objects. I wasn’t aware of the ‘name’ command so my script is more longer to keep track of the IDs and recall them as required. But this is great, I’ll be using this command from this point if required.