def demo_planar(): # 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.planar_daylight(strike - 60, dip) env.planar_friction(friction) plt.title('Rotate, plot\n daylight and friction\nenvelopes\n') jstr = np.random.randint(0, 361, 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.planar_daylight(strike, dip) env.planar_friction(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.planar_daylight(strike, dip) env.planar_friction(friction) ax[3].plane(jstr, jdip, c='k') ax[3].pole(jstr, jdip) plt.title('Plot poles, evaluate results\n') fig.suptitle('Planar failure\n\n')
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