def capacity_salgado_2008(sl, fd, h_l=<NUM_LIT:0>, h_b=<NUM_LIT:0>, vertical_load=<NUM_LIT:1>, verbose=<NUM_LIT:0>, **kwargs):
<EOL>if not kwargs.get("<STR_LIT>", False):<EOL><INDENT>models.check_required(sl, ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>"])<EOL>models.check_required(fd, ["<STR_LIT>", "<STR_LIT:width>", "<STR_LIT>"])<EOL><DEDENT>h_eff_b = kwargs.get("<STR_LIT>", <NUM_LIT:0>)<EOL>h_eff_l = kwargs.get("<STR_LIT>", <NUM_LIT:0>)<EOL>loc_v_l = kwargs.get("<STR_LIT>", fd.length / <NUM_LIT:2>)<EOL>loc_v_b = kwargs.get("<STR_LIT>", fd.width / <NUM_LIT:2>)<EOL>ecc_b = h_b * h_eff_b / vertical_load<EOL>ecc_l = h_l * h_eff_l / vertical_load<EOL>width_eff = min(fd.width, <NUM_LIT:2> * (loc_v_b + ecc_b), <NUM_LIT:2> * (fd.width - loc_v_b - ecc_b))<EOL>length_eff = min(fd.length, <NUM_LIT:2> * (loc_v_l + ecc_l), <NUM_LIT:2> * (fd.length - loc_v_l - ecc_l))<EOL>if width_eff / <NUM_LIT:2> < fd.width / <NUM_LIT:6>:<EOL><INDENT>DesignError("<STR_LIT>")<EOL><DEDENT>fd.nq_factor = np.exp(np.pi * np.tan(sl.phi_r)) * (<NUM_LIT:1> + np.sin(sl.phi_r)) / (<NUM_LIT:1> - np.sin(sl.phi_r))<EOL>fd.ng_factor = <NUM_LIT> * (fd.nq_factor - <NUM_LIT:1>) * np.tan(sl.phi_r)<EOL>if sl.phi_r == <NUM_LIT:0>:<EOL><INDENT>fd.nc_factor = <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>fd.nc_factor = (fd.nq_factor - <NUM_LIT:1>) / np.tan(sl.phi_r)<EOL><DEDENT>s_q = <NUM_LIT:1> + (width_eff / length_eff) * np.tan(sl.phi_r)<EOL>s_g = max(<NUM_LIT:1> - <NUM_LIT> * width_eff / length_eff, <NUM_LIT>)<EOL>s_c = <NUM_LIT:1.0><EOL>d_q = <NUM_LIT:1> + <NUM_LIT:2> * np.tan(sl.phi_r) * (<NUM_LIT:1> - np.sin(sl.phi_r)) ** <NUM_LIT:2> * fd.depth / width_eff<EOL>d_g = <NUM_LIT:1.0><EOL>d_c = <NUM_LIT:1.0><EOL>q_d = sl.unit_dry_weight * fd.depth<EOL>if verbose:<EOL><INDENT>log("<STR_LIT>", width_eff)<EOL>log("<STR_LIT>", length_eff)<EOL>log("<STR_LIT>", fd.nc_factor)<EOL>log("<STR_LIT>", fd.nq_factor)<EOL>log("<STR_LIT>", fd.ng_factor)<EOL>log("<STR_LIT>", s_c)<EOL>log("<STR_LIT>", s_q)<EOL>log("<STR_LIT>", s_g)<EOL>log("<STR_LIT>", d_c)<EOL>log("<STR_LIT>", d_q)<EOL>log("<STR_LIT>", d_g)<EOL>log("<STR_LIT>", q_d)<EOL><DEDENT>fd.q_ult = (sl.cohesion * fd.nc_factor * s_c * d_c +<EOL>q_d * fd.nq_factor * s_q * d_q +<EOL><NUM_LIT:0.5> * width_eff * sl.unit_dry_weight *<EOL>fd.ng_factor * s_g * d_g)<EOL>if verbose:<EOL><INDENT>log("<STR_LIT>", fd.q_ult)<EOL><DEDENT>return fd.q_ult<EOL>
calculates the capacity according to
 THe Engineering of Foundations textbook by Salgado

 ISBN: 0072500581

: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