SkillAgentSearch skills...

CutAndDisplace

Boundary Element MATLAB code. Modelling faults and deformation

Install / Use

/learn @Timmmdavis/CutAndDisplace

README

CutAndDisplace

References to cite

DOI

2018: Slip on wavy frictional faults: Is the 3rd dimension a sticking point?

2017: Stress concentrations around voids in three dimensions: The roots of failure

Index

FaultsDisplacingUnderShearStress
Gif of a fault array shearing due to a remote stress. Computed using the 3D code

Citation

Davis, T., 2017. A new open source boundary element code and its application to geological deformation: Exploring stress concentrations around voids and the effects of 3D frictional distributions on fault surfaces (M.Sc thesis. Aberdeen University)

Introduction

Boundary Element MATLAB code. Modelling faults and deformation

This software is for academic use. Do not use this in a commercial environment. There are plenty of commercial Boundary Element codes in circulation. It does not require compiling, simply run the script 'AddFilePaths.m' then load the file 'Mainframe.m' in MATLAB (either from the 3D or 2D directory) then start the code by pressing the ▶ (run) symbol in the editor tab of MATLAB, alternatively call "run MainFrame.m" in the cmd window. Once the code starts it should run spitting out diagrams, showing progressbars and supplying results.

This code uses the Boundary Element Method (BEM), specifically the Displacement Discontinuity Method (DDM). Only fault surfaces or closed contours of bodies need to be digitised with boundary conditions placed on these elements. This assumes: The material is isotropic, a linear elastic and that infinitesimal deformation applies.

When calculating an unknown such as slip due a prescribed stress the method is dependent on sampling of the surfaces. Users must increase sampling until they are satisfied the result is static or has a changes in precision that are acceptable. This can be seen clearly changing the sampling of surfaces or lines in the regression tests.

This code was created in windows MATLAB versions:

2015a:2016b:2017a

It’s also been tested in Octave GUI windows versions:

4.0.0:4.0.3

although there are sometimes 'bugs' in the Octave Windows version it tends to run fine. It tends to fail in certain places, such as dealing with strings and drawing transparent objects so slight modifications may be required.

It has also been run on both on Linux and Mac versions of MATLAB (2016b) and works fine. For these versions errors may exist when loading the file paths in newer scripts not tested on these platforms i.e \ /.

I have tried to comment lines as much as possible. References to 'Pollard' are :'Pollard, D.D. and Fletcher, R.C., 2005. Fundamentals of structural geology. Cambridge University Press.'

I have attempted to keep copy-write tags on files from other places. If you spot somewhere I have missed this please email ASAP so I can fix this. Places where I was unsure if I could use such files a info.txt has been left with a link to the file download location. Download the files and place these in the file containing 'info.txt'.


1. How to run

Index ^

Codes for 2D and 3D are laid out in the same manner. To run:

  • Download the file from GitHub
  • Unzip the folder and move it to the directory you would like to work from
  • If you rename the folder make sure the new name still contains: 'CutAndDisplace'
  • Open MATLAB
  • Run the file inside the folder called ‘AddFilePaths.m’
  • Then run using and editing 'MainFrame.m' in the respective 2D or 3D directory

2. Analytical tests

The code has analytical regression tests built in to test changes have not introduced bugs before a commit. Note that all images below have been created directly using the software and are drawn like this when the regression tests run. These are:

2.1. 2D Analytical tests

Test by running the file runallregressions.m in 2D/AnalyticalTests folder or the individual scripts further inside this directory.

  • Half space formulation from:

    Martel SM. Boundary element scripts http://www.soest.hawaii.edu/martel/Martel.BEM_dir/, University Hawaii at Manoa, 2003 tested against the 3D analytical solution of:

    Nikkhoo, M. and Walter, T.R., 2015. Triangular dislocation: an analytical, artefact-free solution. Geophysical Journal International, 201(2), pp.1117-1139.

  • Comparing a basic dislocation from the (Crouch and Starfield, 1983) code to a dislocation described in:

    Barber, J., 2010. Elasticity (ed., Vol. 172).(G. Gladwell, Ed.) Michigan.

    and

    Pollard, D.D. and Fletcher, R.C., 2005. Fundamentals of structural geology. Cambridge University Press.

    ConstantDislocationStressTensorComparison Numerical vs analytical comparison of Cartesian stress components around a right lateral shear dislocation lying along the x-axis

  • Comparing the DDM match of slip and stress surrounding a planar crack to the analytical solutions of

    Pollard, D.D. and Segall, P., 1987. Theoretical displacements and stresses near fractures in rock: with applications to faults, joints, veins, dikes, and solution surfaces. Fracture mechanics of rock, 277(349), pp.277-349.

    CrackWallDisplacements2D Numerical (dots) vs analytical (green line) comparison of crack wall displacements due to a line crack loaded with a tensile stress

    TensileCrackStressTensorComparison Numerical vs analytical comparison of Cartesian stress components around a 2D dislocation lying along the x-axis opening due to a tensile stress.

  • Comparing the match of the DDM to the (Kirsch, 1898) solution for a pressurised hole. This tests the elemental locking used to stabilise the DDM result. The (Kirsch, 1898) formulas are taken from:

    Pollard, D.D. and Fletcher, R.C., 2005. Fundamentals of structural geology. Cambridge University Press.

    PressurisedHoleStressTensorComparison Numerical vs analytical comparison of Cartesian stress components around a pressurised hole

  • Comparing the frictional formulation for a planar crack in 2D and its match to the analytical solution for the slip profile of a crack with increasing cohesion towards the crack tips. Analytical slip profile given in:

    Bürgmann, R., Pollard, D.D. and Martel, S.J., 1994. Slip distributions on faults: effects of stress gradients, inelastic deformation, heterogeneous host-rock stiffness, and fault interaction. Journal of Structural Geology, 16(12), pp.1675-1690.

  • Comparing the DDM solution for gravitational stress under valley described in (Martel and Muller, 2000) to the analytical solution of:

    Savage, W.Z., Powers, P.S. and Swolfs, H.S., 1984. In situ geomechanics of crystalline and sedimentary rocks; Part V, RVT, a Fortran program for an exact elastic solution for tectonics and gravity stresses in isolated symmetric ridges and valleys (No. 84-827). US Geological Survey,.

    StressDueToValleyIncisionStressTensorComparison Numerical vs analytical comparison of Cartesian stress components due to valley incision

  • Comparing the DDM result of stresses across inhomogeneous elastics to the analytical solution for the stresses across a dual elastic annulus given in:

    Crouch, S.L. and Starfield, A.M., 1982. Boundary element methods in solid mechanics: with applications in rock mechanics and geological engineering. Allen & Unwin.

    Thanks to Dr Robert Simpson of Glasgow University for sitting down and taking the time walk through the (Crouch and Starfield, 1983) book with me and explain how this is done in other BEM formulations. It was very enlightening and helped me understand how to formulate this in the code.

    PressurisedHoleWithInhomogenousInterfaceRadialStressTensorComparison Comparison of the radial stress tensor components from numerical (dots) and analytical (lines) solutions to the dual material annulus problem.

2.2. 3D Analytical tests

Test by running the file runallregressions.m in 3D/AnalyticalTests folder or the individual scripts further inside this directory.

  • Comparing the superposition of two of the triangular dislocations of Nikkhoo, M. and Walter, T.R., 2015. to:

    the (Okada, 1985) solution coded by François Beauducel.

    This is done in the Nikkhoo paper but it’s good to check his code is not changed.

  • Comparing the 3D DDM to the slip profile of a penny shaped crack of (Sneddon, 1967) given concisely in:

    Segall, P., 2010. Earthquake and volcano deformation. Princeton University Press.

    ![CrackWallDisplacements3D](Images/3DConstantStressPennyCrackWa

Related Skills

View on GitHub
GitHub Stars60
CategoryDevelopment
Updated4d ago
Forks26

Languages

MATLAB

Security Score

100/100

Audited on Apr 4, 2026

No findings