geolysis 0.2.0__py3-none-any.whl → 0.3.0__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.
- geolysis/__init__.py +2 -10
- geolysis/core/__init__.py +9 -0
- geolysis/core/abc_4_cohl_soils.py +495 -0
- geolysis/core/constants.py +47 -0
- geolysis/core/estimators.py +549 -0
- geolysis/core/foundation.py +543 -0
- geolysis/core/soil_classifier.py +859 -0
- geolysis/core/spt.py +633 -0
- geolysis/core/utils.py +113 -0
- {geolysis-0.2.0.dist-info → geolysis-0.3.0.dist-info}/LICENSE.txt +1 -1
- geolysis-0.3.0.dist-info/METADATA +223 -0
- geolysis-0.3.0.dist-info/RECORD +14 -0
- {geolysis-0.2.0.dist-info → geolysis-0.3.0.dist-info}/WHEEL +1 -1
- geolysis/bearing_capacity/__init__.py +0 -1
- geolysis/bearing_capacity/abc.py +0 -335
- geolysis/constants.py +0 -19
- geolysis/estimators.py +0 -255
- geolysis/foundation.py +0 -176
- geolysis/soil_classifier.py +0 -658
- geolysis/spt.py +0 -424
- geolysis/utils.py +0 -106
- geolysis-0.2.0.dist-info/METADATA +0 -193
- geolysis-0.2.0.dist-info/RECORD +0 -14
- {geolysis-0.2.0.dist-info → geolysis-0.3.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,549 @@
|
|
1
|
+
from abc import abstractmethod
|
2
|
+
from dataclasses import dataclass
|
3
|
+
from typing import Protocol
|
4
|
+
|
5
|
+
from .constants import ERROR_TOL, UNIT
|
6
|
+
from .utils import arctan, isclose, round_
|
7
|
+
|
8
|
+
__all__ = [
|
9
|
+
"MoistUnitWeight",
|
10
|
+
"SaturatedUnitWeight",
|
11
|
+
"SubmergedUnitWeight",
|
12
|
+
"TerzaghiCompressionIndex",
|
13
|
+
"SkemptonCompressionIndex",
|
14
|
+
"HoughCompressionIndex",
|
15
|
+
"WolffSoilFrictionAngle",
|
16
|
+
"KullhawyMayneSoilFrictionAngle",
|
17
|
+
"StroudUndrainedShearStrength",
|
18
|
+
"SkemptonUndrainedShearStrength",
|
19
|
+
]
|
20
|
+
|
21
|
+
deg = UNIT.deg
|
22
|
+
kN_m3 = UNIT.kN_m3
|
23
|
+
kPa = UNIT.kPa
|
24
|
+
|
25
|
+
|
26
|
+
class EstimatorError(ValueError):
|
27
|
+
pass
|
28
|
+
|
29
|
+
|
30
|
+
# Protocols
|
31
|
+
|
32
|
+
|
33
|
+
class _UnitWeight(Protocol):
|
34
|
+
@property
|
35
|
+
@abstractmethod
|
36
|
+
def unit_wgt(self): ...
|
37
|
+
|
38
|
+
|
39
|
+
class _CompressionIndexEst(Protocol):
|
40
|
+
@property
|
41
|
+
@abstractmethod
|
42
|
+
def compression_index(self) -> float: ...
|
43
|
+
|
44
|
+
|
45
|
+
class _SoilFrictionAngleEst(Protocol):
|
46
|
+
@property
|
47
|
+
@abstractmethod
|
48
|
+
def soil_friction_angle(self) -> float: ...
|
49
|
+
|
50
|
+
|
51
|
+
class _UndrainedShearStrengthEst(Protocol):
|
52
|
+
@property
|
53
|
+
@abstractmethod
|
54
|
+
def undrained_shear_strength(self) -> float: ...
|
55
|
+
|
56
|
+
|
57
|
+
@dataclass
|
58
|
+
class MoistUnitWeight:
|
59
|
+
r"""Estimates the moist unit weight of soil from SPT N-value.
|
60
|
+
|
61
|
+
Parameters
|
62
|
+
----------
|
63
|
+
std_spt_number : float
|
64
|
+
SPT N-value standardized for field procedures considering 60%
|
65
|
+
energy. This is also known as SPT :math:`N_{60}`.
|
66
|
+
|
67
|
+
Attributes
|
68
|
+
----------
|
69
|
+
unit_wgt : float
|
70
|
+
|
71
|
+
Notes
|
72
|
+
-----
|
73
|
+
Moist unit weight is given by the formula:
|
74
|
+
|
75
|
+
.. math:: \gamma_{moist} = 16.0 + 0.1 \cdot N_{60}
|
76
|
+
|
77
|
+
Examples
|
78
|
+
--------
|
79
|
+
>>> from geolysis.core.estimators import MoistUnitWeight
|
80
|
+
>>> suw_est = MoistUnitWeight(std_spt_number=15.0)
|
81
|
+
>>> suw_est.unit_wgt
|
82
|
+
17.5
|
83
|
+
"""
|
84
|
+
|
85
|
+
std_spt_number: float
|
86
|
+
|
87
|
+
_unit = kN_m3
|
88
|
+
|
89
|
+
@property
|
90
|
+
def unit(self) -> str:
|
91
|
+
return self._unit
|
92
|
+
|
93
|
+
@property
|
94
|
+
@round_
|
95
|
+
def unit_wgt(self) -> float:
|
96
|
+
"""Return the ``moist unit weight`` for cohesionless soils.
|
97
|
+
|rarr| :math:`kN/m^3`"""
|
98
|
+
return 16.0 + 0.1 * self.std_spt_number
|
99
|
+
|
100
|
+
|
101
|
+
@dataclass
|
102
|
+
class SaturatedUnitWeight:
|
103
|
+
r"""Estimates the saturated unit weight of soil from SPT N-value.
|
104
|
+
|
105
|
+
Parameters
|
106
|
+
----------
|
107
|
+
std_spt_number : float
|
108
|
+
SPT N-value standardized for field procedures considering 60%
|
109
|
+
energy. This is also known as SPT :math:`N_{60}`.
|
110
|
+
|
111
|
+
Attributes
|
112
|
+
----------
|
113
|
+
unit_wgt : float
|
114
|
+
|
115
|
+
Notes
|
116
|
+
-----
|
117
|
+
Saturated unit weight is given by the formula:
|
118
|
+
|
119
|
+
.. math:: \gamma_{sat} = 16.8 + 0.15 \cdot N_{60}
|
120
|
+
|
121
|
+
Examples
|
122
|
+
--------
|
123
|
+
>>> from geolysis.core.estimators import SaturatedUnitWeight
|
124
|
+
>>> suw_est = SaturatedUnitWeight(std_spt_number=15.0)
|
125
|
+
>>> suw_est.unit_wgt
|
126
|
+
19.05
|
127
|
+
"""
|
128
|
+
|
129
|
+
std_spt_number: float
|
130
|
+
|
131
|
+
_unit = kN_m3
|
132
|
+
|
133
|
+
@property
|
134
|
+
def unit(self) -> str:
|
135
|
+
return self._unit
|
136
|
+
|
137
|
+
@property
|
138
|
+
@round_
|
139
|
+
def unit_wgt(self) -> float:
|
140
|
+
"""Return the ``saturated unit weight`` for cohesive soils.
|
141
|
+
|rarr| :math:`kN/m^3`
|
142
|
+
"""
|
143
|
+
return 16.8 + 0.15 * self.std_spt_number
|
144
|
+
|
145
|
+
|
146
|
+
@dataclass
|
147
|
+
class SubmergedUnitWeight:
|
148
|
+
r"""Estimates the submerged unit weight of soil from SPT N-value.
|
149
|
+
|
150
|
+
Parameters
|
151
|
+
----------
|
152
|
+
std_spt_number : float
|
153
|
+
SPT N-value standardized for field procedures considering 60%
|
154
|
+
energy. This is also known as SPT :math:`N_{60}`.
|
155
|
+
|
156
|
+
Attributes
|
157
|
+
----------
|
158
|
+
unit_wgt : float
|
159
|
+
|
160
|
+
Notes
|
161
|
+
-----
|
162
|
+
Submerged unit weight is given by the formula:
|
163
|
+
|
164
|
+
.. math:: \gamma_{sub} = 8.8 + 0.01 \cdot N_{60}
|
165
|
+
|
166
|
+
Examples
|
167
|
+
--------
|
168
|
+
>>> from geolysis.core.estimators import SubmergedUnitWeight
|
169
|
+
>>> suw_est = SubmergedUnitWeight(std_spt_number=15.0)
|
170
|
+
>>> suw_est.unit_wgt
|
171
|
+
8.95
|
172
|
+
"""
|
173
|
+
|
174
|
+
std_spt_number: float
|
175
|
+
|
176
|
+
_unit = kN_m3
|
177
|
+
|
178
|
+
@property
|
179
|
+
def unit(self) -> str:
|
180
|
+
return self._unit
|
181
|
+
|
182
|
+
@property
|
183
|
+
@round_
|
184
|
+
def unit_wgt(self) -> float:
|
185
|
+
"""Return the ``submerged unit weight`` for cohesionless soils.
|
186
|
+
|rarr| :math:`kN/m^3`
|
187
|
+
"""
|
188
|
+
return 8.8 + 0.01 * self.std_spt_number
|
189
|
+
|
190
|
+
|
191
|
+
@dataclass
|
192
|
+
class TerzaghiCompressionIndex:
|
193
|
+
"""Compression Index of soil according to ``Terzaghi et al (1967)``.
|
194
|
+
|
195
|
+
Parameters
|
196
|
+
----------
|
197
|
+
liquid_limit : float
|
198
|
+
Water content beyond which soils flow under their own weight.
|
199
|
+
|
200
|
+
Attributes
|
201
|
+
----------
|
202
|
+
compression_index : float
|
203
|
+
|
204
|
+
Notes
|
205
|
+
-----
|
206
|
+
Compression index is given by the formula:
|
207
|
+
|
208
|
+
.. math:: C_i = 0.009 (LL - 10)
|
209
|
+
|
210
|
+
Examples
|
211
|
+
--------
|
212
|
+
>>> from geolysis.core.estimators import TerzaghiCompressionIndex
|
213
|
+
>>> comp_idx_est = TerzaghiCompressionIndex(liquid_limit=40.0)
|
214
|
+
>>> comp_idx_est.compression_index
|
215
|
+
0.27
|
216
|
+
"""
|
217
|
+
|
218
|
+
liquid_limit: float
|
219
|
+
|
220
|
+
_unit = ""
|
221
|
+
|
222
|
+
@property
|
223
|
+
def unit(self) -> str:
|
224
|
+
return self._unit
|
225
|
+
|
226
|
+
@property
|
227
|
+
@round_
|
228
|
+
def compression_index(self) -> float:
|
229
|
+
"""Return the compression index of soil."""
|
230
|
+
return 0.009 * (self.liquid_limit - 10.0)
|
231
|
+
|
232
|
+
|
233
|
+
@dataclass
|
234
|
+
class SkemptonCompressionIndex:
|
235
|
+
"""Compression Index of soil according to ``Skempton (1994)``.
|
236
|
+
|
237
|
+
Parameters
|
238
|
+
----------
|
239
|
+
liquid_limit : float
|
240
|
+
Water content beyond which soils flow under their own weight.
|
241
|
+
|
242
|
+
Attributes
|
243
|
+
----------
|
244
|
+
compression_index : float
|
245
|
+
|
246
|
+
Notes
|
247
|
+
-----
|
248
|
+
Compression index is given by the formula:
|
249
|
+
|
250
|
+
.. math:: C_i = 0.007 (LL - 10)
|
251
|
+
|
252
|
+
Examples
|
253
|
+
--------
|
254
|
+
>>> from geolysis.core.estimators import SkemptonCompressionIndex
|
255
|
+
>>> comp_idx_est = SkemptonCompressionIndex(liquid_limit=40.0)
|
256
|
+
>>> comp_idx_est.compression_index
|
257
|
+
0.21
|
258
|
+
"""
|
259
|
+
|
260
|
+
liquid_limit: float
|
261
|
+
|
262
|
+
_unit = ""
|
263
|
+
|
264
|
+
@property
|
265
|
+
def unit(self) -> str:
|
266
|
+
return self._unit
|
267
|
+
|
268
|
+
@property
|
269
|
+
@round_
|
270
|
+
def compression_index(self) -> float:
|
271
|
+
"""Return the compression index of soil."""
|
272
|
+
return 0.007 * (self.liquid_limit - 10.0)
|
273
|
+
|
274
|
+
|
275
|
+
@dataclass
|
276
|
+
class HoughCompressionIndex:
|
277
|
+
"""Compression Index of soil according to ``Hough (1957)``.
|
278
|
+
|
279
|
+
Parameters
|
280
|
+
----------
|
281
|
+
void_ratio : float
|
282
|
+
Ratio of the volume of voids to the volume of solids.
|
283
|
+
|
284
|
+
Attributes
|
285
|
+
----------
|
286
|
+
compression_index : float
|
287
|
+
|
288
|
+
Notes
|
289
|
+
-----
|
290
|
+
Compression index is given by the formula:
|
291
|
+
|
292
|
+
.. math:: C_i = 0.29 (e_o - 0.27)
|
293
|
+
|
294
|
+
Examples
|
295
|
+
--------
|
296
|
+
>>> from geolysis.core.estimators import HoughCompressionIndex
|
297
|
+
>>> comp_idx_est = HoughCompressionIndex(void_ratio=0.78)
|
298
|
+
>>> comp_idx_est.compression_index
|
299
|
+
0.1479
|
300
|
+
"""
|
301
|
+
|
302
|
+
void_ratio: float
|
303
|
+
|
304
|
+
_unit = ""
|
305
|
+
|
306
|
+
@property
|
307
|
+
def unit(self) -> str:
|
308
|
+
return self._unit
|
309
|
+
|
310
|
+
@property
|
311
|
+
@round_
|
312
|
+
def compression_index(self) -> float:
|
313
|
+
"""Return the compression index of soil."""
|
314
|
+
return 0.29 * (self.void_ratio - 0.27)
|
315
|
+
|
316
|
+
|
317
|
+
@dataclass
|
318
|
+
class WolffSoilFrictionAngle:
|
319
|
+
r"""Soil Friction Angle according to ``Wolff (1989)``.
|
320
|
+
|
321
|
+
Parameters
|
322
|
+
----------
|
323
|
+
std_spt_number : float
|
324
|
+
SPT N-value standardized for field procedures.
|
325
|
+
|
326
|
+
Attributes
|
327
|
+
----------
|
328
|
+
soil_friction_angle : float
|
329
|
+
|
330
|
+
Notes
|
331
|
+
-----
|
332
|
+
Soil Friction Angle is given by the formula:
|
333
|
+
|
334
|
+
.. math:: \phi = 27.1 + 0.3 \cdot N_{60} - 0.00054 \cdot (N_{60})^2
|
335
|
+
|
336
|
+
Examples
|
337
|
+
--------
|
338
|
+
>>> from geolysis.core.estimators import WolffSoilFrictionAngle
|
339
|
+
|
340
|
+
>>> sfa_est = WolffSoilFrictionAngle(std_spt_number=15.0)
|
341
|
+
>>> sfa_est.soil_friction_angle
|
342
|
+
31.4785
|
343
|
+
"""
|
344
|
+
|
345
|
+
std_spt_number: float
|
346
|
+
|
347
|
+
_unit = deg
|
348
|
+
|
349
|
+
@property
|
350
|
+
def unit(self) -> str:
|
351
|
+
return self._unit
|
352
|
+
|
353
|
+
@property
|
354
|
+
@round_
|
355
|
+
def soil_friction_angle(self) -> float:
|
356
|
+
"""Return the internal angle of friction of soil."""
|
357
|
+
return (
|
358
|
+
27.1
|
359
|
+
+ (0.3 * self.std_spt_number)
|
360
|
+
- (0.00054 * (self.std_spt_number**2))
|
361
|
+
)
|
362
|
+
|
363
|
+
|
364
|
+
@dataclass
|
365
|
+
class KullhawyMayneSoilFrictionAngle:
|
366
|
+
r"""Soil Friction Angle according to ``Kullhawy & Mayne (1990)``.
|
367
|
+
|
368
|
+
Parameters
|
369
|
+
----------
|
370
|
+
std_spt_number : float
|
371
|
+
SPT N-value standardized for field procedures.
|
372
|
+
eop : float, :math:`kN/m^2`
|
373
|
+
Effective overburden pressure, ``eop`` should be in the same unit as
|
374
|
+
``atm_pressure``.
|
375
|
+
atm_pressure : float, :math:`kN/m^2`
|
376
|
+
Atmospheric pressure, ``atm_pressure`` should be in the same unit as
|
377
|
+
``eop``.
|
378
|
+
|
379
|
+
Attributes
|
380
|
+
----------
|
381
|
+
soil_friction_angle : float
|
382
|
+
|
383
|
+
Raises
|
384
|
+
------
|
385
|
+
EstimatorError
|
386
|
+
Raised when ``atm_pressure`` is close to zero.
|
387
|
+
|
388
|
+
Notes
|
389
|
+
-----
|
390
|
+
Soil Friction Angle is given by the formula:
|
391
|
+
|
392
|
+
.. math::
|
393
|
+
|
394
|
+
\phi = tan^{-1}\left[\left(\dfrac{N_{60}}{12.2 + 20.3 \cdot
|
395
|
+
\frac{\sigma_o}{P_a}}\right)^{0.34}\right]
|
396
|
+
|
397
|
+
Examples
|
398
|
+
--------
|
399
|
+
>>> from geolysis.core.estimators import KullhawyMayneSoilFrictionAngle
|
400
|
+
|
401
|
+
>>> sfa_est = KullhawyMayneSoilFrictionAngle(std_spt_number=15.0, eop=103.8,
|
402
|
+
... atm_pressure=101.3)
|
403
|
+
>>> sfa_est.soil_friction_angle
|
404
|
+
37.4103
|
405
|
+
"""
|
406
|
+
|
407
|
+
_unit = deg
|
408
|
+
|
409
|
+
def __init__(self, std_spt_number: float, eop: float, atm_pressure: float):
|
410
|
+
self.std_spt_number = std_spt_number
|
411
|
+
self.eop = eop
|
412
|
+
self.atm_pressure = atm_pressure
|
413
|
+
|
414
|
+
@property
|
415
|
+
def unit(self) -> str:
|
416
|
+
return self._unit
|
417
|
+
|
418
|
+
@property
|
419
|
+
def atm_pressure(self) -> float:
|
420
|
+
return self._atm_pressure
|
421
|
+
|
422
|
+
@atm_pressure.setter
|
423
|
+
def atm_pressure(self, __val):
|
424
|
+
if isclose(__val, 0, rel_tol=ERROR_TOL):
|
425
|
+
err_msg = f"atm_pressure = {__val} cannot be close to 0.0"
|
426
|
+
raise EstimatorError(err_msg)
|
427
|
+
self._atm_pressure = __val
|
428
|
+
|
429
|
+
@property
|
430
|
+
@round_
|
431
|
+
def soil_friction_angle(self) -> float:
|
432
|
+
"""Return the internal angle of friction of soil."""
|
433
|
+
angle = self.std_spt_number / (
|
434
|
+
12.2 + 20.3 * (self.eop / self.atm_pressure)
|
435
|
+
)
|
436
|
+
return arctan(angle**0.34)
|
437
|
+
|
438
|
+
|
439
|
+
@dataclass
|
440
|
+
class StroudUndrainedShearStrength:
|
441
|
+
r"""Undrained Shear Strength according to ``Stroud (1974)``.
|
442
|
+
|
443
|
+
Parameters
|
444
|
+
----------
|
445
|
+
std_spt_number : float
|
446
|
+
SPT N-value standardized for field procedures.
|
447
|
+
k : float, default=3.5, :math:`kN/m^2`
|
448
|
+
Stroud constant. :math:`3.5 \le k \le 6.5`
|
449
|
+
|
450
|
+
Attributes
|
451
|
+
----------
|
452
|
+
undrained_shear_strength : float
|
453
|
+
|
454
|
+
Raises
|
455
|
+
------
|
456
|
+
EstimatorError
|
457
|
+
Raised If ``k`` is not in the specified range. :math:`3.5 \le k \le 6.5`
|
458
|
+
|
459
|
+
Notes
|
460
|
+
-----
|
461
|
+
Undrained Shear Strength is given by the formula:
|
462
|
+
|
463
|
+
.. math:: C_u = k \cdot N_{60}
|
464
|
+
|
465
|
+
Examples
|
466
|
+
--------
|
467
|
+
>>> from geolysis.core.estimators import StroudUndrainedShearStrength
|
468
|
+
|
469
|
+
>>> uss_est = StroudUndrainedShearStrength(std_spt_number=10.0)
|
470
|
+
>>> uss_est.undrained_shear_strength
|
471
|
+
35.0
|
472
|
+
"""
|
473
|
+
|
474
|
+
_unit = kPa
|
475
|
+
|
476
|
+
def __init__(self, std_spt_number: float, k=3.5) -> None:
|
477
|
+
self.std_spt_number = std_spt_number
|
478
|
+
self.k = k
|
479
|
+
|
480
|
+
@property
|
481
|
+
def unit(self) -> str:
|
482
|
+
return self._unit
|
483
|
+
|
484
|
+
@property
|
485
|
+
def k(self) -> float:
|
486
|
+
return self._k
|
487
|
+
|
488
|
+
@k.setter
|
489
|
+
def k(self, __val: float):
|
490
|
+
if not 3.5 <= __val <= 6.5:
|
491
|
+
err_msg = "k = {__val} should be in the range 3.5 <= k <= 6.5"
|
492
|
+
raise EstimatorError(err_msg)
|
493
|
+
self._k = __val
|
494
|
+
|
495
|
+
@property
|
496
|
+
@round_
|
497
|
+
def undrained_shear_strength(self) -> float:
|
498
|
+
"""Return the undrained shear strength of soil."""
|
499
|
+
return self.k * self.std_spt_number
|
500
|
+
|
501
|
+
|
502
|
+
@dataclass
|
503
|
+
class SkemptonUndrainedShearStrength:
|
504
|
+
r"""Undrained Shear Strength according to ``Skempton (1957)``.
|
505
|
+
|
506
|
+
Parameters
|
507
|
+
----------
|
508
|
+
eop : float, :math:`kN/m^2`
|
509
|
+
Effective overburden pressure.
|
510
|
+
plasticity_index : float
|
511
|
+
Range of water content over which soil remains in plastic condition.
|
512
|
+
|
513
|
+
Attributes
|
514
|
+
----------
|
515
|
+
undrained_shear_strength : float
|
516
|
+
|
517
|
+
Notes
|
518
|
+
-----
|
519
|
+
Undrained Shear Strength is given by the formula:
|
520
|
+
|
521
|
+
.. math:: C_u = \sigma_o (0.11 + 0.0037 \cdot PI)
|
522
|
+
|
523
|
+
The value of the ratio :math:`\frac{C_u}{\sigma_o}` determined in a
|
524
|
+
consolidated-undrained test on undisturbed samples is generally greater
|
525
|
+
than actual value because of anisotropic consolidation in the field.
|
526
|
+
The actual value is best determined by ``in-situ shear vane test``.
|
527
|
+
|
528
|
+
Examples
|
529
|
+
--------
|
530
|
+
>>> from geolysis.core.estimators import SkemptonUndrainedShearStrength
|
531
|
+
>>> uss_est = SkemptonUndrainedShearStrength(eop=76.8, plasticity_index=25.7)
|
532
|
+
>>> uss_est.undrained_shear_strength
|
533
|
+
15.7509
|
534
|
+
"""
|
535
|
+
|
536
|
+
eop: float
|
537
|
+
plasticity_index: float
|
538
|
+
|
539
|
+
_unit = kPa
|
540
|
+
|
541
|
+
@property
|
542
|
+
def unit(self) -> str:
|
543
|
+
return self._unit
|
544
|
+
|
545
|
+
@property
|
546
|
+
@round_
|
547
|
+
def undrained_shear_strength(self) -> float:
|
548
|
+
"""Return the undrained shear strength of soil."""
|
549
|
+
return self.eop * (0.11 + 0.0037 * self.plasticity_index)
|