def test_pcpt_normalisation_nosleevedata(self): """ Test normalisation of the PCPT data with no sleeve dimensions available :return: """ # Create layering layers = SoilProfile({ "Depth from [m]": [0, 3.16, 5.9, 14.86, 15.7], "Depth to [m]": [3.16, 5.9, 14.86, 15.7, 20], "Total unit weight [kN/m3]": [18, 17, 19.5, 20, 20], 'Soil type': ['SAND', 'CLAY', 'SAND', 'SAND', 'SAND'] }) cone_props = SoilProfile({ 'Depth from [m]': [0, ], 'Depth to [m]': [20, ], 'area ratio [-]': [0.8, ], 'Cone type': ['U', ], 'Cone base area [cm2]': [10, ], }) self.test_pandas_pcpt_creation() self.pandas_pcpt.map_properties(layer_profile=layers, cone_profile=cone_props) self.pandas_pcpt.normalise_pcpt() self.assertAlmostEqual( self.pandas_pcpt.data.loc[2, 'ft [MPa]'], self.pandas_pcpt.data.loc[2, 'fs [MPa]'], 5 )
def test_pcpt_normalisation_withsleeve(self): """ Test normalisation of the PCPT data with correction for sleeve :return: """ # Create layering layers = SoilProfile({ "Depth from [m]": [0, 3.16, 5.9, 14.86, 15.7], "Depth to [m]": [3.16, 5.9, 14.86, 15.7, 20], "Total unit weight [kN/m3]": [18, 17, 19.5, 20, 20], 'Soil type': ['SAND', 'CLAY', 'SAND', 'SAND', 'SAND'] }) cone_props = SoilProfile({ 'Depth from [m]': [0, ], 'Depth to [m]': [20, ], 'area ratio [-]': [0.8, ], 'Cone type': ['U', ], 'Cone base area [cm2]': [10, ], 'Cone sleeve_area [cm2]': [150, ], 'Sleeve cross-sectional area top [cm2]': [0.8,], 'Sleeve cross-sectional area bottom [cm2]': [1,] }) self.test_pandas_pcpt_creation() self.pandas_pcpt.map_properties(layer_profile=layers, cone_profile=cone_props) self.pandas_pcpt.normalise_pcpt() self.assertAlmostEqual( self.pandas_pcpt.data.loc[2, 'ft [MPa]'], 0.003 - 0.004 * ((1 - 0.8) / 150), 5 )
def test_pcpt_mapping_errors(self): """ Test mapping of soil and cone properties to the PCPT grid :return: """ # Create layering layers = SoilProfile({ "Depth from [m]": [0, 3.16, 5.9, 14.86, 15.7], "Depth to [m]": [3.16, 5.9, 14.86, 15.7, 16], # PCPT data exceeds max depth "Total unit weight [kN/m3]": [18, 17, 19.5, 20, 20], 'Soil type': ['SAND', 'CLAY', 'SAND', 'SAND', 'SAND'] }) self.test_pandas_pcpt_creation() with self.assertRaises(ValueError): self.pandas_pcpt.map_properties(layers, extend_layer_profile=False) layers = SoilProfile({ "Depth from [m]": [1, 3.16, 5.9, 14.86, 15.7], "Depth to [m]": [3.16, 5.9, 14.86, 15.7, 20], # PCPT data exceeds max depth "Total unit weight [kN/m3]": [18, 17, 19.5, 20, 20], 'Soil type': ['SAND', 'CLAY', 'SAND', 'SAND', 'SAND'] }) self.test_pandas_pcpt_creation() self.assertRaises(ValueError, self.pandas_pcpt.map_properties, layers) layers = SoilProfile({ "Depth from [m]": [0, 3.16, 5.9, 14.86, 15.7], "Depth to [m]": [3.16, 5.9, 14.86, 15.7, 20], # PCPT data exceeds max depth "Total unit weight [kN/m3]": [18, 17, 19.5, 20, 20], 'Soil type': ['SAND', 'CLAY', 'SAND', 'SAND', 'SAND'] }) self.test_pandas_pcpt_creation() self.pandas_pcpt.map_properties(layer_profile=layers) cone_props = pcpt_processing.DEFAULT_CONE_PROPERTIES cone_props.loc[0, "Depth from [m]"] = 1 self.test_pandas_pcpt_creation() self.assertRaises(ValueError, self.pandas_pcpt.map_properties, layers, cone_props) cone_props.loc[0, "Depth from [m]"] = 0 cone_props.loc[0, "Depth to [m]"] = 18 self.test_pandas_pcpt_creation() with self.assertRaises(ValueError): self.pandas_pcpt.map_properties(layers, cone_props, extend_cone_profile=False, extend_layer_profile=False) cone_props.loc[0, "Depth to [m]"] = 20 self.test_pandas_pcpt_creation() self.pandas_pcpt.map_properties(layer_profile=layers)
def test_pcpt_mapping_nonzero_initial_stress(self): """ Test mapping of soil and cone properties to the PCPT grid :return: """ # Create layering layers = SoilProfile({ "Depth from [m]": [0, 3.16, 5.9, 14.86, 15.7], "Depth to [m]": [3.16, 5.9, 14.86, 15.7, 20], "Total unit weight [kN/m3]": [18, 17, 19.5, 20, 20], 'Soil type': ['SAND', 'CLAY', 'SAND', 'SAND', 'SAND'] }) self.test_pandas_pcpt_creation() self.pandas_pcpt.map_properties(layer_profile=layers, initial_vertical_total_stress=100) self.assertAlmostEqual( self.pandas_pcpt.data.loc[206, "area ratio [-]"], 0.8, 1 ) self.assertAlmostEqual( self.pandas_pcpt.data.loc[206, "Hydrostatic pressure [kPa]"], 42.23, 2 ) self.assertAlmostEqual( self.pandas_pcpt.data.loc[210, "Vertical effective stress [kPa]"], 131.51, 2 ) self.assertEqual( self.pandas_pcpt.data.loc[204, "Total unit weight [kN/m3]"], 17 )
def test_pcpt_mapping_extended(self): """ Test automatic extending of soilprofiles for mapping :return: """ layers = SoilProfile({ "Depth from [m]": [0, 3.16, 5.9, 14.86, 15.7], "Depth to [m]": [3.16, 5.9, 14.86, 15.7, 18], "Total unit weight [kN/m3]": [18, 17, 19.5, 20, 20], 'Soil type': ['SAND', 'CLAY', 'SAND', 'SAND', 'SAND'] }) cone_props = pcpt_processing.DEFAULT_CONE_PROPERTIES cone_props['Depth to [m]'] = [18,] self.test_pandas_pcpt_creation() self.pandas_pcpt.map_properties(layer_profile=layers, cone_profile=cone_props) self.assertAlmostEqual( self.pandas_pcpt.data.loc[206, "area ratio [-]"], 0.8, 1 ) self.assertAlmostEqual( self.pandas_pcpt.data.loc[206, "Hydrostatic pressure [kPa]"], 42.23, 2 ) self.assertAlmostEqual( self.pandas_pcpt.data.loc[210, "Vertical effective stress [kPa]"], 31.51, 2 ) self.assertEqual( self.pandas_pcpt.data.loc[204, "Total unit weight [kN/m3]"], 17 )
def test_pilecalcbeer(self): calc = debeer.DeBeerCalculation(depth=self.cpt_data['z [m]'], qc=self.cpt_data['qc [MPa]'], diameter_pile=0.4, diameter_cone=0.0357) calc.resample_data() profile = SoilProfile({ 'Depth from [m]': [0, 3, 6, 15], 'Depth to [m]': [3, 6, 15, 20], 'Soil type': ['Sand', 'Clay', 'Sand', 'Loam (silt)'] }) calc.set_soil_layers(soilprofile=profile) calc.calculate_base_resistance() calc.correct_shaft_qc(cone_type='U') calc.calculate_average_qc() calc.calculate_unit_shaft_friction() calc.set_shaft_base_factors(alpha_b_tertiary_clay=1.0, alpha_b_other=1.0, alpha_s_tertiary_clay=0.6, alpha_s_other=0.6) calc.calculate_pile_resistance(pile_penetration=16, base_area=0.25 * np.pi * (0.4**2), circumference=np.pi * 0.4) self.assertAlmostEqual(calc.Rs, 1313.1, 1) self.assertAlmostEqual(calc.Rb, 2800.4, 1) self.assertAlmostEqual(calc.Rc, 4113.5, 1)
def setUp(self): self.cpt = PCPTProcessing(title="Shaft test") self.cpt.load_excel(os.path.join(TESTS_DATA_DIR, "cpt_lecture3.xlsx"), sheet_name="CPT1") self.calc = debeer.DeBeerCalculation(depth=self.cpt.data["z [m]"], qc=self.cpt.data["qc [MPa]"], diameter_pile=0.4) self.calc.resample_data(spacing=0.2) profile = SoilProfile({ 'Depth from [m]': [0, 3, 7, 14, 18], 'Depth to [m]': [3, 7, 14, 18, 24], 'Soil type': ['Clay', 'Sand', 'Clay', 'Sand', 'Clayey sand / loam (silt)'] }) self.calc.set_soil_layers(soilprofile=profile)
# Project imports from groundhog.general.plotting import plot_with_log, GROUNDHOG_PLOTTING_CONFIG from groundhog.general.parameter_mapping import map_depth_properties, merge_two_dicts, reverse_dict from groundhog.siteinvestigation.insitutests.spt_correlations import * from groundhog.siteinvestigation.insitutests.pcpt_processing import InsituTestProcessing from groundhog.general.soilprofile import SoilProfile, plot_fence_diagram from groundhog.general.parameter_mapping import offsets from groundhog.general.agsconversion import AGSConverter DEFAULT_SPT_PROPERTIES = SoilProfile({ 'Depth from [m]': [0, ], 'Depth to [m]': [20, ], 'Borehole diameter [mm]': [100, ], 'Country': ['United States', ], 'Hammer type': ['Safety', ], 'Hammer release': ['Rope and pulley',], 'Sampler type': ['Standard sampler', ], 'eta H [-]': [np.nan,], 'eta B [-]': [np.nan,], 'eta S [-]': [np.nan,], 'eta R [-]': [np.nan,] }) class SPTProcessing(InsituTestProcessing): """ The SPTProcessing class implements methods for reading, processing and presentation of Standard Penetration Test (SPT) data. `GeoEngineer <https://www.geoengineer.org/education/site-characterization-in-situ-testing-general/standard-penetration-testing-spt/>`_ describes the SPT test as follows: Standard Penetration Test (SPT) is a simple and low-cost testing procedure widely used in geotechnical investigation to determine the relative density and angle of shearing resistance of cohesionless soils and also the strength of stiff cohesive soils.