v0.14.0
Loading...
Searching...
No Matches
nitsche_test.jou
Go to the documentation of this file.
1#!python
2autofactor=5;
3cubit.cmd('set duplicate block elements on')
4
5#=============================================================
6#Geometry
7#=============================================================
8
9cubit.cmd('reset')
10
11cubit.cmd('brick x 1 y 1 z 1')
12cubit.cmd('create sphere radius 0.3')
13#cubit.cmd('move Volume 2 x 0.14 y 0.14 z 0.14')
14cubit.cmd('subtract volume 2 from volume 1 ')
15cubit.cmd('delete volume 2')
16
17#=============================================================
18#Defining blocks for elastic, transversely-isotropic and potential flow problems
19#=============================================================
20
21vol=['all']
22mat=['MAT_ELASTIC_1']
23for i in range(0, 1):
24 str1='block ' + str(i+1) +' volume '+vol[i]; cubit.cmd(str1)
25 str1='block ' + str(i+1) +' name "'+mat[i] + '"'; cubit.cmd(str1)
26
27#=============================================================
28#Surface elements
29#=============================================================
30cubit.cmd('sideset 103 surface 1 4 3 2 6 5') # all boundary surfaces
31cubit.cmd('sideset 102 surface 1 5 6 ') # all -ve boundary surfaces
32cubit.cmd('sideset 101 surface 2 4 3 ') # all +ve boundary surfaces
33
34#=============================================================
35#Material properties for matrix part
36#=============================================================
37
38cubit.cmd('block 1 attribute count 2')
39Em=3.5e3; Enu=0.3; #giga to mega as we used dimension in mm
40
41Elastic=[str(Em), str(Enu)]
42for i in range(0, 2):
43 str1='block 1 attribute index ' + str(i+1) +' '+Elastic[i]; cubit.cmd(str1)
44
45#=============================================================
46#Defining surfaces for dispacement, traction and periodic boundary conditions
47#=============================================================
48
49cubit.cmd('surface 1 scheme trimesh')
50str1='surface 1 size auto factor '+str(autofactor); cubit.cmd(str1)
51cubit.cmd('mesh surface 1')
52cubit.cmd('surface 4 scheme trimesh')
53str1='surface 4 size auto factor '+str(autofactor); cubit.cmd(str1)
54cubit.cmd('mesh surface 4')
55cubit.cmd('surface 3 scheme trimesh')
56str1='surface 3 size auto factor '+str(autofactor); cubit.cmd(str1)
57cubit.cmd('mesh surface 3')
58
59cubit.cmd('surface 2 scheme copy source surface 1 source vertex 2 target vertex 5 source curve 1 target curve 5 nosmoothing')
60cubit.cmd('mesh surface 2')
61cubit.cmd('surface 6 scheme copy source surface 4 source vertex 3 target vertex 2 source curve 3 target curve 1 nosmoothing')
62cubit.cmd('mesh surface 6')
63cubit.cmd('surface 5 scheme copy source surface 3 source vertex 7 target vertex 8 source curve 9 target curve 11 nosmoothing')
64cubit.cmd('mesh surface 5')
65
66#mesh
67str1='volume all size auto factor '+str(autofactor); cubit.cmd(str1)
68cubit.cmd('volume all scheme tetmesh')
69cubit.cmd('mesh volume all')
70
71#=============================================================
72#High order geomety approximation
73#=============================================================
74cubit.cmd('block 5 tet all')
75cubit.cmd('block 5 element type tetra10')
76