コード例 #1
0
    def test_negative_friction(self):
        layer_table = pd.read_csv("files/d_foundation_layer_table.csv")
        self.gef.groundwater_level = 1
        df = soil.join_cpt_with_classification(self.gef, layer_table)

        tipping_point = nap_to_depth(self.gef.zid, -2.1)
        idx_tp = np.argmin(np.abs(self.gef.df.depth.values - tipping_point))
        s = slice(0, idx_tp - 1)

        if SHOW_PLOTS:
            # show chamfer line
            fig = self.gef.plot(show=False)
            fig.axes[0].plot(df.qc.values[s], df.depth.values[s], color="red")
            fig.axes[0].hlines(tipping_point, 0, df.qc.values[s].max())
            plt.show()

        f = bearing.negative_friction(df.depth.values[s],
                                      df.grain_pressure.values[s], 0.25 * 4,
                                      df.phi.values[s])
        deviation = abs(1 - 19.355 / (f.sum() * 1000))
        self.assertTrue(deviation < 1e-2)
コード例 #2
0
    def negative_friction(self, negative_friction_range=None, agg=True):
        """
        Determine negative friction.

        Parameters
        ----------
        negative_friction_range : np.array[float]
            Length == 2.
            Start and end depth of negative friction.

        agg : bool
            Influences return type.
                True: aggregates the friction values in total friction.
                False: Return friction values per cpt layer.

        Returns
        -------
        out : Union[float, np.array[float]]
            unit [MPa]
            See agg parameter
        """
        if negative_friction_range:
            self.negative_friction_slice = det_slice(
                self.merged_soil_properties.depth.values, negative_friction_range
            )
        negative_friction = bearing.negative_friction(
            depth=self.merged_soil_properties.depth.values[
                self.negative_friction_slice
            ],
            grain_pressure=self.merged_soil_properties.grain_pressure.values[
                self.negative_friction_slice
            ],
            circum=self.circum,
            phi=self.merged_soil_properties.phi[self.negative_friction_slice],
            gamma_m=self.gamma_m,
        )
        self.nk = negative_friction.sum()
        if agg:
            return self.nk
        return negative_friction
コード例 #3
0
# find the index of the pile tip
idx_ptl = np.argmin(np.abs(gef.df.depth.values - ptl))
ptl_slice = slice(0, idx_ptl)

# assume the tipping point is on top of the sand layers.
tipping_point = soil.find_last_negative_friction_tipping_point(
    df.depth.values[ptl_slice], df.soil_code[ptl_slice])

idx_tp = np.argmin(np.abs(df.depth.values - tipping_point))
negative_friction_slice = slice(0, idx_tp)

negative_friction = (bearing.negative_friction(
    depth=df.depth.values[negative_friction_slice],
    grain_pressure=df.grain_pressure.values[negative_friction_slice],
    circum=circum,
    phi=df.phi[negative_friction_slice],
    gamma_m=1,
)).sum() * 1000

positive_friction_slice = slice(idx_tp, idx_ptl)

chamfered_qc = bearing.chamfer_positive_friction(
    df.qc.values, gef.df.depth.values)[positive_friction_slice]

rs = (bearing.positive_friction(
    depth=df.depth.values[positive_friction_slice],
    chamfered_qc=chamfered_qc,
    circum=circum,
    alpha_s=0.01,
)).sum() * 1000