def demo_toppling(): # slope face strike = 60 dip = 55 # generalized friction angle of slip planes friction = 25 fig, ax = st.subplots(ncols=4, projection='equal_angle_stereonet') plt.sca(ax[0]) ax[0].grid(True) ax[0].plane(strike, dip, 'k--', alpha=0.5, lw=5) plt.title('Plot slope face\n') plt.sca(ax[1]) ax[1].grid(True) ax[1].plane(strike - strike, dip, 'k--', alpha=0.5, lw=5) ax[1].set_azimuth_ticks([]) env.toppling_slipLimits(strike - strike, dip) env.toppling_friction(strike - strike, dip, friction) plt.title('Rotate, plot\n daylight and friction\nenvelopes\n') jstr = np.random.randint(0, 361, 4) #np.random.random_integers(0,360,4) jdip = np.random.randint(0, 91, 4) plt.sca(ax[2]) ax[2].grid(True) ax[2].plane(strike, dip, 'k--', alpha=0.5, lw=5) env.toppling_slipLimits(strike, dip) env.toppling_friction(strike, dip, friction) ax[2].plane(jstr, jdip, c='k') plt.title('Rotate back,\nplot discontinuity planes\n') plt.sca(ax[3]) ax[3].grid(True) ax[3].plane(strike, dip, 'k--', alpha=0.5, lw=5) env.toppling_slipLimits(strike, dip) env.toppling_friction(strike, dip, friction) ax[3].plane(jstr, jdip, c='k') ax[3].pole(jstr, jdip) plt.title('Plot poles, evaluate results\n') fig.suptitle('Toppling failure')
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