geofound/capacity.py
def capacity_meyerhof_1963(sl, fd, gwl=1e6, h_l=0, h_b=0, vertical_load=1, verbose=0, **kwargs):
    """
    Calculates the foundation capacity according Meyerhoff (1963)
    http://www.engs-comp.com/meyerhof/index.shtml

    :param sl: Soil object
    :param fd: Foundation object
    :param h_l: Horizontal load parallel to length
    :param h_b: Horizontal load parallel to width
    :param vertical_load: Vertical load
    :param verbose: verbosity
    :return: ultimate bearing stress
    """
    if not kwargs.get("disable_requires", False):
        models.check_required(sl, ["phi_r", "cohesion", "unit_dry_weight"])
        models.check_required(fd, ["length", "width", "depth"])

    horizontal_load = np.sqrt(h_l ** 2 + h_b ** 2)

    fd.nq_factor = ((np.tan(np.pi / 4 + sl.phi_r / 2)) ** 2 *
                    np.exp(np.pi * np.tan(sl.phi_r)))
    if sl.phi_r == 0:
        fd.nc_factor = 5.14
    else:
        fd.nc_factor = (fd.nq_factor - 1) / np.tan(sl.phi_r)
    fd.ng_factor = (fd.nq_factor - 1) * np.tan(1.4 * sl.phi_r)

    if verbose:
        log("Nc: ", fd.nc_factor)
        log("Nq: ", fd.nq_factor)
        log("Ng: ", fd.ng_factor)

    kp = (np.tan(np.pi / 4 + sl.phi_r / 2)) ** 2
    # shape factors
    s_c = 1 + 0.2 * kp * fd.width / fd.length
    if sl.phi > 10:
        s_q = 1.0 + 0.1 * kp * fd.width / fd.length
    else:
        s_q = 1.0
    s_g = s_q

    # depth factors
    d_c = 1 + 0.2 * np.sqrt(kp) * fd.depth / fd.width
    if sl.phi > 10:
        d_q = 1 + 0.1 * np.sqrt(kp) * fd.depth / fd.width
    else:
        d_q = 1.0
    d_g = d_q

    # inclination factors:
    theta_load = np.arctan(horizontal_load / vertical_load)
    i_c = (1 - theta_load / (np.pi * 0.5)) ** 2
    i_q = i_c
    if sl.phi > 0:
        i_g = (1 - theta_load / sl.phi_r) ** 2
    else:
        i_g = 0

    # stress at footing base:

    if gwl == 0:
        q_d = sl.unit_bouy_weight * fd.depth
        unit_weight = sl.unit_bouy_weight

    elif gwl > 0 and gwl < fd.depth:
        q_d = (sl.unit_dry_weight * gwl) + (sl.unit_bouy_weight * (fd.depth - gwl))
        unit_weight = sl.unit_bouy_weight

    elif gwl >= fd.depth and gwl <= fd.depth + fd.width:
        sl.average_unit_bouy_weight = sl.unit_bouy_weight + (
        ((gwl - fd.depth) / fd.width) * (sl.unit_dry_weight - sl.unit_bouy_weight))
        q_d = sl.unit_dry_weight * fd.depth
        unit_weight = sl.average_unit_bouy_weight

    elif gwl > fd.depth + fd.width:
        q_d = sl.unit_dry_weight * fd.depth
        unit_weight = sl.unit_dry_weight

    if verbose:
        log("Nc: ", fd.nc_factor)
        log("Nq: ", fd.nq_factor)
        log("Ng: ", fd.ng_factor)
        log("s_c: ", s_c)
        log("s_q: ", s_q)
        log("s_g: ", s_g)
        log("d_c: ", d_c)
        log("d_q: ", d_q)
        log("d_g: ", d_g)
        log("i_c: ", i_c)
        log("i_q: ", i_q)
        log("i_g: ", i_g)
        log("q_d: ", q_d)

    # Capacity
    fd.q_ult = (sl.cohesion * fd.nc_factor * s_c * d_c * i_c +
                q_d * fd.nq_factor * s_q * d_q * i_q +
                0.5 * fd.width * unit_weight *
                fd.ng_factor * s_g * d_g * i_g)
    return fd.q_ult
def capacity_meyerhof_1963(sl, fd, gwl=1e6, h_l=0, h_b=0, vertical_load=1, verbose=0, **kwargs):
    """
    Calculates the foundation capacity according Meyerhoff (1963)
    http://www.engs-comp.com/meyerhof/index.shtml

    :param sl: Soil object
    :param fd: Foundation object
    :param h_l: Horizontal load parallel to length
    :param h_b: Horizontal load parallel to width
    :param vertical_load: Vertical load
    :param verbose: verbosity
    :return: ultimate bearing stress
    """
    if not kwargs.get("disable_requires", False):
        models.check_required(sl, ["phi_r", "cohesion", "unit_dry_weight"])
        models.check_required(fd, ["length", "width", "depth"])

    horizontal_load = np.sqrt(h_l ** 2 + h_b ** 2)

    fd.nq_factor = ((np.tan(np.pi / 4 + sl.phi_r / 2)) ** 2 *
                    np.exp(np.pi * np.tan(sl.phi_r)))
    if sl.phi_r == 0:
        fd.nc_factor = 5.14
    else:
        fd.nc_factor = (fd.nq_factor - 1) / np.tan(sl.phi_r)
    fd.ng_factor = (fd.nq_factor - 1) * np.tan(1.4 * sl.phi_r)

    if verbose:
        log("Nc: ", fd.nc_factor)
        log("Nq: ", fd.nq_factor)
        log("Ng: ", fd.ng_factor)

    kp = (np.tan(np.pi / 4 + sl.phi_r / 2)) ** 2
    # shape factors
    s_c = 1 + 0.2 * kp * fd.width / fd.length
    if sl.phi > 10:
        s_q = 1.0 + 0.1 * kp * fd.width / fd.length
    else:
        s_q = 1.0
    s_g = s_q

    # depth factors
    d_c = 1 + 0.2 * np.sqrt(kp) * fd.depth / fd.width
    if sl.phi > 10:
        d_q = 1 + 0.1 * np.sqrt(kp) * fd.depth / fd.width
    else:
        d_q = 1.0
    d_g = d_q

    # inclination factors:
    theta_load = np.arctan(horizontal_load / vertical_load)
    i_c = (1 - theta_load / (np.pi * 0.5)) ** 2
    i_q = i_c
    if sl.phi > 0:
        i_g = (1 - theta_load / sl.phi_r) ** 2
    else:
        i_g = 0

    # stress at footing base:

    if gwl == 0:
        q_d = sl.unit_bouy_weight * fd.depth
        unit_weight = sl.unit_bouy_weight

    elif gwl > 0 and gwl < fd.depth:
        q_d = (sl.unit_dry_weight * gwl) + (sl.unit_bouy_weight * (fd.depth - gwl))
        unit_weight = sl.unit_bouy_weight

    elif gwl >= fd.depth and gwl <= fd.depth + fd.width:
        sl.average_unit_bouy_weight = sl.unit_bouy_weight + (
        ((gwl - fd.depth) / fd.width) * (sl.unit_dry_weight - sl.unit_bouy_weight))
        q_d = sl.unit_dry_weight * fd.depth
        unit_weight = sl.average_unit_bouy_weight

    elif gwl > fd.depth + fd.width:
        q_d = sl.unit_dry_weight * fd.depth
        unit_weight = sl.unit_dry_weight

    if verbose:
        log("Nc: ", fd.nc_factor)
        log("Nq: ", fd.nq_factor)
        log("Ng: ", fd.ng_factor)
        log("s_c: ", s_c)
        log("s_q: ", s_q)
        log("s_g: ", s_g)
        log("d_c: ", d_c)
        log("d_q: ", d_q)
        log("d_g: ", d_g)
        log("i_c: ", i_c)
        log("i_q: ", i_q)
        log("i_g: ", i_g)
        log("q_d: ", q_d)

    # Capacity
    fd.q_ult = (sl.cohesion * fd.nc_factor * s_c * d_c * i_c +
                q_d * fd.nq_factor * s_q * d_q * i_q +
                0.5 * fd.width * unit_weight *
                fd.ng_factor * s_g * d_g * i_g)
    return fd.q_ult
def capacity_meyerhof_1963 ( sl , fd , gwl = 1e6 , h_l = 0 , h_b = 0 , vertical_load = 1 , verbose = 0 , * * kwargs ) : if not kwargs . get ( "disable_requires" , False ) : models . check_required ( sl , [ "phi_r" , "cohesion" , "unit_dry_weight" ] ) models . check_required ( fd , [ "length" , "width" , "depth" ] ) horizontal_load = np . sqrt ( h_l ** 2 + h_b ** 2 ) fd . nq_factor = ( ( np . tan ( np . pi / 4 + sl . phi_r / 2 ) ) ** 2 * np . exp ( np . pi * np . tan ( sl . phi_r ) ) ) if sl . phi_r == 0 : fd . nc_factor = 5.14 else : fd . nc_factor = ( fd . nq_factor - 1 ) / np . tan ( sl . phi_r ) fd . ng_factor = ( fd . nq_factor - 1 ) * np . tan ( 1.4 * sl . phi_r ) if verbose : log ( "Nc: " , fd . nc_factor ) log ( "Nq: " , fd . nq_factor ) log ( "Ng: " , fd . ng_factor ) kp = ( np . tan ( np . pi / 4 + sl . phi_r / 2 ) ) ** 2 # shape factors s_c = 1 + 0.2 * kp * fd . width / fd . length if sl . phi > 10 : s_q = 1.0 + 0.1 * kp * fd . width / fd . length else : s_q = 1.0 s_g = s_q # depth factors d_c = 1 + 0.2 * np . sqrt ( kp ) * fd . depth / fd . width if sl . phi > 10 : d_q = 1 + 0.1 * np . sqrt ( kp ) * fd . depth / fd . width else : d_q = 1.0 d_g = d_q # inclination factors: theta_load = np . arctan ( horizontal_load / vertical_load ) i_c = ( 1 - theta_load / ( np . pi * 0.5 ) ) ** 2 i_q = i_c if sl . phi > 0 : i_g = ( 1 - theta_load / sl . phi_r ) ** 2 else : i_g = 0 # stress at footing base: if gwl == 0 : q_d = sl . unit_bouy_weight * fd . depth unit_weight = sl . unit_bouy_weight elif gwl > 0 and gwl < fd . depth : q_d = ( sl . unit_dry_weight * gwl ) + ( sl . unit_bouy_weight * ( fd . depth - gwl ) ) unit_weight = sl . unit_bouy_weight elif gwl >= fd . depth and gwl <= fd . depth + fd . width : sl . average_unit_bouy_weight = sl . unit_bouy_weight + ( ( ( gwl - fd . depth ) / fd . width ) * ( sl . unit_dry_weight - sl . unit_bouy_weight ) ) q_d = sl . unit_dry_weight * fd . depth unit_weight = sl . average_unit_bouy_weight elif gwl > fd . depth + fd . width : q_d = sl . unit_dry_weight * fd . depth unit_weight = sl . unit_dry_weight if verbose : log ( "Nc: " , fd . nc_factor ) log ( "Nq: " , fd . nq_factor ) log ( "Ng: " , fd . ng_factor ) log ( "s_c: " , s_c ) log ( "s_q: " , s_q ) log ( "s_g: " , s_g ) log ( "d_c: " , d_c ) log ( "d_q: " , d_q ) log ( "d_g: " , d_g ) log ( "i_c: " , i_c ) log ( "i_q: " , i_q ) log ( "i_g: " , i_g ) log ( "q_d: " , q_d ) # Capacity fd . q_ult = ( sl . cohesion * fd . nc_factor * s_c * d_c * i_c + q_d * fd . nq_factor * s_q * d_q * i_q + 0.5 * fd . width * unit_weight * fd . ng_factor * s_g * d_g * i_g ) return fd . q_ult
Calculates the foundation capacity according Meyerhoff (1963)
    http://www.engs-comp.com/meyerhof/index.shtml

    :param sl: Soil object
    :param fd: Foundation object
    :param h_l: Horizontal load parallel to length
    :param h_b: Horizontal load parallel to width
    :param vertical_load: Vertical load
    :param verbose: verbosity
    :return: ultimate bearing stress
Calculates the foundation capacity according Meyerhoff ( 1963 ) http : // www . engs - comp . com / meyerhof / index . shtml