Giter VIP home page Giter VIP logo

fractendpy's Introduction

fractendpy

Python version of FracTend.m

Plotting functions are working but tests are not complete, work in progress. Outputs include figures and .csv file of data.

To run the code:

Clone the repository, navigate to the directory with your data file, modify the example below or the fractend_run.py file. There is example dataset included in 'Utah_OA-Sills'.

Examples:

fractures_file = r'C:\Users\path\to\your\data.csv'   # Must be two columns of plunge and trend of pole to fault plane
fracture_poles = np.loadtxt(fractures_file, skiprows=1, delimiter=',')

# Example user imputs
#   read in stress magnitudes 
#   principal stresses in MPa 
sigma1 = 50       
sigma2 = 20     
sigma3 = 5 

Pf = 37 # pore fluid pressure in MPa, for fracture Opening Angle calculations

#   read in stress orientation 
#   e.g. for old case of SHmax azimuth of 135 
# normal fault system: Trend s1=0, Plunge s1=90 - use s3-trend to change orientation of stress field with s1 as the rotation axis
# thrust fault: Trend of s3 must be >90 from s1; Ps1=0
# strike-slip: Trend of s3 must be 90 from Trend of s1
trend_s1 = 26
plunge_s1 = 0
trend_s3 = 116

#   coefficient of friction & cohesion 
mu_static = 0.6 
cohesion = 10
sigmaN_mohr = 100

ncontours = 20 #number of contours, used for plotting

increment = 10 #increment to do calculations by, with a range of 0 to 360 and 90 to 180 for 3d space. 
# value should be set to 10 for testing and 1 for final run.
# End user inputs

# Run program

ss = stress_state(fracture_poles, sigma1, sigma2, sigma3, trend_s1, plunge_s1, trend_s3, Pf, mu_static, cohesion, sigmaN_mohr, increment, ncontours)

ss.stereonet_plot(ss.tau, 'Shear stress (MPa)')
ss.stereonet_plot(ss.sigmaN, 'Normal stress (MPa)')
ss.mohr_plot(ss.sigmaN, 'Normal stress') # plotting functions for mohr circles don't work well yet.

Results include a data table with all results for each fault surface and plots.

SF_Slip susceptibility (MPa)_stereo

To do:

Finish tests for structural geology algorithms (sga.py) code from Cardozo and Allmendinger et al. (2012) Finish tests for fractend

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.