forked from calculix/CalculiX-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpar.pre.fbl
141 lines (134 loc) · 2.66 KB
/
par.pre.fbl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# <th=4>
# <wi=200>
# <he=50>
# <le=250>
# <l2=40>
# <lr=wi+2*th> length of the indenter
# <ro=20> radius of the intenter
# <ra=6>
# <cs=10> width of contact region
# <disp=20> indentation
# <Emodul=70000>
# <Re=160>
# part
pnt py 0 <wi/2> 0
swep all new tra 0 <-th> 0 2
swep all new1 tra 0 0 <he/2-ra> 6
pnt pr 0 <wi/2-ra> <he/2-ra>
swep new1 new2 rot pr x 90 6
swep new2 new3 tra 0 <-wi/2+ra> 0 10
seta bl l L00A L009
bia bl 5
copy all new mir z
swep all new4 tra <cs> 0 0 4
swep new4 new5 tra <le-2*cs> 0 0 20
swep new5 new6 tra <2*cs> 0 0 4
swep new6 new7 tra <l2-cs> 0 0 4
seta part1 se all
# center indenter
seto part2
pnt p1 0 0 <he/2>
pnt p2 <ro> 0 <he/2+ro>
pnt pc 0 0 <he/2+ro>
line l12 p1 p2 pc 6
line lc1 pc p1
line l2c p2 pc
surf s1 l12 l2c lc1
swep part2 new tra 0 <lr/2> 0
copy part2 ind1 rot pc y -90
setc
# support part
seto part3
copy part2 sup1 tra 0 0 0
copy part3 sup2 mir x
move part3 tra <le> 0 <-he-2*ro>
setc
# meshing
#div part1 auto
elty all he8i
mesh all
merg n part1
merg n part2
merg n part3
# boundary conditions
seta nodes n all
enq nodes ysym rec _ 0 _ 0.1
enq nodes xsym rec 0 _ _ 0.1
# enq nodes load rec 0 _ <he/2> 0.1
# enq nodes support rec <le> _ <-he/2>
# enq nodes tmp rec 0 _ 0 15
# enq tmp side rec 0 _ _ 1
seta npart2 n part2
enq npart2 load rec _ 0 _ 0.1
seta npart3 n part3
enq npart3 support rec _ 0 _ 0.1
send all abq
send all abq nam
# contact surfacess
seta c1a s A00L A00I
comp c1a do
comp c1a do
send c1a abq sur
seta c1s s A034
comp c1s do
comp c1s do
send c1s abq sur
seta c2a s A02B A028
comp c2a do
comp c2a do
send c2a abq sur
seta c2s s A03J A03T
comp c2s do
comp c2s do
send c2s abq sur
#seta ! all
view elem
seta ! all
view elem
rot -x
rot c 90
rot r 30
rot u 30
frame
zoom 1.5
ulin Parts
seta ! all
hcpy png
sys mv hcpy_1.png Refs/parts.png
ulin Node groups
plot n ysym r
plus n xsym r
plus n load b
plus n support k
hcpy png
sys mv hcpy_2.png Refs/groups.png
view back
ulin Contact pairs
plot f c1a
plus f c1s n
plus f c2a
plus f c2s n
hcpy png
sys mv hcpy_3.png Refs/pairs.png
# prescribed displacement
sys echo Nload,3,3, <-disp> > load.bou
# Reference solution
# <I=1./12.*(wi*he**3 -(wi-2.*th)*(he-2.*th)**3)>
# <W=I/he*2.>
# <Me=W*Re>
# <Fe=2.*Me/le>
# <w=1./48.*Fe*(2.*le)**3/(Emodul*I)>
# w = <w>
# Fe = <Fe>
# propagate parameters to gnuplot
sys echo disp= <disp> > params.gnu
sys echo w= <w> >> params.gnu
sys echo Fe= <Fe> >> params.gnu
# write material specification to ccx
sys echo *material, name=alu > alu.inc
sys echo *elastic >> alu.inc
sys echo <Emodul>,0.3 >> alu.inc
sys echo *plastic >> alu.inc
sys echo <Re>,0 >> alu.inc
sys echo <Re*1.3>,0.04 >> alu.inc
sys echo <Re*3.>,0.3 >> alu.inc