-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wsection.py
38 lines (31 loc) · 1.2 KB
/
Wsection.py
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
### Adapted from Wsection.tcl
### WSection in OpenSeesPy does not allow for 'weak' orientation of beam-col, thus requiring custom (re)-implementation.
def Wsection(secID, matID, d, bf, tf, tw, nfdw, nftw, nfbf, nftf, orient="Strong"):
if (orient == "Weak"):
dw = d-2*tf
z1 = -d/2
z2 = -dw/2
z3 = dw/2
z4 = d/2
y1 = bf/2
y2 = tw/2
y3 = -tw/2
y4 = -bf/2
ops.section('Fiber',secID)
ops.patch('quad',matID, nfbf, nftf, *[y1,z3], *[y1,z4], *[y4,z4], *[y4,z3]);
ops.patch('quad',matID, nftw, nfdw, *[y2,z3], *[y3,z3], *[y3,z2], *[y2,z2]);
ops.patch('quad',matID, nfbf, nftf, *[y1,z1], *[y1,z2], *[y4,z2], *[y4,z1]);
else:
dw = d-2*tf
y1 = -d/2
y2 = -dw/2
y3 = dw/2
y4 = d/2
z1 = -bf/2
z2 = -tw/2
z3 = tw/2
z4 = bf/2
ops.section('Fiber',secID)
ops.patch('quad',matID, nfbf, nftf, *[y1,z4], *[y1,z1], *[y2,z1], *[y2,z4]);
ops.patch('quad',matID, nftw, nfdw, *[y2,z3], *[y2,z2], *[y3,z2], *[y3,z3]);
ops.patch('quad',matID, nfbf, nftf, *[y3,z4], *[y3,z1], *[y4,z1], *[y4,z4]);