Description: Reads in a binary fracture image stack and calculates the fractal dimension (Df) along either the X and/or Z axis.

For usage information run: apm_fracture_df -h

Written By: Matthew stadelman
Date Written: 2016/11/17
Last Modfied: 2017/04/23

class apmapflow.scripts.apm_fracture_df.FractureSlice(slice_data)[source]

Stores the fractal information for a single slice


alias of fractal


calculates fractional bifurcation

set_fractal(key, data)[source]

Adds a named tuple containing fractal data to the fractals dict


returns the slice data


calculates fractional bifurcation


Code initially written by Charles Alexander in 2013 Modified by Dustin Crandall in 2015 Rewritten into Python by Matt Stadelman 11/15/2016

Based on the methodology presented in Dougan, Addison & McKenzie’s 2000 paper “Fractal Analysis of Fracture: A Comparison of Methods” in Mechanics Research Communications.

The Hurst exponent is defined as equal to 2 - the fractal dimension of a fracture profile

H = 2 - Df Df = 2 - H

The method calculates the Hurst Exponent of a fracture profile using the “Variable Bandwidth Method”, wherein a window of size ‘s’ is moved along the fracture profile and the standard deviation of the displacement of the profile at the ends of the window is calculated


sigma_s = [(1/N-s)*SUM((Profile_height(i) - Profile_height(i+s))^2)]^1/2

where sigma_s = incremental standard deviation N = number of data points Profile_height(x) = height of profile at x

H is determined as the slope of the plot of log10(sigma_s) against log10(s)

returns a range of standard deviations for each bandwidth useds


With large window sizes the realtionship between the log10(window size) and the log10(standard deviation of change in height) does not appear to follow a linear trend, which we should see to calculate the Hurst Exponent

This function is designed to find where the R^2 value of a linear fit to the data is minimum


Takes in a 2-D data slice and generates line traces for JRC and Df analysis.

Returns a dictionary of the top, bottom and midsurface traces as well as the fraction of bifurcations and zero aperture zones.


Driver program to load an image and process it to output hurst exponents

apmapflow.scripts.apm_fracture_df.output_data(file_handle, traces, x_data=None, z_data=None)[source]

generates a tab delimited text file to store all of the data

apmapflow.scripts.apm_fracture_df.process_slice(slice_data, traces)[source]

Processes slice data to measure the changes in the trace height along the fracture, using the variable bandwidth method, then find the best fit linear line to calculate the Hurst exponent.