weac 2.4.0__tar.gz → 2.5.0__tar.gz

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.
@@ -8,12 +8,15 @@ authors:
8
8
  - family-names: "Weissgraeber"
9
9
  given-names: "Philipp"
10
10
  orcid: "https://orcid.org/0000-0001-8320-8672"
11
- version: 2.4.0
11
+ version: 2.5.0
12
12
  date-released: 2021-12-30
13
13
  identifiers:
14
14
  - description: Collection of archived snapshots of all versions of WEAC
15
15
  type: doi
16
16
  value: 10.5281/zenodo.5773113
17
+ - description: Release v2.4 for the analysis of slope-normal and vertical PST boundary conditions
18
+ type: doi
19
+ value: 10.5281/zenodo.10555144
17
20
  - description: Release v2.2 with consistent coordinate systems
18
21
  type: doi
19
22
  value: 10.5281/zenodo.5907134
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: weac
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: Weak layer anticrack nucleation model
5
5
  Home-page: https://github.com/2phi/weac
6
6
  Author: 2phi GbR
@@ -109,7 +109,7 @@ WEAC implements closed-form analytical models for the [mechanical analysis of dr
109
109
 
110
110
  Cite the repository as:
111
111
  ```
112
- Rosendahl, P. L. & Weissgraeber, P. (2022). Weak Layer Anticrack Nucleation Model (WEAC). Zenodo. https://doi.org/10.5281/zenodo.5773113
112
+ Rosendahl, P. L., Schneider, J., & Weissgraeber, P. (2022). Weak Layer Anticrack Nucleation Model (WEAC). Zenodo. https://doi.org/10.5281/zenodo.5773113
113
113
  ```
114
114
 
115
115
  Read the [📄 white paper](https://doi.org/10.5194/tc-17-1475-2023) for model derivations, illustrations, dimensions, material properties, and kinematics:
@@ -213,15 +213,18 @@ x_cm, tau_kPa = skier.get_weaklayer_shearstress(x=xwl, z=z, unit='kPa')
213
213
 
214
214
  See the [open issues](https://github.com/2phi/weac/issues) for a list of proposed features and known issues.
215
215
 
216
- ### v2.5
216
+ ### v2.6
217
217
  - [ ] Finite fracture mechanics implementation for layered snow covers
218
218
 
219
- ### v2.4
219
+ ### v2.5
220
220
  - [ ] Implement anistropic weak layer
221
221
  - [ ] Add demo gif
222
222
 
223
223
  ## Release history
224
224
 
225
+ ### v2.4
226
+ - Choose between slope-normal (`'-pst'`, `'pst-'`) or vertial (`'-vpst'`, `'vpst-'`) PST boundary conditions
227
+
225
228
  ### v2.3
226
229
  - Stress plots on deformed contours
227
230
  - PSTs now account for slab touchdown
@@ -274,9 +277,9 @@ See the [open issues](https://github.com/2phi/weac/issues) for a list of propose
274
277
  <!-- LICENSE -->
275
278
  ## License
276
279
 
277
- Copyright 2phi GbR, 2020-2023.
280
+ Copyright 2phi GbR, 2020-2024.
278
281
 
279
- We currently do not offer an open source license. Please contact us for private licensing options.
282
+ We currently do not offer an open-source license. Please contact us for private licensing options.
280
283
 
281
284
 
282
285
  <!-- CONTACT -->
@@ -85,7 +85,7 @@ WEAC implements closed-form analytical models for the [mechanical analysis of dr
85
85
 
86
86
  Cite the repository as:
87
87
  ```
88
- Rosendahl, P. L. & Weissgraeber, P. (2022). Weak Layer Anticrack Nucleation Model (WEAC). Zenodo. https://doi.org/10.5281/zenodo.5773113
88
+ Rosendahl, P. L., Schneider, J., & Weissgraeber, P. (2022). Weak Layer Anticrack Nucleation Model (WEAC). Zenodo. https://doi.org/10.5281/zenodo.5773113
89
89
  ```
90
90
 
91
91
  Read the [📄 white paper](https://doi.org/10.5194/tc-17-1475-2023) for model derivations, illustrations, dimensions, material properties, and kinematics:
@@ -189,15 +189,18 @@ x_cm, tau_kPa = skier.get_weaklayer_shearstress(x=xwl, z=z, unit='kPa')
189
189
 
190
190
  See the [open issues](https://github.com/2phi/weac/issues) for a list of proposed features and known issues.
191
191
 
192
- ### v2.5
192
+ ### v2.6
193
193
  - [ ] Finite fracture mechanics implementation for layered snow covers
194
194
 
195
- ### v2.4
195
+ ### v2.5
196
196
  - [ ] Implement anistropic weak layer
197
197
  - [ ] Add demo gif
198
198
 
199
199
  ## Release history
200
200
 
201
+ ### v2.4
202
+ - Choose between slope-normal (`'-pst'`, `'pst-'`) or vertial (`'-vpst'`, `'vpst-'`) PST boundary conditions
203
+
201
204
  ### v2.3
202
205
  - Stress plots on deformed contours
203
206
  - PSTs now account for slab touchdown
@@ -250,9 +253,9 @@ See the [open issues](https://github.com/2phi/weac/issues) for a list of propose
250
253
  <!-- LICENSE -->
251
254
  ## License
252
255
 
253
- Copyright 2phi GbR, 2020-2023.
256
+ Copyright 2phi GbR, 2020-2024.
254
257
 
255
- We currently do not offer an open source license. Please contact us for private licensing options.
258
+ We currently do not offer an open-source license. Please contact us for private licensing options.
256
259
 
257
260
 
258
261
  <!-- CONTACT -->
@@ -1,3 +1,6 @@
1
1
  [build-system]
2
2
  requires = ["setuptools", "wheel"]
3
3
  build-backend = "setuptools.build_meta"
4
+
5
+ [tool.ruff]
6
+ ignore = ["E741"]
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = weac
3
- version = 2.4.0
3
+ version = 2.5.0
4
4
  author = 2phi GbR
5
5
  author_email = mail@2phi.de
6
6
  description = Weak layer anticrack nucleation model
@@ -11,7 +11,7 @@ from weac.inverse import Inverse
11
11
  from weac import plot
12
12
 
13
13
  # Version
14
- __version__ = '2.4.0'
14
+ __version__ = '2.5.0'
15
15
 
16
16
  # Public names
17
17
  __all__ = [
@@ -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 # 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
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 # Surface line load (N/mm)
125
- self.slab = False # Slab properties dictionary
126
- self.k = False # Slab shear correction factor
127
- self.h = False # Total slab height (mm)
128
- self.zs = False # Z-coordinate of slab center of gravity (mm)
129
- self.phi = False # Slab inclination (°)
130
- self.A11 = False # Slab extensional stiffness
131
- self.B11 = False # Slab bending-extension coupling stiffness
132
- self.D11 = False # Slab bending stiffness
133
- self.kA55 = False # Slab shear stiffness
134
- self.K0 = False # Stiffness determinant
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 # Complex eigenvalues
138
- self.ewR = False # Real eigenvalues
139
- self.evC = False # Complex eigenvectors
140
- self.evR = False # Real eigenvectors
141
- self.sC = False # Stability shift of complex eigenvalues
142
- self.sR = False # Stability shift of real eigenvalues
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 = False # Flag whether touchdown is possible
146
- self.lC = False # Minimum length of substratum contact (mm)
147
- self.lS = False # Maximum span between bedded and touchdown (mm)
148
- self.ratio = False # Stiffness ratio of collalpsed to uncollapsed weak-layer
149
- self.beta = False # Ratio of slab to bedding stiffness
150
-
151
- def set_foundation_properties(self, t=30, cf=0.5, E=0.25, nu=0.25, update=False):
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 = 10.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 = {
@@ -193,8 +199,6 @@ 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
204
  according to Bergfeld et al. (2023). Default is 6.0.
@@ -229,9 +233,6 @@ class Eigensystem:
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, ratio=16):
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.
@@ -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, SolutionMixin, AnalysisMixin,
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, phi=0):
24
+ def __init__(self, system='pst-', layers=None, touchdown=False):
24
25
  """
25
26
  Initialize model with user input.
26
27
 
@@ -38,10 +39,9 @@ class Layered(FieldQuantitiesMixin, SolutionMixin, AnalysisMixin,
38
39
  to one layer. Default is [[240, 200], ].
39
40
  """
40
41
  # Call parent __init__
41
- super().__init__(system=system)
42
+ super().__init__(system=system, touchdown=touchdown)
42
43
 
43
44
  # Set material properties and set up model
44
- self.set_beam_properties(layers if layers else [[240, 200], ], phi)
45
+ self.set_beam_properties(layers if layers else [[240, 200], ])
45
46
  self.set_foundation_properties()
46
47
  self.calc_fundamental_system()
47
- self.calc_touchdown_system()