Example #1
0
def run_analytical_calc(data):
    D, t, t_coat = data.D, data.t, data.t_coat
    delta_P = data.P_i - data.P_e
    delta_T = data.T - data.T_a
    v, alpha, E, rho_p = data.v, data.alpha, data.E, data.rho_p
    rho_coat, rho_cont = data.rho_coat, data.rho_cont
    delta = max(data.deltas)
    soil_type = data.soil_type
    gamma, f, c = data.gamma_s, data.f, data.c
    rho_sw, g = data.rho_sw, data.g

    D_tot = general.total_outside_diameter(D, t_coat)
    A_i = general.internal_area(D, t)
    A_s = general.area_of_steel(D, t)
    EAF = abs(
        general.effective_axial_force(0, delta_P, A_i, v, A_s, E, alpha,
                                      delta_T))
    I = general.second_moment_of_area(D, t)
    w_o = general.submerged_weight(D, t, t_coat, rho_p, rho_coat, rho_cont,
                                   rho_sw, g)
    w = required_download(delta, E, I, EAF, w_o)
    q = max(w - w_o, 0)
    H = required_sand_cover_height(q, D_tot, gamma, f, c)

    Results = namedtuple("Results", "I EAF w_o w q H")
    return Results(I, EAF, w_o, w, q, H)
Example #2
0
def gen_lateral_spring(data, h, model="asce"):
    """ Returns lateral soil spring as a tuple of displacement and resistance
    based on chosen soil model.
    """
    D_o = general.total_outside_diameter(data.D, data.t_coat)
    H = depth_to_centre(D_o, h)
    disp = delta_p(H, D_o)
    springs = {
        "asce": (disp, Pu(data.c, H, D_o, data.psi_s, data.gamma_s)),
    }
    return springs.get(model, ValueError("Unknown lateral soil model."))
Example #3
0
def gen_bearing_spring(data, h, model="asce"):
    """ Returns bearing soil spring as a tuple of displacement and resistance
    based on chosen soil model.
    """
    D_o = general.total_outside_diameter(data.D, data.t_coat)
    H = depth_to_centre(D_o, h)
    disp = delta_qd(data.soil_type, D_o)
    springs = {
        "asce": (disp, Qd(data.psi_s, data.c, D_o, data.gamma_s, H,
                          data.rho_sw)),
    }
    return springs.get(model, ValueError("Unknown bearing soil model."))
Example #4
0
def gen_uplift_spring(data, h, model="asce"):
    """ Returns vertical uplift soil spring as a tuple of displacement and 
    resistance based on chosen soil model.
    """
    D_o = general.total_outside_diameter(data.D, data.t_coat)
    H = depth_to_centre(D_o, h)
    disp = delta_qu(data.soil_type, H, D_o)
    springs = {
        "asce": (disp, Qu(data.psi_s, data.c, D_o, data.gamma_s, H)),
        "f114": (disp, F_uplift_d(data.soil_type, data.gamma_s, H, D_o)),
        "f110": (disp, R_max(H, D_o, data.gamma_s, data.f)),
        "otc": (disp, P_otc6486(H, D_o, data.gamma_s, data.c)),
    }
    return springs.get(model, ValueError("Unknown uplift soil model."))
Example #5
0
def test_total_outside_diameter(gen_test_data):
    assert pytest.approx(
        general.total_outside_diameter(
            gen_test_data["D"],
            gen_test_data["t_coat"])) == gen_test_data["D_o"]