geolysis 0.4.4__py3-none-any.whl → 0.5.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 foundation, soil_classifier, spt
2
2
 
3
- __version__ = "0.4.4"
3
+ __version__ = "0.5.0"
4
4
 
5
5
  __all__ = ["foundation", "soil_classifier", "spt"]
@@ -1,13 +1,5 @@
1
1
  """ Allowable bearing capacity package for cohesionless soils.
2
2
 
3
- Exceptions
4
- ==========
5
-
6
- .. autosummary::
7
- :toctree: _autosummary
8
-
9
- SettlementError
10
-
11
3
  Enums
12
4
  =====
13
5
 
@@ -15,7 +7,7 @@ Enums
15
7
  :toctree: _autosummary
16
8
  :nosignatures:
17
9
 
18
- ABC_TYPE
10
+ ABCType
19
11
 
20
12
  Functions
21
13
  =========
@@ -25,76 +17,21 @@ Functions
25
17
 
26
18
  create_allowable_bearing_capacity
27
19
  """
20
+
28
21
  import enum
29
- from abc import ABC, abstractmethod
30
22
  from typing import Optional
31
23
 
32
- from geolysis.foundation import (FoundationSize,
33
- Shape,
34
- FoundationType,
35
- create_foundation)
36
- from geolysis.utils import inf, enum_repr, validators
37
-
38
-
39
- class SettlementError(ValueError):
40
- """Raised when tolerable settlement is greater than the maximum
41
- allowable settlement.
42
- """
43
-
44
-
45
- class AllowableBearingCapacity(ABC):
46
- #: Maximum tolerable foundation settlement (mm).
47
- MAX_TOL_SETTLEMENT = 25.4
48
-
49
- def __init__(self, corrected_spt_n_value: float,
50
- tol_settlement: float,
51
- foundation_size: FoundationSize) -> None:
52
- self.corrected_spt_n_value = corrected_spt_n_value
53
- self.tol_settlement = tol_settlement
54
- self.foundation_size = foundation_size
55
-
56
- @property
57
- def corrected_spt_n_value(self) -> float:
58
- return self._corrected_spt_n_value
59
-
60
- @corrected_spt_n_value.setter
61
- @validators.ge(0.0)
62
- def corrected_spt_n_value(self, val: float) -> None:
63
- self._corrected_spt_n_value = val
64
-
65
- @property
66
- def tol_settlement(self) -> float:
67
- return self._tol_settlement
68
-
69
- @tol_settlement.setter
70
- @validators.le(25.4, exc_type=SettlementError)
71
- def tol_settlement(self, tol_settlement: float) -> None:
72
- self._tol_settlement = tol_settlement
73
-
74
- def _sr(self) -> float:
75
- """Calculate the settlement ratio."""
76
- return self.tol_settlement / self.MAX_TOL_SETTLEMENT
77
-
78
- def _fd(self) -> float:
79
- """Calculate the depth factor."""
80
- depth = self.foundation_size.depth
81
- width = self.foundation_size.width
82
-
83
- return min(1.0 + 0.33 * depth / width, 1.33)
84
-
85
- @abstractmethod
86
- def bearing_capacity(self): ...
87
-
88
-
89
- from . import bowles_abc, terzaghi_abc, meyerhof_abc
24
+ from geolysis.foundation import FoundationType, Shape, create_foundation
25
+ from geolysis.utils import enum_repr, inf
90
26
 
27
+ from ._core import AllowableBearingCapacity
91
28
  from .bowles_abc import BowlesABC4MatFoundation, BowlesABC4PadFoundation
92
29
  from .meyerhof_abc import MeyerhofABC4MatFoundation, MeyerhofABC4PadFoundation
93
30
  from .terzaghi_abc import TerzaghiABC4MatFoundation, TerzaghiABC4PadFoundation
94
31
 
95
32
 
96
33
  @enum_repr
97
- class ABC_TYPE(enum.StrEnum):
34
+ class ABCType(enum.StrEnum):
98
35
  """Enumeration of available allowable bearing capacity types."""
99
36
  BOWLES = enum.auto()
100
37
  MEYERHOF = enum.auto()
@@ -109,10 +46,10 @@ def create_allowable_bearing_capacity(corrected_spt_n_value: float,
109
46
  eccentricity: float = 0.0,
110
47
  ground_water_level: float = inf,
111
48
  shape: Shape | str = Shape.SQUARE,
112
- foundation_type: FoundationType | str = \
113
- FoundationType.PAD,
49
+ foundation_type: FoundationType | str =
50
+ FoundationType.PAD,
114
51
  abc_type: Optional[
115
- ABC_TYPE | str] = None,
52
+ ABCType | str] = None,
116
53
  ) -> AllowableBearingCapacity:
117
54
  """ A factory function that encapsulate the creation of allowable bearing
118
55
  capacities.
@@ -133,42 +70,44 @@ def create_allowable_bearing_capacity(corrected_spt_n_value: float,
133
70
  :type length: float, optional
134
71
 
135
72
  :param eccentricity: The deviation of the foundation load from the center
136
- of gravity of the foundation footing, defaults to 0.0.
137
- This means that the foundation load aligns with the
138
- center of gravity of the foundation footing (m).
73
+ of gravity of the foundation footing (m), defaults to
74
+ 0.0. This means that the foundation load aligns with
75
+ the center of gravity of the foundation footing.
139
76
  :type eccentricity: float, optional
140
77
 
141
78
  :param ground_water_level: Depth of water below ground level (m).
142
- :type ground_water_level: float
79
+ :type ground_water_level: float, optional
143
80
 
144
- :param shape: Shape of foundation footing, defaults to "SQUARE".
81
+ :param shape: Shape of foundation footing, defaults to
82
+ :attr:`~geolysis.foundation.Shape.SQUARE`.
145
83
  :type shape: str, optional
146
84
 
147
85
  :param foundation_type: Type of foundation, defaults to "pad".
148
86
  :type foundation_type: FoundationType | str, optional
149
87
 
150
88
  :param abc_type: Type of allowable bearing capacity calculation to apply.
151
- Available values can be found in :class:`ABC_TYPE`,
89
+ Available values can be found in :class:`ABCType`,
152
90
  defaults to None.
153
- :type abc_type: ABC_TYPE | str
91
+ :type abc_type: ABCType | str, optional
154
92
 
155
- :raises ValueError: Raised if abc_type or foundation_type is not supported.
156
- :raises ValueError: Raised when length is not provided for a rectangular
93
+ :raises ValueError: Raised if ``abc_type`` or ``foundation_type`` is not
94
+ supported.
95
+ :raises ValueError: Raised when ``length`` is not provided for a rectangular
157
96
  footing.
158
- :raises ValueError: Raised if an invalid footing shape is provided.
97
+ :raises ValueError: Raised if an invalid footing ``shape`` is provided.
159
98
  """
160
- msg = (f"{abc_type = } is not supported, Supported "
161
- f"types are: {list(ABC_TYPE)}")
99
+ msg = (f"{abc_type=} is not supported, Supported "
100
+ f"types are: {list(ABCType)}")
162
101
 
163
102
  if abc_type is None:
164
103
  raise ValueError(msg)
165
104
 
166
105
  try:
167
- abc_type = ABC_TYPE(str(abc_type).casefold())
106
+ abc_type = ABCType(str(abc_type).casefold())
168
107
  except ValueError as e:
169
108
  raise ValueError(msg) from e
170
109
 
171
- msg = (f"{foundation_type = } is not supported, Supported "
110
+ msg = (f"{foundation_type=} is not supported, Supported "
172
111
  f"types are: {list(FoundationType)}")
173
112
 
174
113
  try:
@@ -183,23 +122,24 @@ def create_allowable_bearing_capacity(corrected_spt_n_value: float,
183
122
  length=length,
184
123
  eccentricity=eccentricity,
185
124
  ground_water_level=ground_water_level,
125
+ foundation_type=foundation_type,
186
126
  shape=shape)
187
127
  abc_classes = {
188
- ABC_TYPE.BOWLES: {
128
+ ABCType.BOWLES: {
189
129
  FoundationType.PAD: BowlesABC4PadFoundation,
190
130
  FoundationType.MAT: BowlesABC4MatFoundation,
191
131
  },
192
- ABC_TYPE.MEYERHOF: {
132
+ ABCType.MEYERHOF: {
193
133
  FoundationType.PAD: MeyerhofABC4PadFoundation,
194
134
  FoundationType.MAT: MeyerhofABC4MatFoundation,
195
135
  },
196
- ABC_TYPE.TERZAGHI: {
136
+ ABCType.TERZAGHI: {
197
137
  FoundationType.PAD: TerzaghiABC4PadFoundation,
198
138
  FoundationType.MAT: TerzaghiABC4MatFoundation,
199
139
  }
200
140
  }
201
141
 
202
- abc_class = abc_classes[abc_type][foundation_type]
142
+ abc_class = abc_classes[abc_type][fnd_size.foundation_type]
203
143
  abc = abc_class(corrected_spt_n_value=corrected_spt_n_value,
204
144
  tol_settlement=tol_settlement,
205
145
  foundation_size=fnd_size)
@@ -0,0 +1,55 @@
1
+ from abc import ABC, abstractmethod
2
+
3
+ from geolysis.foundation import FoundationSize
4
+ from geolysis.utils import validators
5
+
6
+
7
+ class SettlementError(ValueError):
8
+ """Raised when tolerable settlement is greater than the maximum
9
+ allowable settlement.
10
+ """
11
+
12
+
13
+ class AllowableBearingCapacity(ABC):
14
+ #: Maximum tolerable foundation settlement (mm).
15
+ MAX_TOL_SETTLEMENT = 25.4
16
+
17
+ def __init__(self, corrected_spt_n_value: float,
18
+ tol_settlement: float,
19
+ foundation_size: FoundationSize) -> None:
20
+ self.corrected_spt_n_value = corrected_spt_n_value
21
+ self.tol_settlement = tol_settlement
22
+ self.foundation_size = foundation_size
23
+
24
+ @property
25
+ def corrected_spt_n_value(self) -> float:
26
+ """Statistical average of corrected SPT N-value."""
27
+ return self._corrected_spt_n_value
28
+
29
+ @corrected_spt_n_value.setter
30
+ @validators.ge(0.0)
31
+ def corrected_spt_n_value(self, val: float) -> None:
32
+ self._corrected_spt_n_value = val
33
+
34
+ @property
35
+ def tol_settlement(self) -> float:
36
+ """Tolerable settlement foundation (mm)."""
37
+ return self._tol_settlement
38
+
39
+ @tol_settlement.setter
40
+ @validators.le(25.4, exc_type=SettlementError)
41
+ def tol_settlement(self, tol_settlement: float) -> None:
42
+ self._tol_settlement = tol_settlement
43
+
44
+ def _sr(self) -> float:
45
+ """Calculate the settlement ratio."""
46
+ return self.tol_settlement / self.MAX_TOL_SETTLEMENT
47
+
48
+ def _fd(self) -> float:
49
+ """Calculate the depth factor."""
50
+ depth = self.foundation_size.depth
51
+ width = self.foundation_size.width
52
+ return min(1.0 + 0.33 * depth / width, 1.33)
53
+
54
+ @abstractmethod
55
+ def bearing_capacity(self): ...
@@ -12,7 +12,7 @@ Classes
12
12
  from geolysis.foundation import FoundationSize
13
13
  from geolysis.utils import round_
14
14
 
15
- from . import AllowableBearingCapacity
15
+ from ._core import AllowableBearingCapacity
16
16
 
17
17
 
18
18
  class BowlesABC4PadFoundation(AllowableBearingCapacity):
@@ -12,7 +12,7 @@ Classes
12
12
  from geolysis.foundation import FoundationSize
13
13
  from geolysis.utils import round_
14
14
 
15
- from . import AllowableBearingCapacity
15
+ from ._core import AllowableBearingCapacity
16
16
 
17
17
 
18
18
  class MeyerhofABC4PadFoundation(AllowableBearingCapacity):
@@ -12,7 +12,7 @@ Classes
12
12
  from geolysis.foundation import FoundationSize
13
13
  from geolysis.utils import round_
14
14
 
15
- from . import AllowableBearingCapacity
15
+ from ._core import AllowableBearingCapacity
16
16
 
17
17
 
18
18
  class TerzaghiABC4PadFoundation(AllowableBearingCapacity):
@@ -7,7 +7,7 @@ Enum
7
7
  :toctree: _autosummary
8
8
  :nosignatures:
9
9
 
10
- UBC_TYPE
10
+ UBCType
11
11
 
12
12
  Functions
13
13
  =========
@@ -18,13 +18,19 @@ Functions
18
18
  create_ultimate_bearing_capacity
19
19
  """
20
20
  import enum
21
- from abc import ABC, abstractmethod
22
21
  from typing import Optional
23
22
 
24
- from geolysis.foundation import FoundationSize, Shape, create_foundation
25
- from geolysis.utils import arctan, enum_repr, tan, round_, validators
23
+ from geolysis.foundation import Shape, create_foundation
24
+ from geolysis.utils import enum_repr
26
25
 
27
- __all__ = ["UltimateBearingCapacity",
26
+ from ._core import UltimateBearingCapacity
27
+ from .hansen_ubc import HansenUltimateBearingCapacity
28
+ from .terzaghi_ubc import (TerzaghiUBC4CircularFooting,
29
+ TerzaghiUBC4RectangularFooting,
30
+ TerzaghiUBC4SquareFooting, TerzaghiUBC4StripFooting)
31
+ from .vesic_ubc import VesicUltimateBearingCapacity
32
+
33
+ __all__ = ["UBCType",
28
34
  "TerzaghiUBC4StripFooting",
29
35
  "TerzaghiUBC4CircularFooting",
30
36
  "TerzaghiUBC4RectangularFooting",
@@ -34,193 +40,8 @@ __all__ = ["UltimateBearingCapacity",
34
40
  "create_ultimate_bearing_capacity"]
35
41
 
36
42
 
37
- class UltimateBearingCapacity(ABC):
38
- def __init__(self, friction_angle: float,
39
- cohesion: float,
40
- moist_unit_wgt: float,
41
- foundation_size: FoundationSize,
42
- load_angle=0.0,
43
- apply_local_shear=False) -> None:
44
- r"""
45
- :param friction_angle: Internal angle of friction for general shear
46
- failure (degrees).
47
- :type friction_angle: float
48
-
49
- :param cohesion: Cohesion of soil (:math:`kPa`).
50
- :type cohesion: float
51
-
52
- :param moist_unit_wgt: Moist unit weight of soil (:math:`kN/m^3`).
53
- :type moist_unit_wgt: float
54
-
55
- :param foundation_size: Size of the foundation.
56
- :type foundation_size: FoundationSize
57
-
58
- :param load_angle: Inclination of the applied load with the vertical
59
- (:math:`\alpha^{\circ}`), defaults to 0.0.
60
- :type load_angle: float, optional
61
-
62
- :param apply_local_shear: Indicate whether bearing capacity failure is
63
- general shear or local shear failure,
64
- defaults to False.
65
- :type apply_local_shear: bool, optional
66
- """
67
- self.friction_angle = friction_angle
68
- self.cohesion = cohesion
69
- self.moist_unit_wgt = moist_unit_wgt
70
- self.load_angle = load_angle
71
- self.foundation_size = foundation_size
72
- self.apply_local_shear = apply_local_shear
73
-
74
- @property
75
- def friction_angle(self) -> float:
76
- """Return friction angle for local shear in the case of local shear
77
- failure or general shear in the case of general shear failure.
78
- """
79
- if self.apply_local_shear:
80
- return arctan((2 / 3) * tan(self._friction_angle))
81
- return self._friction_angle
82
-
83
- @friction_angle.setter
84
- @validators.ge(0.0)
85
- def friction_angle(self, val: float):
86
- self._friction_angle = val
87
-
88
- @property
89
- def cohesion(self) -> float:
90
- """Return cohesion for local shear in the case of local shear failure
91
- or general shear in the case of general shear failure.
92
- """
93
- if self.apply_local_shear:
94
- return (2.0 / 3.0) * self._cohesion
95
- return self._cohesion
96
-
97
- @cohesion.setter
98
- @validators.ge(0.0)
99
- def cohesion(self, val: float):
100
- self._cohesion = val
101
-
102
- @property
103
- def moist_unit_wgt(self) -> float:
104
- return self._moist_unit_wgt
105
-
106
- @moist_unit_wgt.setter
107
- @validators.gt(0.0)
108
- def moist_unit_wgt(self, val: float):
109
- self._moist_unit_wgt = val
110
-
111
- @property
112
- def load_angle(self) -> float:
113
- return self._load_angle
114
-
115
- @load_angle.setter
116
- @validators.le(90.0)
117
- @validators.ge(0.0)
118
- def load_angle(self, val: float):
119
- self._load_angle = val
120
-
121
- @property
122
- def s_c(self) -> float:
123
- return 1.0
124
-
125
- @property
126
- def s_q(self) -> float:
127
- return 1.0
128
-
129
- @property
130
- def s_gamma(self) -> float:
131
- return 1.0
132
-
133
- @property
134
- def d_c(self) -> float:
135
- return 1.0
136
-
137
- @property
138
- def d_q(self) -> float:
139
- return 1.0
140
-
141
- @property
142
- def d_gamma(self) -> float:
143
- return 1.0
144
-
145
- @property
146
- def i_c(self) -> float:
147
- return 1.0
148
-
149
- @property
150
- def i_q(self) -> float:
151
- return 1.0
152
-
153
- @property
154
- def i_gamma(self) -> float:
155
- return 1.0
156
-
157
- def _cohesion_term(self, coef: float = 1.0) -> float:
158
- return coef * self.cohesion * self.n_c * self.s_c * self.d_c * self.i_c
159
-
160
- def _surcharge_term(self) -> float:
161
- depth = self.foundation_size.depth
162
- water_level = self.foundation_size.ground_water_level
163
-
164
- if water_level is None:
165
- water_corr = 1.0 # water correction
166
- else:
167
- # water level above the base of the foundation
168
- a = max(depth - water_level, 0.0)
169
- water_corr = min(1 - 0.5 * a / depth, 1)
170
-
171
- # effective overburden pressure (surcharge)
172
- eop = self.moist_unit_wgt * depth
173
- return eop * self.n_q * self.s_q * self.d_q * self.i_q * water_corr
174
-
175
- def _embedment_term(self, coef: float = 0.5) -> float:
176
- depth = self.foundation_size.depth
177
- width = self.foundation_size.effective_width
178
- water_level = self.foundation_size.ground_water_level
179
-
180
- if water_level is None:
181
- # water correction
182
- water_corr = 1.0
183
- else:
184
- #: b -> water level below the base of the foundation
185
- b = max(water_level - depth, 0)
186
- water_corr = min(0.5 + 0.5 * b / width, 1)
187
-
188
- return (coef * self.moist_unit_wgt * width * self.n_gamma
189
- * self.s_gamma * self.d_gamma * self.i_gamma * water_corr)
190
-
191
- @round_
192
- def bearing_capacity(self):
193
- """Calculates the ultimate bearing capacity."""
194
- return (self._cohesion_term(1.0)
195
- + self._surcharge_term()
196
- + self._embedment_term(0.5))
197
-
198
- @property
199
- @abstractmethod
200
- def n_c(self) -> float:
201
- ...
202
-
203
- @property
204
- @abstractmethod
205
- def n_q(self) -> float:
206
- ...
207
-
208
- @property
209
- @abstractmethod
210
- def n_gamma(self) -> float:
211
- ...
212
-
213
-
214
- from .hansen_ubc import HansenUltimateBearingCapacity
215
- from .terzaghi_ubc import (TerzaghiUBC4CircularFooting,
216
- TerzaghiUBC4RectangularFooting,
217
- TerzaghiUBC4SquareFooting,
218
- TerzaghiUBC4StripFooting)
219
- from .vesic_ubc import VesicUltimateBearingCapacity
220
-
221
-
222
43
  @enum_repr
223
- class UBC_TYPE(enum.StrEnum):
44
+ class UBCType(enum.StrEnum):
224
45
  """Enumeration of available ultimate bearing capacity types."""
225
46
  HANSEN = enum.auto()
226
47
  TERZAGHI = enum.auto()
@@ -236,45 +57,42 @@ def create_ultimate_bearing_capacity(friction_angle: float,
236
57
  eccentricity: float = 0.0,
237
58
  ground_water_level: Optional[
238
59
  float] = None,
239
- shape: Shape | str = Shape.SQUARE,
240
60
  load_angle=0.0,
241
61
  apply_local_shear=False,
242
- ubc_type: Optional[UBC_TYPE | str] = None,
62
+ shape: Shape | str = Shape.SQUARE,
63
+ ubc_type: Optional[UBCType | str] = None,
243
64
  ) -> UltimateBearingCapacity:
244
65
  r"""A factory function that encapsulate the creation of ultimate bearing
245
66
  capacity.
246
67
 
247
68
  :param friction_angle: Internal angle of friction for general shear
248
- failure. (degree)
69
+ failure (degree).
249
70
  :type friction_angle: float
250
71
 
251
- :param cohesion: Cohesion of soil. (kPa)
72
+ :param cohesion: Cohesion of soil (:math:`kPa`).
252
73
  :type cohesion: float
253
74
 
254
- :param moist_unit_wgt: Moist unit weight of soil. (:math:`kN/m^3`)
75
+ :param moist_unit_wgt: Moist unit weight of soil (:math:`kN/m^3`).
255
76
  :type moist_unit_wgt: float
256
77
 
257
- :param depth: Depth of foundation. (m)
78
+ :param depth: Depth of foundation (m).
258
79
  :type depth: float
259
80
 
260
- :param width: Width of foundation footing. (m)
81
+ :param width: Width of foundation footing (m).
261
82
  :type width: float
262
83
 
263
- :param length: Length of foundation footing. (m)
84
+ :param length: Length of foundation footing (m).
264
85
  :type length: float, optional
265
86
 
266
87
  :param eccentricity: The deviation of the foundation load from the
267
88
  center of gravity of the foundation footing,
268
- defaults to 0.0. This means that the foundation
89
+ defaults to 0.0 (m). This means that the foundation
269
90
  load aligns with the center of gravity of the
270
- foundation footing. (m)
91
+ foundation footing.
271
92
  :type eccentricity: float, optional
272
93
 
273
- :param ground_water_level: Depth of water below ground level. (m)
274
- :type ground_water_level: float
275
-
276
- :param shape: Shape of foundation footing, defaults to "SQUARE".
277
- :type shape: Shape | str, optional
94
+ :param ground_water_level: Depth of water below ground level (m).
95
+ :type ground_water_level: float, optional
278
96
 
279
97
  :param load_angle: Inclination of the applied load with the vertical
280
98
  (:math:`\alpha^{\circ}`), defaults to 0.0.
@@ -285,28 +103,33 @@ def create_ultimate_bearing_capacity(friction_angle: float,
285
103
  False.
286
104
  :type apply_local_shear: bool, optional
287
105
 
106
+ :param shape: Shape of foundation footing, defaults to
107
+ :attr:`~geolysis.foundation.Shape.SQUARE`.
108
+ :type shape: Shape | str, optional
109
+
288
110
  :param ubc_type: Type of allowable bearing capacity calculation to apply.
289
- Available values are: "HANSEN", "TERZAGHI", "VESIC".
111
+ Available values are: :attr:`~UBCType.HANSEN`,
112
+ :attr:`~UBCType.TERZAGHI`, and :attr:`~UBCType.VESIC`
290
113
  defaults to None.
291
- :type ubc_type: UBC_TYPE | str, optional
114
+ :type ubc_type: UBCType | str, optional
292
115
 
293
116
  :raises ValueError: Raised if ubc_type is not supported.
294
117
  :raises ValueError: Raised when length is not provided for a rectangular
295
118
  footing.
296
119
  :raises ValueError: Raised if an invalid footing shape is provided.
297
120
  """
298
- msg = (f"{ubc_type = } is not supported, Supported "
299
- f"types are: {list(UBC_TYPE)}")
121
+ msg = (f"{ubc_type=} is not supported, Supported "
122
+ f"types are: {list(UBCType)}")
300
123
 
301
124
  if ubc_type is None:
302
125
  raise ValueError(msg)
303
126
 
304
127
  try:
305
- ubc_type = UBC_TYPE(str(ubc_type).casefold())
128
+ ubc_type = UBCType(str(ubc_type).casefold())
306
129
  except ValueError as e:
307
130
  raise ValueError(msg) from e
308
131
 
309
- # exception from create_foundation will automaatically propagate
132
+ # exception from create_foundation will automatically propagate
310
133
  # no need to catch and handle it.
311
134
  fnd_size = create_foundation(depth=depth,
312
135
  width=width,
@@ -315,15 +138,15 @@ def create_ultimate_bearing_capacity(friction_angle: float,
315
138
  ground_water_level=ground_water_level,
316
139
  shape=shape)
317
140
  ubc_classes = {
318
- UBC_TYPE.HANSEN: HansenUltimateBearingCapacity,
319
- UBC_TYPE.TERZAGHI: {Shape.STRIP: TerzaghiUBC4StripFooting,
320
- Shape.CIRCLE: TerzaghiUBC4CircularFooting,
321
- Shape.SQUARE: TerzaghiUBC4SquareFooting,
322
- Shape.RECTANGLE: TerzaghiUBC4RectangularFooting},
323
- UBC_TYPE.VESIC: VesicUltimateBearingCapacity,
141
+ UBCType.HANSEN: HansenUltimateBearingCapacity,
142
+ UBCType.TERZAGHI: {Shape.STRIP: TerzaghiUBC4StripFooting,
143
+ Shape.CIRCLE: TerzaghiUBC4CircularFooting,
144
+ Shape.SQUARE: TerzaghiUBC4SquareFooting,
145
+ Shape.RECTANGLE: TerzaghiUBC4RectangularFooting},
146
+ UBCType.VESIC: VesicUltimateBearingCapacity,
324
147
  }
325
148
 
326
- if ubc_type == UBC_TYPE.TERZAGHI:
149
+ if ubc_type == UBCType.TERZAGHI:
327
150
  ubc_class = ubc_classes[ubc_type][fnd_size.footing_shape]
328
151
  else:
329
152
  ubc_class = ubc_classes[ubc_type]