Ejemplo n.º 1
0
    def static_values(self):
        self.total_weight = (sum(self.storey_masses) +
                             self.fd.mass) * self.g * self.horz2vert_mass
        if hasattr(self.fd, 'pad_length'):
            pad = sm.PadFoundation()
            pad.length = self.fd.pad_length
            pad.width = self.fd.pad_width
            pad.height = self.fd.height
            pad.depth = self.fd.depth
            self.soil_q = geofound.capacity_salgado_2008(sl=self.sl, fd=pad)
        else:
            self.soil_q = geofound.capacity_salgado_2008(sl=self.sl,
                                                         fd=self.fd)
        # Add new function to foundations, bearing_capacity_from_sfsimodels,
        # Deal with both raft and pad foundations
        bearing_capacity = nf.bearing_capacity(self.fd.area, self.soil_q)
        weight_per_frame = sum(self.storey_masses) / (
            self.n_seismic_frames + self.n_gravity_frames) * self.g
        self.axial_load_ratio = bearing_capacity / self.total_weight
        self.fd_bearing_capacity = bearing_capacity
        if self.axial_load_ratio < 1.0:
            raise DesignError(
                "Static failure expected. Axial load ratio: %.3f" %
                self.axial_load_ratio)

        self.theta_pseudo_up = nf.calculate_pseudo_uplift_angle(
            self.total_weight, self.fd.width, self.k_f_0,
            self.axial_load_ratio, self.alpha, self.zeta)
Ejemplo n.º 2
0
    def __init__(self, fb, hz, sl, fd, ip_axis='length', horz2vert_mass=None):
        super(AssessedSFSIRCFrame,
              self).__init__(fb, hz)  # run parent class initialiser function
        self.sl.__dict__.update(sl.__dict__)
        if fd.ftype == "raft":
            self.fd = sm.RaftFoundation()
        if fd.ftype == "pad":
            self.fd = sm.PadFoundation()
        self.fd.__dict__.update(fd.__dict__)
        self.k_f0_shear = geofound.stiffness.calc_shear_via_gazetas_1991(
            self.sl, self.fd, ip_axis=ip_axis)
        self.k_f_0 = geofound.stiffness.calc_rotational_via_gazetas_1991(
            self.sl, self.fd, ip_axis=ip_axis)
        if self.fd.ftype == "raft":
            #self.k_f_0 = nf.rotational_stiffness(self.fd.width, self.fd.length, self.sl.g_mod, self.sl.poissons_ratio)
            self.alpha = 4.0
        else:
            #self.k_f_0 = nf.rotational_stiffness(self.fd.width, self.fd.length, self.sl.g_mod, self.sl.poissons_ratio) / 2
            self.alpha = 3.0

        self.zeta = 1.5
        if horz2vert_mass is not None:
            self.horz2vert_mass = horz2vert_mass
        assert fb.material.type == 'rc_material'
        self.concrete = fb.material
def all_descriptions():
    """
    Generates a list of descriptions of all the models

    :return:
    """
    para = []
    para += build_parameter_descriptions(models.Soil()) + [",,\n"]
    para += build_parameter_descriptions(models.SoilProfile()) + [",,\n"]
    para += build_parameter_descriptions(models.Foundation()) + [",,\n"]
    para += build_parameter_descriptions(models.PadFoundation()) + [",,\n"]
    para += build_parameter_descriptions(models.SDOFBuilding()) + [",,\n"]
    para += build_parameter_descriptions(models.FrameBuilding2D(1, 1))

    return para
Ejemplo n.º 4
0
def test_load_and_save_foundation_w_pads():
    fd = models.PadFoundation()
    fd.width = 12  # m
    fd.length = 14  # m
    fd.depth = 0.6  # m
    fd.height = 1.0  # m
    fd.mass = 0.0  # kg
    fd.pad.length = 1.1
    fd.pad.width = 1.1
    fd.n_pads_l = 3
    fd.n_pads_w = 3
    fd.set_pad_pos_in_length_dir_as_equally_spaced()
    fd.set_pad_pos_in_width_dir_as_equally_spaced()
    tie_beams_sect = sm.sections.RCBeamSection()
    tie_beams_sect.depth = fd.height
    tie_beams_sect.width = fd.height
    tie_beams_sect.rc_mat = sm.materials.ReinforcedConcreteMaterial()
    tie_beams_sect.cracked_ratio = 0.6
    fd.tie_beam_sect_in_width_dir = tie_beams_sect
    fd.tie_beam_sect_in_length_dir = tie_beams_sect

    ecp_output = files.Output()
    ecp_output.add_to_dict(fd)
    ecp_output.name = "test data"
    ecp_output.units = "N, kg, m, s"
    ecp_output.comments = ""
    p_str = json.dumps(ecp_output.to_dict(), skipkeys=["__repr__"], indent=4)
    objs = files.loads_json(p_str)
    fd_new = objs['foundation'][1]
    fd_pms = ['width', 'length', 'depth', 'height', 'n_pads_l', 'n_pads_w']
    for item in fd_pms:
        np.isclose(getattr(fd, item), getattr(fd_new, item))
    assert np.sum(
        abs(fd.pad_pos_in_length_dir - fd_new.pad_pos_in_length_dir)) < 1.0e-6
    assert np.sum(
        abs(fd.pad_pos_in_width_dir - fd_new.pad_pos_in_width_dir)) < 1.0e-6
    pad_pms = ['width', 'length', 'depth', 'height']
    for item in pad_pms:
        np.isclose(getattr(fd.pad, item), getattr(fd_new.pad, item))
    return out_obj


def all_descriptions():
    """
    Generates a list of descriptions of all the models

    :return:
    """
    para = []
    para += build_parameter_descriptions(models.Soil()) + [",,\n"]
    para += build_parameter_descriptions(models.SoilProfile()) + [",,\n"]
    para += build_parameter_descriptions(models.Foundation()) + [",,\n"]
    para += build_parameter_descriptions(models.PadFoundation()) + [",,\n"]
    para += build_parameter_descriptions(models.SDOFBuilding()) + [",,\n"]
    para += build_parameter_descriptions(models.FrameBuilding2D(1, 1))

    return para


if __name__ == '__main__':
    # all_descriptions()
    para = []
    para += build_parameter_descriptions(models.Soil()) + [",,\n"]
    para += build_parameter_descriptions(models.SoilProfile()) + [",,\n"]
    para += build_parameter_descriptions(models.Foundation()) + [",,\n"]
    para += build_parameter_descriptions(models.PadFoundation()) + [",,\n"]
    para += build_parameter_descriptions(models.Structure()) + [",,\n"]
    para += build_parameter_descriptions(models.FrameBuilding2D(1, 1))
    print("\n".join(para))