Пример #1
0
    def setUp(self) -> None:
        self.gef = ParseGEF("files/example.gef")
        self.layer_table = pd.read_csv("files/layer_table.csv")
        self.calc = PileCalculationSettlementDriven(
            self.gef,
            self.d_eq,
            self.circum,
            self.area,
            self.layer_table,
            pile_load=1500,
            soil_load=10,
            pile_system="soil-displacement",
            ocr=1,
            elastic_modulus_pile=30e3,
            settlement_time_in_days=int(1e10),
            alpha_s=0.01,
            gamma_m=1,
            alpha_p=1,
            beta_p=1,
            pile_factor_s=1,
        )

        # Assert that tipping points are as yet  none
        self.assertIsNone(self.calc.negative_friction_tipping_point_nap)
        self.assertIsNone(self.calc.positive_friction_tipping_point_nap)
Пример #2
0
 def setUp(self) -> None:
     self.gef = ParseGEF("files/test_gef2.gef")
     self.layer_table = pd.read_csv("files/test_layer_table2.csv")
     self.calc = PileCalculationSettlementDriven(
         self.gef,
         self.d_eq,
         self.circum,
         self.area,
         self.layer_table,
         pile_load=1000,
         soil_load=1,
     )
Пример #3
0
class TestSettlementCalculation(TestCase):
    pile_width = 0.25
    circum = pile_width * 4
    area = pile_width**2
    d_eq = 1.13 * pile_width

    def setUp(self) -> None:
        self.gef = ParseGEF("files/example.gef")
        self.layer_table = pd.read_csv("files/layer_table.csv")
        self.calc = PileCalculationSettlementDriven(
            self.gef,
            self.d_eq,
            self.circum,
            self.area,
            self.layer_table,
            pile_load=1500,
            soil_load=10,
            pile_system="soil-displacement",
            ocr=1,
            elastic_modulus_pile=30e3,
            settlement_time_in_days=int(1e10),
            alpha_s=0.01,
            gamma_m=1,
            alpha_p=1,
            beta_p=1,
            pile_factor_s=1,
        )

        # Assert that tipping points are as yet  none
        self.assertIsNone(self.calc.negative_friction_tipping_point_nap)
        self.assertIsNone(self.calc.positive_friction_tipping_point_nap)

    def tearDown(self) -> None:
        plt.close("all")

    def test_(self):
        self.calc.plot_pile_calculation(-12)
        self.calc.plot_pile_calculation(np.linspace(0, -17), figsize=(10, 10))

        # Tipping points must be set by now, test
        self.assertAlmostEqual(
            self.calc.negative_friction_tipping_point_nap,
            self.calc.merged_soil_properties.elevation_with_respect_to_NAP[
                self.calc.negative_friction_slice.stop],
        )
        self.assertAlmostEqual(
            self.calc.positive_friction_tipping_point_nap,
            self.calc.merged_soil_properties.elevation_with_respect_to_NAP[
                self.calc.positive_friction_slice.start],
        )
Пример #4
0
 def test_pile_tip_masking(self):
     """
     pile tip level should be between surface_level - 8D and cpt_depth - 4D
     """
     pile_width = 0.25
     circum = pile_width * 4
     area = pile_width**2
     d_eq = 1.13 * pile_width
     calc = PileCalculationSettlementDriven(self.gef,
                                            d_eq,
                                            circum,
                                            area,
                                            self.layer_table,
                                            pile_load=1500,
                                            soil_load=10)
     calc._init_calculation(
         np.linspace(self.gef.zid, self.gef.df.depth.max()))
Пример #5
0
class TestGef2(TestCase):
    pile_width = 0.25
    circum = pile_width * 4
    area = pile_width**2
    d_eq = 1.13 * pile_width

    def setUp(self) -> None:
        self.gef = ParseGEF("files/test_gef2.gef")
        self.layer_table = pd.read_csv("files/test_layer_table2.csv")
        self.calc = PileCalculationSettlementDriven(
            self.gef,
            self.d_eq,
            self.circum,
            self.area,
            self.layer_table,
            pile_load=1000,
            soil_load=1,
        )

    def test_raise_when_no_tipping_point_found(self):
        self.calc.run_calculation(-25)