-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShellModelShaftLumped.txt
367 lines (323 loc) · 9.42 KB
/
ShellModelShaftLumped.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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
/COM, ---------------------------------------------------------------------------------
/COM, PROBLEM: MODAL ANALYSIS of the helicopter's TAIL BOOM
/COM, ---------------------------------------------------------------------------------
/COM, Natural frequencies and modal shapes of an helicopter's tail boom
/COM, ---------------------------------------------------------------------------------
FINISH
/CLEAR, START, NEW
/FILNAM, ShellmodelShaftLumped
/TITLE, Helicopter tail boom modal analysis shell model
/UNIT, SI
/INQUIRE, StrJobname, JOBNAME
*USE, testperson.mac
! >>>>> MODEL PARAMETERS <<<<<
*SET, Pi, ACOS(-1) !Pi constant
*AFUN, DEG !Specify units for angular measures [DEG], specify after function *AFUN
*SET, eps, 10e-3 !precision interval
! >>>>> MATERIAL PROPERTIES <<<<<
!*** Duraluminum
*SET, DuralEyounG, 72e9 ![Pa] Young's modulus
*SET, DuralNi, 0.33 !Poisson's ratio
*SET, DuralDensity, 2810 ![Kg/m^3]
!*** Aluminium
*SET, AluminiumEyounG, 64e9 ![Pa] Young modulus
*SET, AluminiumNi, 0.34 !Poisson ratio
*SET, AluminiumDensity, 2700 ![Kg/m^3]
!*** Element size
*SET, E_length_ct, 50e-3 ![m]
!geometric parameter
*SET, Lt, 5.2 ![m] total tail lenght
*SET, RadBaseTail, 0.65/2 ![m]
*SET, RadEndTail, 0.10/2 ![m]
*SET, alpha, atan((RadBaseTail-RadEndTail)/Lt) ![deg]
!geometric parameters section stiffner
*SET, StiffnerBase, 5e-3
*SET, StiffnerHeight, 5e-3
!geometric parameters section Horizzontal Stabilizer
*SET, HorizStabBase, 0.009
*SET, HorizStabHeigth, 0.0015
!geometric parameter mantle
*SET, ThichknessMantle, 5e-4 ![m]
!mass Lumped
*SET, MassShaft, 7 ![kg] concentrated mass shaft
*SET, MassRotor, 30 ![kg] concentrated mass motorblock
*SET, J0, 1 ![kg*m^2] concentrated inertia motorblock
!other parameters
*SET, NumberDivisonSurface, 24 !division cone's area
/COM, -----------------------------------------------
/COM, MODEL DEFINITION
/COM, -----------------------------------------------
! >>>> DEFINE GEOMETRY <<<<
! Reduced integration Timoshenko beam element, with quadratic shape functions
/PREP7
! Define axis rotation
K, 1, 0, 0, 0
K, 2, 5, 0, 0
! create keypoints
K, 3, 0, RadBaseTail, 0 !start keypoint tails
*GET, MaxKp, KP, 0, num, max !extract max keypoint
*SET, StartKpTail, MaxKp !store in variable
*DIM, SegmentRadius, ARRAY, 7, 1 !store in array radius of segment distance between 0 - Y before rotating
*DO, i, 1, 7, 1
*GET, MaxKp, KP, 0, num, max !extract max keypoint
K, MaxKp+1, Lt/7*i, RadBaseTail-Lt/7*i*tan(alpha), 0 !create keypoint
SegmentRadius(i) = RadBaseTail-Lt/7*i*tan(alpha)
*ENDDO
*GET, MaxKp, KP, 0, num, max !extract max keypoint
*SET, EndKpTail, MaxKp !store in variable end's tail
SAVE
! define keypoint mantle'tail
K, Maxkp+1, 0, RadBaseTail, 0
*GET, StartKpMantle, KP, 0, num, max
K, MaxKp+2, Lt/7*i, RadEndTail, 0
*GET, EndKpMantle, KP, 0, num, max
SAVE
*DO, j, StartKpTail, EndKpTail-1, 1
L, j, j+1
*ENDDO
*GET, LenghtLineRference, LINE, 1, leng !extract lenght segment line's cone generator
! generate cone
*GET, NumberLine, line, 0, count !count lines
*GET, StartNumberLine, line, 0, num, min !extract first number line
LSEL, S, LOC, X, 0, Lt
AROTAT, ALL, , , , , , 1, 2, 360, NumberDivisonSurface !generate cone
SAVE
!divide line in array straight line and curved line
!to manage in next step meshing of elements
*GET, NumberLine, line, 0, count !count lines
*DIM, StraighLine, ARRAY, NumberLine, 2
*DIM, ArchLine, ARRAY, NumberLine, 2
*DO, n, StartNumberLine, NumberLine, 1
*GET, LenghtLine, LINE, n, leng,
*IF, LenghtLineRference, EQ, LenghtLine, THEN
StraighLine(n, 1) = n
StraighLine(n, 2) = LenghtLine
*SET, LastStraightLine, n
*ELSE
ArchLine(n, 1)=n
ArchLine(n, 2)=LenghtLine
*SET, LastArchLine, n
*ENDIF
*ENDDO
*DIM, ConnectionKp, ARRAY, 8, 2
ksel, s, loc, x, 0, RadBaseTail
Ksel, s, loc, y, RadBaseTail*cos(360/NumberDivisonSurface), RadBaseTail*cos(360/NumberDivisonSurface)
Ksel, r, loc, z, -RadBaseTail, RadBaseTail
*GET, tmp1, KP, 0, num, min
*GET, tmp2, KP, 0, num, max
ConnectionKp(1, 1) =tmp1
ConnectionKp(1, 2) =tmp2
*DO, i, 1, 7, 1
ksel, s, loc, x, Lt/7*i
Ksel, r, loc, y, SegmentRadius(i)*cos(360/NumberDivisonSurface), SegmentRadius(i)*cos(360/NumberDivisonSurface)
ksel, r, loc, z, -SegmentRadius(i)*sin(360/NumberDivisonSurface), SegmentRadius(i)*sin(360/NumberDivisonSurface)
*GET, tmp1, KP, 0, num, min
*GET, tmp2, KP, 0, num, max
ConnectionKp(i+1, 1) =tmp1
ConnectionKp(i+1, 2) =tmp2
!clear temp variable
*SET, tmp1,
*SET, tmp2,
*ENDDO
SAVE
/VIEW,1,1,1,1
/ANG,1
/REP,FAST
LPLOT
*USE, generateimages.mac
! >>>> MESH <<<<
/ESHAPE, 1
! set material properties and element
ET, 1, BEAM189
MP, EX, 1, DuralEyounG
MP, NUXY, 1, DuralNi
MP, DENS, 1, DuralDensity
!***Horizzontal STabilizer
SECTYPE, 1, BEAM, RECT, HorizzontalStabilizer, 0
SECOFFSET, CENT
SECDATA, HorizStabBase, HorizStabHeigth
LSEL, S, LINE, , 1, LastStraightLine
LESIZE, all, E_length_ct
LATT, 1, , 1, , , , 1
LMESH, ALL
LSEL, NONE
/REPLO
!***stiffners
SECTYPE, 2, BEAM, RECT, Stiffeners, 0
SECOFFSET, ORIG
SECDATA, StiffnerBase, StiffnerHeight
LSEL, S, LINE, , LastStraightLine+1, LastArchLine
LESIZE, ALL, , , , 3
LATT, 1, , 1, , , , 2
LMESH, ALL
LSEL, NONE
/REPLO
/VIEW, 1, 1, 1, 1
/ANG, 1
/REP, FAST
EPLOT
*USE, generateimages.mac, StrJobname(1)
!***Mantle
! set material properties and element
ET, 2, SHELL181
KEYOPT, 2, 3, 2
KEYOPT, 2, 8, 1
MP, EX, 2, AluminiumEyounG
MP, NUXY, 2, AluminiumNi
MP, DENS, 2, AluminiumDensity
SECT, 3, SHELL, , mantle
SECDATA, ThichknessMantle, 2, 0.0, 3
SECOFFSET, TOP
TYPE, 2
SECNUM, 3
AESIZE, ALL, E_length_ct,
MSHAPE, 0, 2D
MSHKEY, 1
AMESH, ALL
SAVE
/VIEW, 1, 1, 1, 1
/ANG, 1
/REP, FAST
EPLOT
*USE, generateimages.mac
!define shaft and support
*DIM, KpShaft, ARRAY, 8, 1
*GET, LastNode, KP, , num, max
K, LastNode+1, 0, RadBaseTail+50e-3, 0
*GET, LastNode, KP, , num, max
Kpshaft(1)=LastNode
*DO, i, 1, 7, 1
*GET, LastNode, KP, , num, max
K, LastNode+1, Lt/7*i, SegmentRadius(i)+50e-3, 0
*GET, LastNode, KP, , num, max
Kpshaft(i+1)=LastNode
*GET, LastLine, LINE, , num, max
L, LastNode-1, LastNode
*ENDDO
SAVE
!***Shaft lumped mass
*DIM, ConnectionShaftSupportNode, ARRAY, 8, 3
*GET, KpShaftDimension,'PARM',KPSHAFT,DIM,X
ET, 4, MASS21, , ,2
R, 4, MassShaft/7
TYPE, 4
REAL, 4
*DO, i, 1, KpShaftDimension-1, 1
*GET,LastNode,NODE,,NUM,MAX
N, LastNode+1, KX(Kpshaft(i)), KY(Kpshaft(i)), KZ(Kpshaft(i))
*GET,node_numb,NODE,,NUM,MAX
ConnectionShaftSupportNode(i, 1) = node_numb
E, node_numb
*ENDDO
SAVE
!***gearbox lumped
ET, 5, MASS21, , , 3 !2D mass with rotary inertia
R, 5, MassRotor, J0
TYPE, 5
REAL, 5
E, ConnectionShaftSupportNode(7, 1)
!***Support shaft - rigid connection
ET, 3, MPC184, 1
KEYOPT, 3, 1, 1
MP, EX, 3, DuralEyounG
MP, NUXY, 3, DuralNi
SECNUM, 4
MAT, 3
TYPE, 3
*DO, i, 1, 7, 1
KSEL, s, KP, , KpShaft(i)
NSLK, s
*GET, NodeShaft, node, , num, max
*SET, NodeShaft,
KSEL, ALL
KSEL, s, KP, , ConnectionKp(i, 1)
NSLK, s
*GET, NodeSupport1, node, , num, max
ConnectionShaftSupportNode(i, 2) = NodeSupport1
*SET, NodeSupport1,
KSEL, ALL
KSEL, s, KP, , ConnectionKp(i, 2)
NSLK, s
*GET, NodeSupport2, node, , num, max
ConnectionShaftSupportNode(i, 3) = NodeSupport2
*SET, NodeSupport2,
E, ConnectionShaftSupportNode(i, 1), ConnectionShaftSupportNode(i, 2)
E, ConnectionShaftSupportNode(i, 1), ConnectionShaftSupportNode(i, 3)
*ENDDO
SAVE
EPLOT
/VIEW, 1, , , 1
/ANG, 1
/REP, FAST
*USE, generateimages.mac
/VIEW, 1, 1, 1, 1
/ANG, 1
/REP, FAST
*USE, generateimages.mac
!***Boundary conditions at base of tail
ALLSEL, ALL
LSEL, S, LOC, Y, -(RadBaseTail*2)+eps, (RadBaseTail*2)+eps
LSEL, S, LOC, x, 0, 0
DL, ALL, , ALL, 0
ALLSEL, ALL
!Selct keypoint-node to apply force
KSEL,S,LOC,X,4.457143
KSEL,R,LOC,Y,0.4464286E-01
KSEL,R,LOC,Z,-0.7732370E-01,0
*GET,ForceOnNode,KP,,NUM,MAX
FK,ForceOnNode,FZ,2243
ALLSEL, ALL
*USE, calcmass.mac, StrJobname(1)
FINISH
/COM, ------------------------------------------------
/COM, Preliminary static analysis - Prestress
/COM, ------------------------------------------------
/SOLU
ANTYPE, STATIC !Preliminary static analysis
PSTRES, ON !Includes prestress effects
Acel, , 9.81 !gravitational acceleration
SOLVE
FINISH
! >>>> POSTPROCESSING <<<<
/POST1
PLDISP, 1
*USE, generateimages.mac
PLNSOL, U, SUM, 0, 1.0
*USE, generateimages.mac
PLNSOL, S, EQV, 0, 1.0
*USE, generateimages.mac
PLNSOL, U,Y, 0,1.0
*USE, generateimages.mac
PLNSOL, U,Z, 0,1.0
*USE, generateimages.mac
FINISH
/COM, ------------------------------------------------
/COM, Modal analysis
/COM, ------------------------------------------------
/SOLU
ANTYPE, MODAL, NEW
PSTRES, ON ! Includes prestress effects
MODOPT, LANB, 10 ! First 10 modes are extracted
LUMPM, OFF ! lumped/consistent mass matrix
MXPAND, 10, , , Yes ! First 10 modes are expanded, calculate element stress
SOLVE
FINISH
! >>>> POSTPROCESSING <<<<
/POST1
SET, LIST !List natural frequencies
SET, 1, 1 !Loads first mode
PLDISP !Displays modal shape
*DIM,ModalFreq,ARRAY,10,1
*Do, i, 1, 10, 1
*GET, omega, MODE, i, FREQ
ModalFreq(i,1) = omega
*SET, omega,
*ENDDO
*SET, omega,
*CFOPEN, 'ModalFreq-%StrJobname(1)%', 'txt'
*VWRITE, 'Num', 'omega'
(8x, A8, 4X, A8,)
*VWRITE, sequ, ModalFreq(1,1)
(F12.0, F12.5)
*CFCLOS
FINISH