Ejemplo n.º 1
0
def kinematic_analysis_results(plotfig=False):
#   slope face
    adjust=0
    strike=320+adjust
    dip=70
    if strike>=270:sddr=strike-270
    else:sddr=strike+90
#   discontinuities
    friction=30
    jstr=np.array([a+adjust for a in [330,295,180,135,340]])     
    jdip=np.array([20,50,80,65,55])           
    jddr=np.where(jstr>=270,jstr-270,jstr+90)
#    printing exercise title, problem, and input data
    print("\n\nKINEMATIC ANALYSIS FOR SLOPE FAILURES")
    print("\nProblem: Given a slope face and a set of planar rock discontinuities, determine the discontinuities which will facilitate planar, toppling, and wedge failures.")
    print("\n1 Slope face data\n--------")
    print('Strike - dip (RHR) / DipDir - dip')    
    print(strike, dip, ' / ', sddr, dip)
    print("\n2 Discontinuity data\n--------")
    print("Friction angle, in degrees (for all): ",friction)
    print('\nDiscontinuity number / Strike-dip (RHR) / DipDir-dip'    )
    for j in range(len(jstr)):
        print(j+1, ' / ',jstr[j],jdip[j], ' / ', jddr[j],jdip[j])
    if plotfig:
#       kinematic analysis axes
        fig,ax=env.setup_axes(strike,dip,friction,'all',True)
#       evaluate planar and toppling failures
        for j in range(len(jstr)):
            curax=ax[0]
            curax.pole(jstr[j],jdip[j],label=str(j+1))
            curax.legend(fontsize='x-small')
            
            curax=ax[2]
            curax.pole(jstr[j],jdip[j],label=str(j+1))
            curax.legend(fontsize='x-small')
    #    evaluate wedge failures
        curax=ax[1]
        curax.plane(jstr, jdip,'k',alpha=0.2)
        for j in range(len(jstr)-1):
            for k in range(j+1,len(jstr)):
                wl_plunge,wl_bearing=st.plane_intersection(jstr[j], jdip[j], jstr[k], jdip[k])
                curax.line(wl_plunge,wl_bearing,marker='^',label=str(j+1)+'x'+str(k+1))
                curax.legend(fontsize='x-small')
        plt.show()
    else:
        return
Ejemplo n.º 2
0
def exercise(plotfig=False):
    #   slope face
    strike = 320
    dip = 70
    if strike + 90 >= 360: ddr = strike + 90 - 360
    else: ddr = strike + 90
    #   discontinuities
    friction = 30
    jstr = [330, 295, 180, 135, 340]  #np.random.random_integers(0,360,3)
    jdip = [20, 50, 80, 65, 55]  #np.random.random_integers(0,90,3)
    jddr = []
    for j in range(len(jstr)):
        if jstr[j] + 90 >= 360:
            ddr = jstr[j] + 90 - 360
        else:
            ddr = jstr[j] + 90
        jddr.append(ddr)


#    printing exercise title, problem, and input data
    print "\n\nKINEMATIC ANALYSIS FOR SLOPE FAILURES"
    print "\nProblem: Given a slope face and a set of planar rock discontinuities, determine the discontinuities which will facilitate planar, toppling, and wedge failures."
    print "\n1) Slope face data\n--------"
    print 'Strike - dip (RHR) / DipDir - dip'
    print strike, dip, ' / ', ddr, dip
    print "\n2) Discontinuity data\n--------"
    print "Friction angle, in degrees (for all): ", friction
    print '\nStrike - dip (RHR) / DipDir - dip'
    for j in range(len(jstr)):
        print j + 1, jstr[j], jdip[j], ' / ', jddr[j], jdip[j]

    if plotfig:

        #       kinematic analysis axes
        fig, ax = env.setup_axes(strike, dip, friction, True)

        #       evaluate planar and toppling failures
        for j in range(len(jstr)):
            curax = ax[0]
            curax.pole(jstr[j], jdip[j], label=str(j + 1))
            curax.legend(fontsize='x-small')

            curax = ax[2]
            curax.pole(jstr[j], jdip[j], label=str(j + 1))
            curax.legend(fontsize='x-small')

            print j + 1, jstr[j], jdip[j], ' / ', jddr[j], jdip[j]

    #    evaluate wedge failures
        curax = ax[1]
        curax.plane(jstr, jdip, 'k', alpha=0.2)
        curax.plane(jstr, jdip, 'k', alpha=0.2)
        for j in range(len(jstr) - 1):
            for k in range(j + 1, len(jstr)):
                wl_plunge, wl_bearing = st.plane_intersection(
                    jstr[j], jdip[j], jstr[k], jdip[k])
                curax.line(wl_plunge,
                           wl_bearing,
                           marker='^',
                           label=str(j + 1) + 'x' + str(k + 1))
                curax.legend(fontsize='x-small')

        plt.show()
    else:
        return
Ejemplo n.º 3
0
def planarFailure(sstr, sdip, jfriction, jstr, jdip, to_plot=False):
    """
    Evaluates planar failure of joints vis-a-vis a slope face 
    with a given strike and dip, such that a joint's pole plots 1) within the
    planar daylight envelope, and 2) outside the planar friction envelope
    
    Parameters
    ----------
    sstr : int or float
        The strike of the slope face in degrees, with dip direction indicated by
        the azimuth (e.g. 315 vs. 135) specified following the "right hand
        rule".
    sdip : int or float
        The dip of the slope face in degrees.
    jfriction : int, float, or array of int or float
        The friction angle of the joint plane in degrees.
    jstr : int, float, or array of int or float
        The strike of the joint plane in degrees, with dip direction indicated by
        the azimuth (e.g. 315 vs. 135) specified following the "right hand
        rule".
    jdip : int, float, or array of int or float
        The dip of the joint plane in degrees.
        
    Returns
    -------
    planarFail: boolean array of size = len(np.atleast_1d(jstr)) 
        Indicates if corresponding joints will allow planar failure.
    """
    #    ensure jstr, jdip, and jfriction are 1-d arrays
    jstr, jdip = np.atleast_1d(jstr, jdip)
    try:
        len(jfriction)
        uniformFriction = False
    except:
        jfriction = jfriction * (np.ones(len(jstr)))
        uniformFriction = True


#    determinde daylight and friction envelopes
    pde_plunge, pde_bearing, pde_angle = env.planar_daylight(sstr, sdip, False)
    pfe_plunge, pfe_bearing, pfe_angle = env.planar_friction(jfriction, False)
    #    convert joint plane (strike-dip) to pole (plunge-bearing)
    jplunge, jbearing = st.pole2plunge_bearing(jstr, jdip)
    #    evaluate if joint poles are contained within daylight and friction envelopes (cones)
    inDaylight = np.empty(len(jstr))
    outFriction = np.empty(len(jstr))
    for a in range(len(jstr)):
        inDaylight[a] = line_in_cone(pde_plunge, pde_bearing, pde_angle,
                                     jplunge[a], jbearing[a])
        outFriction[a] = ~line_in_cone(pfe_plunge[a], pfe_bearing[a],
                                       pfe_angle[a], jplunge[a], jbearing[a])
    planarFail = (inDaylight == True) & (outFriction == True)
    #    plotting results
    if uniformFriction and to_plot:
        env.setup_axes(sstr,
                       sdip,
                       jfriction[0],
                       failure='planar',
                       to_plot=True)
        plt.gca().pole(jstr[~planarFail],
                       jdip[~planarFail],
                       color='0.5',
                       marker='.')
        plt.gca().pole(jstr[planarFail],
                       jdip[planarFail],
                       color='r',
                       marker='.')
    return planarFail
Ejemplo n.º 4
0
def topplingFailure(sstr, sdip, jfriction, jstr, jdip, to_plot=False):
    """
    Evaluates toppling failure of joints vis-a-vis a slope face 
    with a given strike and dip, such that a joint's pole plots 1) within the
    toppling slip limits, and 2) on the convex side of the toppling friction 
    envelope
    
    Parameters
    ----------
    sstr : int or float
        The strike of the slope face in degrees, with dip direction indicated by
        the azimuth (e.g. 315 vs. 135) specified following the "right hand
        rule".
    sdip : int or float
        The dip of the slope face in degrees.
    jfriction : int, float, or array of int or float
        The friction angle of the joint plane in degrees.
    jstr : int, float, or array of int or float
        The strike of the joint plane in degrees, with dip direction indicated by
        the azimuth (e.g. 315 vs. 135) specified following the "right hand
        rule".
    jdip : int, float, or array of int or float
        The dip of the joint plane in degrees.
        
    Returns
    -------
    topplingFail: boolean array of size = len(np.atleast_1d(jstr)) 
        Indicates if corresponding joints will allow toppling failure.
    """
    #    ensure jstr, jdip, and jfriction are 1-d arrays
    jstr, jdip = np.atleast_1d(jstr, jdip)
    try:
        len(jfriction)
        uniformFriction = False
    except:
        jfriction = jfriction * (np.ones(len(jstr)))
        uniformFriction = True


#    determine daylight and friction envelopes
    tsl_plunge, tsl_bearing, tsl_angle = env.toppling_slipLimits(
        sstr, sdip, False)
    tfe_strike, tfe_dip = env.toppling_friction(sstr, sdip, jfriction, False)
    #    convert joint plane (strike-dip) to pole (plunge-bearing)
    jplunge, jbearing = st.pole2plunge_bearing(jstr, jdip)
    #    evaluate if joint poles are contained within slip limits (cones) and friction envelope (great circles)
    inSlipLimit1 = np.empty(len(jstr))
    inSlipLimit2 = np.empty(len(jstr))
    convexFriction = np.empty(len(jstr))
    for a in range(len(jstr)):
        inSlipLimit1[a] = ~line_in_cone(tsl_plunge, tsl_bearing, tsl_angle,
                                        jplunge[a], jbearing[a])
        inSlipLimit2[a] = ~line_in_cone(tsl_plunge, tsl_bearing + 180,
                                        tsl_angle, jplunge[a], jbearing[a])
        convexFriction[a] = line_above_plane(tfe_strike[0], tfe_dip[a],
                                             jplunge[a], jbearing[a])
    topplingFail = ((inSlipLimit1 == True) & (inSlipLimit2 == True) &
                    (convexFriction == True))
    #    plotting results
    if uniformFriction and to_plot:
        env.setup_axes(sstr,
                       sdip,
                       jfriction[a],
                       failure='toppling',
                       to_plot=True)
        plt.gca().pole(jstr[~topplingFail],
                       jdip[~topplingFail],
                       color='0.5',
                       marker='.')
        plt.gca().pole(jstr[topplingFail],
                       jdip[topplingFail],
                       color='r',
                       marker='.')
    return topplingFail
Ejemplo n.º 5
0
def wedgeFailure(sstr, sdip, jfriction, jstr, jdip, to_plot=False):
    """
    Evaluates wedge failure of joints vis-a-vis a slope face 
    with a given strike and dip, such that a line defined by the intersection
    of two joints plots 1) on the convex side of the wedge daylight envelope, 
    and 2) within the wedge friction envelope. For each line, it conservatively
    uses the smaller friction angle (jfriction)
    
    Parameters
    ----------
    sstr : int or float
        The strike of the slope face in degrees, with dip direction indicated by
        the azimuth (e.g. 315 vs. 135) specified following the "right hand
        rule".
    sdip : int or float
        The dip of the slope face in degrees.
    jfriction : int, float, or array of int or float
        The friction angle of the joint plane in degrees.
    jstr : int, float, or array of int or float
        The strike of the joint plane in degrees, with dip direction indicated by
        the azimuth (e.g. 315 vs. 135) specified following the "right hand
        rule".
    jdip : int, float, or array of int or float
        The dip of the joint plane in degrees.
        
    Returns
    -------
    wedgeFail: boolean array of size = len(np.atleast_1d(jstr)) 
        Indicates if corresponding joints will allow wedge failure.
    """
    #    ensure jstr, jdip, and jfriction are 1-d arrays
    jstr, jdip = np.atleast_1d(jstr, jdip)
    try:
        len(jfriction)
        uniformFriction = False
    except:
        jfriction = jfriction * (np.ones(len(jstr)))
        uniformFriction = True


#    get plunge and bearing of unique joint pair intersections
    c = np.array(list(itercomb(range(len(jstr)), 2)))
    wl_plunge, wl_bearing = st.plane_intersection(jstr[c[:, 0]], jdip[c[:, 0]],
                                                  jstr[c[:, 1]], jdip[c[:, 1]])
    #    get minimum jfriction for each joint pair
    wl_friction = np.min((np.vstack([jfriction[c[:, 0]], jfriction[c[:, 1]]])),
                         axis=0)
    #    determinde daylight and friction envelopes
    wde_strike, wde_dip = env.wedge_daylight(sstr, sdip, False)
    wfe_plunge, wfe_bearing, wfe_angle = env.wedge_friction(wl_friction, False)
    #    evaluate if wedge lines are within daylight and friction envelopes (cones)
    convexDaylight = np.empty(len(wl_plunge))
    inFriction = np.empty(len(wl_plunge))
    for a in range(len(wl_plunge)):
        convexDaylight[a] = line_above_plane(wde_strike, wde_dip, wl_plunge[a],
                                             wl_bearing[a])
        inFriction[a] = line_in_cone(wfe_plunge[a], wfe_bearing[a],
                                     wfe_angle[a], wl_plunge[a], wl_bearing[a])
    wedgeFail = ((convexDaylight == True) & (inFriction == True))
    #    plotting results
    if uniformFriction and to_plot:
        env.setup_axes(sstr, sdip, jfriction[0], failure='wedge', to_plot=True)
        plt.gca().line(wl_plunge[~wedgeFail],
                       wl_bearing[~wedgeFail],
                       color='0.5',
                       marker='.')
        plt.gca().line(wl_plunge[wedgeFail],
                       wl_bearing[wedgeFail],
                       color='r',
                       marker='.')
    return wedgeFail