geolysis 0.12.0__tar.gz → 0.14.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.
Files changed (33) hide show
  1. {geolysis-0.12.0 → geolysis-0.14.0}/PKG-INFO +2 -2
  2. {geolysis-0.12.0 → geolysis-0.14.0}/README.md +1 -1
  3. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/__init__.py +1 -1
  4. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/abc/_cohl/__init__.py +31 -43
  5. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/abc/_cohl/_core.py +15 -9
  6. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/abc/_cohl/terzaghi_abc.py +5 -5
  7. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/ubc/__init__.py +21 -31
  8. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/ubc/_core.py +25 -20
  9. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/ubc/_terzaghi_ubc.py +17 -13
  10. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/ubc/_vesic_ubc.py +19 -4
  11. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/foundation.py +69 -73
  12. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/soil_classifier.py +31 -33
  13. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/spt.py +62 -43
  14. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/utils/__init__.py +2 -3
  15. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/utils/math.py +3 -1
  16. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis.egg-info/PKG-INFO +2 -2
  17. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis.egg-info/SOURCES.txt +0 -1
  18. {geolysis-0.12.0 → geolysis-0.14.0}/tests/test_foundation.py +4 -7
  19. geolysis-0.12.0/geolysis/bearing_capacity/ubc/_hansen_ubc.py +0 -200
  20. {geolysis-0.12.0 → geolysis-0.14.0}/LICENSE.txt +0 -0
  21. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/__init__.py +0 -0
  22. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/abc/__init__.py +0 -0
  23. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/abc/_cohl/bowles_abc.py +0 -0
  24. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis/bearing_capacity/abc/_cohl/meyerhof_abc.py +0 -0
  25. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis.egg-info/dependency_links.txt +0 -0
  26. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis.egg-info/requires.txt +0 -0
  27. {geolysis-0.12.0 → geolysis-0.14.0}/geolysis.egg-info/top_level.txt +0 -0
  28. {geolysis-0.12.0 → geolysis-0.14.0}/pyproject.toml +0 -0
  29. {geolysis-0.12.0 → geolysis-0.14.0}/setup.cfg +0 -0
  30. {geolysis-0.12.0 → geolysis-0.14.0}/setup.py +0 -0
  31. {geolysis-0.12.0 → geolysis-0.14.0}/tests/test_docs.py +0 -0
  32. {geolysis-0.12.0 → geolysis-0.14.0}/tests/test_soil_classifier.py +0 -0
  33. {geolysis-0.12.0 → geolysis-0.14.0}/tests/test_spt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geolysis
3
- Version: 0.12.0
3
+ Version: 0.14.0
4
4
  Summary: geolysis is an opensource software for geotechnical engineering analysis and modeling.
5
5
  Author-email: Patrick Boateng <boatengpato.pb@gmail.com>
6
6
  License: MIT License
@@ -161,7 +161,7 @@ These are the main components of the project structure
161
161
  >>> clf = aashto_clf.classify()
162
162
  >>> clf.symbol
163
163
  'A-6(4)'
164
- >>> clf.symbol_no_grp_idx
164
+ >>> clf.symbol_no_group_idx
165
165
  'A-6'
166
166
  >>> clf.group_index
167
167
  '4'
@@ -128,7 +128,7 @@ These are the main components of the project structure
128
128
  >>> clf = aashto_clf.classify()
129
129
  >>> clf.symbol
130
130
  'A-6(4)'
131
- >>> clf.symbol_no_grp_idx
131
+ >>> clf.symbol_no_group_idx
132
132
  'A-6'
133
133
  >>> clf.group_index
134
134
  '4'
@@ -1,5 +1,5 @@
1
1
  from . import bearing_capacity, foundation, soil_classifier, spt
2
2
 
3
- __version__ = "0.12.0"
3
+ __version__ = "0.14.0"
4
4
 
5
5
  __all__ = ["foundation", "soil_classifier", "spt", "bearing_capacity"]
@@ -1,10 +1,11 @@
1
1
  import enum
2
2
  from typing import Optional, Annotated
3
3
 
4
- from func_validator import MustBeMemberOf, validate_func_args
4
+ from func_validator import MustBeMemberOf, validate_params
5
5
 
6
6
  from geolysis.foundation import FoundationType, Shape, create_foundation
7
7
  from geolysis.utils import AbstractStrEnum, inf
8
+
8
9
  from ._core import AllowableBearingCapacity
9
10
  from .bowles_abc import BowlesABC4MatFoundation, BowlesABC4PadFoundation
10
11
  from .meyerhof_abc import MeyerhofABC4MatFoundation, MeyerhofABC4PadFoundation
@@ -16,7 +17,7 @@ class ABCType(AbstractStrEnum):
16
17
 
17
18
  Each member represents a different method for determining
18
19
  the allowable bearing capacity of soil.
19
- """
20
+ """
20
21
 
21
22
  BOWLES = enum.auto()
22
23
  """Bowles's method for calculating allowable bearing capacity"""
@@ -28,20 +29,34 @@ class ABCType(AbstractStrEnum):
28
29
  """Terzaghi's method for calculating allowable bearing capacity"""
29
30
 
30
31
 
31
- @validate_func_args
32
+ abc_classes = {
33
+ ABCType.BOWLES: {
34
+ FoundationType.PAD: BowlesABC4PadFoundation,
35
+ FoundationType.MAT: BowlesABC4MatFoundation,
36
+ },
37
+ ABCType.MEYERHOF: {
38
+ FoundationType.PAD: MeyerhofABC4PadFoundation,
39
+ FoundationType.MAT: MeyerhofABC4MatFoundation,
40
+ },
41
+ ABCType.TERZAGHI: {
42
+ FoundationType.PAD: TerzaghiABC4PadFoundation,
43
+ FoundationType.MAT: TerzaghiABC4MatFoundation,
44
+ },
45
+ }
46
+
47
+
48
+ @validate_params
32
49
  def create_abc_4_cohesionless_soils(
33
- corrected_spt_n_value: float,
34
- tol_settlement: float,
35
- depth: float,
36
- width: float,
37
- length: Optional[float] = None,
38
- eccentricity: float = 0.0,
39
- ground_water_level: float = inf,
40
- shape: Shape | str = "square",
41
- foundation_type: Annotated[
42
- FoundationType | str, MustBeMemberOf(FoundationType)
43
- ] = "pad",
44
- abc_type: Annotated[ABCType | str, MustBeMemberOf(ABCType)] = "bowles",
50
+ corrected_spt_n_value: float,
51
+ tol_settlement: float,
52
+ depth: float,
53
+ width: float,
54
+ length: Optional[float] = None,
55
+ eccentricity: float = 0.0,
56
+ ground_water_level: float = inf,
57
+ shape: Shape | str = "square",
58
+ foundation_type: FoundationType | str = "pad",
59
+ abc_type: Annotated[ABCType | str, MustBeMemberOf(ABCType)] = "bowles",
45
60
  ) -> AllowableBearingCapacity:
46
61
  r"""A factory function that encapsulate the creation of allowable
47
62
  bearing capacities.
@@ -58,13 +73,6 @@ def create_abc_4_cohesionless_soils(
58
73
  :param foundation_type: Type of foundation.
59
74
  :param abc_type: Type of allowable bearing capacity calculation to
60
75
  apply.
61
-
62
- :raises ValidationError: Raised if `abc_type` or `foundation_type`
63
- is not supported.
64
- :raises ValidationError: Raised if an invalid footing `shape` is
65
- provided.
66
- :raises ValueError: Raised when `length` is not provided for a
67
- rectangular footing.
68
76
  """
69
77
  abc_type = ABCType(abc_type)
70
78
  foundation_type = FoundationType(foundation_type)
@@ -80,30 +88,10 @@ def create_abc_4_cohesionless_soils(
80
88
  foundation_type=foundation_type,
81
89
  shape=shape,
82
90
  )
91
+ abc_class = abc_classes[abc_type][foundation_type]
83
92
 
84
- abc_class = _get_allowable_bearing_capacity(abc_type,
85
- fnd_size.foundation_type)
86
93
  return abc_class(
87
94
  corrected_spt_n_value=corrected_spt_n_value,
88
95
  tol_settlement=tol_settlement,
89
96
  foundation_size=fnd_size,
90
97
  )
91
-
92
-
93
- def _get_allowable_bearing_capacity(abc_type: ABCType,
94
- foundation_type: FoundationType):
95
- abc_classes = {
96
- ABCType.BOWLES: {
97
- FoundationType.PAD: BowlesABC4PadFoundation,
98
- FoundationType.MAT: BowlesABC4MatFoundation,
99
- },
100
- ABCType.MEYERHOF: {
101
- FoundationType.PAD: MeyerhofABC4PadFoundation,
102
- FoundationType.MAT: MeyerhofABC4MatFoundation,
103
- },
104
- ABCType.TERZAGHI: {
105
- FoundationType.PAD: TerzaghiABC4PadFoundation,
106
- FoundationType.MAT: TerzaghiABC4MatFoundation,
107
- },
108
- }
109
- return abc_classes[abc_type][foundation_type]
@@ -3,7 +3,7 @@ from dataclasses import dataclass
3
3
  from typing import Annotated
4
4
 
5
5
  from func_validator import (
6
- validate_func_args,
6
+ validate_params,
7
7
  MustBeNonNegative,
8
8
  MustBeLessThanOrEqual,
9
9
  )
@@ -40,9 +40,12 @@ class AllowableBearingCapacity(ABC):
40
40
  return self._corrected_spt_n_value
41
41
 
42
42
  @corrected_spt_n_value.setter
43
- @validate_func_args
44
- def corrected_spt_n_value(self, val: Annotated[float, MustBeNonNegative]):
45
- self._corrected_spt_n_value = val
43
+ @validate_params
44
+ def corrected_spt_n_value(
45
+ self,
46
+ corrected_spt_n_value: Annotated[float, MustBeNonNegative],
47
+ ):
48
+ self._corrected_spt_n_value = corrected_spt_n_value
46
49
 
47
50
  @property
48
51
  def tol_settlement(self) -> float:
@@ -50,7 +53,7 @@ class AllowableBearingCapacity(ABC):
50
53
  return self._tol_settlement
51
54
 
52
55
  @tol_settlement.setter
53
- @validate_func_args
56
+ @validate_params
54
57
  def tol_settlement(
55
58
  self,
56
59
  tol_settlement: Annotated[float, MustBeLessThanOrEqual(25.4)],
@@ -68,8 +71,7 @@ class AllowableBearingCapacity(ABC):
68
71
  return min(1.0 + 0.33 * depth / width, 1.33)
69
72
 
70
73
  def bearing_capacity_results(self) -> AllowableBearingCapacityResult:
71
- """Return a dictionary of bearing capacity results with
72
- intermediate calculations.
74
+ """Return bearing capacity results with intermediate calculations.
73
75
 
74
76
  !!! info "Added in v0.11.0"
75
77
  """
@@ -79,12 +81,16 @@ class AllowableBearingCapacity(ABC):
79
81
  )
80
82
 
81
83
  @round_(ndigits=1)
82
- def allowable_bearing_capacity(self):
84
+ def allowable_bearing_capacity(self) -> float:
83
85
  """Calculates the allowable bearing capacity.
84
86
 
85
87
  !!! info "Added in v0.12.0"
86
88
  """
87
89
  return self._bearing_capacity()
88
90
 
91
+ def allowable_applied_load(self) -> float:
92
+ """Calculate the allowable applied load on the foundation."""
93
+ return self._bearing_capacity() * self.foundation_size.foundation_area()
94
+
89
95
  @abstractmethod
90
- def _bearing_capacity(self): ...
96
+ def _bearing_capacity(self) -> float: ...
@@ -1,7 +1,7 @@
1
1
  from geolysis.foundation import Foundation
2
- from geolysis.utils import round_
2
+ from geolysis.utils import round_, isinf
3
3
 
4
- from ._core import AllowableBearingCapacity
4
+ from ._core import AllowableBearingCapacity, AllowableBearingCapacityResult
5
5
 
6
6
 
7
7
  class TerzaghiABC4PadFoundation(AllowableBearingCapacity):
@@ -46,7 +46,7 @@ class TerzaghiABC4PadFoundation(AllowableBearingCapacity):
46
46
  width = self.foundation_size.width
47
47
  water_level = self.foundation_size.ground_water_level
48
48
 
49
- if water_level is None:
49
+ if isinf(water_level):
50
50
  return 2.0
51
51
 
52
52
  if water_level <= depth:
@@ -75,9 +75,9 @@ class TerzaghiABC4PadFoundation(AllowableBearingCapacity):
75
75
  * self._sr()
76
76
  )
77
77
 
78
- def bearing_capacity_results(self) -> dict:
78
+ def bearing_capacity_results(self) -> AllowableBearingCapacityResult:
79
79
  res = super().bearing_capacity_results()
80
- res["water_correction_factor"] = self._cw()
80
+ res.water_correction_factor = self._cw()
81
81
  return res
82
82
 
83
83
 
@@ -1,12 +1,12 @@
1
1
  import enum
2
2
  from typing import Optional, Annotated
3
3
 
4
- from func_validator import MustBeMemberOf, validate_func_args
4
+ from func_validator import MustBeMemberOf, validate_params
5
5
 
6
6
  from geolysis.foundation import Shape, create_foundation
7
- from geolysis.utils import AbstractStrEnum
7
+ from geolysis.utils import AbstractStrEnum, inf
8
+
8
9
  from ._core import UltimateBearingCapacity
9
- from ._hansen_ubc import HansenUltimateBearingCapacity
10
10
  from ._terzaghi_ubc import (
11
11
  TerzaghiUBC4CircularFooting,
12
12
  TerzaghiUBC4RectangularFooting,
@@ -20,7 +20,6 @@ __all__ = [
20
20
  "TerzaghiUBC4CircularFooting",
21
21
  "TerzaghiUBC4RectangularFooting",
22
22
  "TerzaghiUBC4SquareFooting",
23
- "HansenUltimateBearingCapacity",
24
23
  "VesicUltimateBearingCapacity",
25
24
  "UBCType",
26
25
  "create_ubc_4_all_soil_types",
@@ -34,9 +33,6 @@ class UBCType(AbstractStrEnum):
34
33
  the ultimate bearing capacity of soil.
35
34
  """
36
35
 
37
- HANSEN = enum.auto()
38
- """Hansen's method for calculating ultimate bearing capacity."""
39
-
40
36
  TERZAGHI = enum.auto()
41
37
  """Terzaghi's method for calculating ultimate bearing capacity."""
42
38
 
@@ -44,7 +40,18 @@ class UBCType(AbstractStrEnum):
44
40
  """Vesic's method for calculating ultimate bearing capacity."""
45
41
 
46
42
 
47
- @validate_func_args
43
+ ubc_classes = {
44
+ UBCType.TERZAGHI: {
45
+ Shape.STRIP: TerzaghiUBC4StripFooting,
46
+ Shape.CIRCLE: TerzaghiUBC4CircularFooting,
47
+ Shape.SQUARE: TerzaghiUBC4SquareFooting,
48
+ Shape.RECTANGLE: TerzaghiUBC4RectangularFooting,
49
+ },
50
+ UBCType.VESIC: VesicUltimateBearingCapacity,
51
+ }
52
+
53
+
54
+ @validate_params
48
55
  def create_ubc_4_all_soil_types(
49
56
  friction_angle: float,
50
57
  cohesion: float,
@@ -54,7 +61,7 @@ def create_ubc_4_all_soil_types(
54
61
  length: Optional[float] = None,
55
62
  saturated_unit_wgt: float = 20.5,
56
63
  eccentricity: float = 0.0,
57
- ground_water_level: Optional[float] = None,
64
+ ground_water_level: Optional[float] = inf,
58
65
  load_angle: float = 0.0,
59
66
  apply_local_shear: bool = False,
60
67
  shape: Shape | str = "square",
@@ -86,8 +93,8 @@ def create_ubc_4_all_soil_types(
86
93
  :raises ValidationError: Raised if ubc_type is not supported.
87
94
  :raises ValidationError: Raised if an invalid footing shape is
88
95
  provided.
89
- :raises ValueError: Raised when length is not provided for a
90
- rectangular footing.
96
+ :raises ValidationError: Raised when length is not provided for a
97
+ rectangular footing.
91
98
  """
92
99
  ubc_type = UBCType(ubc_type)
93
100
 
@@ -102,9 +109,10 @@ def create_ubc_4_all_soil_types(
102
109
  ground_water_level=ground_water_level,
103
110
  shape=shape,
104
111
  )
112
+ ubc_class = ubc_classes[ubc_type]
105
113
 
106
- ubc_class = _get_ultimate_bearing_capacity(ubc_type,
107
- fnd_size.footing_shape)
114
+ if ubc_type == UBCType.TERZAGHI:
115
+ ubc_class = ubc_classes[ubc_type][fnd_size.footing_shape]
108
116
 
109
117
  return ubc_class(
110
118
  friction_angle=friction_angle,
@@ -114,21 +122,3 @@ def create_ubc_4_all_soil_types(
114
122
  foundation_size=fnd_size,
115
123
  apply_local_shear=apply_local_shear,
116
124
  )
117
-
118
-
119
- def _get_ultimate_bearing_capacity(ubc_type: UBCType, foundation_shape: Shape):
120
- ubc_classes = {
121
- UBCType.HANSEN: HansenUltimateBearingCapacity,
122
- UBCType.TERZAGHI: {
123
- Shape.STRIP: TerzaghiUBC4StripFooting,
124
- Shape.CIRCLE: TerzaghiUBC4CircularFooting,
125
- Shape.SQUARE: TerzaghiUBC4SquareFooting,
126
- Shape.RECTANGLE: TerzaghiUBC4RectangularFooting,
127
- },
128
- UBCType.VESIC: VesicUltimateBearingCapacity,
129
- }
130
- if ubc_type == UBCType.TERZAGHI:
131
- ubc_class = ubc_classes[ubc_type][foundation_shape]
132
- else:
133
- ubc_class = ubc_classes[ubc_type]
134
- return ubc_class
@@ -1,15 +1,15 @@
1
1
  from abc import ABC, abstractmethod
2
2
  from dataclasses import dataclass
3
- from typing import Annotated, Optional
3
+ from typing import Annotated
4
4
 
5
5
  from func_validator import (
6
- validate_func_args,
6
+ validate_params,
7
7
  MustBeNonNegative,
8
8
  MustBePositive,
9
9
  )
10
10
 
11
11
  from geolysis.foundation import Foundation
12
- from geolysis.utils import arctandeg, round_, tandeg
12
+ from geolysis.utils import arctandeg, round_, tandeg, isinf
13
13
 
14
14
 
15
15
  @dataclass(frozen=True, slots=True)
@@ -80,14 +80,17 @@ class UltimateBearingCapacity(ABC):
80
80
  return self._friction_angle
81
81
 
82
82
  @friction_angle.setter
83
- @validate_func_args
84
- def friction_angle(self, val: Annotated[float, MustBeNonNegative]):
85
- self._friction_angle = val
83
+ @validate_params
84
+ def friction_angle(
85
+ self,
86
+ friction_angle: Annotated[float, MustBeNonNegative],
87
+ ):
88
+ self._friction_angle = friction_angle
86
89
 
87
90
  @property
88
91
  def cohesion(self) -> float:
89
- r"""Return cohesion for local shear in the case of local shear failure
90
- or general shear in the case of general shear failure.
92
+ r"""Return cohesion for local shear in the case of local shear
93
+ failure or general shear in the case of general shear failure.
91
94
 
92
95
  In the case of local shear failure:
93
96
 
@@ -98,9 +101,9 @@ class UltimateBearingCapacity(ABC):
98
101
  return self._cohesion
99
102
 
100
103
  @cohesion.setter
101
- @validate_func_args
102
- def cohesion(self, val: Annotated[float, MustBeNonNegative]):
103
- self._cohesion = val
104
+ @validate_params
105
+ def cohesion(self, cohesion: Annotated[float, MustBeNonNegative]):
106
+ self._cohesion = cohesion
104
107
 
105
108
  @property
106
109
  def moist_unit_wgt(self) -> float:
@@ -108,9 +111,9 @@ class UltimateBearingCapacity(ABC):
108
111
  return self._moist_unit_wgt
109
112
 
110
113
  @moist_unit_wgt.setter
111
- @validate_func_args
112
- def moist_unit_wgt(self, val: Annotated[float, MustBePositive]):
113
- self._moist_unit_wgt = val
114
+ @validate_params
115
+ def moist_unit_wgt(self, moist_unit_wgt: Annotated[float, MustBePositive]):
116
+ self._moist_unit_wgt = moist_unit_wgt
114
117
 
115
118
  @property
116
119
  def saturated_unit_wgt(self) -> float:
@@ -118,9 +121,12 @@ class UltimateBearingCapacity(ABC):
118
121
  return self._saturated_unit_wgt
119
122
 
120
123
  @saturated_unit_wgt.setter
121
- @validate_func_args
122
- def saturated_unit_wgt(self, val: Annotated[float, MustBePositive]):
123
- self._saturated_unit_wgt = val
124
+ @validate_params
125
+ def saturated_unit_wgt(
126
+ self,
127
+ saturated_unit_wgt: Annotated[float, MustBePositive],
128
+ ):
129
+ self._saturated_unit_wgt = saturated_unit_wgt
124
130
 
125
131
  @property
126
132
  def load_angle(self):
@@ -169,10 +175,10 @@ class UltimateBearingCapacity(ABC):
169
175
  def _surcharge_term(self) -> float:
170
176
  depth = self.foundation_size.depth
171
177
  water_level = self.foundation_size.ground_water_level
172
-
173
178
  unit_wgt = self.moist_unit_wgt
174
179
  eop = unit_wgt * depth
175
- if water_level is not None:
180
+
181
+ if not isinf(water_level):
176
182
  if water_level < depth:
177
183
  d_1 = water_level
178
184
  d_2 = depth - d_1
@@ -218,7 +224,6 @@ class UltimateBearingCapacity(ABC):
218
224
  intermediate calculations.
219
225
 
220
226
  !!! info "Added in v0.11.0"
221
-
222
227
  """
223
228
  return UltimateBearingCapacityResult(
224
229
  ultimate_bearing_capacity=self.ultimate_bearing_capacity(),
@@ -100,6 +100,23 @@ class TerzaghiUBC4CircularFooting(TerzaghiUltimateBearingCapacity):
100
100
  )
101
101
 
102
102
 
103
+ class TerzaghiUBC4SquareFooting(TerzaghiUltimateBearingCapacity):
104
+ """Ultimate bearing capacity for square footing according to
105
+ `Terzaghi 1943``.
106
+
107
+ See [implementation](../formulas/ultimate-bearing-capacity.md/#terzaghi-bearing-capacity-for-square-footing)
108
+ for more details on bearing capacity equation used.
109
+ """
110
+
111
+ def _bearing_capacity(self):
112
+ """Calcalates ultimate bearing capacity for square footing."""
113
+ return (
114
+ self._cohesion_term(1.3)
115
+ + self._surcharge_term()
116
+ + self._embedment_term(0.4)
117
+ )
118
+
119
+
103
120
  class TerzaghiUBC4RectangularFooting(TerzaghiUltimateBearingCapacity):
104
121
  r"""Ultimate bearing capacity for rectangular footing according to
105
122
  `Terzaghi 1943`.
@@ -121,16 +138,3 @@ class TerzaghiUBC4RectangularFooting(TerzaghiUltimateBearingCapacity):
121
138
  + self._surcharge_term()
122
139
  + self._embedment_term(emb_coef)
123
140
  )
124
-
125
-
126
- class TerzaghiUBC4SquareFooting(TerzaghiUBC4RectangularFooting):
127
- """Ultimate bearing capacity for square footing according to
128
- `Terzaghi 1943``.
129
-
130
- See [implementation](../formulas/ultimate-bearing-capacity.md/#terzaghi-bearing-capacity-for-square-footing)
131
- for more details on bearing capacity equation used.
132
- """
133
-
134
- def _bearing_capacity(self):
135
- """Calcalates ultimate bearing capacity for square footing."""
136
- return super()._bearing_capacity()
@@ -1,7 +1,16 @@
1
1
  from geolysis.foundation import Shape
2
- from geolysis.utils import isclose, round_, sindeg, tandeg, atan, add_repr
2
+ from geolysis.utils import (
3
+ isclose,
4
+ round_,
5
+ sindeg,
6
+ tandeg,
7
+ atan,
8
+ add_repr,
9
+ cotdeg,
10
+ exp,
11
+ pi,
12
+ )
3
13
  from ._core import UltimateBearingCapacity
4
- from ._hansen_ubc import HansenBearingCapacityFactors
5
14
 
6
15
  __all__ = ["VesicUltimateBearingCapacity"]
7
16
 
@@ -11,12 +20,18 @@ class VesicBearingCapacityFactors:
11
20
  @staticmethod
12
21
  @round_(ndigits=2)
13
22
  def n_c(friction_angle: float) -> float:
14
- return HansenBearingCapacityFactors.n_c(friction_angle)
23
+ if isclose(friction_angle, 0.0):
24
+ return 5.14
25
+ return cotdeg(friction_angle) * (
26
+ VesicBearingCapacityFactors.n_q(friction_angle) - 1.0
27
+ )
15
28
 
16
29
  @staticmethod
17
30
  @round_(ndigits=2)
18
31
  def n_q(friction_angle: float) -> float:
19
- return HansenBearingCapacityFactors.n_q(friction_angle)
32
+ return tandeg(45.0 + friction_angle / 2.0) ** 2.0 * exp(
33
+ pi * tandeg(friction_angle)
34
+ )
20
35
 
21
36
  @staticmethod
22
37
  @round_(ndigits=2)