v0.14.0
loop_atom.jou
Go to the documentation of this file.
1 #!python
2 cubit.cmd('reset')
3 cubit.cmd('create brick x 1 y 1 z 1')
4 cubit.cmd('create brick x 1 y 1 z 1')
5 cubit.cmd('move volume 1 x 1')
6 cubit.cmd('imprint volume all')
7 cubit.cmd('merge volume all')
8 cubit.cmd('compress all')
9 
10 cubit.cmd('volume all size auto factor 10')
11 cubit.cmd('volume all scheme tetmesh')
12 cubit.cmd('mesh volume all')
13 
14 #apply BLOCKSETs, SIDESETs, NODESETs
15 cubit.cmd('set duplicate block elements on')
16 cubit.cmd('block 1 volume 1')
17 cubit.cmd('block 2 volume 2')
18 cubit.cmd('block 2 name "Sun"')
19 cubit.cmd('block 3 volume 1')
20 cubit.cmd('block 3 name "Moon"')
21 cubit.cmd('block 4 volume 2')
22 cubit.cmd('block 4 name "Comet"')
23 
24 sideNames = ['" "','" "','" "','"InterfaceA"','" "','"Europe"','" "','"Africa"','" "','"Asia"','" "']
25 
26 a = 1
27 while a<=11:
28  cubit.cmd('sideset ' + str(a) + ' surface ' + str(a))
29  cubit.cmd('sideset ' + str(a) + ' name ' + str(sideNames[a-1]))
30  a = a + 1
31 
32 vertexNames = ['" "','"UK"','" "','"France"','"Spain"','"Portugal"','" "','"Germany"','"Belguim"','" "','"Holland"']
33 
34 a = 1
35 while a<=11:
36  cubit.cmd('nodeset ' + str(a) + ' vertex ' + str(a))
37  cubit.cmd('nodeset ' + str(a) + ' name ' + str(sideNames[a-1]))
38  a = a + 1
39 
40 cubit.cmd('save as "/Users/michaelcortis/Documents/PhD/moFEM/mofem/meshes/loop_atom.cub" overwrite')