top of page

STRUCTURAL GEOLOGY: An Introduction to Geometrical Techniques

Post type

Discipline

Participation type

Node type

Node

Code

Geology

Instantiating

Equation

Equation 2.3d

Language

Version

Python

3.0

# This code has been written in Python 3.

# It calculates the true thickness of a layer outcropped on a slopped surface, where slope and dip are in the opposite directions.

# Equation 2.3d in Ragan (2009): t = w , where (δ + σ = 90◦).

# t: True thickness of the layer
# w: The width of the layer
# 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, 80, 45, 50]
# d = [80, 10, 45, 40]

# 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(d) + math.radians(s))

# The following three lines request users to enter w, σ, and δ 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-UCEC11H4630-UixuEMvl

Compose
bottom of page