geolysis 0.15.0__py3-none-any.whl → 0.17.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 +1 -1
- geolysis/bearing_capacity/ubc/__init__.py +3 -0
- geolysis/foundation.py +24 -27
- geolysis/soil_classifier.py +26 -27
- {geolysis-0.15.0.dist-info → geolysis-0.17.0.dist-info}/METADATA +1 -1
- {geolysis-0.15.0.dist-info → geolysis-0.17.0.dist-info}/RECORD +9 -9
- {geolysis-0.15.0.dist-info → geolysis-0.17.0.dist-info}/WHEEL +0 -0
- {geolysis-0.15.0.dist-info → geolysis-0.17.0.dist-info}/licenses/LICENSE.txt +0 -0
- {geolysis-0.15.0.dist-info → geolysis-0.17.0.dist-info}/top_level.txt +0 -0
geolysis/__init__.py
CHANGED
@@ -59,6 +59,7 @@ def create_ubc_4_all_soil_types(
|
|
59
59
|
depth: float,
|
60
60
|
width: float,
|
61
61
|
length: Optional[float] = None,
|
62
|
+
factor_of_safety: float = 3.0,
|
62
63
|
saturated_unit_wgt: float = 20.5,
|
63
64
|
eccentricity: float = 0.0,
|
64
65
|
ground_water_level: Optional[float] = inf,
|
@@ -78,6 +79,7 @@ def create_ubc_4_all_soil_types(
|
|
78
79
|
:param depth: Depth of foundation (m).
|
79
80
|
:param width: Width of foundation footing (m).
|
80
81
|
:param length: Length of foundation footing (m).
|
82
|
+
:param factor_of_safety: Factor of safety.
|
81
83
|
:param saturated_unit_wgt: Saturated unit weight of soil ($kN/m^3$).
|
82
84
|
:param eccentricity: The deviation of the foundation load from the
|
83
85
|
center of gravity of the foundation footing.
|
@@ -118,6 +120,7 @@ def create_ubc_4_all_soil_types(
|
|
118
120
|
friction_angle=friction_angle,
|
119
121
|
cohesion=cohesion,
|
120
122
|
moist_unit_wgt=moist_unit_wgt,
|
123
|
+
factor_of_safety=factor_of_safety,
|
121
124
|
saturated_unit_wgt=saturated_unit_wgt,
|
122
125
|
foundation_size=fnd_size,
|
123
126
|
apply_local_shear=apply_local_shear,
|
geolysis/foundation.py
CHANGED
@@ -191,7 +191,7 @@ class CircularFooting(FootingSize):
|
|
191
191
|
|
192
192
|
def area(self) -> float:
|
193
193
|
"""Area of circular footing ($m^2$)."""
|
194
|
-
return pi * self.diameter
|
194
|
+
return pi * self.diameter**2 / 4
|
195
195
|
|
196
196
|
|
197
197
|
@add_repr
|
@@ -227,7 +227,7 @@ class SquareFooting(FootingSize):
|
|
227
227
|
|
228
228
|
def area(self) -> float:
|
229
229
|
"""Area of square footing ($m^2$)."""
|
230
|
-
return self.width
|
230
|
+
return self.width**2
|
231
231
|
|
232
232
|
|
233
233
|
@add_repr
|
@@ -272,13 +272,13 @@ class Foundation:
|
|
272
272
|
"""A simple class representing a foundation structure."""
|
273
273
|
|
274
274
|
def __init__(
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
275
|
+
self,
|
276
|
+
depth: float,
|
277
|
+
footing_size: FootingSize,
|
278
|
+
eccentricity: float = 0.0,
|
279
|
+
load_angle: float = 0.0,
|
280
|
+
ground_water_level: Optional[float] = inf,
|
281
|
+
foundation_type: FoundationType = FoundationType.PAD,
|
282
282
|
) -> None:
|
283
283
|
r"""
|
284
284
|
:param depth: Depth of foundation (m).
|
@@ -342,8 +342,7 @@ class Foundation:
|
|
342
342
|
|
343
343
|
@eccentricity.setter
|
344
344
|
@validate_params
|
345
|
-
def eccentricity(self, eccentricity: Annotated[
|
346
|
-
float, MustBeNonNegative]) -> None:
|
345
|
+
def eccentricity(self, eccentricity: Annotated[float, MustBeNonNegative]) -> None:
|
347
346
|
self._eccentricity = eccentricity
|
348
347
|
|
349
348
|
@property
|
@@ -354,9 +353,8 @@ class Foundation:
|
|
354
353
|
@load_angle.setter
|
355
354
|
@validate_params
|
356
355
|
def load_angle(
|
357
|
-
|
358
|
-
|
359
|
-
float, MustBeBetween(min_value=0.0, max_value=90.0)],
|
356
|
+
self,
|
357
|
+
load_angle: Annotated[float, MustBeBetween(min_value=0.0, max_value=90.0)],
|
360
358
|
) -> None:
|
361
359
|
self._load_angle = load_angle
|
362
360
|
|
@@ -368,8 +366,8 @@ class Foundation:
|
|
368
366
|
@ground_water_level.setter
|
369
367
|
@validate_params
|
370
368
|
def ground_water_level(
|
371
|
-
|
372
|
-
|
369
|
+
self,
|
370
|
+
ground_water_level: Annotated[float, MustBePositive],
|
373
371
|
):
|
374
372
|
self._ground_water_level = ground_water_level
|
375
373
|
|
@@ -381,9 +379,8 @@ class Foundation:
|
|
381
379
|
@foundation_type.setter
|
382
380
|
@validate_params
|
383
381
|
def foundation_type(
|
384
|
-
|
385
|
-
|
386
|
-
FoundationType, MustBeMemberOf(FoundationType)],
|
382
|
+
self,
|
383
|
+
foundation_type: Annotated[FoundationType, MustBeMemberOf(FoundationType)],
|
387
384
|
):
|
388
385
|
self._foundation_type = foundation_type
|
389
386
|
|
@@ -415,14 +412,14 @@ class Foundation:
|
|
415
412
|
|
416
413
|
@validate_params
|
417
414
|
def create_foundation(
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
415
|
+
depth: float,
|
416
|
+
width: float,
|
417
|
+
length: Annotated[float, DependsOn(shape=Shape.RECTANGLE)] = None,
|
418
|
+
eccentricity: float = 0.0,
|
419
|
+
load_angle: float = 0.0,
|
420
|
+
ground_water_level: Optional[float] = inf,
|
421
|
+
foundation_type: FoundationType = "pad",
|
422
|
+
shape: Annotated[Shape | str, MustBeMemberOf(Shape)] = "square",
|
426
423
|
) -> Foundation:
|
427
424
|
r"""A factory function that encapsulate the creation of a foundation.
|
428
425
|
|
geolysis/soil_classifier.py
CHANGED
@@ -4,7 +4,7 @@ from typing import Annotated, Sequence
|
|
4
4
|
|
5
5
|
from func_validator import validate_params, MustBeNonNegative
|
6
6
|
|
7
|
-
from .utils import isclose, round_
|
7
|
+
from .utils import isclose, round_
|
8
8
|
|
9
9
|
__all__ = [
|
10
10
|
"AtterbergLimits",
|
@@ -269,7 +269,8 @@ class AtterbergLimits:
|
|
269
269
|
|
270
270
|
@plastic_limit.setter
|
271
271
|
@validate_params
|
272
|
-
def plastic_limit(self,
|
272
|
+
def plastic_limit(self,
|
273
|
+
plastic_limit: Annotated[float, MustBeNonNegative]):
|
273
274
|
if self.liquid_limit < plastic_limit:
|
274
275
|
msg = (
|
275
276
|
f"plastic_limit: {plastic_limit} cannot be greater than "
|
@@ -363,7 +364,7 @@ class _SizeDistribution:
|
|
363
364
|
|
364
365
|
@property
|
365
366
|
def coeff_of_curvature(self) -> float:
|
366
|
-
return (self.d_30**2.0) / (self.d_60 * self.d_10)
|
367
|
+
return (self.d_30 ** 2.0) / (self.d_60 * self.d_10)
|
367
368
|
|
368
369
|
@property
|
369
370
|
def coeff_of_uniformity(self) -> float:
|
@@ -391,9 +392,7 @@ class _SizeDistribution:
|
|
391
392
|
|
392
393
|
def has_particle_sizes(self) -> bool:
|
393
394
|
"""Checks if particle sizes are provided."""
|
394
|
-
|
395
|
-
return False
|
396
|
-
return True
|
395
|
+
return all((self.d_10, self.d_30, self.d_60))
|
397
396
|
|
398
397
|
|
399
398
|
class PSD:
|
@@ -402,12 +401,12 @@ class PSD:
|
|
402
401
|
"""
|
403
402
|
|
404
403
|
def __init__(
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
404
|
+
self,
|
405
|
+
fines: float,
|
406
|
+
sand: float,
|
407
|
+
d_10: float | None = None,
|
408
|
+
d_30: float | None = None,
|
409
|
+
d_60: float | None = None,
|
411
410
|
):
|
412
411
|
"""
|
413
412
|
:param fines: Percentage of fines in soil sample (%) i.e. The
|
@@ -654,10 +653,10 @@ class USCS:
|
|
654
653
|
"""
|
655
654
|
|
656
655
|
def __init__(
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
656
|
+
self,
|
657
|
+
atterberg_limits: AtterbergLimits,
|
658
|
+
psd: PSD,
|
659
|
+
organic=False,
|
661
660
|
):
|
662
661
|
"""
|
663
662
|
:param atterberg_limits: Atterberg limits of the soil.
|
@@ -785,9 +784,9 @@ class USCS:
|
|
785
784
|
|
786
785
|
|
787
786
|
def create_aashto_classifier(
|
788
|
-
|
789
|
-
|
790
|
-
|
787
|
+
liquid_limit: float,
|
788
|
+
plastic_limit: float,
|
789
|
+
fines: float,
|
791
790
|
) -> AASHTO:
|
792
791
|
"""A helper function that encapsulates the creation of a AASHTO
|
793
792
|
classifier.
|
@@ -810,14 +809,14 @@ def create_aashto_classifier(
|
|
810
809
|
|
811
810
|
|
812
811
|
def create_uscs_classifier(
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
812
|
+
liquid_limit: float,
|
813
|
+
plastic_limit: float,
|
814
|
+
fines: float,
|
815
|
+
sand: float,
|
816
|
+
d_10: float | None = None,
|
817
|
+
d_30: float | None = None,
|
818
|
+
d_60: float | None = None,
|
819
|
+
organic: bool = False,
|
821
820
|
):
|
822
821
|
"""A helper function that encapsulates the creation of a USCS
|
823
822
|
classifier.
|
@@ -1,7 +1,7 @@
|
|
1
|
-
geolysis/__init__.py,sha256=
|
1
|
+
geolysis/__init__.py,sha256=0ryfEZKyHIC8ENVj_VLYnxWIgJN7PmxCrCLBI8HpBaM,161
|
2
2
|
geolysis/exceptions.py,sha256=NocUF7-vaFsBJyi0QmH2EBFCpO2RT90RLEB66BCW_X0,74
|
3
|
-
geolysis/foundation.py,sha256=
|
4
|
-
geolysis/soil_classifier.py,sha256=
|
3
|
+
geolysis/foundation.py,sha256=IlNm-Wnujug_NdiKTejlzlFxXtlpiGGrOvaqkFEHYnU,13188
|
4
|
+
geolysis/soil_classifier.py,sha256=4P0l-zpjdcB2Q6NbjBCNTv1reK_-8uQiZnEH-y_ZKvY,27758
|
5
5
|
geolysis/spt.py,sha256=7xa4KkzBjbtSFo0zoZleCCCyeE81w4d2eicjlFy3p28,17273
|
6
6
|
geolysis/bearing_capacity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
geolysis/bearing_capacity/abc/__init__.py,sha256=nycD68gdA116n2VX5fT_hq7ZZz3CF4OVuU3DIgnlnZw,518
|
@@ -10,14 +10,14 @@ geolysis/bearing_capacity/abc/_cohl/_core.py,sha256=jFJAzFpd78QvzwMRSMr9HOwb8Hq6
|
|
10
10
|
geolysis/bearing_capacity/abc/_cohl/bowles_abc.py,sha256=frjZXiVGTR53gRjYNYfYMlx-q9TLltyPHbJFpN7XOiY,2414
|
11
11
|
geolysis/bearing_capacity/abc/_cohl/meyerhof_abc.py,sha256=vXDdtFwYzmD2vOXEQxSQb-jp1bPlB4blmcfNi1zAk78,2377
|
12
12
|
geolysis/bearing_capacity/abc/_cohl/terzaghi_abc.py,sha256=D8-t9fKCnA4y_cSXk2dCfXPrkeUdNizAf8CDhOCLL0Y,3297
|
13
|
-
geolysis/bearing_capacity/ubc/__init__.py,sha256=
|
13
|
+
geolysis/bearing_capacity/ubc/__init__.py,sha256=y7CknadZ5BKGNptl-VglhMXV_vh2wjYLFWQ9GfSy4E0,4362
|
14
14
|
geolysis/bearing_capacity/ubc/_core.py,sha256=WZUSzgC-RhPTR3t1ECh3A934SMRWeuPyytlNqwpE-0s,8126
|
15
15
|
geolysis/bearing_capacity/ubc/_terzaghi_ubc.py,sha256=3g1kyugpuNy4lvcG_uZBOd3PWIkVJ_-VJWZxkrqX-p4,4322
|
16
16
|
geolysis/bearing_capacity/ubc/_vesic_ubc.py,sha256=yZS1RH1NfHoYk9UNCKFSjjEOok-mLkStt2rg5X_zG7Y,6810
|
17
17
|
geolysis/utils/__init__.py,sha256=T4B8itFH9971MMFpOaAbOMzkIPfrAkZQtGa6jcaI_mY,1768
|
18
18
|
geolysis/utils/math.py,sha256=Nqg6SFIy3peSC-n-rq0KjryOdWTqh9jCF2L_qvx5Yg8,1231
|
19
|
-
geolysis-0.
|
20
|
-
geolysis-0.
|
21
|
-
geolysis-0.
|
22
|
-
geolysis-0.
|
23
|
-
geolysis-0.
|
19
|
+
geolysis-0.17.0.dist-info/licenses/LICENSE.txt,sha256=ap6sMs3lT7ICbEXBhgihwH1BTCVcjmCQkIkwVnil1Ak,1065
|
20
|
+
geolysis-0.17.0.dist-info/METADATA,sha256=78qrdyhZp_vOs_Eu1d8wkJ9eIny9U81i1xwhwfqx6LA,6833
|
21
|
+
geolysis-0.17.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
22
|
+
geolysis-0.17.0.dist-info/top_level.txt,sha256=9mnQgOaCRr11dtXff8X-q3FfXjRONd6kHseSy5q2y8g,9
|
23
|
+
geolysis-0.17.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|