py-pilecore 0.3.0__tar.gz → 0.3.1__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.
Potentially problematic release.
This version of py-pilecore might be problematic. Click here for more details.
- {py-pilecore-0.3.0/src/py_pilecore.egg-info → py-pilecore-0.3.1}/PKG-INFO +1 -1
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/pyproject.toml +1 -1
- {py-pilecore-0.3.0 → py-pilecore-0.3.1/src/py_pilecore.egg-info}/PKG-INFO +1 -1
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/_version.py +1 -1
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/input/multi_cpt.py +10 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/input/soil_properties.py +20 -4
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/tests/test_input.py +61 -2
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/LICENSE +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/README.md +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/setup.cfg +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/py_pilecore.egg-info/SOURCES.txt +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/py_pilecore.egg-info/dependency_links.txt +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/py_pilecore.egg-info/requires.txt +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/py_pilecore.egg-info/top_level.txt +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/__init__.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/api.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/exceptions.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/input/__init__.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/input/grouper_properties.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/input/pile_properties.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/plot_utils.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/results/__init__.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/results/grouper_result.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/results/load_settlement.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/results/multi_cpt_results.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/results/pile_properties.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/results/single_cpt_results.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/results/soil_properties.py +0 -0
- {py-pilecore-0.3.0 → py-pilecore-0.3.1}/src/pypilecore/utils.py +0 -0
|
@@ -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,
|
|
@@ -369,7 +369,9 @@ def test_create_multi_cpt_payload_defaults(
|
|
|
369
369
|
# Check the payload content
|
|
370
370
|
|
|
371
371
|
# We don't completely check the soil_properties list here
|
|
372
|
-
|
|
372
|
+
list_soil_properties = payload.pop("list_soil_properties")
|
|
373
|
+
assert isinstance(list_soil_properties, list)
|
|
374
|
+
assert len(list_soil_properties) == 1
|
|
373
375
|
|
|
374
376
|
assert payload.pop("excavation_param_t") == 1.0
|
|
375
377
|
assert payload.pop("pile_head_level_nap") == "surface"
|
|
@@ -513,6 +515,8 @@ def test_create_multi_cpt_payload_extended_rect_pile(
|
|
|
513
515
|
function with extended arguments for a rect pile.
|
|
514
516
|
"""
|
|
515
517
|
|
|
518
|
+
assert isinstance(cpt.alias, str)
|
|
519
|
+
|
|
516
520
|
payload, _ = create_multi_cpt_payload(
|
|
517
521
|
pile_tip_levels_nap=[0, 1],
|
|
518
522
|
cptdata_objects=[cpt],
|
|
@@ -561,7 +565,9 @@ def test_create_multi_cpt_payload_extended_rect_pile(
|
|
|
561
565
|
# Check the payload content
|
|
562
566
|
|
|
563
567
|
# We don't completely check the soil_properties list here
|
|
564
|
-
|
|
568
|
+
list_soil_properties = payload.pop("list_soil_properties")
|
|
569
|
+
assert isinstance(list_soil_properties, list)
|
|
570
|
+
assert len(list_soil_properties) == 1
|
|
565
571
|
|
|
566
572
|
assert payload.pop("excavation_param_t") == 0.5
|
|
567
573
|
assert payload.pop("pile_head_level_nap") == 5.0
|
|
@@ -615,6 +621,59 @@ def test_create_multi_cpt_payload_extended_rect_pile(
|
|
|
615
621
|
assert len(payload.keys()) == 0
|
|
616
622
|
|
|
617
623
|
|
|
624
|
+
def test_create_multi_cpt_payload_extended_ocr(
|
|
625
|
+
cpt: CPTData, mock_classify_response: dict
|
|
626
|
+
) -> None:
|
|
627
|
+
"""
|
|
628
|
+
Test creating the multi_cpt_results payload with the `create_multi_cpt_payload`
|
|
629
|
+
function with extended OCR arguments.
|
|
630
|
+
"""
|
|
631
|
+
|
|
632
|
+
payload, _ = create_multi_cpt_payload(
|
|
633
|
+
pile_tip_levels_nap=[0, 1],
|
|
634
|
+
cptdata_objects=[cpt],
|
|
635
|
+
classify_tables={cpt.alias: mock_classify_response},
|
|
636
|
+
groundwater_level_nap=-2.5,
|
|
637
|
+
pile_type="concrete",
|
|
638
|
+
specification="1",
|
|
639
|
+
installation="A",
|
|
640
|
+
pile_shape="round",
|
|
641
|
+
diameter_base=0.3,
|
|
642
|
+
ocr=2.5,
|
|
643
|
+
)
|
|
644
|
+
|
|
645
|
+
# Check the payload content
|
|
646
|
+
|
|
647
|
+
list_soil_properties = payload.get("list_soil_properties")
|
|
648
|
+
assert isinstance(list_soil_properties, list)
|
|
649
|
+
assert len(list_soil_properties) == 1
|
|
650
|
+
assert "ocr" in list_soil_properties[0].keys()
|
|
651
|
+
assert np.isclose(list_soil_properties[0]["ocr"], 2.5)
|
|
652
|
+
|
|
653
|
+
# Case 2: set OCR with individual_ocr parameter
|
|
654
|
+
|
|
655
|
+
payload, _ = create_multi_cpt_payload(
|
|
656
|
+
pile_tip_levels_nap=[0, 1],
|
|
657
|
+
cptdata_objects=[cpt],
|
|
658
|
+
classify_tables={cpt.alias: mock_classify_response},
|
|
659
|
+
groundwater_level_nap=-2.5,
|
|
660
|
+
pile_type="concrete",
|
|
661
|
+
specification="1",
|
|
662
|
+
installation="A",
|
|
663
|
+
pile_shape="round",
|
|
664
|
+
diameter_base=0.3,
|
|
665
|
+
ocr=1.0,
|
|
666
|
+
individual_ocr={cpt.alias: 2.0},
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
# Check the payload content
|
|
670
|
+
|
|
671
|
+
list_soil_properties = payload.pop("list_soil_properties")
|
|
672
|
+
assert isinstance(list_soil_properties, list)
|
|
673
|
+
assert "ocr" in list_soil_properties[0].keys()
|
|
674
|
+
assert np.isclose(list_soil_properties[0]["ocr"], 2.0)
|
|
675
|
+
|
|
676
|
+
|
|
618
677
|
def test_create_multi_cpt_payload_errors(
|
|
619
678
|
cpt: CPTData, mock_classify_response: dict
|
|
620
679
|
) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|