-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass_structure.py
More file actions
executable file
·285 lines (203 loc) · 5.53 KB
/
class_structure.py
File metadata and controls
executable file
·285 lines (203 loc) · 5.53 KB
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
#---Class structure for this----------------------
#-------------grid class-------------------------
class grid:
self.type
self.id
self.cp
self.x1
self.x2
self.x3
self.cd #display coordinate system
self.ps
self.seid
self.contbeg
self.contend
class scalar_point:
self.type
self.id1
self.id2
self.id3
self.id4
self.id5
self.id6
self.id7
self.id8
#---------------coordinate system class---------------
class CORD1:
self.type
self.cida
self.g1a
self.g2a
self.g3a
self.cidb
self.g1b
self.g2b
self.g3b
class CORD2:
self.type
self.cid
self.rid
self.a1
self.a2
self.a3
self.b1
self.b2
self.b3
self.c1
self.c2
self.c3
#--------element classes--------------------------
#scalar elements---------
class CELAS:
self.type
self.eid
self.pid
self.k
self.g1
self.g2
self.c1
self.c2
self.s1
self.s2
self.ge
self.s
class PELAS:
self.type
self.pid1
self.k1
self.ge1
self.s1
self.pid2
self.k2
self.ge2
self.s2
#1D elements-------------
class CROD:
self.type
self.eid #element id
self.pid # property identification umber of PROD
self.g1 #grid point id numbers of connection points
self.g2
class PROD:
self.type
self.pid
self.mid
self.a #area
self.j #torsional constant
self.c #torsional stress coeff
self.nsm #non structural mass per unit length
class CBAR: #incomplete
self.type
self.eid #element id
self.pid # property identification umber of PROD
self.ga #grid point id numbers of connection points
self.gb
#2D elements------------
class CQUAD4:
self.type
self.eid
self.pid
self.g1 #point identification
self.g2
self.g3
self.g4
self.theta #mat prop orientation
self.zoffs #offset from surface
self.t1 #membrane thickness at g1 to g4
self.t2
self.t3
self.t4
class CTRIA3:
self.type
self.eid
self.pid
self.g1 #point identification
self.g2
self.g3
self.g4
self.theta #mat prop orientation
self.zoffs #offset from surface
self.tflag #integer flag signifying meaning of Ti
self.t1 #membrane thickness at g1 to g3
self.t2
self.t3
class PSHELL:
def __defaults__(self):
self.type = 'PSHELL'
self.pid
self.mid1 #material identification number
self.mid2 #mat identification for bending
self.mid3 #mat ident for transf shear
self.t #def mem thickness for ti
self.bmi #bending moment inertia ratio
self.ts_t #transverse shear thickness ratio
self.nsm #non structural mass per unit area
self.z1 #fiber distances for stress calc
self.z2
self.mid4 #mat identification number for mem-bend coupling
#3D elements------------
#--------material classes--------------------------
class MAT1:
def __defaults__(self):
self.type = 'MAT1'
self.mid = #material identification number
self.e =0.0 #youngs modulus
self.g =0.0 #shear modulus
self.nu =0.0 #poisson's ratio
self.rho = 0.0 #masss density
self.a =0.0 #thermal expansion coeff
self.tref=0.0 #reference temperature
self.st =0.0 #stress lim for tension
self.sc = 0.0 #stress for comp
self.ss = 0.0 #stress for shear
self.mcsid = #material coord sys identif number
#----------class constraint------------------------
class SPC:
def __defaults__(self):
self.type='SPC'
self.sid =0 #identification number of single point constr set
self.g1=0.0 #grid or scalar point id
self.c1=0 #component no
self.d1=0.0 #value of enforced disp
self.g2=0.0
self.c2=0
self.d2=0.0
#----------class load----------------------------
class FORCE:
def __defaults__(self):
self.type='FORCE'
self.sid=0 #local set identification number
self.g=0 #grid point identificatyion number
self.cid=0 #coordinate system identification number
self.f=1.0 #scale factor
self.n1=0.0 #components of force vector measured in coordinate system defined by cid
self.n2=0.0
self.n3=0.0
class FORCE1:
def __defaults__(self):
self.type='FORCE'
self.sid=0 #local set identification number
self.g=0 #grid point identificatyion number
self.f=0 #magnitude of force
self.g1=1.0 #grid point identification numbers
self.g2=0.0
class FORCE2:
def __defaults__(self):
self.type='FORCE'
self.sid=0 #local set identification number
self.g=0 #grid point identificatyion number
self.f=0 #magnitude of force
self.g1=1.0 #grid point identification numbers
self.g2=0.0
self.g3=0.0
self.g4=0.0
#----------class su2 import--------------
class SU2_import:
def __defaults__(self):
self.type='SU2_surf'
self.x=0.0
self.y=0.0
self.z=0.0
self.cp=0.0
self.mno=0.0
self.gi= 0 #global index