top of page

STRUCTURAL GEOLOGY: An Introduction to Geometrical Techniques

Post type

Discipline

Participation type

Node type

Node

Code

Geology

Instantiating

Equation

Equation 2.3a

Language

Version

Python

3.0

# This code was written in Python 3

# The code calculates the thickness of a layer outcropped on a slopped surface.

# Equation 23.a in Ragan (2009): t = w sin(σ − δ), where δ is lesser than σ.
# w: The width of the layer outcropped
# s: Slope angle of the layer (in degrees)
# d: Dip angle of the layer (in degrees)

# Sample of arrays of input data:
# w = [1, 1, 1, 1]
# s = [10, 30, 40, 50]
# d = [0, 10, 20, 30]

# Importing the module math
import math
# Importing the numpy package
import numpy as np

# The function thickness calculates the true thickness of the layer
def thickness(w, s, d):
return w * math.sin(math.radians(s) - math.radians(d))

# The following three lines request users to enter w and delta as arrays
w = input('Enter w values as an array: ')
s = input('Enter s values as an array: ')
d = input('Enter d values as an array: ')

# The following three lines convert input values to array
w = np.array(eval(w))
s = np.array(eval(s))
d = np.array(eval(d))

# Iterating the function thickness for each value of input data
for i in range(0, len(w), 1):
print(thickness(w[i], s[i], d[i]))

Post information and links

C-054-UCDE14Q5632-ZlE8CWn5

Compose
bottom of page