-
Notifications
You must be signed in to change notification settings - Fork 1
/
CommandList-HW7.txt
280 lines (258 loc) · 5.26 KB
/
CommandList-HW7.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
!*********************
! PROBLEM HOMEWORK 7 *
!*********************
FINISH
/CLEAR, START, NEW
/CWD,'E:\Homework\HW7\Part1'
/TITLE, SHAFT CARRYING(WITHOUT RELIEF GROOVE)
/FILNAME,HOMEWORK7part1,1
/EFACET,4
/GFILE,2400
/PLOPTS,DATE,0
! >>> PARAMETERS MODEL <<<
*SET, Pi, ACOS(-1)
*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
! >>> 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,0,0
K,3,D/2,0,0
K,4,D/2,d1,0
K,5,D/2-((D-d1))/2+r1,d1,0
K,6,D/2-((D-d1))/2,d1,0
K,7,D/2-((D-d1)/2),d1+r1
K,8,d1/2,2*d1
K,9,0,2*d1,0
K,10,0,d1+r1
K,11,0,d1/2,0
K,12,D/2-((D-d1))/2+r1,d1/2,0
K,13,D/2,d1/2,0
SAVE
LSTR, 1, 2
LSTR, 2, 3
LSTR, 3, 13
LSTR, 13, 4
LSTR, 4, 5
LSTR, 7, 8
LSTR, 8, 9
LSTR, 9, 10
LSTR, 10, 11
LSTR, 11, 1
LSTR, 11, 12
LSTR, 10, 7
LSTR, 5, 12
LSTR, 12, 2
LSTR, 12, 13
LARC,7,5,6,-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_PART1, 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,14,11,10
AL,2,3,15,14
AL,15,4,5,13
AL,9,11,12,13,16
AL,12,8,7,6
/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_PART1, 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,11,,,n_div_a
LESIZE,12,,,n_div_b,1/3
LESIZE,13,,,n_div_b,3
LESIZE,9,,,n_div_b
LESIZE,16,,,n_div_b+n_div_a
LCCAT,9,11
LESIZE,10,,,n_div_b
LESIZE,1,,,n_div_a
LESIZE,14,,,n_div_b
LESIZE,2,,,n_div_a
LESIZE,3,,,n_div_b
LESIZE,15,,,n_div_a
LESIZE,4,,,n_div_b,1/3
LESIZE,5,,,n_div_a
LESIZE,6,,,n_div_b
LESIZE,7,,,n_div_b,3
LESIZE,8,,,n_div_b
MSHKEY,1
MSHAPE,0,2D
AMESH,ALL
SAVE
EPLOT
/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-Mesh_PART1, 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
! >>> WRITE FILE <<<
*GET,Xnode,NODE,506,LOC,X
*CREATE,ansuitmp
*CFOPEN,temp,txt,,
*VWRITE,%506%,Xnode
(F5.0,F20.10)
*DO,i,513,507,-1
*GET,Xnode_i,NODE,i,LOC,X
*VWRITE,i,Xnode_i
(F5.0,F20.10)
*ENDDO
*GET,Xnodelast,NODE,498,LOC,X
*VWRITE,%498%,Xnodelast
(F5.0,F20.10)
*CFCLOS
*END
/INPUT,ansuitmp
! >>> SOLUTION <<<
/SOLU
ANTYPE,STATIC
! >>> CONSTRAINT <<<
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
! >>> BENDING <<<
MODE,1,1
nsel,s,loc,y,(2*d1)-eps,(2*d1)+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_PART1, 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,n_div_b+1,,,X
*TREAD,force,torsion,txt
NSEL,S,LOC,y,(2*d1)-EPS,(2*d1)+EPS
F,ALL,FZ, %force%
ALLSEL,ALL
LSWRITE,2
/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-LoadTorsion_PART1, 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
LSSOLVE,1,2
FINISH
! >>> POST-PROCESS <<<
/VIEW,1,,,1
/ANG,1
/REP,FAST
/AUTO,1
/REP,FAST
/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_PART1, 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
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_PART1, 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_PART1, 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