Ejemplo n.º 1
0
def calc_crit_span(sl,
                   fd,
                   vertical_load,
                   ip_axis='length',
                   verbose=0,
                   **kwargs):
    """
    Determine the size of a footing given an aspect ratio and a load

    :param sl: Soil object
    :param vertical_load: The applied load to the foundation
    :param fos: The target factor of safety
    :param length_to_width: The desired length to width ratio of the foundation
    :param verbose: verbosity
    :return: a Foundation object
    """
    method = kwargs.get("method", 'vesic')

    # Find approximate size
    new_fd = models.RaftFoundation()
    new_fd.width = fd.width
    new_fd.depth = fd.depth
    new_fd.length = fd.length
    prev_ub_len = fd.length
    q_ult = capacity_method_selector(sl,
                                     new_fd,
                                     method,
                                     verbose=max(0, verbose - 1))
    init_fos = (
        q_ult *
        fd.area) / vertical_load  # TODO: should this have overburden pressure?
    if init_fos < 1.0:
        raise ValueError
    prev_lb_len = 0  # should be FOS lower than 1.
    l_ip = getattr(fd, ip_axis)
    est_len = l_ip / init_fos
    prev_q = q_ult
    for i in range(50):
        setattr(new_fd, ip_axis, est_len)
        q = capacity_method_selector(sl,
                                     new_fd,
                                     method,
                                     verbose=max(0, verbose - 1))
        curr_fos = (q * new_fd.area) / vertical_load
        if np.isclose(curr_fos, 1.0, rtol=0.01):
            break
        elif curr_fos < 1:
            prev_lb_len = est_len
            est_len = (prev_ub_len + est_len) / 2
        else:
            prev_ub_len = est_len
            est_len = (prev_lb_len + est_len) / 2
    if i == 49:
        raise ValueError(init_fos, curr_fos, est_len, prev_lb_len, prev_ub_len)
    return est_len
Ejemplo n.º 2
0
def test_calc_m_eff_via_loukidis_and_salgado_2006():
    # pg 451
    fd = models.RaftFoundation()
    fd.width = 2
    fd.length = 3
    fd.depth = 0.0
    sl = models.Soil(unit_dry_weight=17.1e3)
    m_eff_expected = 742.0  # kPa
    m_eff = geofound.calc_m_eff_bc_via_loukidis_and_salgado_2006(
        sl, fd, p_atm=100.0e3) / 1e3
    assert np.isclose(m_eff, m_eff_expected, rtol=0.01), m_eff
Ejemplo n.º 3
0
def size_footing_for_capacity(sl,
                              vertical_load,
                              fos=1.0,
                              length_to_width=1.0,
                              verbose=0,
                              unit_weight=0,
                              **kwargs):
    """
    Determine the size of a footing given an aspect ratio and a load

    :param sl: Soil object
    :param vertical_load: The applied load to the foundation
    :param fos: The target factor of safety
    :param length_to_width: The desired length to width ratio of the foundation
    :param verbose: verbosity
    :return: a Foundation object
    """
    method = kwargs.get("method", 'vesic')
    depth_to_width = kwargs.get("depth_to_width", 0)
    depth = kwargs.get("depth", 0)
    use_depth_to_width = 0
    if not depth:
        use_depth_to_width = 1

    # Find approximate size
    fd = models.RaftFoundation()
    fd.width = .5  # start with B=1.0m
    for i in range(50):
        fd.length = length_to_width * fd.width
        if use_depth_to_width:
            fd.depth = depth_to_width * fd.width
        else:
            fd.depth = depth
        capacity_method_selector(sl, fd, method)
        q = fd.q_ult

        bearing_capacity = q * fd.length * fd.width
        fs_actual = bearing_capacity / (vertical_load +
                                        unit_weight * fd.area * fd.depth)

        if fs_actual < fos:
            # Need to increase foundation sizes
            fd.width += 0.5
        else:
            if verbose:
                log("fs_actual: ", fs_actual)
                log("fd.width: ", fd.width)
            break

    # at this stage the current size should be too big
    width_array = []
    fs_array = []
    for j in range(11):
        width_array.append(fd.width)
        fd.length = length_to_width * fd.width
        if use_depth_to_width:
            fd.depth = depth_to_width * fd.width
        capacity_method_selector(sl, fd, method)
        q = fd.q_ult

        capacity = q * fd.length * fd.width

        fs_array.append(capacity /
                        (vertical_load + unit_weight * fd.area * fd.depth))

        fd.width = fd.width - 0.5 / 10

    # search the array until FS satisfied:
    if verbose:
        log("reqFS: ", fos)
        log("width array: \n", width_array)
        log("FS array: \n", fs_array)

    for fs in range(len(fs_array)):
        if fs_array[fs] < fos:
            fd.width = width_array[fs - 1]
            fd.length = length_to_width * fd.width
            if use_depth_to_width:
                fd.depth = depth_to_width * fd.width
            capacity_method_selector(sl, fd, method)
            break
        if fs == len(fs_array) - 1:
            DesignError("No suitable foundation sizes could be determined!")

    return fd