py-pilecore 0.2.5__py3-none-any.whl → 0.3.1__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-pilecore
3
- Version: 0.2.5
3
+ Version: 0.3.1
4
4
  Summary: Public python SDK for the CEMS PileCore web-API.
5
5
  License: MIT License
6
6
 
@@ -1,23 +1,23 @@
1
1
  pypilecore/__init__.py,sha256=T2Uuao6fboVhrzKI_Sa7jXbcNAUl_PKk9BFdsozOG98,78
2
- pypilecore/_version.py,sha256=32GW00vMKy-dZ6YEGZU761DjY4UfQ3SE86XtIj3yyhs,175
2
+ pypilecore/_version.py,sha256=YxvR7Y0Tsf_BUbHAeQJdfQVgFNjWkq8WBqPIIATmUb4,175
3
3
  pypilecore/api.py,sha256=Bq7FRSQQGOENY7HTI8bW41-WBNPpqXZvyN1A71VUam4,5141
4
4
  pypilecore/exceptions.py,sha256=-MZOfsxyHLCI0k1-wZFfVsMxc1lya5buuhLks5rxlCo,89
5
5
  pypilecore/plot_utils.py,sha256=rK5_067-4-x7LzZgt_t6ahcGrZInxNrqHqsy0RzCnq8,954
6
6
  pypilecore/utils.py,sha256=ib9LgJBIgWukL7zd_Zk1LP27UTMIZTRJ4RBB6ubn97o,1186
7
7
  pypilecore/input/__init__.py,sha256=tlmThdPtO8e6L6pqxuRQ7EOHRxYwuIcaNNGlZyAnzig,606
8
8
  pypilecore/input/grouper_properties.py,sha256=AqZHvg-CXcoTW7u9wgyqSm1oZLBc7sSoTawxGK69144,10895
9
- pypilecore/input/multi_cpt.py,sha256=ksXwMzY1KeSyWeeyiCkJVMilIWxAS45XwKXaS_uEQAE,19086
9
+ pypilecore/input/multi_cpt.py,sha256=1gEK-Imdhr0xOfcn50lq1OwYvjFs2NMf51LDaVddGas,19539
10
10
  pypilecore/input/pile_properties.py,sha256=mK8_VRy-tHZCKFHcv8ftMlCEs8KEsZpG9eGLq13hYPA,8400
11
- pypilecore/input/soil_properties.py,sha256=6JIy5CHXReKZNrsB0m-ehJKUM97t-GBO04MG9QyHXMM,6962
11
+ pypilecore/input/soil_properties.py,sha256=SL9aJ9IiVx00YjBu-hzAAIpbPZgTLpSNGnfphUVZjKQ,7659
12
12
  pypilecore/results/__init__.py,sha256=ggTI2QzILhX_oNx1YMOih6IVCkBFg8I5-Jyn9Sw3_h0,389
13
- pypilecore/results/grouper_result.py,sha256=9UV_fyUttqYuFgmdBCAvm6OXRTohF7oU4btxzQh1Fzk,19482
13
+ pypilecore/results/grouper_result.py,sha256=XzrvsWezFB0ZXmIfC_Foy9oxqOqttRLDAxTa7eve1rc,21066
14
14
  pypilecore/results/load_settlement.py,sha256=EbfTrSvH_g96KE-x8ZjmO8D0mt5KFaQ_-AR8u4blLsU,9752
15
- pypilecore/results/multi_cpt_results.py,sha256=vZLy7CRUHnShVzuiixfzGWZEdxeMMLWv57Xm_x8rDu4,22466
15
+ pypilecore/results/multi_cpt_results.py,sha256=_5cXM3lWFobfG3w6a6h5e5MQVdP6lgmcaJNpAWZIAC4,25204
16
16
  pypilecore/results/pile_properties.py,sha256=z1R5UNoYjBem2rS8LMJ_ye2J5ejDoSilU5fCjUrNdUg,28592
17
- pypilecore/results/single_cpt_results.py,sha256=-fmlgBPyCSyID7d-u-pPUdu5PLExtyKQc2kXQFNhQvs,17564
17
+ pypilecore/results/single_cpt_results.py,sha256=eFeqMOOhgiQimv9EHFFWPFWWZWV_iYcqhXU39jSreF4,19358
18
18
  pypilecore/results/soil_properties.py,sha256=oZYTKSXP5UgxY2vwX-bu_X447KLptuYPpsgFi_E00IQ,20704
19
- py_pilecore-0.2.5.dist-info/LICENSE,sha256=3OCAZXffN0Bettjeya8uF_ZYegyvvCfH1WUt6CrHb_0,1061
20
- py_pilecore-0.2.5.dist-info/METADATA,sha256=G5wi-AfRRynjXYGF-G72Me0isAoT_4O4QbRGOtPCpJg,5806
21
- py_pilecore-0.2.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
22
- py_pilecore-0.2.5.dist-info/top_level.txt,sha256=7BKIWZuSkbQtJ0ho5P1JvcaEbHzqADCcBuOduZmIaiI,11
23
- py_pilecore-0.2.5.dist-info/RECORD,,
19
+ py_pilecore-0.3.1.dist-info/LICENSE,sha256=3OCAZXffN0Bettjeya8uF_ZYegyvvCfH1WUt6CrHb_0,1061
20
+ py_pilecore-0.3.1.dist-info/METADATA,sha256=TaAuonuIG1bDL4r4IqC8cDweFcnmGK-Ar-Pq-WGxsWA,5806
21
+ py_pilecore-0.3.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
22
+ py_pilecore-0.3.1.dist-info/top_level.txt,sha256=7BKIWZuSkbQtJ0ho5P1JvcaEbHzqADCcBuOduZmIaiI,11
23
+ py_pilecore-0.3.1.dist-info/RECORD,,
pypilecore/_version.py CHANGED
@@ -4,4 +4,4 @@ try:
4
4
  __version__ = version("py-pilecore")
5
5
  # during CI
6
6
  except PackageNotFoundError:
7
- __version__ = "0.2.5"
7
+ __version__ = "0.3.1"
@@ -24,6 +24,7 @@ def create_multi_cpt_payload(
24
24
  ] = "lower_bound",
25
25
  stiff_construction: bool = False,
26
26
  cpts_group: List[str] | None = None,
27
+ ocr: float | None = None,
27
28
  fixed_negative_friction_range_nap: Tuple[float, float] | None = None,
28
29
  fixed_positive_friction_range_nap: Tuple[float, Literal["ptl"] | float]
29
30
  | None = None,
@@ -41,6 +42,7 @@ def create_multi_cpt_payload(
41
42
  str, Tuple[float, Literal["ptl"] | float]
42
43
  ]
43
44
  | None = None,
45
+ individual_ocr: Mapping[str, float] | None = None,
44
46
  diameter_base: float | None = None,
45
47
  diameter_shaft: float | None = None,
46
48
  width_base_large: float | None = None,
@@ -129,6 +131,8 @@ def create_multi_cpt_payload(
129
131
  cpts_group:
130
132
  CPTs that are considered one group. Items must relate to the alias of the CPTData
131
133
  objects in `cptdata_objects`.
134
+ ocr:
135
+ The Over-Consolidation-Ratio [-] of the foundation layer.
132
136
  fixed_negative_friction_range_nap:
133
137
  Optionally sets the fixed depth range between which the negative sleeve friction
134
138
  is calculated. If an array of format [top, bottom], the range is set between top
@@ -189,6 +193,10 @@ def create_multi_cpt_payload(
189
193
  individual_positive_friction_range_nap:
190
194
  A dictionary, mapping ``CPTData.alias`` values to fixed positive-friction ranges.
191
195
  For a specification of the values, see ``fixed_positive_friction_range_nap``
196
+ individual_ocr:
197
+ A dictionary, mapping ``CPTData.alias`` values to Over-Consolidation-Ratio [-]
198
+ values of the foundation layer. This will overrule the general `ocr` setting for
199
+ these specific CPTs only.
192
200
  diameter_base:
193
201
  Pile base diameter [m].
194
202
  Only relevant if ``pile_shape`` = "round".
@@ -299,8 +307,10 @@ def create_multi_cpt_payload(
299
307
  groundwater_level_nap=groundwater_level_nap,
300
308
  friction_range_strategy=friction_range_strategy,
301
309
  excavation_depth_nap=excavation_depth_nap,
310
+ master_ocr=ocr,
302
311
  individual_negative_friction_range_nap=individual_negative_friction_range_nap,
303
312
  individual_positive_friction_range_nap=individual_positive_friction_range_nap,
313
+ individual_ocr=individual_ocr,
304
314
  )
305
315
  pile_properties = create_pile_properties_payload(
306
316
  pile_type=pile_type,
@@ -15,10 +15,6 @@ transform = {
15
15
  "peat": "V",
16
16
  }
17
17
 
18
- # Create input_table
19
- results_passover = {}
20
- soil_properties_list = []
21
-
22
18
 
23
19
  def create_soil_properties_payload(
24
20
  cptdata_objects: List[CPTData],
@@ -26,12 +22,14 @@ def create_soil_properties_payload(
26
22
  groundwater_level_nap: float,
27
23
  friction_range_strategy: Literal["manual", "lower_bound", "settlement_driven"],
28
24
  excavation_depth_nap: float | None = None,
25
+ master_ocr: float | None = None,
29
26
  individual_negative_friction_range_nap: Mapping[Any, Tuple[float, float]]
30
27
  | None = None,
31
28
  individual_positive_friction_range_nap: Mapping[
32
29
  Any, Tuple[float, Literal["ptl"] | float]
33
30
  ]
34
31
  | None = None,
32
+ individual_ocr: Mapping[Any, float] | None = None,
35
33
  ) -> Tuple[List[dict], Dict[str, dict]]:
36
34
  """
37
35
  Creates a dictionary with the `soil_properties` payload content for the PileCore
@@ -79,12 +77,18 @@ def create_soil_properties_payload(
79
77
  "lower_bound" or "settlement_driven".
80
78
  excavation_depth_nap:
81
79
  Soil excavation depth after the CPT was taken. Unit: [m] w.r.t. NAP.
80
+ ocr:
81
+ The Over-Consolidation-Ratio [-] of the foundation layer.
82
82
  individual_negative_friction_range_nap:
83
83
  A dictionary, mapping `CPTData.alias` values to fixed negative-friction ranges.
84
84
  For a specification of the values, see `fixed_negative_friction_range_nap`
85
85
  individual_positive_friction_range_nap:
86
86
  A dictionary, mapping `CPTData.alias` values to fixed positive-friction ranges.
87
87
  For a specification of the values, see `fixed_positive_friction_range_nap`
88
+ individual_ocr:
89
+ A dictionary, mapping ``CPTData.alias`` values to Over-Consolidation-Ratio [-]
90
+ values of the foundation layer. This will overrule the general `ocr` setting for
91
+ these specific CPTs only.
88
92
 
89
93
  Returns
90
94
  -------
@@ -95,6 +99,10 @@ def create_soil_properties_payload(
95
99
  Dictionary with keyword arguments for the `pilecore.MultiCPTBearingResults`
96
100
  object.
97
101
  """
102
+ # Initialize outputs
103
+ results_passover = {}
104
+ soil_properties_list = []
105
+
98
106
  for cpt in tqdm(cptdata_objects, desc="Create soil properties payload"):
99
107
  # Construct the cpt_data payload
100
108
  cpt_data = dict(
@@ -158,6 +166,14 @@ def create_soil_properties_payload(
158
166
  "fixed_positive_friction_range_nap"
159
167
  ] = individual_positive_friction_range_nap[cpt.alias]
160
168
 
169
+ # Optionally add OCR parameter
170
+ if individual_ocr is not None and cpt.alias in individual_ocr.keys():
171
+ ocr: float | None = individual_ocr[cpt.alias]
172
+ else:
173
+ ocr = master_ocr
174
+ if ocr is not None:
175
+ soil_properties["ocr"] = ocr
176
+
161
177
  soil_properties_list.append(soil_properties)
162
178
  results_passover[cpt.alias] = {
163
179
  "ref_height": cpt.delivered_vertical_position_offset,
@@ -279,6 +279,7 @@ class SingleClusterResult:
279
279
  cls, response_dict: dict, pile_load_uls: float
280
280
  ) -> "SingleClusterResult":
281
281
  try:
282
+ table = response_dict["table"]
282
283
  return cls(
283
284
  cpt_names=response_dict["names"],
284
285
  coordinates=response_dict["coordinates"],
@@ -292,7 +293,37 @@ class SingleClusterResult:
292
293
  spatial_check=response_dict["spatial_check"],
293
294
  variation_check=response_dict["variation_check"],
294
295
  centre_to_centre_check=response_dict["centre_to_centre_check"],
295
- data=SingleClusterData(**response_dict["table"]),
296
+ data=SingleClusterData(
297
+ characteristic_bearing_capacity=table[
298
+ "characteristic_bearing_capacity"
299
+ ],
300
+ design_bearing_capacity=table["design_bearing_capacity"],
301
+ design_negative_friction=table["design_negative_friction"],
302
+ group_centre_to_centre_validation=table[
303
+ "group_centre_to_centre_validation"
304
+ ],
305
+ group_centre_to_centre_validation_15=table[
306
+ "group_centre_to_centre_validation_15"
307
+ ],
308
+ group_centre_to_centre_validation_20=table[
309
+ "group_centre_to_centre_validation_20"
310
+ ],
311
+ group_centre_to_centre_validation_25=table[
312
+ "group_centre_to_centre_validation_25"
313
+ ],
314
+ mean_calculated_bearing_capacity=table[
315
+ "mean_calculated_bearing_capacity"
316
+ ],
317
+ min_calculated_bearing_capacity=table[
318
+ "min_calculated_bearing_capacity"
319
+ ],
320
+ net_design_bearing_capacity=table["net_design_bearing_capacity"],
321
+ nominal_cpt=table["nominal_cpt"],
322
+ pile_tip_level=table["pile_tip_level"],
323
+ variation_coefficient=table["variation_coefficient"],
324
+ xi_factor=table["xi_factor"],
325
+ xi_values=table["xi_values"],
326
+ ),
296
327
  )
297
328
  except KeyError as e:
298
329
  raise KeyError(
@@ -30,6 +30,8 @@ class CPTGroupResultsTable:
30
30
  R_s_k: Sequence[float],
31
31
  R_b_k: Sequence[float],
32
32
  R_c_k: Sequence[float],
33
+ R_s_d: Sequence[float],
34
+ R_b_d: Sequence[float],
33
35
  R_c_d: Sequence[float],
34
36
  F_nk_cal_mean: Sequence[float],
35
37
  F_nk_k: Sequence[float],
@@ -70,6 +72,10 @@ class CPTGroupResultsTable:
70
72
  The characteristic value of the bottom bearingcapacity [kN].
71
73
  R_c_k:
72
74
  The characteristic value of the total compressive bearingcapacity [kN].
75
+ R_s_d:
76
+ The design value of the shaft bearingcapacity [kN].
77
+ R_b_d:
78
+ The design value of the bottom bearingcapacity [kN].
73
79
  R_c_d:
74
80
  The design value of the total bearingcapacity [kN].
75
81
  F_nk_cal_mean:
@@ -137,6 +143,10 @@ class CPTGroupResultsTable:
137
143
  """The characteristic value of the bottom bearingcapacity [kN]."""
138
144
  self.R_c_k = np.array(R_c_k).astype(np.float64)
139
145
  """The characteristic value of the total compressive bearingcapacity [kN]."""
146
+ self.R_s_d = np.array(R_s_d).astype(np.float64)
147
+ """The design value of the shaft bearingcapacity [kN]."""
148
+ self.R_b_d = np.array(R_b_d).astype(np.float64)
149
+ """The design value of the bottom bearingcapacity [kN]."""
140
150
  self.R_c_d = np.array(R_c_d).astype(np.float64)
141
151
  """The design value of the total bearingcapacity [kN]."""
142
152
  self.F_nk_cal_mean = np.array(F_nk_cal_mean).astype(np.float64)
@@ -453,13 +463,56 @@ class MultiCPTBearingResults:
453
463
  cpt_results_dict = SingleCPTBearingResultsContainer.from_api_response(
454
464
  cpt_results_list=response_dict["cpts"], cpt_input=cpt_input
455
465
  )
456
-
466
+ group_results = response_dict["group_results"]
457
467
  return cls(
458
468
  cpt_results=cpt_results_dict,
459
469
  pile_properties=create_pile_properties_from_api_response(
460
470
  response_dict["pile_properties"]
461
471
  ),
462
- group_results_table=CPTGroupResultsTable(**response_dict["group_results"]),
472
+ group_results_table=CPTGroupResultsTable(
473
+ pile_tip_level_nap=group_results["pile_tip_level_nap"],
474
+ R_s_k=group_results["R_s_k"],
475
+ R_b_k=group_results["R_b_k"],
476
+ R_c_k=group_results["R_c_k"],
477
+ R_s_d=group_results["R_s_d"]
478
+ if "R_s_d" in group_results
479
+ else np.full_like(
480
+ group_results["pile_tip_level_nap"], fill_value=np.nan
481
+ ), # For backwards compatibility with PileCore-API < 2.9.0
482
+ R_b_d=group_results["R_b_d"]
483
+ if "R_b_d" in group_results
484
+ else np.full_like(
485
+ group_results["pile_tip_level_nap"], fill_value=np.nan
486
+ ), # For backwards compatibility with PileCore-API < 2.9.0,
487
+ R_c_d=group_results["R_c_d"],
488
+ F_nk_cal_mean=group_results["F_nk_cal_mean"],
489
+ F_nk_k=group_results["F_nk_k"],
490
+ F_nk_d=group_results["F_nk_d"],
491
+ R_c_d_net=group_results["R_c_d_net"],
492
+ F_c_k=group_results["F_c_k"],
493
+ F_c_k_tot=group_results["F_c_k_tot"],
494
+ s_b=group_results["s_b"],
495
+ s_e=group_results["s_e"],
496
+ s_e_mean=group_results["s_e_mean"],
497
+ R_b_mob_ratio=group_results["R_b_mob_ratio"],
498
+ R_s_mob_ratio=group_results["R_s_mob_ratio"],
499
+ k_v_b=group_results["k_v_b"],
500
+ k_v_1=group_results["k_v_1"],
501
+ R_c_min=group_results["R_c_min"],
502
+ R_c_max=group_results["R_c_max"],
503
+ R_c_mean=group_results["R_c_mean"],
504
+ R_c_std=group_results["R_c_std"],
505
+ R_s_mean=group_results["R_s_mean"],
506
+ R_b_mean=group_results["R_b_mean"],
507
+ var_coef=group_results["var_coef"],
508
+ n_cpts=group_results["n_cpts"],
509
+ use_group_average=group_results["use_group_average"],
510
+ xi_normative=group_results["xi_normative"],
511
+ xi_value=group_results["xi_value"],
512
+ cpt_Rc_min=group_results["cpt_Rc_min"],
513
+ cpt_Rc_max=group_results["cpt_Rc_max"],
514
+ cpt_normative=group_results["cpt_normative"],
515
+ ),
463
516
  gamma_f_nk=response_dict["calculation_params"]["gamma_f_nk"],
464
517
  gamma_r_b=response_dict["calculation_params"]["gamma_r_b"],
465
518
  gamma_r_s=response_dict["calculation_params"]["gamma_r_s"],
@@ -241,6 +241,7 @@ class SingleCPTBearingResults:
241
241
  x: float | None = None,
242
242
  y: float | None = None,
243
243
  ) -> "SingleCPTBearingResults":
244
+ results_table = cpt_results_dict["results_table"]
244
245
  return cls(
245
246
  soil_properties=SoilProperties(
246
247
  cpt_table=CPTTable.from_api_response(
@@ -256,7 +257,45 @@ class SingleCPTBearingResults:
256
257
  y=y,
257
258
  ),
258
259
  pile_head_level_nap=cpt_results_dict["annotations"]["pile_head_level_nap"],
259
- results_table=CPTResultsTable(**cpt_results_dict["results_table"]),
260
+ results_table=CPTResultsTable(
261
+ pile_tip_level_nap=results_table["pile_tip_level_nap"],
262
+ F_nk_cal=results_table["F_nk_cal"],
263
+ F_nk_k=results_table["F_nk_k"],
264
+ F_nk_d=results_table["F_nk_d"],
265
+ R_b_cal=results_table["R_b_cal"],
266
+ R_b_k=results_table["R_b_k"],
267
+ R_b_d=results_table["R_b_d"],
268
+ R_s_cal=results_table["R_s_cal"],
269
+ R_s_k=results_table["R_s_k"],
270
+ R_s_d=results_table["R_s_d"],
271
+ R_c_cal=results_table["R_c_cal"],
272
+ R_c_k=results_table["R_c_k"],
273
+ R_c_d=results_table["R_c_d"],
274
+ R_c_d_net=results_table["R_c_d_net"],
275
+ F_c_k=results_table["F_c_k"],
276
+ F_c_k_tot=results_table["F_c_k_tot"],
277
+ negative_friction_range_nap_top=results_table[
278
+ "negative_friction_range_nap_top"
279
+ ],
280
+ negative_friction_range_nap_btm=results_table[
281
+ "negative_friction_range_nap_btm"
282
+ ],
283
+ positive_friction_range_nap_top=results_table[
284
+ "positive_friction_range_nap_top"
285
+ ],
286
+ positive_friction_range_nap_btm=results_table[
287
+ "positive_friction_range_nap_btm"
288
+ ],
289
+ q_b_max=results_table["q_b_max"],
290
+ q_s_max_mean=results_table["q_s_max_mean"],
291
+ qc1=results_table["qc1"],
292
+ qc2=results_table["qc2"],
293
+ qc3=results_table["qc3"],
294
+ s_b=results_table["s_b"],
295
+ s_el=results_table["s_el"],
296
+ k_v_b=results_table["k_v_b"],
297
+ k_v_1=results_table["k_v_1"],
298
+ ),
260
299
  )
261
300
 
262
301
  @property