py-pilecore 0.8.3__py3-none-any.whl → 0.9.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.

Potentially problematic release.


This version of py-pilecore might be problematic. Click here for more details.

Files changed (30) hide show
  1. {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.0.dist-info}/METADATA +2 -1
  2. py_pilecore-0.9.0.dist-info/RECORD +49 -0
  3. pypilecore/_version.py +1 -1
  4. pypilecore/api.py +89 -0
  5. pypilecore/common/piles/__init__.py +2 -0
  6. pypilecore/common/piles/geometry/materials.py +15 -0
  7. pypilecore/common/piles/grid.py +222 -0
  8. pypilecore/common/piles/main.py +15 -1
  9. pypilecore/common/piles/type.py +25 -0
  10. pypilecore/input/grouper_properties.py +2 -2
  11. pypilecore/input/soil_properties.py +19 -0
  12. pypilecore/input/tension.py +280 -0
  13. pypilecore/results/__init__.py +12 -4
  14. pypilecore/results/cases_multi_cpt_results.py +31 -26
  15. pypilecore/results/{multi_cpt_results.py → compression/multi_cpt_results.py} +25 -19
  16. pypilecore/results/{single_cpt_results.py → compression/single_cpt_results.py} +7 -7
  17. pypilecore/results/grouper_result.py +5 -3
  18. pypilecore/results/result_definitions.py +20 -13
  19. pypilecore/results/soil_properties.py +50 -0
  20. pypilecore/results/tension/multi_cpt_results.py +393 -0
  21. pypilecore/results/tension/single_cpt_results.py +393 -0
  22. pypilecore/results/typing.py +44 -0
  23. pypilecore/viewers/interactive_figures/figure_cpt_results_plan_view.py +1 -1
  24. pypilecore/viewers/viewer_cpt_group_results.py +7 -3
  25. pypilecore/viewers/viewer_cpt_results.py +8 -3
  26. pypilecore/viewers/viewer_cpt_results_plan_view.py +7 -3
  27. py_pilecore-0.8.3.dist-info/RECORD +0 -44
  28. {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.0.dist-info}/LICENSE +0 -0
  29. {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.0.dist-info}/WHEEL +0 -0
  30. {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,280 @@
1
+ from __future__ import annotations
2
+
3
+ import datetime
4
+ from copy import deepcopy
5
+ from typing import Any, Dict, List, Literal, Mapping, Sequence, Tuple
6
+
7
+ from pygef.cpt import CPTData
8
+
9
+ from pypilecore.common.piles import PileGridProperties, PileProperties
10
+ from pypilecore.input.soil_properties import create_soil_properties_payload
11
+
12
+
13
+ def create_multi_cpt_payload(
14
+ pile_tip_levels_nap: Sequence[float],
15
+ cptdata_objects: List[CPTData],
16
+ classify_tables: Dict[str, dict],
17
+ groundwater_level_nap: float,
18
+ pile: PileProperties,
19
+ pile_grid: PileGridProperties | None,
20
+ stiff_construction: bool = False,
21
+ ocr: float | None = None,
22
+ soil_load_sls: float = 0.0,
23
+ pile_head_level_nap: float | Literal["surface"] = "surface",
24
+ excavation_depth_nap: float | None = None,
25
+ top_of_tension_zone_nap: float | None = None,
26
+ individual_top_of_tension_zone_nap: Mapping[Any, float] | None = None,
27
+ excavation_param_t: float = 1.0,
28
+ individual_ocr: Mapping[str, float] | None = None,
29
+ overrule_xi: float | None = None,
30
+ gamma_f_nk: float = 1.0,
31
+ gamma_r_s: float = 1.2,
32
+ gamma_r_b: float = 1.2,
33
+ void_ratio_max: float = 0.8,
34
+ void_ratio_min: float = 0.4,
35
+ pile_load_sls_max: float = 1,
36
+ pile_load_sls_min: float = 0,
37
+ gamma_s_t: float = 1.35,
38
+ gamma_gamma: float = 1.1,
39
+ ) -> Tuple[dict, Dict[str, dict]]:
40
+ """
41
+ Creates a dictionary with the payload content for the PileCore endpoint
42
+ "/compression/multi-cpt/results"
43
+
44
+ This dictionary can be passed directly to `nuclei.client.call_endpoint()`.
45
+
46
+ Note
47
+ ----
48
+ The result should be converted to a jsonifyable message before it can be passed to a
49
+ `requests` call directly, for instance with
50
+ `nuclei.client.utils.python_types_to_message()`.
51
+
52
+ Parameters
53
+ ----------
54
+ pile_tip_levels_nap:
55
+ Range of values for which the pile resistance is calculated.
56
+ cptdata_objects:
57
+ A list of pygef.CPTData objects
58
+ classify_tables:
59
+ A dictionary, mapping `CPTData.alias` values to dictionary with the resulting response
60
+ of a call to CPTCore `classify/*` information, containing the following keys:
61
+
62
+ - geotechnicalSoilName: Sequence[str]
63
+ Geotechnical Soil Name related to the ISO
64
+ - lowerBoundary: Sequence[float]
65
+ Lower boundary of the layer [m]
66
+ - upperBoundary: Sequence[float]
67
+ Upper boundary of the layer [m]
68
+ - color: Sequence[str]
69
+ Hex color code
70
+ - mainComponent: Sequence[Literal["rocks", "gravel", "sand", "silt", "clay", "peat"]]
71
+ Main soil component
72
+ - cohesion: Sequence[float]
73
+ Cohesion of the layer [kPa]
74
+ - gamma_sat: Sequence[float]
75
+ Saturated unit weight [kN/m^3]
76
+ - gamma_unsat: Sequence[float]
77
+ Unsaturated unit weight [kN/m^3]
78
+ - phi: Sequence[float]
79
+ Phi [degrees]
80
+ - undrainedShearStrength: Sequence[float]
81
+ Undrained shear strength [kPa]
82
+
83
+ groundwater_level_nap:
84
+ The groundwater level. Unit: [m] w.r.t. NAP.
85
+ pile:
86
+ A PileProperties object.
87
+ stiff_construction:
88
+ Set to True if it's a stiff costruction. This will have influence on the xi factor
89
+ if you don't overrule it. Default = False.
90
+ ocr:
91
+ The Over-Consolidation-Ratio [-] of the foundation layer.
92
+ soil_load_sls:
93
+ Load on soil surface [kPa], used to calculate soil settlement. This is only required
94
+ with the settlement-driven friction-range strategy.
95
+ Default = 0.0
96
+ pile_head_level_nap:
97
+ The level of the pile head. Can be:
98
+
99
+ - float;
100
+ This is interpreted as an absolute level in [m w.r.t. NAP];
101
+ - Literal["surface"] (default).
102
+ In this case, the soil_properties.service_level
103
+ property is used.
104
+ excavation_depth_nap:
105
+ Soil excavation depth after the CPT was taken. Unit: [m] w.r.t. NAP.
106
+ excavation_param_t:
107
+ Excavation parameter depending on pile installation method and/or phasing.
108
+ - Use 1.0 (default) for post-excavation installation with vibration (i.e. hammering).
109
+ - Use 0.5 for reduced-vibration installation, or pile installation prior to
110
+ excavation method.
111
+
112
+ See for more info NEN 9997-1+C2:2017 7.6.2.3.(10)(k)
113
+ overrule_xi:
114
+ Set a fixed value for xi in all calculations. Use with caution. This will
115
+ overrule the calculation of xi-values based on the group-size, variation-
116
+ coefficient and construction stiffness.
117
+ gamma_f_nk:
118
+ Safety factor for design-values of the negative sleeve friction force.
119
+ Default = 1.0
120
+ gamma_r_s:
121
+ Safety factor, used to obtain design-values of the pile-tip bearingcapacity.
122
+ Default = 1.2
123
+ gamma_r_b:
124
+ Safety factor, used to obtain design-values of the sleeve bearingcapacity.
125
+ Default = 1.2
126
+ void_ratio_max:
127
+ Maximum void ratio of the soil (the loosest packing). The influence of this
128
+ parameter is limited and therefore it is typically sufficient to provide a
129
+ global estimation. For normally consolidated sands in The Netherlands, an
130
+ emax = 0.80 can be used in most cases.
131
+ Default = 0.8
132
+ void_ratio_min:
133
+ Minimum void ratio of the soil (the densest packing). The influence of this parameter
134
+ is limited and therefore it is typically sufficient to provide a global estimation.
135
+ For normally consolidated sands in The Netherlands, an emin = 0.40 can be used in most cases.
136
+ Default = 0.4
137
+ pile_load_sls_max:
138
+ Maximum tension force on pile Ft;max;k. Note that only positive values (tension force)
139
+ are accepted. unit: kN
140
+ Default = 1
141
+ pile_load_sls_min:
142
+ Minimum tension force (or maximum compression force) on pile -Ft;min;k (tension > 0). Positive
143
+ values (tension force), negative values (compression force) and 0.0 are accepted. Note that
144
+ the positive must be <= pile_load_sls_max. unit: kN
145
+ Default = 0
146
+ gamma_s_t:
147
+ Pile resistance factor gamma_s;t used to compute the design cone resistance values
148
+ qc;z;d as prescribed in NEN 9997-1+C2_2017 7.6.3.3(d).
149
+ Default = 1.35
150
+ gamma_gamma:
151
+ Partial factor for volumetric weight NEN 9997-1+C2:2017 A.3.2
152
+ Default = 1.1
153
+ Returns
154
+ -------
155
+ multi_cpt_payload:
156
+ Dictionary with the payload content for the PileCore endpoint
157
+ "/compression/multi-cpt/results"
158
+ results_kwargs:
159
+ Dictionary with keyword arguments for the `pilecore.MultiCPTBearingResults`
160
+ object.
161
+
162
+ Raises
163
+ ------
164
+ ValueError:
165
+ - If `excavation_depth_nap` is not None and `excavation_param_t` is None.
166
+ - If both `relative_pile_load` and `pile_load_sls` are None.
167
+ """
168
+ # Input validation
169
+ if excavation_depth_nap is not None and excavation_param_t is None:
170
+ raise ValueError(
171
+ "`excavation_param_t` cannot be None when `excavation_depth_nap` is not None."
172
+ )
173
+
174
+ soil_properties_list, results_kwargs = create_soil_properties_payload(
175
+ cptdata_objects=cptdata_objects,
176
+ classify_tables=classify_tables,
177
+ groundwater_level_nap=groundwater_level_nap,
178
+ friction_range_strategy="manual",
179
+ excavation_depth_nap=excavation_depth_nap,
180
+ master_ocr=ocr,
181
+ individual_negative_friction_range_nap=None,
182
+ individual_positive_friction_range_nap=None,
183
+ individual_ocr=individual_ocr,
184
+ master_top_of_tension_zone_nap=top_of_tension_zone_nap,
185
+ individual_top_of_tension_zone_nap=individual_top_of_tension_zone_nap,
186
+ )
187
+ multi_cpt_payload: dict = dict(
188
+ pile_tip_levels_nap=list(pile_tip_levels_nap),
189
+ list_soil_properties=soil_properties_list,
190
+ pile_properties=pile.serialize_payload(),
191
+ pile_head_level_nap=pile_head_level_nap,
192
+ stiff_construction=stiff_construction,
193
+ soil_load=soil_load_sls if soil_load_sls is not None else 0.0,
194
+ excavation_param_t=excavation_param_t,
195
+ gamma_f_nk=gamma_f_nk,
196
+ gamma_r_b=gamma_r_b,
197
+ gamma_r_s=gamma_r_s,
198
+ void_ratio_max=void_ratio_max,
199
+ void_ratio_min=void_ratio_min,
200
+ pile_load_sls_max=pile_load_sls_max,
201
+ pile_load_sls_min=pile_load_sls_min,
202
+ gamma_s_t=gamma_s_t,
203
+ gamma_gamma=gamma_gamma,
204
+ )
205
+
206
+ # Add optional properties
207
+ if excavation_depth_nap is not None:
208
+ multi_cpt_payload["excavation_depth_nap"] = excavation_depth_nap
209
+ if overrule_xi is not None:
210
+ multi_cpt_payload["overrule_xi"] = overrule_xi
211
+ if pile_grid is not None:
212
+ multi_cpt_payload["pile_grid"] = pile_grid.serialize_payload()
213
+
214
+ return multi_cpt_payload, results_kwargs
215
+
216
+
217
+ def create_multi_cpt_report_payload(
218
+ multi_cpt_payload: dict,
219
+ project_name: str,
220
+ project_id: str,
221
+ author: str,
222
+ date: str | None = None,
223
+ group_results_content: bool = True,
224
+ individual_cpt_results_content: bool = True,
225
+ result_summary_content: bool = True,
226
+ ) -> dict:
227
+ """
228
+ Creates a dictionary with the payload content for the PileCore endpoint
229
+ "/compression/multi-cpt/report"
230
+
231
+ This dictionary can be passed directly to `nuclei.client.call_endpoint()`. Note that
232
+ it should be converted to a jsonifyable message before it can be passed to a
233
+ `requests` call directly, for instance with
234
+ `nuclei.client.utils.python_types_to_message()`.
235
+
236
+ Parameters
237
+ ----------
238
+ multi_cpt_payload:
239
+ Index 0 of the resulting tuple of a call to `create_multi_cpt_payload()`
240
+ project_name:
241
+ The name of the project.
242
+ project_id:
243
+ The identifier (code) of the project.
244
+ author:
245
+ The author of the report.
246
+ date:
247
+ The date of the report. If None, the current date will be used.
248
+ group_results_content:
249
+ Whether or not to add the group-results section to the report. Default = True
250
+ individual_cpt_results_content:
251
+ Whether or not to add the individual-cpt-results section to the report.
252
+ Default = True
253
+ result_summary_content:
254
+ Whether or not to add the result-summary section to the report. Default = True
255
+
256
+ Returns
257
+ -------
258
+ report_payload:
259
+ Dictionary with the payload content for the PileCore endpoint
260
+ "/compression/multi-cpt/report"
261
+ """
262
+ report_payload = deepcopy(multi_cpt_payload)
263
+ report_payload.update(
264
+ dict(
265
+ content=dict(
266
+ group_results=group_results_content,
267
+ individual_cpt_results=individual_cpt_results_content,
268
+ result_summary=result_summary_content,
269
+ ),
270
+ general=dict(
271
+ author=author,
272
+ project_id=project_id,
273
+ project_name=project_name,
274
+ date=(
275
+ date if date is None else datetime.date.today().strftime("%d-%m-%y")
276
+ ),
277
+ ),
278
+ )
279
+ )
280
+ return report_payload
@@ -1,13 +1,21 @@
1
1
  from pypilecore.results.cases_multi_cpt_results import CasesMultiCPTBearingResults
2
+ from pypilecore.results.compression.multi_cpt_results import (
3
+ MultiCPTCompressionBearingResults,
4
+ )
5
+ from pypilecore.results.compression.single_cpt_results import (
6
+ SingleCPTCompressionBearingResults,
7
+ )
2
8
  from pypilecore.results.grouper_result import GrouperResults
3
- from pypilecore.results.multi_cpt_results import MultiCPTBearingResults
4
- from pypilecore.results.single_cpt_results import SingleCPTBearingResults
5
9
  from pypilecore.results.soil_properties import SoilProperties
10
+ from pypilecore.results.tension.multi_cpt_results import MultiCPTTensionBearingResults
11
+ from pypilecore.results.tension.single_cpt_results import SingleCPTTensionBearingResults
6
12
 
7
13
  __all__ = [
8
14
  "CasesMultiCPTBearingResults",
9
- "MultiCPTBearingResults",
10
- "SingleCPTBearingResults",
15
+ "MultiCPTCompressionBearingResults",
16
+ "SingleCPTCompressionBearingResults",
17
+ "MultiCPTTensionBearingResults",
18
+ "SingleCPTTensionBearingResults",
11
19
  "SoilProperties",
12
20
  "GrouperResults",
13
21
  ]
@@ -6,11 +6,11 @@ import pandas as pd
6
6
  from natsort import natsorted
7
7
  from pygef.common import Location
8
8
 
9
- from pypilecore.results.multi_cpt_results import MultiCPTBearingResults
10
9
  from pypilecore.results.result_definitions import (
11
10
  CPTGroupResultDefinitions,
12
11
  CPTResultDefinitions,
13
12
  )
13
+ from pypilecore.results.typing import MultiCPTBearingResults
14
14
 
15
15
 
16
16
  class CasesMultiCPTBearingResults:
@@ -77,23 +77,27 @@ class CasesMultiCPTBearingResults:
77
77
  records = []
78
78
  for case_name, case_results in results_per_case.items():
79
79
  for result_definition in CPTResultDefinitions:
80
- df = case_results.cpt_results.get_results_per_cpt(
81
- column_name=result_definition.name
82
- )
83
- for idx_row, row in df.iterrows():
84
- for test_id, result in row.items():
85
- records.append(
86
- dict(
87
- case_name=case_name,
88
- result_name=result_definition.name,
89
- test_id=test_id,
90
- x=self.cpt_locations[test_id].x,
91
- y=self.cpt_locations[test_id].y,
92
- pile_tip_level_nap=idx_row,
93
- result=result,
94
- result_unit=result_definition.value.unit,
80
+ if (
81
+ result_definition.name
82
+ in case_results.cpt_results.to_pandas().columns
83
+ ):
84
+ df = case_results.cpt_results.get_results_per_cpt(
85
+ column_name=result_definition.name
86
+ )
87
+ for idx_row, row in df.iterrows():
88
+ for test_id, result in row.items():
89
+ records.append(
90
+ dict(
91
+ case_name=case_name,
92
+ result_name=result_definition.name,
93
+ test_id=test_id,
94
+ x=self.cpt_locations[test_id].x,
95
+ y=self.cpt_locations[test_id].y,
96
+ pile_tip_level_nap=idx_row,
97
+ result=result,
98
+ result_unit=result_definition.value.unit,
99
+ )
95
100
  )
96
- )
97
101
  self._cpt_results_dataframe = pd.DataFrame.from_records(records)
98
102
 
99
103
  def _set_cpt_group_results_dataframe(
@@ -104,16 +108,17 @@ class CasesMultiCPTBearingResults:
104
108
  for case_name, case_results in result_cases.items():
105
109
  df = case_results.group_results_table.to_pandas()
106
110
  for result_definition in CPTGroupResultDefinitions:
107
- for _, row in df.iterrows():
108
- records.append(
109
- dict(
110
- case_name=case_name,
111
- result_name=result_definition.name,
112
- pile_tip_level_nap=row["pile_tip_level_nap"],
113
- result=row[result_definition.value.name],
114
- result_unit=result_definition.value.unit,
111
+ if result_definition.name in df.columns:
112
+ for _, row in df.iterrows():
113
+ records.append(
114
+ dict(
115
+ case_name=case_name,
116
+ result_name=result_definition.name,
117
+ pile_tip_level_nap=row["pile_tip_level_nap"],
118
+ result=row[result_definition.value.name],
119
+ result_unit=result_definition.value.unit,
120
+ )
115
121
  )
116
- )
117
122
  self._cpt_group_results_dataframe = pd.DataFrame.from_records(records)
118
123
 
119
124
  def _set_cpt_locations(self, value: Dict[str, Location]) -> None:
@@ -11,13 +11,15 @@ from matplotlib.patches import Patch
11
11
 
12
12
  from pypilecore.common.piles import PileProperties
13
13
  from pypilecore.exceptions import UserError
14
+ from pypilecore.results.compression.single_cpt_results import (
15
+ SingleCPTCompressionBearingResults,
16
+ )
14
17
  from pypilecore.results.load_settlement import get_load_settlement_plot
15
- from pypilecore.results.single_cpt_results import SingleCPTBearingResults
16
18
 
17
19
  Number = Union[float, int]
18
20
 
19
21
 
20
- class CPTGroupResultsTable:
22
+ class CPTCompressionGroupResultsTable:
21
23
  """
22
24
  Dataclass that contains the bearing results of a group of CPTs.
23
25
  """
@@ -299,10 +301,10 @@ class CPTGroupResultsTable:
299
301
  return axes
300
302
 
301
303
 
302
- class SingleCPTBearingResultsContainer:
304
+ class SingleCPTCompressionBearingResultsContainer:
303
305
  """A container that holds multiple SingleCPTBearingResults objects"""
304
306
 
305
- def __init__(self, cpt_results_dict: Dict[str, SingleCPTBearingResults]):
307
+ def __init__(self, cpt_results_dict: Dict[str, SingleCPTCompressionBearingResults]):
306
308
  """
307
309
  Parameters
308
310
  ----------
@@ -314,14 +316,16 @@ class SingleCPTBearingResultsContainer:
314
316
  @classmethod
315
317
  def from_api_response(
316
318
  cls, cpt_results_list: list, cpt_input: dict
317
- ) -> "SingleCPTBearingResultsContainer":
319
+ ) -> "SingleCPTCompressionBearingResultsContainer":
318
320
  """
319
321
  Instantiates the SingleCPTBearingResultsContainer object from the "cpts" array,
320
322
  which is returned in the response of a "compression/multiple-cpts/results" endpoint call.
321
323
  """
322
324
  return cls(
323
325
  cpt_results_dict={
324
- cpt_results["test_id"]: SingleCPTBearingResults.from_api_response(
326
+ cpt_results[
327
+ "test_id"
328
+ ]: SingleCPTCompressionBearingResults.from_api_response(
325
329
  cpt_results_dict=cpt_results,
326
330
  ref_height=cpt_input[cpt_results["test_id"]]["ref_height"],
327
331
  surface_level_ref=cpt_input[cpt_results["test_id"]][
@@ -334,14 +338,14 @@ class SingleCPTBearingResultsContainer:
334
338
  }
335
339
  )
336
340
 
337
- def __getitem__(self, test_id: str) -> SingleCPTBearingResults:
341
+ def __getitem__(self, test_id: str) -> SingleCPTCompressionBearingResults:
338
342
  if not isinstance(test_id, str):
339
343
  raise TypeError(f"Expected a test-id as a string, but got: {type(test_id)}")
340
344
 
341
345
  return self.get_cpt_results(test_id)
342
346
 
343
347
  @property
344
- def cpt_results_dict(self) -> Dict[str, SingleCPTBearingResults]:
348
+ def cpt_results_dict(self) -> Dict[str, SingleCPTCompressionBearingResults]:
345
349
  """The dictionary that maps the cpt-names to SingleCPTBearingResults objects."""
346
350
  return self._cpt_results_dict
347
351
 
@@ -351,11 +355,11 @@ class SingleCPTBearingResultsContainer:
351
355
  return list(self.cpt_results_dict.keys())
352
356
 
353
357
  @property
354
- def results(self) -> List[SingleCPTBearingResults]:
358
+ def results(self) -> List[SingleCPTCompressionBearingResults]:
355
359
  """The computed results, as a list of SingleCPTBearingResults objects."""
356
360
  return list(self.cpt_results_dict.values())
357
361
 
358
- def get_cpt_results(self, test_id: str) -> SingleCPTBearingResults:
362
+ def get_cpt_results(self, test_id: str) -> SingleCPTCompressionBearingResults:
359
363
  """
360
364
  Returns the `SingleCPTBearingResults` object for the provided test_id.
361
365
  """
@@ -411,7 +415,7 @@ class SingleCPTBearingResultsContainer:
411
415
  return cpt_results_df
412
416
 
413
417
 
414
- class MultiCPTBearingResults:
418
+ class MultiCPTCompressionBearingResults:
415
419
  """
416
420
  Object that contains the results of a PileCore multi-cpt calculation.
417
421
 
@@ -420,8 +424,8 @@ class MultiCPTBearingResults:
420
424
 
421
425
  def __init__(
422
426
  self,
423
- cpt_results: SingleCPTBearingResultsContainer,
424
- group_results_table: CPTGroupResultsTable,
427
+ cpt_results: SingleCPTCompressionBearingResultsContainer,
428
+ group_results_table: CPTCompressionGroupResultsTable,
425
429
  pile_properties: PileProperties,
426
430
  gamma_f_nk: float,
427
431
  gamma_r_b: float,
@@ -460,13 +464,15 @@ class MultiCPTBearingResults:
460
464
  @classmethod
461
465
  def from_api_response(
462
466
  cls, response_dict: dict, cpt_input: dict
463
- ) -> "MultiCPTBearingResults":
467
+ ) -> "MultiCPTCompressionBearingResults":
464
468
  """
465
469
  Build the object from the response payload of the PileCore endpoint
466
470
  "/compression/multi-cpt/results".
467
471
  """
468
- cpt_results_dict = SingleCPTBearingResultsContainer.from_api_response(
469
- cpt_results_list=response_dict["cpts"], cpt_input=cpt_input
472
+ cpt_results_dict = (
473
+ SingleCPTCompressionBearingResultsContainer.from_api_response(
474
+ cpt_results_list=response_dict["cpts"], cpt_input=cpt_input
475
+ )
470
476
  )
471
477
  group_results = response_dict["group_results"]
472
478
  return cls(
@@ -474,7 +480,7 @@ class MultiCPTBearingResults:
474
480
  pile_properties=PileProperties.from_api_response(
475
481
  response_dict["pile_properties"]
476
482
  ),
477
- group_results_table=CPTGroupResultsTable(
483
+ group_results_table=CPTCompressionGroupResultsTable(
478
484
  pile_tip_level_nap=group_results["pile_tip_level_nap"],
479
485
  R_s_k=group_results["R_s_k"],
480
486
  R_b_k=group_results["R_b_k"],
@@ -532,7 +538,7 @@ class MultiCPTBearingResults:
532
538
  return self._pp
533
539
 
534
540
  @property
535
- def cpt_results(self) -> SingleCPTBearingResultsContainer:
541
+ def cpt_results(self) -> SingleCPTCompressionBearingResultsContainer:
536
542
  """The SingleCPTBearingResultsContainer object."""
537
543
  return self._cpt_results
538
544
 
@@ -542,7 +548,7 @@ class MultiCPTBearingResults:
542
548
  return self.cpt_results.test_ids
543
549
 
544
550
  @property
545
- def group_results_table(self) -> CPTGroupResultsTable:
551
+ def group_results_table(self) -> CPTCompressionGroupResultsTable:
546
552
  """The CPTGroupResultsTable dataclass, containing the group results."""
547
553
  return self._group_results_table
548
554
 
@@ -21,7 +21,7 @@ Number = Union[float, int]
21
21
 
22
22
 
23
23
  @dataclass(frozen=True)
24
- class CPTResultsTable:
24
+ class CPTCompressionResultsTable:
25
25
  """Object containing the results of a single CPT."""
26
26
 
27
27
  pile_tip_level_nap: NDArray[np.float64]
@@ -127,7 +127,7 @@ class CPTResultsTable:
127
127
  s_el: Sequence[Number],
128
128
  k_v_b: Sequence[Number],
129
129
  k_v_1: Sequence[Number],
130
- ) -> CPTResultsTable:
130
+ ) -> CPTCompressionResultsTable:
131
131
  return cls(
132
132
  pile_tip_level_nap=np.array(pile_tip_level_nap).astype(np.float64),
133
133
  F_nk_cal=np.array(F_nk_cal).astype(np.float64),
@@ -173,7 +173,7 @@ class CPTResultsTable:
173
173
  return pd.DataFrame(self.__dict__).dropna(axis=0, how="all")
174
174
 
175
175
 
176
- class SingleCPTBearingResults:
176
+ class SingleCPTCompressionBearingResults:
177
177
  """
178
178
  Object that contains the results of a PileCore single-cpt calculation.
179
179
 
@@ -184,7 +184,7 @@ class SingleCPTBearingResults:
184
184
  self,
185
185
  soil_properties: SoilProperties,
186
186
  pile_head_level_nap: float,
187
- results_table: CPTResultsTable,
187
+ results_table: CPTCompressionResultsTable,
188
188
  ) -> None:
189
189
  """
190
190
  Parameters
@@ -208,7 +208,7 @@ class SingleCPTBearingResults:
208
208
  surface_level_ref: float,
209
209
  x: float | None = None,
210
210
  y: float | None = None,
211
- ) -> "SingleCPTBearingResults":
211
+ ) -> "SingleCPTCompressionBearingResults":
212
212
  results_table = cpt_results_dict["results_table"]
213
213
  return cls(
214
214
  soil_properties=SoilProperties(
@@ -226,7 +226,7 @@ class SingleCPTBearingResults:
226
226
  y=y,
227
227
  ),
228
228
  pile_head_level_nap=cpt_results_dict["annotations"]["pile_head_level_nap"],
229
- results_table=CPTResultsTable.from_sequences(
229
+ results_table=CPTCompressionResultsTable.from_sequences(
230
230
  pile_tip_level_nap=results_table["pile_tip_level_nap"],
231
231
  F_nk_cal=results_table["F_nk_cal"],
232
232
  F_nk_k=results_table["F_nk_k"],
@@ -282,7 +282,7 @@ class SingleCPTBearingResults:
282
282
  return self._pile_head_level_nap
283
283
 
284
284
  @property
285
- def table(self) -> CPTResultsTable:
285
+ def table(self) -> CPTCompressionResultsTable:
286
286
  """The object with single-CPT results table traces."""
287
287
  return self._results_table
288
288
 
@@ -13,7 +13,9 @@ from matplotlib.axes import Axes
13
13
  from numpy.typing import NDArray
14
14
  from shapely import MultiPoint
15
15
 
16
- from pypilecore.results.multi_cpt_results import MultiCPTBearingResults
16
+ from pypilecore.results.compression.multi_cpt_results import (
17
+ MultiCPTCompressionBearingResults,
18
+ )
17
19
  from pypilecore.results.post_processing import (
18
20
  MaxBearingResult,
19
21
  MaxBearingResults,
@@ -568,7 +570,7 @@ class GrouperResults:
568
570
  """
569
571
 
570
572
  clusters: List[SingleClusterResult]
571
- multi_cpt_bearing_results: MultiCPTBearingResults
573
+ multi_cpt_bearing_results: MultiCPTCompressionBearingResults
572
574
 
573
575
  def __post_init__(self) -> None:
574
576
  for cluster in self.clusters:
@@ -606,7 +608,7 @@ class GrouperResults:
606
608
  cls,
607
609
  response_dict: dict,
608
610
  pile_load_uls: float,
609
- multi_cpt_bearing_results: MultiCPTBearingResults,
611
+ multi_cpt_bearing_results: MultiCPTCompressionBearingResults,
610
612
  ) -> "GrouperResults":
611
613
  """
612
614
  Stores the response of the PileCore endpoint