geolysis 0.8.0__py3-none-any.whl → 0.10.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 +3 -3
- geolysis/bearing_capacity/abc/__init__.py +21 -0
- geolysis/bearing_capacity/abc/_cohl/__init__.py +109 -0
- geolysis/bearing_capacity/abc/{cohl → _cohl}/_core.py +20 -10
- geolysis/bearing_capacity/abc/_cohl/bowles_abc.py +103 -0
- geolysis/bearing_capacity/abc/_cohl/meyerhof_abc.py +100 -0
- geolysis/bearing_capacity/abc/_cohl/terzaghi_abc.py +143 -0
- geolysis/bearing_capacity/ubc/__init__.py +107 -128
- geolysis/bearing_capacity/ubc/_core.py +68 -66
- geolysis/bearing_capacity/ubc/_hansen_ubc.py +271 -0
- geolysis/bearing_capacity/ubc/_terzaghi_ubc.py +178 -0
- geolysis/bearing_capacity/ubc/_vesic_ubc.py +253 -0
- geolysis/foundation.py +160 -127
- geolysis/soil_classifier.py +386 -285
- geolysis/spt.py +323 -257
- geolysis/{utils/__init__.py → utils.py} +48 -36
- geolysis-0.10.0.dist-info/METADATA +181 -0
- geolysis-0.10.0.dist-info/RECORD +22 -0
- {geolysis-0.8.0.dist-info → geolysis-0.10.0.dist-info}/WHEEL +1 -1
- geolysis/bearing_capacity/abc/cohl/__init__.py +0 -137
- geolysis/bearing_capacity/abc/cohl/bowles_abc.py +0 -96
- geolysis/bearing_capacity/abc/cohl/meyerhof_abc.py +0 -96
- geolysis/bearing_capacity/abc/cohl/terzaghi_abc.py +0 -131
- geolysis/bearing_capacity/ubc/hansen_ubc.py +0 -287
- geolysis/bearing_capacity/ubc/terzaghi_ubc.py +0 -246
- geolysis/bearing_capacity/ubc/vesic_ubc.py +0 -293
- geolysis/utils/exceptions.py +0 -52
- geolysis/utils/validators.py +0 -129
- geolysis-0.8.0.dist-info/METADATA +0 -206
- geolysis-0.8.0.dist-info/RECORD +0 -24
- {geolysis-0.8.0.dist-info → geolysis-0.10.0.dist-info}/licenses/LICENSE.txt +0 -0
- {geolysis-0.8.0.dist-info → geolysis-0.10.0.dist-info}/top_level.txt +0 -0
@@ -1,30 +1,46 @@
|
|
1
|
+
import enum
|
1
2
|
import functools
|
2
3
|
import math
|
3
4
|
from math import exp, inf, isclose, log10, pi, sqrt
|
4
5
|
from statistics import fmean as mean
|
5
|
-
from typing import
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
6
|
+
from typing import Callable
|
7
|
+
|
8
|
+
__all__ = [
|
9
|
+
"AbstractStrEnum",
|
10
|
+
"inf",
|
11
|
+
"pi",
|
12
|
+
"deg2rad",
|
13
|
+
"rad2deg",
|
14
|
+
"tan",
|
15
|
+
"cot",
|
16
|
+
"sin",
|
17
|
+
"cos",
|
18
|
+
"arctan",
|
19
|
+
"round_",
|
20
|
+
"mean",
|
21
|
+
"exp",
|
22
|
+
"isclose",
|
23
|
+
"log10",
|
24
|
+
"sqrt",
|
25
|
+
]
|
26
|
+
|
27
|
+
|
28
|
+
class StrEnumMeta(enum.EnumMeta):
|
29
|
+
def __contains__(cls, item) -> bool:
|
30
|
+
if isinstance(item, (str, cls)):
|
31
|
+
return str(item) in (member.value for member in cls)
|
32
|
+
return NotImplemented
|
33
|
+
|
34
|
+
def __repr__(cls) -> str:
|
35
|
+
return str([member.value for member in cls])
|
36
|
+
|
37
|
+
|
38
|
+
class AbstractStrEnum(enum.StrEnum, metaclass=StrEnumMeta):
|
39
|
+
"""An abstract string enumeration class that inherits from StrEnum.
|
40
|
+
|
41
|
+
This class can be used as a base class for creating string
|
42
|
+
enumerations.
|
43
|
+
"""
|
28
44
|
|
29
45
|
|
30
46
|
def deg2rad(x: float, /) -> float:
|
@@ -62,23 +78,19 @@ def arctan(x: float, /) -> float:
|
|
62
78
|
return rad2deg(math.atan(x))
|
63
79
|
|
64
80
|
|
65
|
-
def
|
66
|
-
|
67
|
-
|
68
|
-
|
81
|
+
def round_(ndigits: int) -> Callable:
|
82
|
+
"""A decorator that rounds the result of a callable to a specified
|
83
|
+
number of decimal places.
|
69
84
|
|
70
|
-
|
71
|
-
|
72
|
-
of decimal places.
|
85
|
+
The returned value of the callable should support the `__round__`
|
86
|
+
dunder method and should be a numeric value.
|
73
87
|
|
74
|
-
|
75
|
-
method and should be a numeric value. ``ndigits`` can either be an int
|
76
|
-
which will indicate the number of decimal places to round to or a
|
77
|
-
callable. If ``ndigits`` is callable the default decimal places is 2.
|
78
|
-
|
79
|
-
TypeError is raised when ``ndigits`` is neither an int nor a callable.
|
88
|
+
TypeError is raised when `ndigits` is not an int.
|
80
89
|
"""
|
81
90
|
|
91
|
+
if not isinstance(ndigits, int):
|
92
|
+
raise TypeError("ndigits must be an int")
|
93
|
+
|
82
94
|
def dec(fn) -> Callable[..., float]:
|
83
95
|
@functools.wraps(fn)
|
84
96
|
def wrapper(*args, **kwargs) -> float:
|
@@ -0,0 +1,181 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: geolysis
|
3
|
+
Version: 0.10.0
|
4
|
+
Summary: geolysis is an opensource software for geotechnical engineering analysis and modeling.
|
5
|
+
Author-email: Patrick Boateng <boatengpato.pb@gmail.com>
|
6
|
+
License: MIT License
|
7
|
+
Project-URL: Homepage, https://docs.geolysis.io
|
8
|
+
Project-URL: Documentation, https://docs.geolysis.io
|
9
|
+
Project-URL: Repository, https://github.com/patrickboateng/geolysis
|
10
|
+
Project-URL: Discussions, https://github.com/patrickboateng/geolysis/discussions
|
11
|
+
Project-URL: Issue Tracker, https://github.com/patrickboateng/geolysis/issues
|
12
|
+
Keywords: geotechnical-engineering,soil-classification,bearing-capacity-analysis,standard-penetration-test-analysis
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
14
|
+
Classifier: Intended Audience :: Developers
|
15
|
+
Classifier: Intended Audience :: Education
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
18
|
+
Classifier: Natural Language :: English
|
19
|
+
Classifier: Operating System :: OS Independent
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
22
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
24
|
+
Requires-Python: >=3.11
|
25
|
+
Description-Content-Type: text/markdown
|
26
|
+
License-File: LICENSE.txt
|
27
|
+
Provides-Extra: dev
|
28
|
+
Requires-Dist: pytest; extra == "dev"
|
29
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
30
|
+
Requires-Dist: coverage; extra == "dev"
|
31
|
+
Dynamic: license-file
|
32
|
+
|
33
|
+
<div align="center">
|
34
|
+
<img src="https://raw.githubusercontent.com/patrickboateng/geolysis/main/docs/assets/pkg-logo.svg"
|
35
|
+
alt="logo" width="30%" height="30%" />
|
36
|
+
</div><br>
|
37
|
+
|
38
|
+
<div align="center">
|
39
|
+
|
40
|
+
[](https://pypi.org/project/geolysis/)
|
41
|
+
[](https://pepy.tech/projects/geolysis)
|
42
|
+
[](https://pypi.python.org/pypi/geolysis/)
|
43
|
+
[](https://opensource.org/license/mit/)
|
44
|
+
|
45
|
+

|
46
|
+
[](https://app.codacy.com/gh/patrickboateng/geolysis/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
47
|
+
[](https://github.com/patrickboateng/geolysis/actions/workflows/geolysis-unit-tests.yml)
|
48
|
+
[](https://geolysis.readthedocs.io/en/latest/?badge=latest)
|
49
|
+
|
50
|
+
</div>
|
51
|
+
|
52
|
+
`geolysis` is an open-source python package (library) for geotechnical analysis
|
53
|
+
and modeling.
|
54
|
+
|
55
|
+
The `geolysis` python package is among three other projects, `geolysis.excel`,
|
56
|
+
`geolysis.gui`, and `geolysis.ai`. More details about these projects are
|
57
|
+
provided [here](https://github.com/geolysis-dev).
|
58
|
+
|
59
|
+
The rest of this **README** provides an overview of the `geolysis` python
|
60
|
+
package.
|
61
|
+
|
62
|
+
## Table of Contents
|
63
|
+
|
64
|
+
- [Installation](#installation)
|
65
|
+
- [API Reference](#api-reference)
|
66
|
+
- [Imports](#imports)
|
67
|
+
- [Project Structure](#project-structure)
|
68
|
+
- [Usage](#usage)
|
69
|
+
- [Documentation](#documentation)
|
70
|
+
- [Contributing](#contributing)
|
71
|
+
- [License](#license)
|
72
|
+
- [Contact](#contact)
|
73
|
+
|
74
|
+
## Installation
|
75
|
+
|
76
|
+
```shell
|
77
|
+
$ pip install geolysis
|
78
|
+
```
|
79
|
+
|
80
|
+
## API Reference
|
81
|
+
|
82
|
+
- [Python API](https://docs.geolysis.io/en/latest/reference/)
|
83
|
+
- [geolysis.bearing_capacity.abc](https://docs.geolysis.io/en/latest/reference/allowable_bearing_capacity/) - _Allowable bearing capacity
|
84
|
+
estimation_
|
85
|
+
- [geolysis.bearing_capacity.ubc](https://docs.geolysis.io/en/latest/reference/ultimate_bearing_capacity/) - _Ultimate bearing capacity
|
86
|
+
estimation_
|
87
|
+
- [geolysis.foundation](https://docs.geolysis.io/en/latest/reference/foundation/) - _Foundation Representation_
|
88
|
+
- [geolysis.soil_classifier](https://docs.geolysis.io/en/latest/reference/soil_classifier/) - _Soil classification_
|
89
|
+
- [geolysis.spt](https://docs.geolysis.io/en/latest/reference/spt/) - _Standard Penetration Test (SPT) Analysis_
|
90
|
+
- [geolysis.utils](https://docs.geolysis.io/en/latest/reference/utils/) - _Utilities_
|
91
|
+
|
92
|
+
|
93
|
+
## Imports
|
94
|
+
|
95
|
+
- **Bearing Capacity**
|
96
|
+
|
97
|
+
- **Allowable Bearing Capacity (ABC)**
|
98
|
+
|
99
|
+
```python
|
100
|
+
from geolysis.bearing_capacity.abc import create_abc_4_cohesionless_soils
|
101
|
+
```
|
102
|
+
|
103
|
+
- **Ultimate Bearing Capacity (UBC)**
|
104
|
+
|
105
|
+
```python
|
106
|
+
from geolysis.bearing_capacity.ubc import create_ubc_4_all_soil_types
|
107
|
+
```
|
108
|
+
|
109
|
+
- **Foundation**
|
110
|
+
|
111
|
+
```python
|
112
|
+
from geolysis.foundation import create_foundation
|
113
|
+
```
|
114
|
+
|
115
|
+
|
116
|
+
- **Soil Classification**
|
117
|
+
|
118
|
+
```python
|
119
|
+
from geolysis.soil_classifier import create_uscs_classifier
|
120
|
+
from geolysis.soil_classifier import create_aashto_classifier
|
121
|
+
```
|
122
|
+
|
123
|
+
- **Standard Penetration Test (SPT) Analysis**
|
124
|
+
|
125
|
+
```python
|
126
|
+
from geolysis.spt import DilatancyCorrection
|
127
|
+
from geolysis.spt import EnergyCorrection
|
128
|
+
from geolysis.spt import SPT
|
129
|
+
from geolysis.spt import create_overburden_pressure_correction
|
130
|
+
```
|
131
|
+
|
132
|
+
## Project Structure
|
133
|
+
|
134
|
+
.
|
135
|
+
├── .github # GitHub Actions
|
136
|
+
├── docs # Documentation files
|
137
|
+
├── geolysis # Source files
|
138
|
+
├── tests # Automated tests
|
139
|
+
├── pyproject.toml # Project configuration file
|
140
|
+
└── README.md # Project README file
|
141
|
+
|
142
|
+
## Usage
|
143
|
+
|
144
|
+
```python
|
145
|
+
|
146
|
+
>>> from geolysis.soil_classifier import create_aashto_classifier
|
147
|
+
>>> aashto_clf = create_aashto_classifier(liquid_limit=34.1,
|
148
|
+
... plastic_limit=21.1,
|
149
|
+
... fines=47.88, )
|
150
|
+
>>> clf = aashto_clf.classify()
|
151
|
+
>>> clf.symbol
|
152
|
+
'A-6(4)'
|
153
|
+
>>> clf.symbol_no_grp_idx
|
154
|
+
'A-6'
|
155
|
+
>>> clf.group_index
|
156
|
+
'4'
|
157
|
+
>>> clf.description
|
158
|
+
'Clayey soils'
|
159
|
+
|
160
|
+
```
|
161
|
+
|
162
|
+
Check out more [examples](https://docs.geolysis.io/en/latest/usage/)
|
163
|
+
|
164
|
+
## Documentation
|
165
|
+
|
166
|
+
Check out the full [documentation](https://docs.geolysis.io/en/latest/).
|
167
|
+
|
168
|
+
## Contributing
|
169
|
+
|
170
|
+
Check out the [contribution guidelines](https://docs.geolysis.io/en/latest/dev_guide/)
|
171
|
+
|
172
|
+
## License
|
173
|
+
|
174
|
+
This project is licensed under the MIT License - see the
|
175
|
+
[LICENSE](https://github.com/patrickboateng/geolysis/blob/main/LICENSE.txt)
|
176
|
+
file for more details.
|
177
|
+
|
178
|
+
## Contact
|
179
|
+
|
180
|
+
For questions or feedback, please
|
181
|
+
contact [patrickboateng at patrickboateng dot tech](mailto:patrickboateng@patrickboateng.tech)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
geolysis/__init__.py,sha256=_BzryYcgDYjfkWn75IfellVNRi3uyzQcTD4P8z7pElE,161
|
2
|
+
geolysis/foundation.py,sha256=khmZCa8V-UEqp7A4WlIwt8Oy5tVQdT0UsaLMuxEbDQU,12819
|
3
|
+
geolysis/soil_classifier.py,sha256=rScsrMR7mNOkKuWWiduJzsakibyYR2S0-tLrXbYSobQ,27427
|
4
|
+
geolysis/spt.py,sha256=_AWfs5Ho5ScCwPlVDNh6cuhcLOR4-u7Dr7UoagRlDoM,18620
|
5
|
+
geolysis/utils.py,sha256=hgAeuMoGxL_GRbzYD3jZHglFxAmeqUa8FBqM0sm40lc,2394
|
6
|
+
geolysis/bearing_capacity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
+
geolysis/bearing_capacity/abc/__init__.py,sha256=QCSni6_QI059y3JF5UU9Gd_wAyVLmVEMR7ajq_EZQRg,518
|
8
|
+
geolysis/bearing_capacity/abc/_cohl/__init__.py,sha256=M1EBn2WMgtG-Dg-LT7N-OVke6upwL6plqyPCn3ebR0M,4110
|
9
|
+
geolysis/bearing_capacity/abc/_cohl/_core.py,sha256=Ix6bSkTlP0zxN6CuH_lHT1B3ug9ZvbGjOImlU4IABOU,1739
|
10
|
+
geolysis/bearing_capacity/abc/_cohl/bowles_abc.py,sha256=AC0OslIUZBxC5ClB0HNvLoVDwnt982l8OGPuxyE2uZ0,3153
|
11
|
+
geolysis/bearing_capacity/abc/_cohl/meyerhof_abc.py,sha256=Zf4X6YVrPMH5Sgm0bORbWe4RgfO-jVJBdeRWl8jBRH8,3056
|
12
|
+
geolysis/bearing_capacity/abc/_cohl/terzaghi_abc.py,sha256=KKutVHYRFlS5SFFRVJEMKOfROFPk5MnCgQ6LmIdv1ow,4131
|
13
|
+
geolysis/bearing_capacity/ubc/__init__.py,sha256=5EtGLFW0vwCfUGxQDKPQJ687C9AKRlbYEPYb2aY2AgA,4578
|
14
|
+
geolysis/bearing_capacity/ubc/_core.py,sha256=Fbp5AXdixDUAL4YRz-BP92AHhYL1ROBOX_FEVUGxEaw,6057
|
15
|
+
geolysis/bearing_capacity/ubc/_hansen_ubc.py,sha256=aVu40WFCtvstWNq3x65Klb9am4UfJq00MtfaJYIwifI,6995
|
16
|
+
geolysis/bearing_capacity/ubc/_terzaghi_ubc.py,sha256=U9mt92glUuooXnd_NPOFDpEdG15bTdb_KPPXLu5zjPw,5503
|
17
|
+
geolysis/bearing_capacity/ubc/_vesic_ubc.py,sha256=a8TvlJCZ4AMU_YEVE0DEXb_Eo75uVOtOLDg-mC3zYlc,7034
|
18
|
+
geolysis-0.10.0.dist-info/licenses/LICENSE.txt,sha256=ap6sMs3lT7ICbEXBhgihwH1BTCVcjmCQkIkwVnil1Ak,1065
|
19
|
+
geolysis-0.10.0.dist-info/METADATA,sha256=l5am6GR_xC1gpLUEVO-Ase9kCGXrBxocPLiVcMtkXYg,6611
|
20
|
+
geolysis-0.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
21
|
+
geolysis-0.10.0.dist-info/top_level.txt,sha256=9mnQgOaCRr11dtXff8X-q3FfXjRONd6kHseSy5q2y8g,9
|
22
|
+
geolysis-0.10.0.dist-info/RECORD,,
|
@@ -1,137 +0,0 @@
|
|
1
|
-
"""This package provides a factory function and utilities for creating
|
2
|
-
allowable bearing capacity calculations using methods like Bowles, Meyerhof,
|
3
|
-
and Terzaghi for various foundation types and shapes.
|
4
|
-
"""
|
5
|
-
import enum
|
6
|
-
from typing import Optional
|
7
|
-
|
8
|
-
from geolysis.foundation import FoundationType, Shape, create_foundation
|
9
|
-
from geolysis.utils import enum_repr, inf
|
10
|
-
from geolysis.utils.exceptions import ErrorMsg, ValidationError
|
11
|
-
|
12
|
-
from ._core import AllowableBearingCapacity
|
13
|
-
from .bowles_abc import BowlesABC4MatFoundation, BowlesABC4PadFoundation
|
14
|
-
from .meyerhof_abc import MeyerhofABC4MatFoundation, MeyerhofABC4PadFoundation
|
15
|
-
from .terzaghi_abc import TerzaghiABC4MatFoundation, TerzaghiABC4PadFoundation
|
16
|
-
|
17
|
-
|
18
|
-
@enum_repr
|
19
|
-
class ABCType(enum.StrEnum):
|
20
|
-
"""Enumeration of available allowable bearing capacity types."""
|
21
|
-
BOWLES = enum.auto()
|
22
|
-
MEYERHOF = enum.auto()
|
23
|
-
TERZAGHI = enum.auto()
|
24
|
-
|
25
|
-
|
26
|
-
abc_classes = {
|
27
|
-
ABCType.BOWLES: {
|
28
|
-
FoundationType.PAD: BowlesABC4PadFoundation,
|
29
|
-
FoundationType.MAT: BowlesABC4MatFoundation,
|
30
|
-
},
|
31
|
-
ABCType.MEYERHOF: {
|
32
|
-
FoundationType.PAD: MeyerhofABC4PadFoundation,
|
33
|
-
FoundationType.MAT: MeyerhofABC4MatFoundation,
|
34
|
-
},
|
35
|
-
ABCType.TERZAGHI: {
|
36
|
-
FoundationType.PAD: TerzaghiABC4PadFoundation,
|
37
|
-
FoundationType.MAT: TerzaghiABC4MatFoundation,
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
|
42
|
-
def create_allowable_bearing_capacity(corrected_spt_n_value: float,
|
43
|
-
tol_settlement: float,
|
44
|
-
depth: float,
|
45
|
-
width: float,
|
46
|
-
length: Optional[float] = None,
|
47
|
-
eccentricity: float = 0.0,
|
48
|
-
ground_water_level: float = inf,
|
49
|
-
shape: Shape | str = Shape.SQUARE,
|
50
|
-
foundation_type: FoundationType | str =
|
51
|
-
FoundationType.PAD,
|
52
|
-
abc_type: Optional[
|
53
|
-
ABCType | str] = None,
|
54
|
-
) -> AllowableBearingCapacity:
|
55
|
-
""" A factory function that encapsulate the creation of allowable bearing
|
56
|
-
capacities.
|
57
|
-
|
58
|
-
:param corrected_spt_n_value: The corrected SPT N-value.
|
59
|
-
:type corrected_spt_n_value: float
|
60
|
-
|
61
|
-
:param tol_settlement: Tolerable settlement of foundation (mm).
|
62
|
-
:type tol_settlement: float
|
63
|
-
|
64
|
-
:param depth: Depth of foundation (m).
|
65
|
-
:type depth: float
|
66
|
-
|
67
|
-
:param width: Width of foundation footing (m).
|
68
|
-
:type width: float
|
69
|
-
|
70
|
-
:param length: Length of foundation footing (m).
|
71
|
-
:type length: float, optional
|
72
|
-
|
73
|
-
:param eccentricity: The deviation of the foundation load from the center
|
74
|
-
of gravity of the foundation footing (m), defaults to
|
75
|
-
0.0. This means that the foundation load aligns with
|
76
|
-
the center of gravity of the foundation footing.
|
77
|
-
:type eccentricity: float, optional
|
78
|
-
|
79
|
-
:param ground_water_level: Depth of water below ground level (m).
|
80
|
-
:type ground_water_level: float, optional
|
81
|
-
|
82
|
-
:param shape: Shape of foundation footing, defaults to
|
83
|
-
:py:enum:mem:`~geolysis.foundation.Shape.SQUARE`.
|
84
|
-
:type shape: str, optional
|
85
|
-
|
86
|
-
:param foundation_type: Type of foundation, defaults to "pad".
|
87
|
-
:type foundation_type: FoundationType | str, optional
|
88
|
-
|
89
|
-
:param abc_type: Type of allowable bearing capacity calculation to apply.
|
90
|
-
Available values can be found in :py:enum:`ABCType`,
|
91
|
-
defaults to None.
|
92
|
-
:type abc_type: ABCType | str, optional
|
93
|
-
|
94
|
-
:raises ValueError: Raised if ``abc_type`` or ``foundation_type`` is not
|
95
|
-
supported.
|
96
|
-
:raises ValueError: Raised when ``length`` is not provided for a rectangular
|
97
|
-
footing.
|
98
|
-
:raises ValueError: Raised if an invalid footing ``shape`` is provided.
|
99
|
-
"""
|
100
|
-
|
101
|
-
msg = ErrorMsg(param_name="abc_type",
|
102
|
-
param_value=abc_type,
|
103
|
-
symbol="in",
|
104
|
-
param_value_bound=list(ABCType))
|
105
|
-
|
106
|
-
if abc_type is None:
|
107
|
-
raise ValidationError(msg)
|
108
|
-
|
109
|
-
try:
|
110
|
-
abc_type = ABCType(str(abc_type).casefold())
|
111
|
-
except ValueError as e:
|
112
|
-
raise ValidationError(msg) from e
|
113
|
-
|
114
|
-
try:
|
115
|
-
foundation_type = FoundationType(str(foundation_type).casefold())
|
116
|
-
except ValueError as e:
|
117
|
-
msg = ErrorMsg(param_name="foundation_type",
|
118
|
-
param_value=foundation_type,
|
119
|
-
symbol="in",
|
120
|
-
param_value_bound=list(FoundationType))
|
121
|
-
raise ValidationError(msg) from e
|
122
|
-
|
123
|
-
# exception from create_foundation will automaatically propagate
|
124
|
-
# no need to catch and handle it.
|
125
|
-
fnd_size = create_foundation(depth=depth,
|
126
|
-
width=width,
|
127
|
-
length=length,
|
128
|
-
eccentricity=eccentricity,
|
129
|
-
ground_water_level=ground_water_level,
|
130
|
-
foundation_type=foundation_type,
|
131
|
-
shape=shape)
|
132
|
-
|
133
|
-
abc_class = abc_classes[abc_type][fnd_size.foundation_type]
|
134
|
-
abc = abc_class(corrected_spt_n_value=corrected_spt_n_value,
|
135
|
-
tol_settlement=tol_settlement,
|
136
|
-
foundation_size=fnd_size)
|
137
|
-
return abc
|
@@ -1,96 +0,0 @@
|
|
1
|
-
from geolysis.foundation import FoundationSize
|
2
|
-
from geolysis.utils import round_
|
3
|
-
|
4
|
-
from ._core import AllowableBearingCapacity
|
5
|
-
|
6
|
-
|
7
|
-
class BowlesABC4PadFoundation(AllowableBearingCapacity):
|
8
|
-
r"""Allowable bearing capacity for pad foundation on cohesionless soils
|
9
|
-
according to ``Bowles (1997)``.
|
10
|
-
|
11
|
-
:Equation:
|
12
|
-
|
13
|
-
.. math::
|
14
|
-
|
15
|
-
q_a(kPa) &= 19.16(N_1)_{55} f_d\left(\dfrac{S}{25.4}\right),
|
16
|
-
\ B \ \le \ 1.2m
|
17
|
-
|
18
|
-
q_a(kPa) &= 11.98(N_1)_{55}\left(\dfrac{3.28B + 1}{3.28B} \right)^2
|
19
|
-
f_d \left(\dfrac{S}{25.4}\right), \ B \ \gt 1.2m
|
20
|
-
|
21
|
-
f_d &= 1 + 0.33 \cdot \frac{D_f}{B} \le 1.33
|
22
|
-
|
23
|
-
=================== ====================================== ===========
|
24
|
-
Symbol Description Unit
|
25
|
-
=================== ====================================== ===========
|
26
|
-
:math:`q_a` Allowable bearing capacity :math:`kPa`
|
27
|
-
:math:`(N_1)_{55}` Corrected SPT N-value —
|
28
|
-
:math:`f_d` Depth factor —
|
29
|
-
:math:`S` Tolerable settlement :math:`mm`
|
30
|
-
:math:`B` Width of foundation footing :math:`m`
|
31
|
-
:math:`D_f` Depth of foundation footing :math:`m`
|
32
|
-
=================== ====================================== ===========
|
33
|
-
"""
|
34
|
-
|
35
|
-
def __init__(self, corrected_spt_n_value: float,
|
36
|
-
tol_settlement: float,
|
37
|
-
foundation_size: FoundationSize) -> None:
|
38
|
-
"""
|
39
|
-
:param corrected_spt_n_value: Statistical average of corrected SPT
|
40
|
-
N-value (55% energy with overburden
|
41
|
-
pressure correction) within the foundation
|
42
|
-
influence zone i.e ``0.5B`` to ``2B``.
|
43
|
-
:type corrected_spt_n_value: float
|
44
|
-
|
45
|
-
:param tol_settlement: Tolerable settlement of foundation (mm).
|
46
|
-
:type tol_settlement: float
|
47
|
-
|
48
|
-
:param foundation_size: Size of the foundation.
|
49
|
-
:type foundation_size: FoundationSize
|
50
|
-
"""
|
51
|
-
super().__init__(corrected_spt_n_value=corrected_spt_n_value,
|
52
|
-
tol_settlement=tol_settlement,
|
53
|
-
foundation_size=foundation_size)
|
54
|
-
|
55
|
-
@round_(ndigits=2)
|
56
|
-
def bearing_capacity(self) -> float:
|
57
|
-
"""Calculate the allowable bearing capacity of the pad foundation."""
|
58
|
-
n_corr = self.corrected_spt_n_value
|
59
|
-
width = self.foundation_size.width
|
60
|
-
|
61
|
-
if width <= 1.2:
|
62
|
-
return 19.16 * n_corr * self._fd() * self._sr()
|
63
|
-
|
64
|
-
return (11.98 * n_corr * ((3.28 * width + 1) / (3.28 * width)) ** 2
|
65
|
-
* self._fd() * self._sr())
|
66
|
-
|
67
|
-
|
68
|
-
class BowlesABC4MatFoundation(BowlesABC4PadFoundation):
|
69
|
-
r"""Allowable bearing capacity for mat foundation on cohesionless soils
|
70
|
-
according to ``Bowles (1997)``.
|
71
|
-
|
72
|
-
:Equation:
|
73
|
-
|
74
|
-
.. math::
|
75
|
-
|
76
|
-
q_a(kPa) &= 11.98(N_1)_{55}f_d\left(\dfrac{S}{25.4}\right)
|
77
|
-
|
78
|
-
f_d &= 1 + 0.33 \cdot \frac{D_f}{B} \le 1.33
|
79
|
-
|
80
|
-
=================== ====================================== ===========
|
81
|
-
Symbol Description Unit
|
82
|
-
=================== ====================================== ===========
|
83
|
-
:math:`q_a` Allowable bearing capacity :math:`kPa`
|
84
|
-
:math:`(N_1)_{55}` Corrected SPT N-value —
|
85
|
-
:math:`f_d` Depth factor —
|
86
|
-
:math:`S` Tolerable settlement :math:`mm`
|
87
|
-
:math:`B` Width of foundation footing :math:`m`
|
88
|
-
:math:`D_f` Depth of foundation footing :math:`m`
|
89
|
-
=================== ====================================== ===========
|
90
|
-
"""
|
91
|
-
|
92
|
-
@round_(ndigits=2)
|
93
|
-
def bearing_capacity(self) -> float:
|
94
|
-
"""Calculate the allowable bearing capacity of the mat foundation."""
|
95
|
-
n_corr = self.corrected_spt_n_value
|
96
|
-
return 11.98 * n_corr * self._fd() * self._sr()
|
@@ -1,96 +0,0 @@
|
|
1
|
-
from geolysis.foundation import FoundationSize
|
2
|
-
from geolysis.utils import round_
|
3
|
-
|
4
|
-
from ._core import AllowableBearingCapacity
|
5
|
-
|
6
|
-
|
7
|
-
class MeyerhofABC4PadFoundation(AllowableBearingCapacity):
|
8
|
-
r"""Allowable bearing capacity for pad foundation on cohesionless soils
|
9
|
-
according to ``Meyerhof (1956)``.
|
10
|
-
|
11
|
-
:Equation:
|
12
|
-
|
13
|
-
.. math::
|
14
|
-
|
15
|
-
q_a(kPa) &= 12N f_d\left(\dfrac{S}{25.4}\right), \ B \ \le 1.2m
|
16
|
-
|
17
|
-
q_a(kPa) &= 8N\left(\dfrac{3.28B + 1}{3.28B} \right)^2 f_d\left(
|
18
|
-
\dfrac{S}{25.4}\right), \ B \ \gt 1.2m
|
19
|
-
|
20
|
-
f_d &= 1 + 0.33 \cdot \frac{D_f}{B} \le 1.33
|
21
|
-
|
22
|
-
=================== ====================================== ===========
|
23
|
-
Symbol Description Unit
|
24
|
-
=================== ====================================== ===========
|
25
|
-
:math:`q_a` Allowable bearing capacity :math:`kPa`
|
26
|
-
:math:`N` Corrected SPT N-value —
|
27
|
-
:math:`f_d` Depth factor —
|
28
|
-
:math:`S` Tolerable settlement :math:`mm`
|
29
|
-
:math:`B` Width of foundation footing :math:`m`
|
30
|
-
:math:`D_f` Depth of foundation footing :math:`m`
|
31
|
-
=================== ====================================== ===========
|
32
|
-
"""
|
33
|
-
|
34
|
-
def __init__(self, corrected_spt_n_value: float,
|
35
|
-
tol_settlement: float,
|
36
|
-
foundation_size: FoundationSize):
|
37
|
-
"""
|
38
|
-
:param corrected_spt_n_value: Average uncorrected SPT N-value (60%
|
39
|
-
energy with dilatancy (water) correction
|
40
|
-
if applicable) within the foundation
|
41
|
-
influence zone i.e :math:`D_f` to
|
42
|
-
:math:`D_f + 2B`.
|
43
|
-
:type corrected_spt_n_value: float
|
44
|
-
|
45
|
-
:param tol_settlement: Tolerable settlement of foundation (mm).
|
46
|
-
:type tol_settlement: float
|
47
|
-
|
48
|
-
:param foundation_size: Size of the foundation.
|
49
|
-
:type foundation_size: FoundationSize
|
50
|
-
"""
|
51
|
-
super().__init__(corrected_spt_n_value=corrected_spt_n_value,
|
52
|
-
tol_settlement=tol_settlement,
|
53
|
-
foundation_size=foundation_size)
|
54
|
-
|
55
|
-
@round_(ndigits=2)
|
56
|
-
def bearing_capacity(self):
|
57
|
-
"""Calculates the allowable bearing capacity of the pad foundation."""
|
58
|
-
n_corr = self.corrected_spt_n_value
|
59
|
-
width = self.foundation_size.width
|
60
|
-
|
61
|
-
if width <= 1.2:
|
62
|
-
return 12 * n_corr * self._fd() * self._sr()
|
63
|
-
|
64
|
-
return (8 * n_corr * ((3.28 * width + 1) / (3.28 * width)) ** 2
|
65
|
-
* self._fd() * self._sr())
|
66
|
-
|
67
|
-
|
68
|
-
class MeyerhofABC4MatFoundation(MeyerhofABC4PadFoundation):
|
69
|
-
r"""Allowable bearing capacity for mat foundation on cohesionless soils
|
70
|
-
according to ``Meyerhof (1956)``.
|
71
|
-
|
72
|
-
:Equation:
|
73
|
-
|
74
|
-
.. math::
|
75
|
-
|
76
|
-
q_a(kPa) &= 8 N f_d\left(\dfrac{S}{25.4}\right)
|
77
|
-
|
78
|
-
f_d &= 1 + 0.33 \cdot \frac{D_f}{B} \le 1.33
|
79
|
-
|
80
|
-
=================== ====================================== ===========
|
81
|
-
Symbol Description Unit
|
82
|
-
=================== ====================================== ===========
|
83
|
-
:math:`q_a` Allowable bearing capacity :math:`kPa`
|
84
|
-
:math:`N` Corrected SPT N-value —
|
85
|
-
:math:`f_d` Depth factor —
|
86
|
-
:math:`S` Tolerable settlement :math:`mm`
|
87
|
-
:math:`B` Width of foundation footing :math:`m`
|
88
|
-
:math:`D_f` Depth of foundation footing :math:`m`
|
89
|
-
=================== ====================================== ===========
|
90
|
-
"""
|
91
|
-
|
92
|
-
@round_(ndigits=2)
|
93
|
-
def bearing_capacity(self):
|
94
|
-
"""Calculate the allowable bearing capacity of the mat foundation."""
|
95
|
-
n_corr = self.corrected_spt_n_value
|
96
|
-
return 8 * n_corr * self._fd() * self._sr()
|