Frictional slip along fractures in rock is an interesting topic with applications in the fields of structural geology and tectonics, geophysics, engineering geology, rock mechanics, hydrogeology, and petroleum engineering. Specific problems that can be addressed include enhancing the productivity of gas, oil and geothermal reservoirs, underground storage of natural gas, hot water and liquid wastes, rock engineering stability, hydrofracturing stress measurement, and earthquake prediction.

Chapter Contents:

1.1 Overview

FRIC2D is a two-dimensional numerical program based on the boundary element method. FRIC2D investigates frictional slip and fracture initation along frictional interfaces. The calculations of stress and displacement are based on a boundary element program TWODD that employs the displacement discontinuity method (Crouch & Starfield 1983). The program was converted from FORTRAN to C and extensively modified by Andrew L. Thomas and Jinhuo Liang at Stanford University to create a code called FRAC2D. That code, FRAC2D, calculates 2-D fracture propagation paths in an elastic body under conditions of mixed mode I-II loading. FRIC2D code was extended from FRAC2D to incorporate frictional slip and associated fracture growth.

The development of FRIC2D was an integral part of Michele Cooke's Ph.D. work at Stanford University. In the course of her thesis she used this code to investigate several situations of frictional slip in the earth. This informal User's Manual was prepared by Michele Cooke and is based on the the user documentation developed by Jinhuo Liang for FRIC2D's parent BEM code, FRAC2D. Indeed, some parts of the code description are taken directly from the documentation of FRAC2D.

This document was created in HTML format. This format allows the user to more speedily access portions of the documentaion of interest. The HTML version can be accessed through the World Wide Web at URL: Lisa Koenig formatted many of the figures of this text and edited the text.

Version 2.0 of Fric2d allows a more broad range of superposed gravitational loading than version 1.0, wihch was limited to lithostatic loading.

1.2 General Features

FRIC2D is a command-driven computer program. The general features of FRIC2D can be described as follows:
  1. The input data is based on recognized word commands that allow the user to identify the application of each command easily and in a logical fashion (e.g. the command, fracture, applies fracture conditions to the model).

  2. The command and data are entered through a file-driven procedure (i.e. they are stored in a data file and read from a storage device).

  3. The word-oriented input files provide an excellent means to keep a documented record of the analyses performed for an engineering study. Often, it is convenient to include these files as an appendix to an engineering report for the purpose of quality assurance.

  4. The command-driven structure also allows the user to develop pre- and post-processing programs to manipulate FRIC2D input/output as desired.

1.3 Guide to the Manual

FRIC2D user's manual is divided into six chapters. It provides theoretical background, instructions, and examples. Users who are familiar with FRIC2D's parent code, FRAC2D, should be comfortable with the fundamentals and can quickly adjust to FRIC2D by reading chapter 4.

Beginner users who wish to create their own models might first read Chapters 3, 4 and 5 for sign conventions, elements, coordinate systems, units, and data file handling.

Users who are not familiar with the boundary element method and fracture mechanics should read Chapter 2 . A brief description of the theoretical background of FRIC2D is given in this chapter. Many of the sections in this chapter are identical to FRAC2D.

The complete description of all input commands is given in Chapter 4 . It is suggested that the user refer to Section 4.1 for a recommended sequence for entering input commands by function.

Post-processing of the results is described in Chapter 5 . The user can understand the self-explanatory output files and process the results using other commercial graphic-processing software.

1.4 Installing

FRIC2D source code consists of four sub-programs: fric2d.c, getopt.c, getwords.c, and getopt.h.
The main program, it is developed to read input data, to calculate stress and displacement fields, to predict fracture propagation, and to output the analysis results.
Links a list of arguments to the program based on the arg_string passed in.
Reads a line of input data into the character array line from the input file, then return the number of words on the line.
Header file for declaring the data used in fric2d.c, getopt.c.
The installation of FRIC2D depends on where the source code resides. If it resides in an accessible director or folder on the user's computer, simply use the command "cp" to copy the source code of FRIC2D for UNIX systems, use the command "copy" to copy the source code of FRIC2D for IBM-PC or compatible micro-computers, or move the icon to your folder to copy the source code for Macintosh computers.

1.5 Compiling

The source code for FRIC2D conforms to the ANSI C. It is divided into several files which must be compiled and linked to create the executable program. On a UNIX system, you might compile FRIC2D by typing

cc fric2d.c getopt.c getwords.c -o fric2d -lm

where cc is the name of your C compiler, is a space-separated list of the source files, including fric2d.c, getopt.c, getwords.c, and getopt.h; -o fric2d names the executable file to be created, and -lm is an option for linking with the math object library.

On many computers, a makefile may be used to simplify the process of compiling and maintaining FRIC2D. A simple makefile for a UNIX system is given as follows:

	# Makefile for compiling fric2d
	# Source files
	SRC = fric2d.c getopt.c getwords.c
	# Object files
	OBJ = fric2d.o getopt.o getwords.o
	# Options (Flags) to be used by the C compiler
	CFLAGS = -g -lm -I$(HOME) -sb
	# Library to be used
	LIB =
	# Name of the C compiler to be used
	CC = acc

	# Building the executive code fric2d based on OBJ
	fric2d:  $(OBJ)
		$(CC) -o fric2d $(OBJ) $(CFLAGS) $(LIB)

	# C verifier lint to examine source files for potential errors, 
portability problems
	lint: 	lint $(SRC)
FRIC2D normally assumes that the names of input and output files are supplied on the command line. If command line arguments are difficult or impossible to supply on your computer, you may want to compile FRIC2D using the fprompt option. FRIC2D will then use the standard input (normally the keyboard) and standard output (normally the monitor) to prompt you for input and output file names. If you don't know what the standard input and output are for your machine, consult the documentation for your C compiler.

1.6 Running

On UNIX machines, you can run FRIC2D by typing the program name at the system prompt. The program name may be followed by one or more options. For example, the UNIX command:

fric2d -i infile -o outfile -g graphicsfile

runs fric2d using infile as the input file, outfile as the file for the output data and graphicsfile as the file for the output graphics.

While FRIC2D is running, updates are printed to standard output. Information such as the current loading step and iteration of convergence are printed to standard output (usually the screen) This information informs the user about the progress of the process. The run information can be send to a separate file using the following command:

fric2d -i infile -o outfile -g graphicsfile >

The file will contain information about the process. When no input or output files are specified, FRIC2D reads from the standard input and writes to the standard output.

When FRIC2D encounters an error from which it cannot recover, it prints an error message to the standard output (normally the monitor) and ceases execution. If you don't know what the standard input and output are for your machine, consult the documentation for your C compiler. For example, suppose the first line of the input file,, attempts to assign an unknown constant

no_such_constant = 100.0

If you run FRIC2D on a UNIX machine using as input file, you will get the following results:

	Unix-prompt>fric2d -i
	fric2d: Unknown constant, or incorrect format (, line 1)
		  no_such_constant  =  100.0
All FRIC2D error messages begin with fric2d:. An error message not beginning with fric2d: indicates that FRIC2D has encountered an error that the programmer(s) did not anticipate.


Crouch, S. L. and Starfield A. M., 183. Boundary Element Methods in Solid Mechanics: with Applications in Rock Mechanics and Geological Engineering. George Allen & Unwin, London, 322p.

Go to Chapter 2 , 3 , 4 , or 5