3 cubit.cmd('set duplicate block elements on')
5 #=============================================================
7 #=============================================================
11 cubit.cmd('brick x 1 y 1 z 1')
12 cubit.cmd('create sphere radius 0.3')
13 #cubit.cmd('move Volume 2 x 0.14 y 0.14 z 0.14')
14 cubit.cmd('subtract volume 2 from volume 1 ')
15 cubit.cmd('delete volume 2')
17 #=============================================================
18 #Defining blocks for elastic, transversely-isotropic and potential flow problems
19 #=============================================================
24 str1='block ' + str(i+1) +' volume '+vol[i]; cubit.cmd(str1)
25 str1='block ' + str(i+1) +' name "'+mat[i] + '"'; cubit.cmd(str1)
27 #=============================================================
29 #=============================================================
30 cubit.cmd('sideset 103 surface 1 4 3 2 6 5') # all boundary surfaces
31 cubit.cmd('sideset 102 surface 1 5 6 ') # all -ve boundary surfaces
32 cubit.cmd('sideset 101 surface 2 4 3 ') # all +ve boundary surfaces
34 #=============================================================
35 #Material properties for matrix part
36 #=============================================================
38 cubit.cmd('block 1 attribute count 2')
39 Em=3.5e3; Enu=0.3; #giga to mega as we used dimension in mm
41 Elastic=[str(Em), str(Enu)]
43 str1='block 1 attribute index ' + str(i+1) +' '+Elastic[i]; cubit.cmd(str1)
45 #=============================================================
46 #Defining surfaces for dispacement, traction and periodic boundary conditions
47 #=============================================================
49 cubit.cmd('surface 1 scheme trimesh')
50 str1='surface 1 size auto factor '+str(autofactor); cubit.cmd(str1)
51 cubit.cmd('mesh surface 1')
52 cubit.cmd('surface 4 scheme trimesh')
53 str1='surface 4 size auto factor '+str(autofactor); cubit.cmd(str1)
54 cubit.cmd('mesh surface 4')
55 cubit.cmd('surface 3 scheme trimesh')
56 str1='surface 3 size auto factor '+str(autofactor); cubit.cmd(str1)
57 cubit.cmd('mesh surface 3')
59 cubit.cmd('surface 2 scheme copy source surface 1 source vertex 2 target vertex 5 source curve 1 target curve 5 nosmoothing')
60 cubit.cmd('mesh surface 2')
61 cubit.cmd('surface 6 scheme copy source surface 4 source vertex 3 target vertex 2 source curve 3 target curve 1 nosmoothing')
62 cubit.cmd('mesh surface 6')
63 cubit.cmd('surface 5 scheme copy source surface 3 source vertex 7 target vertex 8 source curve 9 target curve 11 nosmoothing')
64 cubit.cmd('mesh surface 5')
67 str1='volume all size auto factor '+str(autofactor); cubit.cmd(str1)
68 cubit.cmd('volume all scheme tetmesh')
69 cubit.cmd('mesh volume all')
71 #=============================================================
72 #High order geomety approximation
73 #=============================================================
74 cubit.cmd('block 5 tet all')
75 cubit.cmd('block 5 element type tetra10')