-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCommandList-HW7Part2.txt
336 lines (307 loc) · 6.14 KB
/
CommandList-HW7Part2.txt
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
!*********************
! PROBLEM HOMEWORK 7 *
!*********************
FINISH
/CLEAR, START, NEW
/CWD,'E:\Homework\HW7\Part2'
/TITLE, SHAFT CARRYING(RELIEF GROOVE)
/FILNAME,HOMEWORK7Part2,1
/EFACET,4
/GFILE,2400
/PLOPTS,DATE,0
! >>> PARAMETERS MODEL <<<
*SET, Pi, ACOS(-1)
*SET, i, 4
*SET, D, 90
*SET, d1, D/(1.4)
*SET, r1, d1/20
*SET, R, (D-d1)/2
*SET, n_div_a, 3*4
*SET, n_div_b, 2*4
*SET, n_div_c, 3*4
*SET, EPS, 1E-3
*SET, x, 1.5
! >>> PROPERTIES Material <<<
*SET,E_Young, 210000 ! modulo di Young , MPa
*SET,ni,0.3 ! coefficiente di Poisson
! >>> LOAD <<<
*SET, Mf, 100000
*SET, Mt, 1000000
! >>> MOMENT INERTIA <<<
*SET, J, (Pi*d1**4)/64
*SET, sigma_max, Mf/J*(d1/2)
! >>> PRE PROCESSING <<<
/PREP7
ET,1,PLANE25,,,,,,2
MP,EX,1,E_Young
MP,PRXY,1,ni
K,1,0,0,0
K,2,D/2-((D-d1))/2+r1-10,0,0
K,3,D/2-((D-d1))/2+r1-10,d1-10,0
K,4,D/2,0,0
K,5,D/2,d1,0
K,6,D/2-R,d1+R,0
K,7,D/2-((D-d1))/2+r1-10,d1+R,0
K,8,D/2,d1+R,0
K,9,D/2,d1+2*R,0
k,10,D/2,d1+2*R+x/2,0
K,11,D/2,(d1+2*R)+x,0
K,12,D/2-((D-d1))/2+r1,(d1+2*R)+x,0
k,13,D/2-((D-d1))/2+r1,(d1+2*R)+x/2,0
K,14,d1/2,(d1+2*R)+x,0
K,15,d1/2,((d1+2*R)+r1)+x,0
k,16,D/2-((D-d1))/2+r1-10,((d1+2*R)+r1)+x,0
K,17,D/2-((D-d1))/2+r1-10,2*(d1+R)+x,0
k,18,D/2-((D-d1))/2+r1-10,d1+2*R+x/2,0
K,19,d1/2,2*(d1+R)+x,0
K,20,0,2*(d1+R)+x,0
K,21,0,((d1+2*R)+r1)+x,0
K,22,0,d1+2*R+x/2,0
K,23,0,d1+R,0
K,24,0,d1-10,0
K,25,D/2,d1-10,0
SAVE
LSTR, 1, 2
LSTR, 2, 4
LSTR, 4, 25
LSTR, 25, 5
LSTR, 2, 3
LSTR, 1, 24
LSTR, 24, 3
LSTR, 3, 25
LSTR, 24, 23
LSTR, 23, 7
LSTR, 7, 3
LSTR, 7, 6
LSTR, 22, 18
LSTR, 18, 16
LSTR, 16, 21
LSTR, 21, 22
LSTR, 22, 23
LSTR, 18, 7
LSTR, 21, 20
LSTR, 20, 17
LSTR, 17, 19
LSTR, 19, 15
LSTR, 16, 17
LSTR, 16, 15
LARC,5,6,8,R,
LARC,6,9,8,R,
LSTR, 9, 10
LSTR, 10, 11
LSTR, 11, 12
LSTR, 13, 10
LSTR, 13, 12
LSTR, 18, 13
LSTR, 18, 7
LARC,12,15,14,-r1,
SAVE
/PNUM,LINE,1
LPLOT
/RGB,INDEX,100,100,100, 0
/RGB,INDEX, 80, 80, 80,13
/RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
/REPLOT
/IMAGE, SAVE, HW7-Geometry_PART2, bmp
/RGB,INDEX, 0, 0, 0, 0
/RGB,INDEX, 60, 60, 60,13
/RGB,INDEX, 80, 80, 80,14
/RGB,INDEX,100,100,100,15
/REPLOT
AL,1,5,7,6
AL,2,3,8,5
AL,8,4,25,12,11
AL,12,26,27,30,32,18
AL,30,28,29,31
AL,32,31,33,24,14
AL,7,11,10,9
AL,10,18,13,17
AL,13,14,15,16
AL,24,22,21,23
AL,15,23,20,19
SAVE
/PNUM,LINE,0
/PNUM,AREA,1
APLOT
/RGB,INDEX,100,100,100, 0
/RGB,INDEX, 80, 80, 80,13
/RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
/REPLOT
/IMAGE, SAVE, HW7-Area_PART2, bmp
/RGB,INDEX, 0, 0, 0, 0
/RGB,INDEX, 60, 60, 60,13
/RGB,INDEX, 80, 80, 80,14
/RGB,INDEX,100,100,100,15
/REPLOT
LESIZE,8,,,n_div_a
LESIZE,25,,,n_div_b+n_div_a
LESIZE,4,,,n_div_b,1/3
LESIZE,11,,,n_div_b
LESIZE,12,,,n_div_b,1/3
LCCAT,11,8
SAVE
LESIZE,18,,,n_div_b+n_div_c
LESIZE,32,,,n_div_a
LESIZE,26,,,n_div_b+n_div_c+2*n_div_a
LESIZE,27,,,n_div_b,3
LESIZE,30,,,n_div_a
FLST,2,3,4,ORDE,3
FITEM,2,18
FITEM,2,30
FITEM,2,32
LCCAT,P51X
SAVE
LESIZE,33,,,n_div_b+n_div_a
LESIZE,31,,,n_div_b,1/3
LESIZE,14,,,n_div_b
LESIZE,24,,,n_div_b,1/3
LCCAT,14,32
SAVE
LESIZE,29,,,n_div_a
LESIZE,28,,,n_div_b,1/3
SAVE
LESIZE,22,,,n_div_a,3
LESIZE,21,,,n_div_b,1/3
LESIZE,23,,,n_div_a,1/3
SAVE
LESIZE,20,,,n_div_b
LESIZE,19,,,n_div_a,1/3
LESIZE,15,,,n_div_b
SAVE
LESIZE,10,,,n_div_b
LESIZE,17,,,n_div_b+n_div_c
LESIZE,9,,,n_div_b
SAVE
LESIZE,1,,,n_div_b
LESIZE,6,,,n_div_a
LESIZE,7,,,n_div_b
LESIZE,5,,,n_div_a
SAVE
LESIZE,2,,,n_div_a
LESIZE,3,,,n_div_a
SAVE
MSHKEY,1
MSHAPE,0,2D
AMESH,ALL
SAVE
LSEL,S,LINE,,33
NSLL,S,1
NREFINE,ALL,,,1,1,,OFF
ALLSEL,ALL
! >>> WRITE FILE <<<
*GET,Xnode,NODE,4475,LOC,X
*CREATE,ansuitmp
*CFOPEN,temp,txt,,
*VWRITE,Xnode
(F20.10)
*DO,i,4496,4508,1
*GET,Xnode_i,NODE,i,LOC,X
*VWRITE,Xnode_i
(F20.10)
*ENDDO
*DO,i,4181,4194,1
*GET,Xnode_i,NODE,i,LOC,X
*VWRITE,Xnode_i
(F20.10)
*ENDDO
*GET,Xnodelast,NODE,4160,LOC,X
*VWRITE,Xnodelast
(F20.10)
*CFCLOS
*END
/INPUT,ansuitmp
! >>> SOLUTION <<<
/SOLU
! >>> BENDING <<<
ANTYPE,STATIC
NSEL,S,LOC,Y,-EPS,EPS
D,ALL,uy,0
NSEL,R,LOC,X,(D/2)-EPS,(D/2)+EPS
D,ALL,ux,0
ALLSEL,ALL
MODE,1,1
NSEL,S,LOC,y,2*(d1+R)+x-EPS,2*(d1+R)+x+EPS
SFGRAD,PRES,0,x,0,sigma_max/(d1/2)
SF,ALL,PRES,0
ALLSEL,ALL
LSWRITE,1
/RGB,INDEX,100,100,100, 0
/RGB,INDEX, 80, 80, 80,13
/RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
/REPLOT
/IMAGE, SAVE, HW7-LoadBendMoment_PART2, bmp
/RGB,INDEX, 0, 0, 0, 0
/RGB,INDEX, 60, 60, 60,13
/RGB,INDEX, 80, 80, 80,14
/RGB,INDEX,100,100,100,15
/REPLOT
! >>> TORQUE <<<
LSCLEAR,ALL
MODE,0
NSEL,S,LOC,Y,-EPS,EPS
D,ALL,uy,0
NSEL,R,LOC,X,(D/2)-EPS,(D/2)+EPS
D,ALL,ux,0
ALLSEL
NSEL,S,LOC,Y,-EPS,EPS
D,ALL,uz,0
ALLSEL
*DIM,force,TABLE,2*n_div_b+1,,,X
*TREAD,force,torsion,txt
NSEL,S,LOC,y,2*(d1+R)+x-eps,2*(d1+R)+x+eps
F,ALL,FZ,%FORCE%
ALLSEL,ALL
LSWRITE,2
LSSOLVE,1,2
FINISH
! >>> POST PROCESSING <<<
/POST1
SET,1,1,,,,180
PLNSOL,S,1
/RGB,INDEX,100,100,100, 0
/RGB,INDEX, 80, 80, 80,13
/RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
/REPLOT
/IMAGE, SAVE, HW7-MaxFirstStressBendingMoment_PART2, bmp
/RGB,INDEX, 0, 0, 0, 0
/RGB,INDEX, 60, 60, 60,13
/RGB,INDEX, 80, 80, 80,14
/RGB,INDEX,100,100,100,15
/REPLOT
SET,2,1,,,,180
PLNSOL,S,1
/RGB,INDEX,100,100,100, 0
/RGB,INDEX, 80, 80, 80,13
/RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
/REPLOT
/IMAGE, SAVE, HW7-MaxFirstStressTorsionMoment_PART2, bmp
/RGB,INDEX, 0, 0, 0, 0
/RGB,INDEX, 60, 60, 60,13
/RGB,INDEX, 80, 80, 80,14
/RGB,INDEX,100,100,100,15
/REPLOT
!superposition of the two loading cases
SET,1,1,,,,180
LCWRITE,1
SET,2,1,,,,180
LCOPER,ADD,1
LCWRITE,1
PLNSOL,S,1
/RGB,INDEX,100,100,100, 0
/RGB,INDEX, 80, 80, 80,13
/RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
/REPLOT
/IMAGE, SAVE, HW7-MaxFirstStressCombMoment_PART2, bmp
/RGB,INDEX, 0, 0, 0, 0
/RGB,INDEX, 60, 60, 60,13
/RGB,INDEX, 80, 80, 80,14
/RGB,INDEX,100,100,100,15
/REPLOT
FINISH
QUIT