Reference

Application programming interface (API)

pypilecore.api.get_multi_cpt_api_result(client, payload, verbose=False)[source]

Wrapper around the PileCore endpoint “/compression/multiple-cpts/results”.

Parameters:
  • client (NucleiClient) – client object created by [nuclei](https://github.com/cemsbv/nuclei)

  • payload (dict) – the payload of the request, can be created by calling create_grouper_payload()

  • verbose (bool) – if True, print additional information to the console

Return type:

dict

pypilecore.api.get_multi_cpt_api_report(client, payload, verbose=False)[source]

Wrapper around the PileCore endpoint “/compression/multiple-cpts/report”.

Parameters:
  • client (NucleiClient) – client object created by [nuclei](https://github.com/cemsbv/nuclei)

  • payload (dict) – the payload of the request, can be created by calling create_grouper_payload()

  • verbose (bool) – if True, print additional information to the console

Return type:

dict

pypilecore.api.get_groups_api_result(client, payload, verbose=False)[source]

Wrapper around the PileCore endpoint “/grouper/group_cpts”.

Parameters:
  • client (NucleiClient) – client object created by [nuclei](https://github.com/cemsbv/nuclei)

  • payload (dict) – the payload of the request, can be created by calling create_grouper_payload()

  • verbose (bool) – if True, print additional information to the console

Return type:

dict

pypilecore.api.get_optimize_groups_api_result(client, payload, verbose=False)[source]

Wrapper around the PileCore endpoint “/grouper/optimize_groups”.

Parameters:
  • client (NucleiClient) – client object created by [nuclei](https://github.com/cemsbv/nuclei)

  • payload (dict) – the payload of the request, can be created by calling create_grouper_payload()

  • verbose (bool) – if True, print additional information to the console

Return type:

dict

pypilecore.api.get_groups_api_report(client, payload, verbose=False)[source]

Wrapper around the PileCore endpoint “/grouper/generate_grouper_report”.

Parameters:
  • client (NucleiClient) – client object created by [nuclei](https://github.com/cemsbv/nuclei)

  • payload (dict) – the payload of the request, can be created by calling create_grouper_report_payload()

  • verbose (bool) – if True, print additional information to the console

Return type:

bytes

Bearing calculation: Input

pypilecore.input.multi_cpt.create_multi_cpt_payload(pile_tip_levels_nap, cptdata_objects, classify_tables, groundwater_level_nap, pile, friction_range_strategy='lower_bound', stiff_construction=False, cpts_group=None, ocr=None, fixed_negative_friction_range_nap=None, fixed_positive_friction_range_nap=None, negative_shaft_friction=None, apply_qc3_reduction=None, relative_pile_load=0.7, pile_load_sls=None, soil_load_sls=0.0, pile_head_level_nap='surface', excavation_depth_nap=None, excavation_param_t=1.0, excavation_stress_reduction_method='constant', excavation_width=None, excavation_edge_distance=None, individual_negative_friction_range_nap=None, individual_positive_friction_range_nap=None, individual_ocr=None, use_almere_rules=False, overrule_xi=None, gamma_f_nk=1.0, gamma_r_s=1.2, gamma_r_b=1.2)[source]

Creates a dictionary with the payload content for the PileCore endpoint “/compression/multi-cpt/results”

This dictionary can be passed directly to nuclei.client.call_endpoint().

Note

The result should be converted to a jsonifyable message before it can be passed to a requests call directly, for instance with nuclei.client.utils.python_types_to_message().

Parameters:
  • pile_tip_levels_nap (Sequence[float]) – Range of values for which the pile resistance is calculated.

  • cptdata_objects (List[CPTData]) – A list of pygef.CPTData objects

  • classify_tables (Dict[str, dict]) –

    A dictionary, mapping CPTData.alias values to dictionary with the resulting response of a call to CPTCore classify/* information, containing the following keys:

    • geotechnicalSoilName: Sequence[str]

      Geotechnical Soil Name related to the ISO

    • lowerBoundary: Sequence[float]

      Lower boundary of the layer [m]

    • upperBoundary: Sequence[float]

      Upper boundary of the layer [m]

    • color: Sequence[str]

      Hex color code

    • mainComponent: Sequence[Literal[“rocks”, “gravel”, “sand”, “silt”, “clay”, “peat”]]

      Main soil component

    • cohesion: Sequence[float]

      Cohesion of the layer [kPa]

    • gamma_sat: Sequence[float]

      Saturated unit weight [kN/m^3]

    • gamma_unsat: Sequence[float]

      Unsaturated unit weight [kN/m^3]

    • phi: Sequence[float]

      Phi [degrees]

    • undrainedShearStrength: Sequence[float]

      Undrained shear strength [kPa]

  • groundwater_level_nap (float) – The groundwater level. Unit: [m] w.r.t. NAP.

  • pile (PileProperties) – A PileProperties object.

  • friction_range_strategy (Literal['manual', 'lower_bound', 'settlement_driven']) – Sets the method to determine the sleeve friction zones on the pile. The soil friction in the positive zone contributes to the bearing capacity, while the negative zone adds an extra load on the pile. Accepted values: “manual”, “lower_bound” (default) or “settlement_driven”.

  • stiff_construction (bool) – Set to True if it’s a stiff costruction. This will have influence on the xi factor if you don’t overrule it. Default = False.

  • cpts_group (Optional[List[str]]) – CPTs that are considered one group. Items must relate to the alias of the CPTData objects in cptdata_objects.

  • ocr (Optional[float]) – The Over-Consolidation-Ratio [-] of the foundation layer.

  • fixed_negative_friction_range_nap (Optional[Tuple[float, float]]) – Optionally sets the fixed depth range between which the negative sleeve friction is calculated. If an array of format [top, bottom], the range is set between top and bottom where top and bottom are floating values. Unit: [m] w.r.t. NAP

  • fixed_positive_friction_range_nap (Optional[Tuple[float, Union[Literal['ptl'], float]]]) – Optionally sets the fixed depth range between which the positive sleeve friction is calculated. If an array of format (top, bottom), the range is set between top and bottom where top and bottom are floating point values. If bottom == “ptl”, the pile tip level of the calculation is used as value for bottom. Unit: [m] w.r.t. NAP

  • negative_shaft_friction (Optional[float]) – Sets a fixed value for the negative friction force. If provided, the fixed_negative_friction_range_nap parameter will be ignored. Unit: [kN]

  • apply_qc3_reduction (Optional[bool]) – Determines if the reduction on the qc;III trajectory for auger piles should be applied conform 7.6.2.3(e) of NEN 9997-1. If omitted (or null: default), the value is inferred from the pile type: only True for auger piles (when pile_properties.is_auger == True). If a boolean is provided, the qc3 reduction is/isn’t applied, regardless of the pile type.

  • relative_pile_load (Optional[float]) –

    The fraction of the maximum bearing capacity that is used as pilehead force in the settlement calculations. The input value can range between 0.0 and 1.0, where 1.0 translates to a pile load of 100% of the maximum bearing capacity. When the pile_load_sls parameter is provided, rel_pile_load will be ignored.

    When multiple pile-tip levels are considered, the applied pile load will vary with each pile-tip level, depending on the bearing capacity.

    Default = 0.7

  • pile_load_sls (Optional[float]) – Force on pile in SLS [kN]. Used to determine settlement of pile w.r.t. soil.

  • soil_load_sls (float) – Load on soil surface [kPa], used to calculate soil settlement. This is only required with the settlement-driven friction-range strategy. Default = 0.0

  • pile_head_level_nap (Union[float, Literal['surface']]) –

    The level of the pile head. Can be:

    • float;

      This is interpreted as an absolute level in [m w.r.t. NAP];

    • Literal[“surface”] (default).

      In this case, the soil_properties.service_level property is used.

  • excavation_depth_nap (Optional[float]) – Soil excavation depth after the CPT was taken. Unit: [m] w.r.t. NAP.

  • excavation_param_t (float) –

    Excavation parameter depending on pile installation method and/or phasing.
    • Use 1.0 (default) for post-excavation installation with vibration (i.e. hammering).

    • Use 0.5 for reduced-vibration installation, or pile installation prior to excavation method.

    See for more info NEN 9997-1+C2:2017 7.6.2.3.(10)(k)

  • excavation_stress_reduction_method (Literal['constant', 'begemann']) –

    Method used to calculate the stress reduction due to the excavation applied to the effective and total stresses. Only used when excavation_depth_nap is different than None. It can be:

    • ”constant” (default): The stress reduction below the excavation is constant with depth. The stress reduction

    is equal to the original effective stress (i.e. before the excavation) at the excavation depth. - “begemann”: The stress reduction below the excavation decreases with depth according to the Begemann method. This method uses the elastic solution of a strip load acting on a semi-infinite homogeneous soil mass. The load has a width equal to the excavation width and a magnitude equal to the original effective stress at the excavation depth.

    Regardless the method, the stress reduction applied above the excavation is equal to the original effective stress at each corresponding depth.

  • excavation_width (Optional[float]) – Width of the excavation [m]. Used to calculate the stress reduction due to the excavation if the Begemann method is selected. In this case, it must be provided and it must be > 0.

  • excavation_edge_distance (Optional[float]) –

    Distance from the pile centerline to the excavation edge [m]. Used to calculate the stress reduction due to the excavation if the Begemann method is selected. In this case, it must be provided and it must be between 0.0 and 0.5 * excavation_width.

    Note that:
    • 0.0 means that the pile is located at the edge of the excavation.

    • 0.5 * excavation_width means that the pile is at the center of the excavation.

  • individual_negative_friction_range_nap (Optional[Mapping[str, Tuple[float, float]]]) – A dictionary, mapping CPTData.alias values to fixed negative-friction ranges. For a specification of the values, see fixed_negative_friction_range_nap

  • individual_positive_friction_range_nap (Optional[Mapping[str, Tuple[float, Union[Literal['ptl'], float]]]]) – A dictionary, mapping CPTData.alias values to fixed positive-friction ranges. For a specification of the values, see fixed_positive_friction_range_nap

  • individual_ocr (Optional[Mapping[str, float]]) – A dictionary, mapping CPTData.alias values to Over-Consolidation-Ratio [-] values of the foundation layer. This will overrule the general ocr setting for these specific CPTs only.

  • use_almere_rules (bool) – If set to True the contribution, produced by the positive shaft friction, to the total bearing capacity is limited to at most 75% the contribution provided by the pile tip. ref: https://www.almere.nl/fileadmin/user_upload/Richtlijnen_Constructie_Gem._Almere_vanaf_01-01-2017_versie_3.0a.pdf

  • overrule_xi (Optional[float]) – Set a fixed value for xi in all calculations. Use with caution. This will overrule the calculation of xi-values based on the group-size, variation- coefficient and construction stiffness.

  • gamma_f_nk (float) – Safety factor for design-values of the negative sleeve friction force. Default = 1.0

  • gamma_r_s (float) – Safety factor, used to obtain design-values of the pile-tip bearingcapacity. Default = 1.2

  • gamma_r_b (float) – Safety factor, used to obtain design-values of the sleeve bearingcapacity. Default = 1.2

Return type:

Tuple[dict, Dict[str, dict]]

Returns:

  • multi_cpt_payload – Dictionary with the payload content for the PileCore endpoint “/compression/multi-cpt/results”

  • results_kwargs – Dictionary with keyword arguments for the pilecore.MultiCPTBearingResults object.

Raises:

ValueError:

  • If excavation_depth_nap is not None and excavation_param_t is None. - If excavation_stress_reduction_method is not either ‘constant’ or ‘begemann’. - If excavation_stress_reduction_method is ‘begemann’ and excavation_width is None. - If excavation_stress_reduction_method is ‘begemann’ and excavation_edge_distance is None. - If both relative_pile_load and pile_load_sls are None.

pypilecore.input.multi_cpt.create_multi_cpt_report_payload(multi_cpt_payload, project_name, project_id, author, date=None, group_results_content=True, individual_cpt_results_content=True, result_summary_content=True)[source]

Creates a dictionary with the payload content for the PileCore endpoint “/compression/multi-cpt/report”

This dictionary can be passed directly to nuclei.client.call_endpoint(). Note that it should be converted to a jsonifyable message before it can be passed to a requests call directly, for instance with nuclei.client.utils.python_types_to_message().

Parameters:
  • multi_cpt_payload (dict) – Index 0 of the resulting tuple of a call to create_multi_cpt_payload()

  • project_name (str) – The name of the project.

  • project_id (str) – The identifier (code) of the project.

  • author (str) – The author of the report.

  • date (Optional[str]) – The date of the report. If None, the current date will be used.

  • group_results_content (bool) – Whether or not to add the group-results section to the report. Default = True

  • individual_cpt_results_content (bool) – Whether or not to add the individual-cpt-results section to the report. Default = True

  • result_summary_content (bool) – Whether or not to add the result-summary section to the report. Default = True

Returns:

Dictionary with the payload content for the PileCore endpoint “/compression/multi-cpt/report”

Return type:

report_payload

Bearing calculation: Results

class pypilecore.results.cases_multi_cpt_results.CasesMultiCPTBearingResults(results_per_case, cpt_locations)[source]

Container class for the results of multiple cases of MultiCPTBearingResults. It expects that all MultiCPTBearingResults objects have the same pile tip levels and same test ids.

__init__(results_per_case, cpt_locations)[source]

Initialize the class with the results of multiple cases of MultiCPTBearingResults.

Parameters:
  • results_per_case (Dict[Hashable, MultiCPTBearingResults]) – A dictionary with the results of multiple cases of MultiCPTBearingResults. The keys of the dictionary are the case names. All MultiCPTBearingResults objects must have the same pile tip levels and same test ids.

  • cpt_locations (Dict[str, Location]) – The mapping between test_id (key) and the location (value) of the cpt. The keys must contain all the test_id (s) used in the MultiCPTBearingResults objects.

Raises:
  • TypeError – If results_per_case is not of the expected type. If cpt_locations is not of the expected type.

  • ValueError – If results_per_case is an empty dictionary. If not all MultiCPTBearingResults objects have the same pile tip levels and test ids. If not all the test_id (s) used in the MultiCPTBearingResults objects are in the keys of cpt_locations.

property cases: List[Hashable]

The case names.

property multicpt_bearing_results: List[MultiCPTBearingResults]

The MultiCPTBearingResults objects.

property test_ids: List[str]

The test ids of all MultiCPTBearingResults objects.

property pile_tip_levels_nap: List[float]

The pile tip levels NAP of all MultiCPTBearingResults objects.

property cpt_locations: Dict[str, Location]

The mapping between test_id (key) and the location (value) of the cpt.

property cpt_results_dataframe: DataFrame

The dataframe with all the CPT results. Available columns: case_name, result_name, test_id, x, y, pile_tip_level_nap, result, result_unit.

property cpt_group_results_dataframe: DataFrame

The dataframe with CPT group results. Available columns: case_name, result_name, pile_tip_level_nap, result, result_unit.

class pypilecore.results.multi_cpt_results.MultiCPTBearingResults(cpt_results, group_results_table, pile_properties, gamma_f_nk, gamma_r_b, gamma_r_s, soil_load)[source]

Object that contains the results of a PileCore multi-cpt calculation.

Not meant to be instantiated by the user.

classmethod from_api_response(response_dict, cpt_input)[source]

Build the object from the response payload of the PileCore endpoint “/compression/multi-cpt/results”.

Return type:

MultiCPTBearingResults

property pile_properties: PileProperties

The PileProperties object.

property cpt_results: SingleCPTBearingResultsContainer

The SingleCPTBearingResultsContainer object.

property cpt_names: List[str]

The test-ids of the CPTs.

property group_results_table: CPTGroupResultsTable

The CPTGroupResultsTable dataclass, containing the group results.

boxplot(attribute, axes=None, figsize=(6.0, 6.0), show_sqrt=False, **kwargs)[source]

Plot a box and whisker plot for a given attribute.

MIN      Q1   median  Q3       MAX
          |-----:-----|
 |--------|     :     |--------|
          |-----:-----|
Parameters:
  • attribute (str) – result attribute to create boxplot. Please note that the attribute name must be present in the CPTResultsTable and CPTGroupResultsTable class.

  • axes (Optional[Axes]) – Optional Axes object where the boxplot data can be plotted on. If not provided, a new plt.Figure will be activated and the Axes object will be created and returned.

  • figsize (Tuple[float, float]) – Size of the activate figure, as the plt.figure() argument.

  • show_sqrt (bool) – Add sqrt(2) bandwidth to figure

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Axes object where the settlement curves were plotted on

Return type:

axes

plot_load_settlement(pile_tip_level_nap, axes=None, figsize=(6.0, 6.0), sb_max=25, **kwargs)[source]

Plot load settlement curve.

Parameters:
  • pile_tip_level_nap (float) – Pile tip level in [m NAP] for which to calculate and plot the load-settlement behavior.

  • axes (Optional[Axes]) – Optional Axes object where the load-settlement data can be plotted on. If not provided, a new plt.Figure will be activated and the Axes object will be created and returned.

  • figsize (Tuple[float, float]) – Size of the activate figure, as the plt.figure() argument.

  • sb_max (float) – Default: 25 Maximum value for settlement at pile-tip level.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Axes object where the settlement curves were plotted on

Return type:

axes

class pypilecore.results.multi_cpt_results.SingleCPTBearingResultsContainer(cpt_results_dict)[source]

A container that holds multiple SingleCPTBearingResults objects

classmethod from_api_response(cpt_results_list, cpt_input)[source]

Instantiates the SingleCPTBearingResultsContainer object from the “cpts” array, which is returned in the response of a “compression/multiple-cpts/results” endpoint call.

Return type:

SingleCPTBearingResultsContainer

property cpt_results_dict: Dict[str, SingleCPTBearingResults]

The dictionary that maps the cpt-names to SingleCPTBearingResults objects.

property test_ids: List[str]

The test-ids of the CPTs.

property results: List[SingleCPTBearingResults]

The computed results, as a list of SingleCPTBearingResults objects.

get_cpt_results(test_id)[source]

Returns the SingleCPTBearingResults object for the provided test_id.

Return type:

SingleCPTBearingResults

get_results_per_cpt(column_name)[source]

Returns a pandas dataframe with a single result-item, organized per CPT (test-id) and pile-tip-level-nap.

Parameters:

column_name (str) – The name of the result-item / column name of the single-cpt-results table.

Return type:

DataFrame

to_pandas()[source]

Returns a total overview of all single-cpt results in a pandas.DataFrame representation.

Return type:

DataFrame

class pypilecore.results.single_cpt_results.SingleCPTBearingResults(soil_properties, pile_head_level_nap, results_table)[source]

Object that contains the results of a PileCore single-cpt calculation.

Not meant to be instantiated by the user.

property soil_properties: SoilProperties

The SoilProperties object.

property pile_head_level_nap: float

The elevation of the pile-head in [m] w.r.t. NAP.

property table: CPTResultsTable

The object with single-CPT results table traces.

plot_bearing_capacities(axes=None, figsize=(8, 10), add_legend=True, **kwargs)[source]

Plot the bearing calculation results on an `Axes’ object.

Parameters:
  • axes (Optional[Axes]) – Optional Axes object where the bearing capacities can be plotted on. If not provided, a new plt.Figure will be activated and the Axes object will be created and returned.

  • figsize (Tuple[float, float]) – Size of the activate figure, as the plt.figure() argument.

  • add_legend (bool) – Add a legend to the second axes object

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Axes object where the bearing capacities were plotted on.

Return type:

axes

plot_bearing_overview(figsize=(10.0, 12.0), width_ratios=(1, 0.1, 2), add_legend=True, **kwargs)[source]

Plot an overview of the bearing-capacities, including the .

Parameters:
  • figsize (Tuple[float, float]) – Size of the activate figure, as the plt.figure() argument.

  • width_ratios (Tuple[float, float, float]) – Tuple of width-ratios of the subplots, as the plt.GridSpec argument.

  • add_legend (bool) – Add a legend to the second axes object

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The matplotlib Figure

Return type:

fig

class pypilecore.results.multi_cpt_results.CPTGroupResultsTable(pile_tip_level_nap, R_s_k, R_b_k, R_c_k, R_s_d, R_b_d, R_c_d, F_nk_cal_mean, F_nk_k, F_nk_d, R_c_d_net, F_c_k, F_c_k_tot, s_b, s_e, s_e_mean, R_b_mob_ratio, R_s_mob_ratio, k_v_b, k_v_1, R_c_min, R_c_max, R_c_mean, R_c_std, R_s_mean, R_b_mean, var_coef, n_cpts, use_group_average, xi_normative, xi_value, cpt_Rc_min, cpt_Rc_max, cpt_normative)[source]

Dataclass that contains the bearing results of a group of CPTs.

pile_tip_level_nap

The pile-tip level [m] w.r.t. NAP.

R_s_k

The characteristic value of the shaft bearingcapacity [kN].

R_b_k

The characteristic value of the bottom bearingcapacity [kN].

R_c_k

The characteristic value of the total compressive bearingcapacity [kN].

R_s_d

The design value of the shaft bearingcapacity [kN].

R_b_d

The design value of the bottom bearingcapacity [kN].

R_c_d

The design value of the total bearingcapacity [kN].

F_nk_cal_mean

The mean value of the calculated single-CPT negative friction forces [kN].

F_nk_k

The charactertistic value of the negative friction force [kN].

F_nk_d

The design value of the negative friction force [kN].

R_c_d_net

The net design value of the total bearingcapacity [kN] (netto = excluding design negative friction force.).

F_c_k

The characteristic value of the load on the pile head (e.g. building load) [kN]

F_c_k_tot

The characteristic value of the total compressive pile load [kN] (building-load + neg. friction force).

s_b

The settlement of the pile bottom [mm].

s_e

The elastic shortening of the pile [mm].

s_e_mean

The mean of single-CPT results for elastic shortening of the pile [mm].

R_b_mob_ratio

The mobilisation ratio of the bottom bearing capacity [-].

R_s_mob_ratio

The mobilisation ratio of the shaft bearing capacity [-].

k_v_b

The 1-dimensional stiffness modulus at pile bottom [kN/m].

k_v_1

The 1-dimensional stiffness modulus at pile head [kN/m].

R_c_min

The minimum of the single-CPT values for the calculated bearingcapacity [kN].

R_c_max

The maximum of the single-CPT values for the calculated bearingcapacity [kN].

R_c_mean

The mean of the single-CPT values for the calculated bearingcapacity [kN].

R_c_std

The standard-deviation of the single-CPT values for the calculated bearingcapacity [kN].

R_s_mean

The mean of the single-CPT values for the calculated shaft bearingcapacity [kN].

R_b_mean

The mean of the single-CPT values for the calculated bottom bearingcapacity [kN].

var_coef

The variation coefficient [%] of the calculated bearing capacities in the group.

n_cpts

The number of CPTs [-] that have been taken into account to establish the Xi value.

use_group_average

If true, the group average is used for the calculation of characteristic group results. If false, the values of the normative CPT are used.

xi_normative

The normative Xi (either Xi_3 or Xi_4)

xi_value

The Xi value [-] that was applied to calculate the characteristic value of the total bearing capacity.

cpt_Rc_min

The CPT with the lowest value for R_c_cal.

cpt_Rc_max

The CPT with the highest value for R_c_cal.

cpt_normative

The normative CPT. Can be “group average” if that was found to be the normative scenario.

to_pandas()[source]

The pandas.DataFrame representation

Return type:

DataFrame

plot_bearing_capacities(axes=None, figsize=(8, 10), add_legend=True, **kwargs)[source]

Plots the design value of the bearing capacity Rcd, based on a group of CPTs.

Parameters:
  • axes (Optional[Axes]) – Optional Axes object where the bearing capacity data can be plotted on. If not provided, a new plt.Figure will be activated and the Axes object will be created and returned.

  • figsize (Tuple[int, int]) – Size of the activate figure, as the plt.figure() argument.

  • add_legend (bool) – Add a legend to the Axes object

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Axes object where the bearing capacities were plotted on.

Return type:

axes

Bearing calculation: Result Viewers

class pypilecore.viewers.viewer_cpt_results.ViewerCptResults(cases_multi_results)[source]

Viewer for the CPT results of the bearing capacity calculations.

It offers the following layout:
  • Dropdown widgets:
    • Case: to select the case to show.

    • Result: to select the result to show.

  • Figure CPT results vs. pile tip level:
    • X axis: result values

    • Y axis: pile tip level w.r.t. NAP

    • Each trace represents a different CPT.

__init__(cases_multi_results)[source]

Initialize the viewer.

Parameters:

cases_multi_results (CasesMultiCPTBearingResults) – The results of the bearing capacity calculations.

Raises:

TypeError – If ‘cases_multi_results’ are not of type ‘CasesMultiCPTBearingResults’.

display()[source]

Display the figure.

Return type:

Optional[DisplayHandle]

class pypilecore.viewers.viewer_cpt_results_plan_view.ViewerCptResultsPlanView(cases_multi_results)[source]

Viewer for the CPT results of the bearing capacity calculations in plan view for a fixed pile tip level (PTL).

It offers the following layout:
  • Dropdown widgets:
    • Case: to select the case to show.

    • Result: to select the result to show.

    • Pile tip level: to select the pile tip level to show.

  • Figure CPT results vs. pile tip level:
    • X axis: X coordinate.

    • Y axis: Y coordinate.

    • Each point represents a different CPT, but the same pile tip level.

__init__(cases_multi_results)[source]

Initialize the viewer.

Parameters:

cases_multi_results (CasesMultiCPTBearingResults) – The results of the bearing capacity calculations.

Raises:

TypeError – If ‘cases_multi_results’ are not of type ‘CasesMultiCPTBearingResults’.

display()[source]

Display the figure.

Return type:

Optional[DisplayHandle]

class pypilecore.viewers.viewer_cpt_group_results.ViewerCptGroupResults(cases_multi_results)[source]

Viewer for the CPT group results of the bearing capacity calculations.

It offers the following layout:
  • Dropdown widgets:
    • Result: to select the result to show.

  • Figure CPT group results vs. pile tip level:
    • X axis: result values

    • Y axis: pile tip level w.r.t. NAP

    • Each trace represents a different case.

__init__(cases_multi_results)[source]

Initialize the viewer.

Parameters:

cases_multi_results (CasesMultiCPTBearingResults) – The results of the bearing capacity calculations.

Raises:

TypeError – If ‘cases_multi_results’ are not of type ‘CasesMultiCPTBearingResults’.

display()[source]

Display the figure.

Return type:

Optional[DisplayHandle]

Pile properties: Results

pypilecore.common.piles.create_basic_pile(pile_shape, pile_name=None, main_type=None, specification=None, installation=None, height_base=None, core_secondary_dimension=None, core_tertiary_dimension=None, base_secondary_dimension=None, base_tertiary_dimension=None, core_diameter=None, base_diameter=None, pile_material=None, custom_material=None, settlement_curve=None, adhesion=None, alpha_p=None, alpha_s_clay=None, alpha_s_sand=None, beta_p=None, pile_tip_factor_s=None, is_auger=None, is_low_vibrating=None, negative_fr_delta_factor=None)[source]

Create a basic pile with the provided parameters. A “basic” pile is a pile with a basic geometry, containing at most 2 components, namely a core component and an optional shell/widened-base component.

Parameters:
  • pile_shape (str) – The shape of the pile. Either “round” or “rect”.

  • pile_name (str, optional) – The name of the pile, by default None.

  • main_type (str, optional) – The main type of the standard pile type definition, by default None.

  • specification (str | int | float, optional) – The specification of the standard pile type definition, by default None. Required if main_type is provided.

  • installation (str, optional) – The installation of the standard pile type definition, by default None.

  • height_base (float, optional) – The height [m] of the base component, by default None. Required if base dimensions are provided.

  • core_secondary_dimension (float, optional) – The largest dimension [m] of the core component’s cross-section, by default None. Required for rectangular piles.

  • core_tertiary_dimension (float, optional) – The smallest dimension [m] of the core component’s cross-section, by default None.

  • base_secondary_dimension (float, optional) – The largest dimension [m] of the base/shell component’s cross-section, by default None.

  • base_tertiary_dimension (float, optional) – The smallest dimension [m] of the base/shell component’s cross-section, by default None.

  • core_diameter (float, optional) – The diameter [m] of the core component’s cross-section, by default None. Required for round piles.

  • base_diameter (float, optional) – The diameter [m] of the base/shell component’s cross-section, by default None.

  • pile_material (str, optional) – The material of the pile, by default None. Required if no standard pile type was specified.

  • custom_material (dict, optional) – A custom material for the pile, by default None.

  • settlement_curve (int, optional) – The settlement curve of the pile, by default None. Required if no standard pile type was specified.

  • adhesion (float, optional) – The adhesion of the pile, by default None. Required if no standard pile type was specified.

  • alpha_p (float, optional) – The alpha_p of the pile, by default None. Required if no standard pile type was specified.

  • alpha_s_clay (float, optional) – The alpha_s_clay of the pile, by default None. Required if no standard pile type was specified.

  • alpha_s_sand (float, optional) – The alpha_s_sand of the pile, by default None. Required if no standard pile type was specified.

  • beta_p (float, optional) – The beta_p of the pile, by default None. Required if no standard pile type was specified.

  • pile_tip_factor_s (float, optional) – The pile tip factor s of the pile, by default None. Required if no standard pile type was specified.

  • is_auger (bool, optional) – Whether the pile is an auger pile, by default None. Required if no standard pile type was specified.

  • is_low_vibrating (bool, optional) – Whether the pile is low vibrating, by default None. Required if no standard pile type was specified.

  • negative_fr_delta_factor (float, optional) – The negative friction delta factor of the pile, by default None. Required if no standard pile type was specified.

Returns:

The pile properties object.

Return type:

PileProperties

class pypilecore.common.piles.PileProperties(geometry, pile_type, name=None)[source]

The PileProperties class represents all properties of a pile.

classmethod from_api_response(pile_properties)[source]

Instantiates a PileProperties from a response dictionary.

Return type:

PileProperties

Parameters:

pile_properties: dict

A dictionary that is retrieved from the API response payload at “/pile_properties”.

Returns:

: PileProperties

A pile properties object.

property geometry: PileGeometry

The geometry of the pile.

property pile_type: PileType

The type of the pile.

property name: str | None

The name of the pile.

serialize_payload()[source]

Serialize the pile properties to a dictionary payload for the API.

Return type:

Dict[str, dict | str]

Returns:

A dictionary payload containing the geometry, pile type, and name (if set).

class pypilecore.common.piles.type.PileType(standard_pile=None, alpha_s_sand=None, alpha_s_clay=None, alpha_p=None, alpha_t_sand=None, settlement_curve=None, negative_fr_delta_factor=None, adhesion=None, is_low_vibrating=None, is_auger=None)[source]

The PileType class represents the type of a pile.

classmethod from_api_response(pile_type)[source]

Instantiates a PileType from a pile type object in the API response payload.

Return type:

PileType

Parameters:

pile_type: dict

A dictionary that is retrieved from the API response payload at “/pile_properties/pile_type”.

Returns:

: PileType

A pile type.

property standard_pile: Dict[str, str | int] | None

The standard pile definition of the pile type (if applicable)

property alpha_s_sand: float | None

The alpha_s_sand value of the pile type

property alpha_s_clay: float | None

The alpha_s_clay value of the pile type

property alpha_p: float | None

The alpha_p value of the pile type

property alpha_t_sand: float | None

The alpha_t_sand value of the pile type

property settlement_curve: int | None

The settlement curve of the pile type

property negative_fr_delta_factor: float | None

The negative_fr_delta_factor value of the pile type

property adhesion: float | None

The adhesion value of the pile type

property is_low_vibrating: bool | None

The is_low_vibrating value of the pile type

property is_auger: bool | None

The is_auger value of the pile type

serialize_payload()[source]

Serialize the pile type to a dictionary payload for the API.

Return type:

Dict[str, dict | str]

Returns:

A dictionary payload containing the standard pile (if set), alpha_s_sand, alpha_s_clay, alpha_p, alpha_t_sand, settlement curve, negative_fr_delta_factor, adhesion, is_low_vibrating, and is_auger.

class pypilecore.common.piles.geometry.PileGeometry(components, materials=None, pile_tip_factor_s=None, beta_p=None)[source]

The PileGeometry class represents the geometry of a pile.

classmethod from_api_response(geometry)[source]

Instantiates a PileGeometry from a geometry object in the API response payload.

Return type:

PileGeometry

Parameters:

geometry: dict

A dictionary that is retrieved from the API response payload at “/pile_properties/geometry”.

Returns:

: PileGeometry

A pile geometry.

property components: List[RoundPileGeometryComponent | RectPileGeometryComponent]

The components of the pile geometry

property materials: List[PileMaterial]

The materials used in the pile geometry

property materials_dict: Dict[str, PileMaterial]

The materials used in the pile geometry as a dictionary with the material name as key

property pile_tip_factor_s: float | None

The pile tip factor S of the pile geometry

property beta_p: float | None

The beta_p value of the pile geometry

property equiv_diameter_pile_tip: float

The equivalent diameter of the pile at the pile tip.

property circumference_pile_tip: float

The outer-circumference of the pile at the pile tip.

property area_pile_tip: float

The area of the pile at the pile tip.

serialize_payload()[source]

Serialize the pile geometry to a dictionary payload for the API.

Return type:

Dict[str, list | dict]

Returns:

A dictionary payload containing the components, materials (if set), pile tip factor S (if set), and beta_p (if set).

get_circum_vs_depth(pile_tip_level_nap, pile_head_level_nap, depth_nap)[source]

Returns pile circumferences at requested depths.

Parameters:
  • pile_tip_level_nap (float) – Pile tip level in [m] w.r.t. NAP.

  • pile_head_level_nap (float) – Pile head level in [m] w.r.t. NAP.

  • depth_nap (np.array) – Array with depths in [m] w.r.t. NAP.

Returns:

Array with pile circumferences at the requested depth_nap levels.

Return type:

np.array

get_area_vs_depth(pile_tip_level_nap, pile_head_level_nap, depth_nap)[source]

Returns cross-sectional area of the pile at requested depths.

Parameters:
  • pile_tip_level_nap (float) – Pile tip level in [m] w.r.t. NAP.

  • pile_head_level_nap (float) – Pile head level in [m] w.r.t. NAP.

  • depth_nap (np.array) – Array with depths in [m] w.r.t. NAP.

Returns:

Array with pile areas at the requested depth_nap levels.

Return type:

np.array

plot(pile_tip_level_nap=-10, pile_head_level_nap=0, figsize=(3, 9), show=True, **kwargs)[source]

Plot the top-view of the pile at a specified depth.

Parameters:
  • pile_tip_level_nap (float, optional) – The pile tip level in m w.r.t. NAP, by default -10.

  • pile_head_level_nap (float, optional) – The pile head level in m w.r.t. NAP, by default 0.

  • figsize (tuple, optional) – The figure size (width, height) in inches, by default (6.0, 6.0).

  • show (bool, optional) – Whether to display the plot, by default True.

  • **kwargs (Any) – Additional keyword arguments to pass to the `plt

Return type:

List[Axes]

class pypilecore.common.piles.geometry._BasePileGeometryComponent[source]

The _BasePileGeometryComponent class is an abstract base class for pile-geometry components.

abstract classmethod from_api_response(component, inner_component=None)[source]

Instantiates a pile-geometry component from a component object in the API response payload.

Return type:

_BasePileGeometryComponent

Parameters:

component: dict

A dictionary that is retrieved from the API response payload at “/pile_properties/geometry/components/[i]”.

inner_component: _BasePileGeometryComponent | None, optional

The component on the inside of the pile-geometry component, by default None.

Returns:

: _BasePileGeometryComponent

A pile-geometry component.

abstract property inner_component: _BasePileGeometryComponent | None

The component on the inside of the pile-geometry component

abstract property outer_shape: str

The outer shape of the pile-geometry component

abstract property material: str | None

The material name of the pile-geometry component

abstract property primary_dimension: PrimaryPileComponentDimension

The primary dimension [m] of the pile-geometry component, which is measured along the primary axis of the pile.

abstract property circumference: float

The outer-circumference [m] of the pile-geometry component

abstract property equiv_tip_diameter: float

Equivalent outer-diameter [m] of the component at the tip-level.

abstract property area_full: float

The full outer-area [m²] of the pile-geometry component, including any potential inner-components

abstract serialize_payload()[source]

Serialize the pile-geometry component to a dictionary payload for the API.

Return type:

dict

Returns:

A dictionary payload containing the geometry properties.

abstract get_component_bounds_nap(pile_tip_level_nap, pile_head_level_nap)[source]

Returns component head and tip level in NAP.

Parameters:
  • pile_tip_level_nap (float) – pile tip level in [m] w.r.t. NAP.

  • pile_head_level_nap (float) – pile head level in [m] w.r.t. NAP.

Returns:

Tuple with component head and tip level in [m] w.r.t. NAP.

Return type:

tuple

abstract get_circum_vs_depth(depth_nap, pile_tip_level_nap, pile_head_level_nap)[source]

Returns component circumferences at requested depths.

Parameters:
  • depth_nap (np.array) – Array with depths in [m] w.r.t. NAP.

  • pile_tip_level_nap (float) – pile tip level in [m] w.r.t. NAP.

  • pile_head_level_nap (float) – pile head level in [m] w.r.t. NAP.

Returns:

Array with component circumferences at the depths in the depth parameter.

Return type:

np.array

abstract get_inner_area_vs_depth(depth_nap, pile_tip_level_nap, pile_head_level_nap)[source]

Returns inner component areas at requested depths.

Parameters:
  • depth_nap (np.array) – Array with depths in [m] w.r.t. NAP.

  • pile_tip_level_nap (float) – pile tip level in [m] w.r.t. NAP.

  • pile_head_level_nap (float) – pile head level in [m] w.r.t. NAP.

Returns:

Array with inner component areas at the depths in the depth parameter.

Return type:

np.array

abstract get_area_vs_depth(depth_nap, pile_tip_level_nap, pile_head_level_nap)[source]

Returns component areas at requested depths.

Parameters:
  • depth_nap (np.array) – Array with depths in [m] w.r.t. NAP.

  • pile_tip_level_nap (float) – pile tip level in [m] w.r.t. NAP.

  • pile_head_level_nap (float) – pile head level in [m] w.r.t. NAP.

Returns:

Array with component areas at the depths in the depth parameter.

Return type:

np.array

abstract plot_cross_section_exterior(figsize=(6.0, 6.0), facecolor=None, axes=None, axis_arg='auto', show=True, **kwargs)[source]

Plot the cross-section of the component at a specified depth.

Parameters:
  • figsize (tuple, optional) – The figure size (width, height) in inches, by default (6.0, 6.0).

  • facecolor (tuple or str, optional) – The face color of the cross-section, by default None.

  • axes (Axes) – The axes object to plot the cross-section on.

  • axis_arg (bool or str or tuple, optional) – The axis argument to pass to the axes.axis() function, by default “auto”.

  • show (bool, optional) – Whether to display the plot, by default True.

Returns:

The axes object to plot the cross-section on.

Return type:

Axes

abstract plot_side_view(bottom_boundary_nap='pile_tip', top_boundary_nap='pile_head', pile_tip_level_nap=-10, pile_head_level_nap=0, figsize=(6.0, 6.0), facecolor=None, axes=None, axis_arg='scaled', show=True, **kwargs)[source]

Plot the side view of the cross-section at a specified depth.

Parameters:
  • figsize (tuple, optional) – The figure size (width, height) in inches, by default (6.0, 6.0).

  • facecolor (tuple or str, optional) – The face color of the pile cross-section, by default None.

  • axes (Axes) – The axes object to plot the cross-section on.

  • axis_arg (bool or str or tuple, optional) – The axis argument to pass to the axes.axis() function, by default “auto”.

  • show (bool, optional) – Whether to display the plot, by default True.

  • **kwargs (Any) – Additional keyword arguments to pass to the `plt

Return type:

Axes

class pypilecore.common.piles.geometry.PrimaryPileComponentDimension(length=None)[source]

The PrimaryPileComponentDimension class represents the primary dimension of a pile-geometry component, which is measured along the primary axis of the pile. It contains the length, top level, and bottom level of the pile-geometry component.

classmethod from_api_response(primary_dim)[source]

Instantiates a PrimaryPileComponentDimension from a primary dimension object in the API response payload.

Parameters:

primary_dim (dict) – A dictionary that is retrieved from the API response payload at “/pile_properties/geometry/components/[i]/primary_dimension”.

Return type:

PrimaryPileComponentDimension

property length: float | None

The length [m] of the pile-geometry component

serialize_payload()[source]

Serialize the primary dimension to a dictionary payload for the API.

Only contains the length, since this is the only accepted value by the API. Returns None if the length is not set.

Return type:

Optional[Dict[str, Optional[float]]]

Returns:

A dictionary payload containing the length of the primary dimension.

class pypilecore.common.piles.geometry.PileMaterial(name, elastic_modulus, yield_stress=None, color=None)[source]

The PileMaterial class represents a material that can be used in a pile geometry component.

classmethod from_api_response(material)[source]

Instantiates a PileMaterial from a material object in the API response payload.

Parameters:

material (dict) – A dictionary that is retrieved from the API response payload at “/pile_properties/geometry/materials/[i]”.

Return type:

PileMaterial

property name: str

The name of the material

property elastic_modulus: float

The elastic modulus [MPa] of the material

property yield_stress: float | None

The yield stress [MPa] of the material

property color: Color | None

The color of the material

serialize_payload()[source]

Serialize the material to a dictionary payload for the API.

Return type:

Dict[str, Union[str, float, Dict[str, int]]]

Returns:

A dictionary payload containing the material’s name, elastic modulus, and color.

class pypilecore.common.piles.geometry.Color(red, green, blue)[source]

The Color class represents an RGB color.

classmethod from_hex(hex)[source]

Instantiate a Color object from a hexadecimal color string.

Return type:

Color

Parameters:

hexstr

The hexadecimal representation of the RGB color. example: “#ff0000” for red.

Returns:

: Color

A Color object.

property hex: str

The hexadecimal representation of the RGB color. e.g. “#ff0000” for red.

serialize_payload()[source]

Serialize the RGB color to a dictionary payload for the API.

Return type:

Dict[str, int]

Soil properties: Results

class pypilecore.results.soil_properties.SoilProperties(cpt_table, layer_table, ref_height, surface_level_ref, groundwater_level_ref, test_id=None, x=None, y=None)[source]

A class for soil properties.

property cpt_table: CPTTable

The CPTTable object

property layer_table: LayerTable

The LayerTable object

property x: float | None

x-coordinate of the CPT

property y: float | None

y-coordinate of the CPT

property test_id: str | None

Identifier of the CPT

property ref_height: float

The vertical reference [m].

property groundwater_level_ref: float

The elevation of the groundwater w.r.t. the vertical reference [m].

property surface_level_ref: float

The elevation of the surface w.r.t. the vertical reference [m]. This could be the level post-excavation.

plot_layers(axes=None, hide_excavated=False, add_legend=True, **kwargs)[source]

Plots the soil layers on the provided Axes.

Parameters:
  • axes (Optional[Axes]) – Optional Axes object where the soil-layer data can be plotted on. If not provided, a new plt.Figure will be activated and the Axes object will be created and returned.

  • hide_excavated (bool) – Hide the layers under the excavation level.

  • add_legend (bool) – Add a legend to the axes object

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Axes object where the soil layers were plotted on

Return type:

axes

plot(figsize=(10.0, 12.0), width_ratios=(1.0, 0.1), add_legend=True, **kwargs)[source]

Plots the CPT and soil table data.

Parameters:
  • figsize (Tuple[float, float]) – Size of the activate figure, as the plt.figure() argument.

  • width_ratios (Tuple[float, float]) – Tuple of width-ratios of the subplots, as the plt.GridSpec argument.

  • add_legend (bool) – Add a legend to the second axes object

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The matplotlib Figure

Return type:

fig

class pypilecore.results.soil_properties.CPTTable(depth_nap, qc, qc_original, qc_chamfered, qc1, qc2, fs)[source]

Object that contains the CPT-related data-traces of a bearing calculation. These can be either raw input data, corrected data or intermediate results.

qc

The cone resistance signal from the CPT [MPa], possibly corrected for excavation or OCR.

qc_original

The original cone resistance signal from the CPT [MPa].

qc_chamfered

The chamfered-qc signal, used for the positive friction range [MPa].

qc1

The Koppejan-qc1 trajectory [MPa].

qc2

The Koppejan-qc2 trajectory [MPa].

fs

The original fs signal from the CPT [MPa].

classmethod from_api_response(cpt_chart_dict)[source]

Instantiates the CPTTable object from the “cpt_chart” object, which is returned in the response of a “compression/multiple-cpts/results” endpoint call.

Return type:

CPTTable

property qc_has_been_chamfered: bool

Returns False if qc_chamfered contains the same data as qc.

property qc_has_been_reduced: bool

Returns False if qc contains the same data as qc_original.

to_pandas()[source]

The pandas.DataFrame representation

Return type:

DataFrame

plot_qc(axes=None, add_legend=True, **kwargs)[source]

Plots the qc data on the provided Axes.

Parameters:
  • axes (Optional[Axes]) – Optional Axes to plot on.

  • add_legend (bool) – Add a legend (default = True).

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The matplotlib Axes object

Return type:

axes

plot_friction_ratio(axes=None, add_legend=True, **kwargs)[source]

Plots the friction-ratio data on the provided Axes.

Parameters:
  • axes (Optional[Axes]) – Optional Axes to plot on.

  • add_legend (bool) – Add a legend (default = True).

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The matplotlib Axes object

Return type:

axes

class pypilecore.results.soil_properties.LayerTable(index, thickness, depth_btm, C_s, C_p, gamma, gamma_sat, phi, soil_code)[source]

Object that contains the Soil-layer data-traces.

index

Layer index

thickness

The layer thickness [m]

depth_btm

The depth of the layer bottom (below service level) [m].

C_s

Koppejan parameters for secondary compression.

C_p

Koppejan parameters for primary compression.

gamma

The dry unit weights [MPa].

gamma_sat

The saturated unit weights [MPa].

phi

Internal friction angle. [rad]

soil_code

The code used to describe the soil layers of the boreholes. Main components are specified with capital letters and are the following:

  • G: gravel (Grind)

  • Z: sand (Zand)

  • L: loam (Leem)

  • K: clay (Klei)

  • V: peat (Veen)

classmethod from_api_response(layer_table_dict)[source]

Instantiates the LayerTable object from the “layer_table” object, which is returned in the response of a “compression/multiple-cpts/results” endpoint call.

Return type:

LayerTable

to_pandas()[source]

The pandas.DataFrame representation

Return type:

DataFrame

CPT grouper: Input

pypilecore.input.grouper_properties.create_grouper_payload(cpt_results_dict, pile_load_uls, building_polygon=None, cpt_grid_rotation=0.0, gamma_bottom=1.2, gamma_shaft=1.2, include_centre_to_centre_check=False, stiff_construction=False, optimize_result_by=['minimum_pile_level', 'number_of_cpts', 'number_of_consecutive_pile_levels'], resolution=0.5, overrule_nan=0.0, skip_nan=False)[source]

Creates a dictionary with the payload content for the PileCore endpoint “/grouper/group_cpts”

Note

The grouper uses pile bearing capacity results calculated by PileCore or other software to form subgroups of the total group of CPT’s belonging to this project. Valid subgroups have three characteristics:

  • a maximum variation coefficient of 12% at one or more pile-tip levels. (Variation check NEN9997-1 A.3.3.3)

  • a minimum design pile bearing capacity based on the given pile load ULS at one or more pile-tip levels. (Bearing check)

  • is spatially coherent, which means there are no other CPTs in between the members of the subgroup. (Spatial check)

Additionally, centre to centre validation (include_centre_to_centre_check; NEN9997-1 3.2.3) can be added to the cluster method. This check adds restrictions to the maximum allowable R;c;cal outliers and makes sure that the suitable data density requirements for the subgroup are met, by checking the centre-to-centre (CTC) distance of the cpts in a regular square grid:

  • A maximum CTC distance of 25 m, if no R;c;cal outliers greater than 30% off the average;

  • A maximum CTC distance of 20 m, if no R;c;cal outliers greater than 40% off the average;

  • A maximum CTC distance of 15 m, if no R;c;cal outliers greater than 50% off the average;

  • All subgroups with R;c;cal outliers greater than 50% of the average are considered invalid.

The CTC check is performed by drawing a square around each CPT with the CTC dimensions according to the outlier criterion and verifying that there is no empty space between squares. The rotation of the squares can be provided with the cpt_grid_rotation argument. Note that this rotation is assigned to all CPT’s and therefore should represent the main orientation of the building.

Parameters:
  • cpt_results_dict (Dict[str, SingleCPTBearingResults]) – Dictionary with key as CPT name and value a SingleCPTBearingResults class. Should contain at least 2 entries.

  • pile_load_uls (float) – ULS load in kN. Used to determine if a grouping configuration is valid.

  • stiff_construction (bool) – Default is False Attribute use to get the xi3 and xi4 value. True if it is a stiff construction

  • optimize_result_by (Optional[List[Literal['minimum_pile_level', 'number_of_cpts', 'number_of_consecutive_pile_levels', 'centre_to_centre_check']]]) –

    Default is “minimum_pile_level”, “number_of_cpts”, “number_of_consecutive_pile_levels” Attribute that states how to sort the result and find groups. Based on the filter method, a selection of valid subgroups are included in the report. The following filters are available:

    • Number_of_cpts: the grouper adds filters to make the group as big as possible to try and get a uniform pile tip level for most CPT’s.

    • Number_of_consecutive_pile_levels; the grouper adds filters to get groups that contain consecutive pile tip levels to ensure a consistent soil layer is used.

    • Minimum_pile_level; the grouper adds filters to return groups that optimize pile length to try and optimize or reduce material use.

    • Centre_to_centre_check; the grouper adds filters to favour groups that are valid according to the centre to centre rules of the NEN9997-1 3.2.3.

  • gamma_shaft (float) – Default is 1.2 Safety factor shaft design bearing capacity

  • gamma_bottom (float) – Default is 1.2 Safety factor bottom design bearing capacity

  • include_centre_to_centre_check (bool) – Default is False Flag that indicates if the cluster algorithm performs a centre to centre validation of the CPT’s of the generated subgroups or not according to NEN9997-1 3.2.3. If the group doesn’t comply to the check, the result of the group is deleted from the result.

  • building_polygon (Optional[Polygon]) – Default is None Polygon of the contour of the building. If None the building Polygon in generated based on the convex_hull of the CPT points.

  • cpt_grid_rotation (float) – Default is 0.0. Rotation of the squares used in the centre to centre validation [degrees]

  • resolution (float) – Default is 0.5 The resolution of clusters algorithm. If resolution is 1 the cluster boundary conditions can be met (number clusters is number CPTs). Depending on the number of CPTs this can take some time.

  • overrule_nan (float) – Default is 0.0 The default behavior is to replace NaN with zero, for one of the following attributes [“R_b_cal”, “F_nk_d”, “R_s_cal”].

  • skip_nan (bool) – Default is False If True the CPTs are skipped that have NaN values in one of the following attributes [“R_b_cal”, “F_nk_d”, “R_s_cal”], this means that they are not used in the grouper method.

Raises:

ValueError:

  • if NaN values are present in negative friction, bottom or shaft bearing_capacity - if x or y coordinate is None - if pile tip levels don’t macht for all SingleCPTBearingResults - if less than 2 valid CPTs are provided

Returns:

Dictionary with the payload content for the PileCore endpoint “/grouper/group_cpts”

Return type:

payload

pypilecore.input.grouper_properties.create_grouper_report_payload(grouper_payload, grouper_response, project_name, project_id, author)[source]

Creates a dictionary with the payload content for the PileCore endpoint “grouper/generate_grouper_report”

Parameters:
  • grouper_payload (dict) – The resulting payload of a call to create_grouper_payload()

  • grouper_response (dict) – The resulting response of a call to get_groups_api_result()

  • project_name (str) – The name of the project.

  • project_id (str) – The identifier (code) of the project.

  • author (str) – The author of the report.

Returns:

Dictionary with the payload content for the PileCore endpoint “grouper/generate_grouper_report”

Return type:

report_payload

CPT grouper: Results

class pypilecore.results.grouper_result.GrouperResults(clusters, multi_cpt_bearing_results)[source]

Not meant to be instantiated by the user.

Use the from_api_response method to instantiate the class.

Attributes:

clusters: List[SingleClusterResult]

classmethod from_api_response(response_dict, pile_load_uls, multi_cpt_bearing_results)[source]

Stores the response of the PileCore endpoint “/grouper/group_cpts”

Parameters:
  • response_dict (dict) – The resulting response of a call to get_groups_api_result()

  • pile_load_uls (float) – ULS load in kN. Used to determine if a grouping configuration is valid.

  • multi_cpt_bearing_results (MultiCPTBearingResults) – The container that holds multiple SingleCPTBearingResults objects

Return type:

GrouperResults

property max_bearing_results: MaxBearingResults

Get the results of the maximum net design bearing capacity (R_c_d_net) for every CPT.

map(distance=25.0, add_tags=True, figsize=None, **kwargs)[source]

Plot a map of the valid subgroups. Plot contains the:

  • convex_hull of the subgroup with buffer distance

  • All CPT’s with tag

Parameters:
  • distance (float, optional) – Default is 25. The buffer around the convex_hull of the subgroup

  • add_tags (bool, optional) – default is True Show the CTP names as tags on the map

  • figsize (Optional[Tuple[int, int]]) – Size of the activate figure, as the plt.figure() argument.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Figure object where the data was plotted on.

Return type:

figure

plot(figsize=None, **kwargs)[source]

Plot a summary of the valid subgroups.

Note

Plot contains the:

  • cpts within a subgroup
    • green:

      There are no other CPTs in between the members of the subgroup. The group is also compliant with the NEN9997-1 3.2.3 centre to centre validation.

    • orange:

      There are no other CPTs in between the members of the subgroup. The centre-to-centre check failed and so the group does not follow the NEN9997-1 3.2.3 centre to centre validation.

    • red:

      There are other CPTs in between the members of the subgroup.

  • valid depth of the subgroup

Parameters:
  • figsize (Optional[Tuple[int, int]]) – Size of the activate figure, as the plt.figure() argument.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

the plt.Figure object.

Return type:

figure

class pypilecore.results.grouper_result.SingleClusterResult(cpt_names, coordinates, pile_load_uls, maximum_pile_level, minimum_pile_level, number_of_consecutive_pile_levels, pile_load_check, spatial_check, variation_check, centre_to_centre_check, data)[source]

Not meant to be instantiated by the user.

Attributes:

cpt_names: List[str]

List of cpt names present in this cluster

coordinates: List[Tuple[float, float]]

List of coordinates present in this cluster

pile_load_uls

ULS load in kN. Used to determine if a grouping configuration is valid.

maximum_pile_level: float

maximum pile level [m w.r.t NAP]

minimum_pile_level: float

minimum pile level [m w.r.t NAP]

number_of_consecutive_pile_levels: int

number of consecutive pile levels

pile_load_check: bool

True if a minimum design pile bearing capacity based on the given pile load ULS at one or more pile-tip levels.

spatial_check: bool

True if cluster is spatially coherent, which means there are no other CPTs in between the members of the subgroup.

variation_check: bool

True if a maximum variation coefficient of 12% at one or more pile-tip levels.

centre_to_centre_check: bool

True if one of the conditions stated in NEN9997-1 3.2.3 is met at one or more pile-tip levels.

data: SingleClusterData

single cluster dataclass

map(figsize=None, **kwargs)[source]

Plot a map of the cpt locations

Parameters:
  • figsize (Optional[Tuple[int, int]]) – Size of the activate figure, as the plt.figure() argument.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Axes object where the data was plotted on.

Return type:

axes

plot(figsize=None, **kwargs)[source]
Plot contains the:
  • bearing capacity

  • variation coefficient

  • xi factor

  • centre to centre validation

Note

For the Net bearing capacity subplot there are two colors plotted:
  • orange: conservative bearing capacity

  • blue: net bearing capacity

For the xi factor subplot there are two colors plotted:
  • olive: xi3

  • cyan: xi4

For the spacing subplot there are two colors plotted:
  • red: invalid spacing

  • green: valid spacing

Parameters:
  • figsize (Optional[Tuple[int, int]]) – Size of the activate figure, as the plt.figure() argument.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

plt.Figure object.

Return type:

figure

class pypilecore.results.grouper_result.SingleClusterData(characteristic_bearing_capacity, design_bearing_capacity, design_negative_friction, group_centre_to_centre_validation, group_centre_to_centre_validation_15, group_centre_to_centre_validation_20, group_centre_to_centre_validation_25, mean_calculated_bearing_capacity, min_calculated_bearing_capacity, net_design_bearing_capacity, nominal_cpt, pile_tip_level, variation_coefficient, xi_factor, xi_values)[source]

Data for a single CPT subgroup Not meant to be instantiated by the user.

property characteristic_bearing_capacity: ndarray[Any, dtype[float64]]

Characteristic bearing capacity [kN]

property design_bearing_capacity: ndarray[Any, dtype[float64]]

Design bearing capacity [kN]

property design_negative_friction: ndarray[Any, dtype[float64]]

Design negative friction [kN]

property group_centre_to_centre_validation: ndarray[Any, dtype[bool_]]

Group centre to centre validation

property group_centre_to_centre_validation_15: ndarray[Any, dtype[bool_]]

Group centre to centre validation 15 meter

property group_centre_to_centre_validation_20: ndarray[Any, dtype[bool_]]

Group centre to centre validation 20 meter

property group_centre_to_centre_validation_25: ndarray[Any, dtype[bool_]]

Group centre to centre validation 25 meter

property mean_calculated_bearing_capacity: ndarray[Any, dtype[float64]]

Mean calculated bearing capacity [kN]

property min_calculated_bearing_capacity: ndarray[Any, dtype[float64]]

Min calculated bearing capacity [kN]

property net_design_bearing_capacity: ndarray[Any, dtype[float64]]

Net design bearing capacity [kN]

property nominal_cpt: ndarray[Any, dtype[str_]]

Nominal cpt

property pile_tip_level: ndarray[Any, dtype[float64]]

Pile tip level [m w.r.t NAP]

property variation_coefficient: ndarray[Any, dtype[float64]]

Variation coefficient [-]

property xi_factor: ndarray[Any, dtype[str_]]

Xi factor

property xi_values: ndarray[Any, dtype[float64]]

Xi values [-]

plot_variation_coefficient(axes=None, **kwargs)[source]

Plot the bearing capacity and variation coefficient in a subplot

Parameters:
  • axes (Optional[Axes]) – plt.Axes object where the data can be plotted on.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Return type:

None

plot_bearing_capacity(axes=None, pile_load_uls=0.0, **kwargs)[source]

Plot the bearing capacity and variation coefficient in a subplot

Note

For the Net bearing capacity subplot there are two colors plotted:
  • orange: conservative bearing capacity

  • blue: net bearing capacity

Parameters:
  • axes (Optional[Axes]) – plt.Axes object where the data can be plotted on.

  • pile_load_uls (float) – Default is 0.0 ULS load in kN.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Return type:

None

plot_group_centre_to_centre_validation(axes=None, **kwargs)[source]

Plot the spacing checks in a subplot

Note

For the spacing subplot there are two colors plotted:
  • red: invalid spacing

  • green: valid spacing

Parameters:
  • axes (Optional[Axes]) – plt.Axes object where the data can be plotted on.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Return type:

None

plot_xi(axes=None, **kwargs)[source]

Plot the xi factor in a subplot

Note

For the xi factor subplot there are two colors plotted:
  • olive: xi3

  • cyan: xi4

Parameters:
  • axes (Optional[Axes]) – plt.Axes object where the data can be plotted on.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Return type:

None

Post-Processing: Results

class pypilecore.results.post_processing.MaxBearingResults(cpt_results_dict)[source]

Object containing the results for the maximum net design bearing capacity (R_c_d_net) for every CPT.

property cpt_results_dict: Dict[str, MaxBearingResult]

The dictionary with the MaxBearingResult for each CPT.

property test_ids: List[str]

The test-ids of the CPTs.

property results: List[MaxBearingResult]

The computed results, as a list of MaxBearingResult objects.

get_cpt_results(test_id)[source]

Returns the MaxBearingResult object for the provided test_id.

Return type:

MaxBearingResult

get_results_per_cpt(column_name)[source]

Returns a pandas dataframe with a single result-item, organized per CPT (test-id) and pile-tip-level-nap.

Parameters:

column_name (str) – The name of the result-item / column name of the single-cpt-results table.

Return type:

DataFrame

to_pandas()[source]

Returns a total overview of all single-cpt results in a pandas.DataFrame representation.

Return type:

DataFrame

triangulation(pile_tip_level_nap)[source]

Delaunay tessellation based on the CPT location

Returns:

collection – A list of dictionaries containing the tessellation geometry and corresponding cpt names:

  • geometry: List[Tuple[float, float]]

  • test_id: List[str]

Return type:

List

plot(projection='3d', hue='colormap', pile_load_uls=100, figsize=None, **kwargs)[source]

Plot a 3D scatterplot of the valid ULS load.

Parameters:
  • projection (Optional[Literal['3d']]) – default is 3d The projection type of the subplot. use None to create a 2D plot

  • hue (Literal['colormap', 'category']) – default is colormap The marker colors methode. If colormap is used the colors represent the R_c_d_net value. The category option sets the colors to valid ULS loads. Please use the pile_load_uls attribute to set the required bearing capacity.

  • pile_load_uls (float) – default is 100 kN ULS load in kN. Used to determine if a pile tip level configuration is valid.

  • figsize (Optional[Tuple[int, int]]) – Size of the activate figure, as the plt.figure() argument.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Figure object where the data was plotted on.

Return type:

figure

map(pile_tip_level_nap, pile_load_uls=100, show_delaunay_vertices=True, show_voronoi_vertices=False, figsize=None, **kwargs)[source]

Plot a map of the valid ULS load for a given depth.

Note

Based on the Delaunay methode a tessellation is created with the location of the CPT’s. Each triangle is then colored according to the bearing capacity of the CPT its based on. If any of the CPT does not meet the required capacity the triangle becomes also invalid.

Warning

Please note that this map indication of valid ULS zones is intended as a visual aid to help the geotechnical engineer. It does not necessarily comply with the NEN 9997-1+C2:2017 since the NEN is open to interpretation. It is therefore that the interpretation provided by this methode must be carefully validated by a geotechnical engineer.

Parameters:
  • pile_tip_level_nap (float) – Pile tip level to generate map.

  • pile_load_uls (float) – default is 100 kN ULS load in kN. Used to determine if a pile tip level configuration is valid.

  • show_delaunay_vertices (bool) – default is True Add delaunay vertices to the figure

  • show_voronoi_vertices (bool) – default is False Add voronoi vertices to the figure

  • figsize (Optional[Tuple[int, int]]) – Size of the activate figure, as the plt.figure() argument.

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Figure object where the data was plotted on.

Return type:

figure

class pypilecore.results.post_processing.MaxBearingResult(soil_properties, pile_head_level_nap, table)[source]

Object that contains the results of a PileCore single-cpt calculation.

Not meant to be instantiated by the user.

soil_properties

The object with soil properties

pile_head_level_nap

The elevation of the pile-head, in [m] w.r.t. NAP.

table

The object with CPT results.

to_pandas()[source]

Get the pandas.DataFrame representation

Return type:

DataFrame

plot_bearing_capacities(axes=None, figsize=(8, 10), add_legend=True, **kwargs)[source]

Plot the bearing calculation results on an `Axes’ object.

Parameters:
  • axes (Optional[Axes]) – Optional Axes object where the bearing capacities can be plotted on. If not provided, a new plt.Figure will be activated and the Axes object will be created and returned.

  • figsize (Tuple[float, float]) – Size of the activate figure, as the plt.figure() argument.

  • add_legend (bool) – Add a legend to the second axes object

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The Axes object where the bearing capacities were plotted on.

Return type:

axes

plot_bearing_overview(figsize=(10.0, 12.0), width_ratios=(1, 0.1, 2), add_legend=True, **kwargs)[source]

Plot an overview of the bearing-capacities, including the .

Parameters:
  • figsize (Tuple[float, float]) – Size of the activate figure, as the plt.figure() argument.

  • width_ratios (Tuple[float, float, float]) – Tuple of width-ratios of the subplots, as the plt.GridSpec argument.

  • add_legend (bool) – Add a legend to the second axes object

  • **kwargs (Any) – All additional keyword arguments are passed to the pyplot.subplots() call.

Returns:

The matplotlib Figure

Return type:

fig

class pypilecore.results.post_processing.MaxBearingTable(pile_tip_level_nap, R_c_d_net, F_nk_d, origin)[source]

Object that contains the results belonging to the maximum net design bearing capacity (R_c_d_net) for a single CPT.

Not meant to be instantiated by the user.

property pile_tip_level_nap: ndarray[Any, dtype[float64]]

The elevation of the pile-tip, in [m] w.r.t. NAP.

property R_c_d_net: ndarray[Any, dtype[float64]]

The maximum net design bearing capacity, in [kN].

property F_nk_d: ndarray[Any, dtype[float64]]

The net design bearing capacity, in [kN].

property origin: ndarray[Any, dtype[str_]]

The origin of the CPT data.

to_pandas()[source]

Get the pandas.DataFrame representation

Return type:

DataFrame