geolysis 0.11.0__py3-none-any.whl → 0.12.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  from . import bearing_capacity, foundation, soil_classifier, spt
2
2
 
3
- __version__ = "0.11.0"
3
+ __version__ = "0.12.0"
4
4
 
5
5
  __all__ = ["foundation", "soil_classifier", "spt", "bearing_capacity"]
@@ -1,4 +1,5 @@
1
1
  from abc import ABC, abstractmethod
2
+ from dataclasses import dataclass
2
3
  from typing import Annotated
3
4
 
4
5
  from func_validator import (
@@ -8,17 +9,26 @@ from func_validator import (
8
9
  )
9
10
 
10
11
  from geolysis.foundation import Foundation
12
+ from geolysis.utils import round_, add_repr
11
13
 
12
14
 
15
+ @dataclass
16
+ class AllowableBearingCapacityResult:
17
+ allowable_bearing_capacity: float
18
+ depth_factor: float
19
+ water_correction_factor: float = 1.0
20
+
21
+
22
+ @add_repr
13
23
  class AllowableBearingCapacity(ABC):
14
24
  #: Maximum tolerable foundation settlement (mm).
15
25
  MAX_TOL_SETTLEMENT = 25.4
16
26
 
17
27
  def __init__(
18
- self,
19
- corrected_spt_n_value: float,
20
- tol_settlement: float,
21
- foundation_size: Foundation,
28
+ self,
29
+ corrected_spt_n_value: float,
30
+ tol_settlement: float,
31
+ foundation_size: Foundation,
22
32
  ) -> None:
23
33
  self.corrected_spt_n_value = corrected_spt_n_value
24
34
  self.tol_settlement = tol_settlement
@@ -42,8 +52,8 @@ class AllowableBearingCapacity(ABC):
42
52
  @tol_settlement.setter
43
53
  @validate_func_args
44
54
  def tol_settlement(
45
- self,
46
- tol_settlement: Annotated[float, MustBeLessThanOrEqual(25.4)],
55
+ self,
56
+ tol_settlement: Annotated[float, MustBeLessThanOrEqual(25.4)],
47
57
  ):
48
58
  self._tol_settlement = tol_settlement
49
59
 
@@ -57,17 +67,24 @@ class AllowableBearingCapacity(ABC):
57
67
  width = self.foundation_size.width
58
68
  return min(1.0 + 0.33 * depth / width, 1.33)
59
69
 
60
- def bearing_capacity_results(self) -> dict:
70
+ def bearing_capacity_results(self) -> AllowableBearingCapacityResult:
61
71
  """Return a dictionary of bearing capacity results with
62
72
  intermediate calculations.
63
73
 
64
74
  !!! info "Added in v0.11.0"
75
+ """
76
+ return AllowableBearingCapacityResult(
77
+ allowable_bearing_capacity=self.allowable_bearing_capacity(),
78
+ depth_factor=self._fd(),
79
+ )
80
+
81
+ @round_(ndigits=1)
82
+ def allowable_bearing_capacity(self):
83
+ """Calculates the allowable bearing capacity.
65
84
 
85
+ !!! info "Added in v0.12.0"
66
86
  """
67
- return {
68
- "bearing_capacity": self.bearing_capacity(),
69
- "depth_factor": self._fd(),
70
- }
87
+ return self._bearing_capacity()
71
88
 
72
89
  @abstractmethod
73
- def bearing_capacity(self): ...
90
+ def _bearing_capacity(self): ...
@@ -14,10 +14,10 @@ class BowlesABC4PadFoundation(AllowableBearingCapacity):
14
14
  """
15
15
 
16
16
  def __init__(
17
- self,
18
- corrected_spt_n_value: float,
19
- tol_settlement: float,
20
- foundation_size: Foundation,
17
+ self,
18
+ corrected_spt_n_value: float,
19
+ tol_settlement: float,
20
+ foundation_size: Foundation,
21
21
  ) -> None:
22
22
  """
23
23
  :param corrected_spt_n_value: Statistical average of corrected
@@ -35,7 +35,7 @@ class BowlesABC4PadFoundation(AllowableBearingCapacity):
35
35
  )
36
36
 
37
37
  @round_(ndigits=2)
38
- def bearing_capacity(self) -> float:
38
+ def _bearing_capacity(self) -> float:
39
39
  """
40
40
  Calculate the allowable bearing capacity of the pad foundation.
41
41
  """
@@ -46,11 +46,11 @@ class BowlesABC4PadFoundation(AllowableBearingCapacity):
46
46
  return 19.16 * n_corr * self._fd() * self._sr()
47
47
 
48
48
  return (
49
- 11.98
50
- * n_corr
51
- * ((3.28 * width + 1) / (3.28 * width)) ** 2
52
- * self._fd()
53
- * self._sr()
49
+ 11.98
50
+ * n_corr
51
+ * ((3.28 * width + 1) / (3.28 * width)) ** 2
52
+ * self._fd()
53
+ * self._sr()
54
54
  )
55
55
 
56
56
 
@@ -64,7 +64,7 @@ class BowlesABC4MatFoundation(BowlesABC4PadFoundation):
64
64
  """
65
65
 
66
66
  @round_(ndigits=2)
67
- def bearing_capacity(self) -> float:
67
+ def _bearing_capacity(self) -> float:
68
68
  """
69
69
  Calculate the allowable bearing capacity of the mat foundation.
70
70
  """
@@ -14,10 +14,10 @@ class MeyerhofABC4PadFoundation(AllowableBearingCapacity):
14
14
  """
15
15
 
16
16
  def __init__(
17
- self,
18
- corrected_spt_n_value: float,
19
- tol_settlement: float,
20
- foundation_size: Foundation,
17
+ self,
18
+ corrected_spt_n_value: float,
19
+ tol_settlement: float,
20
+ foundation_size: Foundation,
21
21
  ):
22
22
  """
23
23
  :param corrected_spt_n_value: Average uncorrected SPT N-value
@@ -35,7 +35,7 @@ class MeyerhofABC4PadFoundation(AllowableBearingCapacity):
35
35
  )
36
36
 
37
37
  @round_(ndigits=2)
38
- def bearing_capacity(self):
38
+ def _bearing_capacity(self):
39
39
  """
40
40
  Calculates the allowable bearing capacity of the pad foundation.
41
41
  """
@@ -46,11 +46,11 @@ class MeyerhofABC4PadFoundation(AllowableBearingCapacity):
46
46
  return 12 * n_corr * self._fd() * self._sr()
47
47
 
48
48
  return (
49
- 8
50
- * n_corr
51
- * ((3.28 * width + 1) / (3.28 * width)) ** 2
52
- * self._fd()
53
- * self._sr()
49
+ 8
50
+ * n_corr
51
+ * ((3.28 * width + 1) / (3.28 * width)) ** 2
52
+ * self._fd()
53
+ * self._sr()
54
54
  )
55
55
 
56
56
 
@@ -64,7 +64,7 @@ class MeyerhofABC4MatFoundation(MeyerhofABC4PadFoundation):
64
64
  """
65
65
 
66
66
  @round_(ndigits=2)
67
- def bearing_capacity(self):
67
+ def _bearing_capacity(self):
68
68
  """Calculate the allowable bearing capacity of the mat foundation."""
69
69
  n_corr = self.corrected_spt_n_value
70
70
  return 8 * n_corr * self._fd() * self._sr()
@@ -14,10 +14,10 @@ class TerzaghiABC4PadFoundation(AllowableBearingCapacity):
14
14
  """
15
15
 
16
16
  def __init__(
17
- self,
18
- corrected_spt_n_value: float,
19
- tol_settlement: float,
20
- foundation_size: Foundation,
17
+ self,
18
+ corrected_spt_n_value: float,
19
+ tol_settlement: float,
20
+ foundation_size: Foundation,
21
21
  ) -> None:
22
22
  """
23
23
  :param corrected_spt_n_value: Lowest (or average) uncorrected
@@ -57,7 +57,7 @@ class TerzaghiABC4PadFoundation(AllowableBearingCapacity):
57
57
  return min(cw, 2.0)
58
58
 
59
59
  @round_(ndigits=2)
60
- def bearing_capacity(self):
60
+ def _bearing_capacity(self):
61
61
  """
62
62
  Calculates the allowable bearing capacity of the pad foundation.
63
63
  """
@@ -68,11 +68,11 @@ class TerzaghiABC4PadFoundation(AllowableBearingCapacity):
68
68
  return 12 * n_corr * (1 / (self._cw() * self._fd())) * self._sr()
69
69
 
70
70
  return (
71
- 8
72
- * n_corr
73
- * ((3.28 * width + 1) / (3.28 * width)) ** 2
74
- * (1 / (self._cw() * self._fd()))
75
- * self._sr()
71
+ 8
72
+ * n_corr
73
+ * ((3.28 * width + 1) / (3.28 * width)) ** 2
74
+ * (1 / (self._cw() * self._fd()))
75
+ * self._sr()
76
76
  )
77
77
 
78
78
  def bearing_capacity_results(self) -> dict:
@@ -91,7 +91,7 @@ class TerzaghiABC4MatFoundation(TerzaghiABC4PadFoundation):
91
91
  """
92
92
 
93
93
  @round_(ndigits=2)
94
- def bearing_capacity(self):
94
+ def _bearing_capacity(self):
95
95
  """
96
96
  Calculates the allowable bearing capacity of the mat foundation.
97
97
  """
@@ -46,18 +46,19 @@ class UBCType(AbstractStrEnum):
46
46
 
47
47
  @validate_func_args
48
48
  def create_ubc_4_all_soil_types(
49
- friction_angle: float,
50
- cohesion: float,
51
- moist_unit_wgt: float,
52
- depth: float,
53
- width: float,
54
- length: Optional[float] = None,
55
- eccentricity: float = 0.0,
56
- ground_water_level: Optional[float] = None,
57
- load_angle: float = 0.0,
58
- apply_local_shear: bool = False,
59
- shape: Shape | str = "square",
60
- ubc_type: Annotated[UBCType | str, MustBeMemberOf(UBCType)] = "hansen",
49
+ friction_angle: float,
50
+ cohesion: float,
51
+ moist_unit_wgt: float,
52
+ depth: float,
53
+ width: float,
54
+ length: Optional[float] = None,
55
+ saturated_unit_wgt: float = 20.5,
56
+ eccentricity: float = 0.0,
57
+ ground_water_level: Optional[float] = None,
58
+ load_angle: float = 0.0,
59
+ apply_local_shear: bool = False,
60
+ shape: Shape | str = "square",
61
+ ubc_type: Annotated[UBCType | str, MustBeMemberOf(UBCType)] = "vesic",
61
62
  ) -> UltimateBearingCapacity:
62
63
  r"""A factory function that encapsulate the creation of ultimate
63
64
  bearing capacity.
@@ -70,6 +71,7 @@ def create_ubc_4_all_soil_types(
70
71
  :param depth: Depth of foundation (m).
71
72
  :param width: Width of foundation footing (m).
72
73
  :param length: Length of foundation footing (m).
74
+ :param saturated_unit_wgt: Saturated unit weight of soil ($kN/m^3$).
73
75
  :param eccentricity: The deviation of the foundation load from the
74
76
  center of gravity of the foundation footing.
75
77
  :param ground_water_level: Depth of water below ground level (m).
@@ -101,12 +103,14 @@ def create_ubc_4_all_soil_types(
101
103
  shape=shape,
102
104
  )
103
105
 
104
- ubc_class = _get_ultimate_bearing_capacity(ubc_type, fnd_size.footing_shape)
106
+ ubc_class = _get_ultimate_bearing_capacity(ubc_type,
107
+ fnd_size.footing_shape)
105
108
 
106
109
  return ubc_class(
107
110
  friction_angle=friction_angle,
108
111
  cohesion=cohesion,
109
112
  moist_unit_wgt=moist_unit_wgt,
113
+ saturated_unit_wgt=saturated_unit_wgt,
110
114
  foundation_size=fnd_size,
111
115
  apply_local_shear=apply_local_shear,
112
116
  )
@@ -1,5 +1,6 @@
1
1
  from abc import ABC, abstractmethod
2
- from typing import Annotated
2
+ from dataclasses import dataclass
3
+ from typing import Annotated, Optional
3
4
 
4
5
  from func_validator import (
5
6
  validate_func_args,
@@ -8,17 +9,38 @@ from func_validator import (
8
9
  )
9
10
 
10
11
  from geolysis.foundation import Foundation
11
- from geolysis.utils import arctan, round_, tan
12
+ from geolysis.utils import arctandeg, round_, tandeg
13
+
14
+
15
+ @dataclass(frozen=True, slots=True)
16
+ class UltimateBearingCapacityResult:
17
+ ultimate_bearing_capacity: float
18
+ allowable_bearing_capacity: float
19
+ allowable_applied_load: float
20
+ n_c: float
21
+ n_q: float
22
+ n_gamma: float
23
+ s_c: float
24
+ s_q: float
25
+ s_gamma: float
26
+ d_c: float
27
+ d_q: float
28
+ d_gamma: float
29
+ i_c: float
30
+ i_q: float
31
+ i_gamma: float
12
32
 
13
33
 
14
34
  class UltimateBearingCapacity(ABC):
15
35
  def __init__(
16
- self,
17
- friction_angle: float,
18
- cohesion: float,
19
- moist_unit_wgt: float,
20
- foundation_size: Foundation,
21
- apply_local_shear: bool = False,
36
+ self,
37
+ friction_angle: float,
38
+ cohesion: float,
39
+ moist_unit_wgt: float,
40
+ foundation_size: Foundation,
41
+ saturated_unit_wgt: float = 20.5,
42
+ apply_local_shear: bool = False,
43
+ factor_of_safety: float = 3.0,
22
44
  ) -> None:
23
45
  r"""
24
46
  :param friction_angle: Internal angle of friction for general
@@ -26,6 +48,9 @@ class UltimateBearingCapacity(ABC):
26
48
  :param cohesion: Cohesion of soil ($kPa$).
27
49
  :param moist_unit_wgt: Moist unit weight of soil ($kN/m^3$).
28
50
  :param foundation_size: Size of the foundation.
51
+ :param saturated_unit_wgt: Saturated unit weight of soil ($kN/m^3$).
52
+ :param factor_of_safety: Factor of safety against bearing
53
+ capacity failure. Added in v0.12.0.
29
54
  :param apply_local_shear: Indicate whether bearing capacity
30
55
  failure is general shear or local
31
56
  shear failure.
@@ -34,6 +59,8 @@ class UltimateBearingCapacity(ABC):
34
59
  self.cohesion = cohesion
35
60
  self.moist_unit_wgt = moist_unit_wgt
36
61
  self.foundation_size = foundation_size
62
+ self.saturated_unit_wgt = saturated_unit_wgt
63
+ self.factor_of_safety = factor_of_safety
37
64
  self.apply_local_shear = apply_local_shear
38
65
 
39
66
  @property
@@ -49,7 +76,7 @@ class UltimateBearingCapacity(ABC):
49
76
 
50
77
  """
51
78
  if self.apply_local_shear:
52
- return arctan((2.0 / 3.0) * tan(self._friction_angle))
79
+ return arctandeg((2.0 / 3.0) * tandeg(self._friction_angle))
53
80
  return self._friction_angle
54
81
 
55
82
  @friction_angle.setter
@@ -64,9 +91,7 @@ class UltimateBearingCapacity(ABC):
64
91
 
65
92
  In the case of local shear failure:
66
93
 
67
- $$
68
- C^{'} = \dfrac{2}{3} \cdot C
69
- $$
94
+ $$C^{'} = \dfrac{2}{3} \cdot C$$
70
95
  """
71
96
  if self.apply_local_shear:
72
97
  return (2.0 / 3.0) * self._cohesion
@@ -87,6 +112,16 @@ class UltimateBearingCapacity(ABC):
87
112
  def moist_unit_wgt(self, val: Annotated[float, MustBePositive]):
88
113
  self._moist_unit_wgt = val
89
114
 
115
+ @property
116
+ def saturated_unit_wgt(self) -> float:
117
+ """Saturated unit weight of soil ($kN/m^3$)."""
118
+ return self._saturated_unit_wgt
119
+
120
+ @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
+
90
125
  @property
91
126
  def load_angle(self):
92
127
  """Inclination of the applied load with the vertical."""
@@ -135,84 +170,107 @@ class UltimateBearingCapacity(ABC):
135
170
  depth = self.foundation_size.depth
136
171
  water_level = self.foundation_size.ground_water_level
137
172
 
138
- if water_level is None:
139
- water_corr = 1.0 # water correction
140
- else:
141
- # water level above the base of the foundation
142
- a = max(depth - water_level, 0.0)
143
- water_corr = min(1 - 0.5 * a / depth, 1)
144
-
145
- # effective overburden pressure (surcharge)
146
- eop = self.moist_unit_wgt * depth
147
- return eop * self.n_q * self.s_q * self.d_q * self.i_q * water_corr
173
+ unit_wgt = self.moist_unit_wgt
174
+ eop = unit_wgt * depth
175
+ if water_level is not None:
176
+ if water_level < depth:
177
+ d_1 = water_level
178
+ d_2 = depth - d_1
179
+ unit_wgt = self.saturated_unit_wgt - 9.81
180
+ eop = self.moist_unit_wgt * d_1 + unit_wgt * d_2
181
+ return eop * self.n_q * self.s_q * self.d_q * self.i_q
148
182
 
149
183
  def _embedment_term(self, coef: float = 0.5) -> float:
150
184
  depth = self.foundation_size.depth
151
185
  width = self.foundation_size.effective_width
152
186
  water_level = self.foundation_size.ground_water_level
153
187
 
154
- if water_level is None:
155
- # water correction
156
- water_corr = 1.0
157
- else:
158
- #: b -> water level below the base of the foundation
159
- b = max(water_level - depth, 0)
160
- water_corr = min(0.5 + 0.5 * b / width, 1)
188
+ unit_wgt = self.moist_unit_wgt
189
+
190
+ if water_level is not None:
191
+ wgt = self.saturated_unit_wgt - 9.81
192
+ if water_level < depth:
193
+ unit_wgt = wgt
194
+ else:
195
+ d = water_level - depth
196
+ if d <= width:
197
+ unit_wgt = wgt + (d / width) * (self.moist_unit_wgt - wgt)
161
198
 
162
199
  return (
163
- coef
164
- * self.moist_unit_wgt
165
- * width
166
- * self.n_gamma
167
- * self.s_gamma
168
- * self.d_gamma
169
- * self.i_gamma
170
- * water_corr
200
+ coef
201
+ * unit_wgt
202
+ * width
203
+ * self.n_gamma
204
+ * self.s_gamma
205
+ * self.d_gamma
206
+ * self.i_gamma
171
207
  )
172
208
 
173
- @round_(ndigits=2)
174
- def bearing_capacity(self) -> float:
175
- """Calculates the ultimate bearing capacity."""
209
+ def _bearing_capacity(self) -> float:
176
210
  return (
177
- self._cohesion_term(1.0)
178
- + self._surcharge_term()
179
- + self._embedment_term(0.5)
211
+ self._cohesion_term(1.0)
212
+ + self._surcharge_term()
213
+ + self._embedment_term(0.5)
180
214
  )
181
215
 
182
- def bearing_capacity_results(self) -> dict:
216
+ def bearing_capacity_results(self) -> UltimateBearingCapacityResult:
183
217
  """Return a dictionary of bearing capacity results with
184
218
  intermediate calculations.
185
219
 
186
220
  !!! info "Added in v0.11.0"
187
221
 
188
222
  """
189
- return {
190
- "bearing_capacity": self.bearing_capacity(),
191
- "n_c": self.n_c,
192
- "n_q": self.n_q,
193
- "n_gamma": self.n_gamma,
194
- "s_c": self.s_c,
195
- "s_q": self.s_q,
196
- "s_gamma": self.s_gamma,
197
- "d_c": self.d_c,
198
- "d_q": self.d_q,
199
- "d_gamma": self.d_gamma,
200
- "i_c": self.i_c,
201
- "i_q": self.i_q,
202
- "i_gamma": self.i_gamma,
203
- }
223
+ return UltimateBearingCapacityResult(
224
+ ultimate_bearing_capacity=self.ultimate_bearing_capacity(),
225
+ allowable_bearing_capacity=self.allowable_bearing_capacity(),
226
+ allowable_applied_load=self.allowable_applied_load(),
227
+ n_c=self.n_c,
228
+ n_q=self.n_q,
229
+ n_gamma=self.n_gamma,
230
+ s_c=self.s_c,
231
+ s_q=self.s_q,
232
+ s_gamma=self.s_gamma,
233
+ d_c=self.d_c,
234
+ d_q=self.d_q,
235
+ d_gamma=self.d_gamma,
236
+ i_c=self.i_c,
237
+ i_q=self.i_q,
238
+ i_gamma=self.i_gamma,
239
+ )
240
+
241
+ @round_(ndigits=1)
242
+ def ultimate_bearing_capacity(self) -> float:
243
+ """Calculates the ultimate bearing capacity.
244
+
245
+ !!! info "Added in v0.12.0"
246
+ """
247
+ return self._bearing_capacity()
248
+
249
+ @round_(ndigits=1)
250
+ def allowable_bearing_capacity(self) -> float:
251
+ """Calculates the allowable bearing capacity.
252
+
253
+ !!! info "Added in v0.12.0"
254
+ """
255
+ return self._bearing_capacity() / self.factor_of_safety
256
+
257
+ @round_(ndigits=1)
258
+ def allowable_applied_load(self) -> float:
259
+ """Calculates the allowable applied load.
260
+
261
+ !!! info "Added in v0.12.0"
262
+ """
263
+ area = self.foundation_size.foundation_area()
264
+ return self.allowable_bearing_capacity() * area
204
265
 
205
266
  @property
206
267
  @abstractmethod
207
- def n_c(self) -> float:
208
- ...
268
+ def n_c(self) -> float: ...
209
269
 
210
270
  @property
211
271
  @abstractmethod
212
- def n_q(self) -> float:
213
- ...
272
+ def n_q(self) -> float: ...
214
273
 
215
274
  @property
216
275
  @abstractmethod
217
- def n_gamma(self) -> float:
218
- ...
276
+ def n_gamma(self) -> float: ...
@@ -1,5 +1,15 @@
1
1
  from geolysis.foundation import Shape
2
- from geolysis.utils import cos, cot, exp, isclose, pi, round_, sin, tan
2
+ from geolysis.utils import (
3
+ cosdeg,
4
+ cotdeg,
5
+ exp,
6
+ isclose,
7
+ pi,
8
+ round_,
9
+ sindeg,
10
+ tandeg,
11
+ add_repr,
12
+ )
3
13
 
4
14
  from ._core import UltimateBearingCapacity
5
15
 
@@ -13,23 +23,24 @@ class HansenBearingCapacityFactors:
13
23
  def n_c(friction_angle: float) -> float:
14
24
  if isclose(friction_angle, 0.0):
15
25
  return 5.14
16
- return cot(friction_angle) * (
17
- HansenBearingCapacityFactors.n_q(friction_angle) - 1.0
26
+ return cotdeg(friction_angle) * (
27
+ HansenBearingCapacityFactors.n_q(friction_angle) - 1.0
18
28
  )
19
29
 
20
30
  @staticmethod
21
31
  @round_(ndigits=2)
22
32
  def n_q(friction_angle: float) -> float:
23
- return tan(45.0 + friction_angle / 2.0) ** 2.0 * exp(
24
- pi * tan(friction_angle))
33
+ return tandeg(45.0 + friction_angle / 2.0) ** 2.0 * exp(
34
+ pi * tandeg(friction_angle)
35
+ )
25
36
 
26
37
  @staticmethod
27
38
  @round_(ndigits=2)
28
39
  def n_gamma(friction_angle: float) -> float:
29
40
  return (
30
- 1.8
31
- * (HansenBearingCapacityFactors.n_q(friction_angle) - 1.0)
32
- * tan(friction_angle)
41
+ 1.8
42
+ * (HansenBearingCapacityFactors.n_q(friction_angle) - 1.0)
43
+ * tandeg(friction_angle)
33
44
  )
34
45
 
35
46
 
@@ -91,17 +102,17 @@ class HansenInclinationFactors:
91
102
  @staticmethod
92
103
  @round_(ndigits=2)
93
104
  def i_c(
94
- cohesion: float,
95
- load_angle: float,
96
- f_width: float,
97
- f_length: float,
105
+ cohesion: float,
106
+ load_angle: float,
107
+ f_width: float,
108
+ f_length: float,
98
109
  ) -> float:
99
- return 1.0 - sin(load_angle) / (2.0 * cohesion * f_width * f_length)
110
+ return 1.0 - sindeg(load_angle) / (2.0 * cohesion * f_width * f_length)
100
111
 
101
112
  @staticmethod
102
113
  @round_(ndigits=2)
103
114
  def i_q(load_angle: float) -> float:
104
- return 1.0 - (1.5 * sin(load_angle)) / cos(load_angle)
115
+ return 1.0 - (1.5 * sindeg(load_angle)) / cosdeg(load_angle)
105
116
 
106
117
  @staticmethod
107
118
  @round_(ndigits=2)
@@ -109,6 +120,7 @@ class HansenInclinationFactors:
109
120
  return HansenInclinationFactors.i_q(load_angle) ** 2.0
110
121
 
111
122
 
123
+ @add_repr
112
124
  class HansenUltimateBearingCapacity(UltimateBearingCapacity):
113
125
  r"""Ultimate bearing capacity for soils according to `Hansen (1961)`.
114
126