예제 #1
0
 def prepare(self, sites):
     sites.add_col('Fs', float, static_factor_of_safety(
         slope=sites.slope,
         cohesion=sites.cohesion_mid,
         friction_angle=sites.friction_mid,
         saturation_coeff=sites.saturation,
         soil_dry_density=sites.dry_density))
     sites.add_col('crit_accel', float,
                   newmark_critical_accel(sites.Fs, sites.slope))
예제 #2
0
 def test_newmark_critical_accel(self):
     ca = newmark_critical_accel(self.fs, self.slopes)
     ca_ = np.array([
         1.16853211,
         1.11533996,
         0.98539093,
         0.68736863,
         0.17927676,
         0.0,
     ])
     np.testing.assert_allclose(ca, ca_)
예제 #3
0
 def test_newmark_critical_accel(self):
     ca = newmark_critical_accel(self.fs, self.slopes)
     ca_ = np.array(
         [
             11.46329996, 
             10.94148504,  
             9.66668506,  
             6.74308623,  
             1.75870504, 
             0.
         ]
     )
     np.testing.assert_allclose(ca, ca_)
예제 #4
0
    def setUp(self):
        sites = pd.read_csv(site_data_file)
        self.sites = sites

        self.sites["Fs"] = static_factor_of_safety(
            slope=sites.slope,
            cohesion=sites.cohesion_mid,
            friction_angle=sites.friction_mid,
            saturation_coeff=sites.saturation,
            soil_dry_density=sites.dry_density,
        )

        self.sites["crit_accel"] = newmark_critical_accel(self.sites.Fs, 
            self.sites.slope)

        self.pga = np.array([0.29624916, 0.80906772, 0.35025253, 0.78940926,
            0.56134898, 0.25358895, 0.10497708, 0.05846073, 0.67329238,
            0.69782966])