cubit.cmd('reset')
cubit.cmd('set duplicate block elements off')
D = 50
h = 40
L = 2.1777*D
s = 0.05
physicalL = L
brick_str = 'brick x %f y %f z %f' % (L, D, h)
cubit.cmd(brick_str)
CHOP_L = 0.2 * L
chop_brick_str = 'brick x %f y %f z %f' % (CHOP_L, D, h)
cubit.cmd(chop_brick_str)
cubit.cmd('chop volume 1 with volume 2')
small_brick_str = 'brick x %f y %f z %f' % (s * L, s* D, h)
cubit.cmd(small_brick_str)
cubit.cmd('align Volume 6 surface 29 with surface 14')
cubit.cmd('split body 4')
cubit.cmd('unite volume 3 6')
cubit.cmd('merge volume all')
cubit.cmd('webcut volume 3 with plane xplane imprint merge')
cubit.cmd('webcut volume all with plane yplane offset %f imprint merge' % (-D/2 + 0.3*D))
cubit.cmd('block 1 volume all')
cubit.cmd('block 1 name \'MAT_ELASTIC\'')
cubit.cmd('block 1 attribute count 2')
cubit.cmd('block 1 attribute index 1 35600')
cubit.cmd('block 1 attribute index 2 0.172')
cubit.cmd('create Displacement on curve 9 dof 2 dof 3 fix 0')
cubit.cmd('create Displacement on curve 10 dof 2 dof 3 fix 0')
cubit.cmd('create Displacement on surface 36 43 dof 1 dof 3 fix 0')
cubit.cmd('create cfd_bc interface on surface 52')
cubit.cmd('block 4 surface 52')
cubit.cmd('block 4 name \'MAT_INTERF\'')
cubit.cmd('block 4 attribute count 4')
cubit.cmd('block 4 attribute index 1 35600')