v0.14.0
Cube_moisture.jou
Go to the documentation of this file.
1 #!python
2 #To create RVE for all the three type of boundary conditions, i.e. (Linear dispacemet, traction and periodic)
3 
4 cubit.cmd('new')
5 cubit.cmd('brick x 1 y 1 z 1')
6 interval=1;
7 
8 str1='block 1 ' +' volume 1'; cubit.cmd(str1)
9 str1='block 1 ' +' name "MAT_MOISTURE"'; cubit.cmd(str1)
10 cubit.cmd('block 1 attribute count 1')
11 Moisture=['1000']
12 for i in range(0, 1):
13  str1='block 1 attribute index ' + str(i+1) +' '+Moisture[i]; cubit.cmd(str1)
14 
15 str1='surface 4 interval '+str(interval); cubit.cmd(str1)
16 cubit.cmd('surface 4 scheme trimesh')
17 cubit.cmd('mesh surface 4')
18 cubit.cmd('surface 6 scheme copy source surface 4 source vertex 4 target vertex 1 source curve 9 target curve 10 nosmoothing')
19 cubit.cmd('mesh surface 6')
20 
21 str1='surface 1 interval '+str(interval); cubit.cmd(str1)
22 cubit.cmd('surface 1 scheme trimesh')
23 cubit.cmd('mesh surface 1')
24 cubit.cmd('surface 2 scheme copy source surface 1 source vertex 4 target vertex 7 source curve 3 target curve 7 nosmoothing')
25 cubit.cmd('mesh surface 2')
26 
27 str1='surface 3 interval '+str(interval); cubit.cmd(str1)
28 cubit.cmd('surface 3 scheme trimesh')
29 cubit.cmd('mesh surface 3')
30 cubit.cmd('surface 5 scheme copy source surface 3 source vertex 7 target vertex 8 source curve 9 target curve 11 nosmoothing')
31 cubit.cmd('mesh surface 5')
32 
33 cubit.cmd('volume 1 scheme tetmesh')
34 cubit.cmd('mesh volume 1')
35 
36 cubit.cmd('sideset 101 surface 2 3 4') # all -ve boundary surfaces
37 cubit.cmd('sideset 102 surface 1 5 6') # all +ve boundary surfaces
38 cubit.cmd('sideset 103 surface 1 2 3 4 5 6') # all boundary surfaces
39 
40 cubit.cmd('save as "/Users/zahur/Documents/moFEM/mofem-cephas/mofem_v0.2/users_modules/homogenisation/meshes/Cube_moisture.cub" overwrite')
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86