weac 2.4.1__py3-none-any.whl → 2.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- weac/__init__.py +1 -1
- weac/eigensystem.py +41 -183
- weac/layered.py +8 -6
- weac/mixins.py +574 -121
- weac/plot.py +25 -16
- weac/tools.py +60 -0
- {weac-2.4.1.dist-info → weac-2.5.1.dist-info}/METADATA +15 -6
- weac-2.5.1.dist-info/RECORD +12 -0
- {weac-2.4.1.dist-info → weac-2.5.1.dist-info}/WHEEL +1 -1
- weac-2.4.1.dist-info/RECORD +0 -12
- {weac-2.4.1.dist-info → weac-2.5.1.dist-info}/LICENSE +0 -0
- {weac-2.4.1.dist-info → weac-2.5.1.dist-info}/top_level.txt +0 -0
weac/__init__.py
CHANGED
weac/eigensystem.py
CHANGED
|
@@ -90,7 +90,7 @@ class Eigensystem:
|
|
|
90
90
|
Describes the stiffnesses of weak-layer and slab.
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
|
-
def __init__(self, system='pst-'):
|
|
93
|
+
def __init__(self, system='pst-', touchdown=False):
|
|
94
94
|
"""
|
|
95
95
|
Initialize eigensystem with user input.
|
|
96
96
|
|
|
@@ -114,41 +114,48 @@ class Eigensystem:
|
|
|
114
114
|
self.system = system # 'pst-', '-pst', 'vpst-', '-vpst', 'skier', 'skiers'
|
|
115
115
|
|
|
116
116
|
# Initialize weak-layer attributes that will be filled later
|
|
117
|
-
self.weak = False
|
|
118
|
-
self.t = False
|
|
119
|
-
self.kn = False
|
|
120
|
-
self.kt = False
|
|
121
|
-
self.tc = False # Weak-layer collapse height (mm)
|
|
117
|
+
self.weak = False # Weak-layer properties dictionary
|
|
118
|
+
self.t = False # Weak-layer thickness (mm)
|
|
119
|
+
self.kn = False # Weak-layer compressive stiffness
|
|
120
|
+
self.kt = False # Weak-layer shear stiffness
|
|
122
121
|
|
|
123
122
|
# Initialize slab attributes
|
|
124
|
-
self.p = 0
|
|
125
|
-
self.slab = False
|
|
126
|
-
self.k = False
|
|
127
|
-
self.h = False
|
|
128
|
-
self.zs = False
|
|
129
|
-
self.phi = False
|
|
130
|
-
self.A11 = False
|
|
131
|
-
self.B11 = False
|
|
132
|
-
self.D11 = False
|
|
133
|
-
self.kA55 = False
|
|
134
|
-
self.K0 = False
|
|
123
|
+
self.p = 0 # Surface line load (N/mm)
|
|
124
|
+
self.slab = False # Slab properties dictionary
|
|
125
|
+
self.k = False # Slab shear correction factor
|
|
126
|
+
self.h = False # Total slab height (mm)
|
|
127
|
+
self.zs = False # Z-coordinate of slab center of gravity (mm)
|
|
128
|
+
self.phi = False # Slab inclination (°)
|
|
129
|
+
self.A11 = False # Slab extensional stiffness
|
|
130
|
+
self.B11 = False # Slab bending-extension coupling stiffness
|
|
131
|
+
self.D11 = False # Slab bending stiffness
|
|
132
|
+
self.kA55 = False # Slab shear stiffness
|
|
133
|
+
self.K0 = False # Stiffness determinant
|
|
135
134
|
|
|
136
135
|
# Inizialize eigensystem attributes
|
|
137
|
-
self.ewC = False
|
|
138
|
-
self.ewR = False
|
|
139
|
-
self.evC = False
|
|
140
|
-
self.evR = False
|
|
141
|
-
self.sC = False
|
|
142
|
-
self.sR = False
|
|
136
|
+
self.ewC = False # Complex eigenvalues
|
|
137
|
+
self.ewR = False # Real eigenvalues
|
|
138
|
+
self.evC = False # Complex eigenvectors
|
|
139
|
+
self.evR = False # Real eigenvectors
|
|
140
|
+
self.sC = False # Stability shift of complex eigenvalues
|
|
141
|
+
self.sR = False # Stability shift of real eigenvalues
|
|
143
142
|
|
|
144
143
|
# Initialize touchdown attributes
|
|
145
|
-
self.touchdown =
|
|
146
|
-
self.
|
|
147
|
-
self.
|
|
148
|
-
self.ratio = False
|
|
149
|
-
self.
|
|
150
|
-
|
|
151
|
-
|
|
144
|
+
self.touchdown = touchdown # Flag whether touchdown is possible
|
|
145
|
+
self.a = False # Cracklength
|
|
146
|
+
self.tc = False # Weak-layer collapse height (mm)
|
|
147
|
+
self.ratio = False # Stiffness ratio of collapsed to uncollapsed weak-layer
|
|
148
|
+
self.betaU = False # Ratio of slab to bedding stiffness (uncollapsed)
|
|
149
|
+
self.betaC = False # Ratio of slab to bedding stiffness (collapsed)
|
|
150
|
+
self.mode = False # Touchdown-mode can be either A, B, C or D
|
|
151
|
+
self.td = False # Touchdown length
|
|
152
|
+
|
|
153
|
+
def set_foundation_properties(
|
|
154
|
+
self,
|
|
155
|
+
t: float = 30.0,
|
|
156
|
+
E: float = 0.25,
|
|
157
|
+
nu: float = 0.25,
|
|
158
|
+
update: bool = False):
|
|
152
159
|
"""
|
|
153
160
|
Set material properties and geometry of foundation (weak layer).
|
|
154
161
|
|
|
@@ -169,7 +176,6 @@ class Eigensystem:
|
|
|
169
176
|
"""
|
|
170
177
|
# Geometry
|
|
171
178
|
self.t = t # Weak-layer thickness (mm)
|
|
172
|
-
self.tc = cf*self.t # Weak-layer collapse height (mm)
|
|
173
179
|
|
|
174
180
|
# Material properties
|
|
175
181
|
self.weak = {
|
|
@@ -181,7 +187,7 @@ class Eigensystem:
|
|
|
181
187
|
if update:
|
|
182
188
|
self.calc_fundamental_system()
|
|
183
189
|
|
|
184
|
-
def set_beam_properties(self, layers,
|
|
190
|
+
def set_beam_properties(self, layers, C0=6.5, C1=4.4,
|
|
185
191
|
nu=0.25, update=False):
|
|
186
192
|
"""
|
|
187
193
|
Set material and properties geometry of beam (slab).
|
|
@@ -193,11 +199,9 @@ class Eigensystem:
|
|
|
193
199
|
Columns are density (kg/m^3) and thickness (mm). One row
|
|
194
200
|
corresponds to one layer. If entered as str, last split
|
|
195
201
|
must be available in database.
|
|
196
|
-
phi : float
|
|
197
|
-
Inclination of the slab (degrees).
|
|
198
202
|
C0 : float, optional
|
|
199
203
|
Multiplicative constant of Young modulus parametrization
|
|
200
|
-
according to Bergfeld et al. (2023). Default is 6.
|
|
204
|
+
according to Bergfeld et al. (2023). Default is 6.5.
|
|
201
205
|
C1 : float, optional
|
|
202
206
|
Exponent of Young modulus parameterization according to
|
|
203
207
|
Bergfeld et al. (2023). Default is 4.6.
|
|
@@ -222,16 +226,13 @@ class Eigensystem:
|
|
|
222
226
|
|
|
223
227
|
# Compute total slab thickness and center of gravity
|
|
224
228
|
self.h, self.zs = calc_center_of_gravity(layers)
|
|
225
|
-
|
|
229
|
+
|
|
226
230
|
# Assemble layering into matrix (top to bottom)
|
|
227
231
|
# Columns are density (kg/m^3), layer thickness (mm)
|
|
228
232
|
# Young's modulus (MPa), shear modulus (MPa), and
|
|
229
233
|
# Poisson's ratio
|
|
230
234
|
self.slab = np.vstack([layers.T, E, G, nu]).T
|
|
231
235
|
|
|
232
|
-
# Set beam inclination
|
|
233
|
-
self.phi = phi
|
|
234
|
-
|
|
235
236
|
# Recalculate the fundamental system after properties have changed
|
|
236
237
|
if update:
|
|
237
238
|
self.calc_fundamental_system()
|
|
@@ -253,7 +254,7 @@ class Eigensystem:
|
|
|
253
254
|
"""
|
|
254
255
|
self.p = p
|
|
255
256
|
|
|
256
|
-
def calc_foundation_stiffness(self
|
|
257
|
+
def calc_foundation_stiffness(self):
|
|
257
258
|
"""Compute foundation normal and shear stiffness."""
|
|
258
259
|
# Elastic moduli (MPa) under plane-strain conditions
|
|
259
260
|
G = self.weak['E']/(2*(1 + self.weak['nu'])) # Shear modulus
|
|
@@ -263,9 +264,6 @@ class Eigensystem:
|
|
|
263
264
|
self.kn = E/self.t # Normal stiffness
|
|
264
265
|
self.kt = G/self.t # Shear stiffness
|
|
265
266
|
|
|
266
|
-
# Weak-layer stiffness increment factor for collapse
|
|
267
|
-
self.ratio = ratio
|
|
268
|
-
|
|
269
267
|
def get_ply_coordinates(self):
|
|
270
268
|
"""
|
|
271
269
|
Calculate ply (layer) z-coordinates.
|
|
@@ -479,146 +477,6 @@ class Eigensystem:
|
|
|
479
477
|
|
|
480
478
|
return Fn, Ft
|
|
481
479
|
|
|
482
|
-
def calc_beta(self):
|
|
483
|
-
"""
|
|
484
|
-
Calculate beta.
|
|
485
|
-
|
|
486
|
-
Returns
|
|
487
|
-
-------
|
|
488
|
-
beta : float
|
|
489
|
-
Weak-layer to slab stiffness relation factor.
|
|
490
|
-
"""
|
|
491
|
-
# (Intact) weak-layer to slab stiffness relation factor
|
|
492
|
-
self.beta = (self.kn/(4*self.D11))**(1/4)
|
|
493
|
-
|
|
494
|
-
def calc_span_length(self):
|
|
495
|
-
"""
|
|
496
|
-
Calculate span from layer and weak layer properties and load situation.
|
|
497
|
-
|
|
498
|
-
Returns
|
|
499
|
-
-------
|
|
500
|
-
lS : float
|
|
501
|
-
Span of the element between bedded element and touchdown for full touchdown.
|
|
502
|
-
"""
|
|
503
|
-
def polynomial():
|
|
504
|
-
"""
|
|
505
|
-
Calculate the coefficients of a sixth order polynomial equation.
|
|
506
|
-
|
|
507
|
-
Returns
|
|
508
|
-
-------
|
|
509
|
-
list
|
|
510
|
-
First coefficient for sixth order term,
|
|
511
|
-
second coefficient for fith order term and so on.
|
|
512
|
-
"""
|
|
513
|
-
kA55 = self.kA55
|
|
514
|
-
D11 = self.D11
|
|
515
|
-
tc = self.tc
|
|
516
|
-
|
|
517
|
-
a1 = kA55**2*kR1*kN1*q0
|
|
518
|
-
a2 = 6*kA55*(D11*kA55 + kR1*kR2)*kN1*q0
|
|
519
|
-
a3 = 30*D11*kA55*(kR1 + kR2)*kN1*q0
|
|
520
|
-
a4 = 24*D11*(2*kA55**2*kR1 + 3*D11*kA55*kN1 + 3*kR1*kR2*kN1)*q0
|
|
521
|
-
a5 = 72*D11*(D11*(kA55**2 + (kR1 + kR2)*kN1)*q0 \
|
|
522
|
-
+ kA55*kR1*(2*kR2*q0 - kA55*kN1*tc))
|
|
523
|
-
a6 = 144*D11*kA55*(D11*(kR1 + kR2)*q0 \
|
|
524
|
-
- (D11*kA55 + kR1*kR2)*kN1*tc)
|
|
525
|
-
a7 = - 144*D11**2*kA55*(kR1 + kR2)*kN1*tc
|
|
526
|
-
return [a1,a2,a3,a4,a5,a6,a7]
|
|
527
|
-
|
|
528
|
-
# Get spring stiffnesses for adjacent segment with intact weak-layer
|
|
529
|
-
kR1 = self.calc_rot_spring(collapse=False)
|
|
530
|
-
kN1 = self.calc_trans_spring()
|
|
531
|
-
# Get spring stiffnesses for adjacent segment with collapsed weak-layer
|
|
532
|
-
kR2 = self.calc_rot_spring(collapse=True)
|
|
533
|
-
# Get surface normal load components
|
|
534
|
-
qn = self.get_weight_load(self.phi)[0]
|
|
535
|
-
pn = self.get_surface_load(self.phi)[0]
|
|
536
|
-
q0 = qn + pn
|
|
537
|
-
# Calculate positive real roots
|
|
538
|
-
pos = (np.roots(polynomial()).imag == 0) & (np.roots(polynomial()).real > 0)
|
|
539
|
-
self.lS = np.roots(polynomial())[pos].real[0]
|
|
540
|
-
|
|
541
|
-
def calc_contact_length(self):
|
|
542
|
-
"""
|
|
543
|
-
Calculate segment length where max slab deflection equals tc.
|
|
544
|
-
|
|
545
|
-
Returns
|
|
546
|
-
-------
|
|
547
|
-
lC : float
|
|
548
|
-
Maximum length without substratum contact.
|
|
549
|
-
"""
|
|
550
|
-
def polynomial():
|
|
551
|
-
"""
|
|
552
|
-
Calculate the coefficients of a fourth order polynomial equation.
|
|
553
|
-
|
|
554
|
-
Returns
|
|
555
|
-
-------
|
|
556
|
-
list
|
|
557
|
-
First coefficient for fourth order term,
|
|
558
|
-
second coefficient for third order term and so on.
|
|
559
|
-
"""
|
|
560
|
-
a1 = 1/(8*self.D11)*q0
|
|
561
|
-
a2 = 1/(2*kR1)*q0
|
|
562
|
-
a3 = 1/(2*self.kA55)*q0
|
|
563
|
-
a4 = 1/kN1*q0
|
|
564
|
-
a5 = -self.tc
|
|
565
|
-
return [a1,a2,a3,a4,a5]
|
|
566
|
-
|
|
567
|
-
# Get spring stiffnesses for adjacent segment intact intact weak-layer
|
|
568
|
-
kR1 = self.calc_rot_spring(collapse=False)
|
|
569
|
-
kN1 = self.calc_trans_spring()
|
|
570
|
-
# Get surface normal load components
|
|
571
|
-
qn = self.get_weight_load(self.phi)[0]
|
|
572
|
-
pn = self.get_surface_load(self.phi)[0]
|
|
573
|
-
q0 = qn + pn
|
|
574
|
-
# Calculate positive real roots
|
|
575
|
-
pos = (np.roots(polynomial()).imag == 0) & (np.roots(polynomial()).real > 0)
|
|
576
|
-
self.lC = np.roots(polynomial())[pos].real[0]
|
|
577
|
-
|
|
578
|
-
def calc_rot_spring(self, collapse=True):
|
|
579
|
-
"""
|
|
580
|
-
Calculate rotational spring stiffness from layer properties.
|
|
581
|
-
|
|
582
|
-
Arguments
|
|
583
|
-
---------
|
|
584
|
-
collapse : boolean
|
|
585
|
-
Indicates whether weak-layer is collapsed.
|
|
586
|
-
|
|
587
|
-
Returns
|
|
588
|
-
-------
|
|
589
|
-
kR : float
|
|
590
|
-
Rotational spring stiffness (Nmm/mm/rad).
|
|
591
|
-
"""
|
|
592
|
-
# get ratio for foundation stiffness after collapse
|
|
593
|
-
if collapse:
|
|
594
|
-
ratio = self.ratio
|
|
595
|
-
else:
|
|
596
|
-
ratio = 1
|
|
597
|
-
# calc spring stiffness
|
|
598
|
-
kR = self.D11*self.beta*ratio**(1/4)
|
|
599
|
-
|
|
600
|
-
return kR
|
|
601
|
-
|
|
602
|
-
def calc_trans_spring(self):
|
|
603
|
-
"""
|
|
604
|
-
Calculate translational spring stiffness from layer properties.
|
|
605
|
-
|
|
606
|
-
Returns
|
|
607
|
-
-------
|
|
608
|
-
kN : float
|
|
609
|
-
Translational spring stiffness (N/mm^2).
|
|
610
|
-
"""
|
|
611
|
-
# calc translational spring stiffness for bedded euler-bernoulli-beam
|
|
612
|
-
kN = 2*self.D11*self.beta**3
|
|
613
|
-
|
|
614
|
-
return kN
|
|
615
|
-
|
|
616
|
-
def calc_touchdown_system(self):
|
|
617
|
-
"""Calculate the lenghts for touchdown evaluation"""
|
|
618
|
-
self.calc_beta()
|
|
619
|
-
self.calc_span_length()
|
|
620
|
-
self.calc_contact_length()
|
|
621
|
-
|
|
622
480
|
def zh(self, x, l=0, bed=True):
|
|
623
481
|
"""
|
|
624
482
|
Compute bedded or free complementary solution at position x.
|
weac/layered.py
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# Project imports
|
|
4
4
|
from weac.mixins import FieldQuantitiesMixin
|
|
5
|
+
from weac.mixins import SlabContactMixin
|
|
5
6
|
from weac.mixins import SolutionMixin
|
|
6
7
|
from weac.mixins import AnalysisMixin
|
|
7
8
|
from weac.mixins import OutputMixin
|
|
8
9
|
from weac.eigensystem import Eigensystem
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
class Layered(FieldQuantitiesMixin,
|
|
12
|
-
OutputMixin, Eigensystem):
|
|
12
|
+
class Layered(FieldQuantitiesMixin, SlabContactMixin, SolutionMixin,
|
|
13
|
+
AnalysisMixin, OutputMixin, Eigensystem):
|
|
13
14
|
"""
|
|
14
15
|
Layered beam on elastic foundation model application interface.
|
|
15
16
|
|
|
@@ -20,7 +21,7 @@ class Layered(FieldQuantitiesMixin, SolutionMixin, AnalysisMixin,
|
|
|
20
21
|
analysis from AnalysisMixin().
|
|
21
22
|
"""
|
|
22
23
|
|
|
23
|
-
def __init__(self, system='pst-', layers=None,
|
|
24
|
+
def __init__(self, system='pst-', layers=None, touchdown=False):
|
|
24
25
|
"""
|
|
25
26
|
Initialize model with user input.
|
|
26
27
|
|
|
@@ -36,12 +37,13 @@ class Layered(FieldQuantitiesMixin, SolutionMixin, AnalysisMixin,
|
|
|
36
37
|
2D list of layer densities and thicknesses. Columns are
|
|
37
38
|
density(kg/m ^ 3) and thickness(mm). One row corresponds
|
|
38
39
|
to one layer. Default is [[240, 200], ].
|
|
40
|
+
touchdown : bool, optional
|
|
41
|
+
Set True if slab touchdown is to be considered. Default is False.
|
|
39
42
|
"""
|
|
40
43
|
# Call parent __init__
|
|
41
|
-
super().__init__(system=system)
|
|
44
|
+
super().__init__(system=system, touchdown=touchdown)
|
|
42
45
|
|
|
43
46
|
# Set material properties and set up model
|
|
44
|
-
self.set_beam_properties(layers if layers else [[240, 200], ]
|
|
47
|
+
self.set_beam_properties(layers if layers else [[240, 200], ])
|
|
45
48
|
self.set_foundation_properties()
|
|
46
49
|
self.calc_fundamental_system()
|
|
47
|
-
self.calc_touchdown_system()
|