Parametric study with Python - Slope in a Closely Jointed Rock Mass (FLAC2D)

Example Application

The project file for this example may be viewed/run in FLAC2D.[1] The main data file used is shown at the end of this example.

How To Read and Use Examples

Problem Statement

A slope stability analysis in a closely jointed rock mass is presented in Slope in a Closely Jointed Rock Mass (FLAC2D). In this example, a factor-of-safety analysis is performed on a simple rock slope. Four cases were considered: a fully intact case with mohr-coulomb material, and three cases using the ubiquitous joint model with joint angles of 10°, 45°, and 135°, respectively.

Using Python in FLAC2D, we can easily extend this to a parametric study where different slope angles and ubiquitous joint angles are iterated over, and a factor-of-safety analysis is performed for each case. The input parameters and factor of safety from each case are saved, and a contour plot is generated with Matplotlib. This provides an intuitive visual representation of how factor of safety for this particular model geometry is affected by the slope angle and ubiquitous joint angle. WARNING: This example performs 91 factor of safety analyses and takes some time to run.

Figure 1 shows the factor-of-safety (FOS) contour plot, with a black line drawn at FOS = 1.0. The shape of the contours provides insight on how different combinations of slope angle and ubiquitous joint angle affect the overall stability of the slope. From the plot, we can easily identify the least favorable joint angles for toppling failure (at joint angle = 75°) and slip along the jointing (at joint angle = 120°). As expected, the stability of the slope decreases as the slope angle increases.

../../../../../_images/ubipython-fos.png

Figure 1: Factor-of-safety contour plot, as a function of slope angle and ubiquitous joint angle.

Data Files

ubi_joint_study.py

import itasca as it
import numpy as np
import matplotlib.pyplot as plt

# create an empty list for storing factor of safety values for 
# each slope angle
all_fos = []

# iterate over different slope angles to apply to the model
for angle in range(50, 85, 5):
    # based on the slope angle at each loop iteration, the 
    # point making up the slope face geometry is adjusted
    x1 = 80 - 20 / np.tan(np.deg2rad(angle))

    # the model geometry from Slope in a Closely Jointed Rock 
    # Mass (FLAC2D) is prescribed, with increased model depth 
    # and a variable slope angle
    it.command(f"""
    model new
    sketch set delete

    sketch set select "slope"
    sketch edge create polyline point 100 0 100 20 80 20 {x1} 40 0 40 0 0 close
    sketch set automatic-zone total test
    sketch set automatic-zone direction construction edge 1 min-size 1
    sketch block create automatic
    zone generate from-sketch
    model save "init_joint" compress
    """)
    
    # create an empty list for storing factor of safety values 
    # for each ubiquitous joint angle
    this_fos = []
    
    # iterate over different ubiquitous joint angles to apply 
    # to the model (for each slope angle)
    for ubi in range(0, 195, 15):
        # the model properties and boundary conditions from 
        # Slope in a Closely Jointed Rock Mass (FLAC2D) are 
        # prescribed, with a variable ubiquitous joint angle
        it.command(f"""
        model restore "init_joint"
        model gravity 9.81
        model large-strain off

        zone cmodel assign ubiquitous-joint

        zone property density 2500.0 bulk 1E8 shear 3E7 ...
                      cohesion 100000.0 friction 45.0 dilation 0.0 tension 0.0 ...
                      angle={ubi} joint-cohesion=10000.0 joint-friction=40.0

        zone face apply velocity-x 0 range position-x 0
        zone face apply velocity-x 0 range position-x 100
        zone face apply velocity (0,0) range position-y 0

        model factor-of-safety filename 'ubi{ubi}'
        """)
        
        # append factor of safety value to list
        this_fos.append(it.fos())
    # append factor of safety list to list (creates a nested list)
    all_fos.append(this_fos)

# convert nested list of factor of safety values to a 2D numpy 
# array and save it as a .npy file
all_fos = np.array(all_fos).astype(float)
np.save('fos_values_ubi.npy', all_fos)

# load .npy file and create input arrays for plotting contours
# of factor of safety
all_fos = np.load('fos_values_ubi.npy')
X, Y = np.meshgrid(np.arange(0, 195, 15), np.arange(50, 85, 5))

# use matplotlib to create a contour plot of factor of safety
# values for the combinations of inputs modeled, saving the 
# plot as a .png file
plt.rcParams['xtick.major.pad'] = 3
plt.figure(figsize=(12, 6))
cf = plt.contourf(X, Y, all_fos, levels=np.arange(0.4, 2.8, 0.1))
cs = plt.contour(X, Y, all_fos, levels=[1.0], colors='black')
plt.title(f'Jointed Slope Analysis - FOS Contours')
plt.xlabel('Joint Angle [deg]')
plt.ylabel('Slope Angle [deg]')
cbar = plt.colorbar(cf)
cbar.set_label('Factor of Safety')
plt.clabel(cs, fmt='%.1f', fontsize=9, inline=True)
plt.xticks(rotation=20)
plt.tight_layout()
plt.savefig('ubipython-fos.png')
plt.show()

Endnote