Skip to content

Commit 0eaaebf

Browse files
authored
Merge pull request #6405 from Geoniette/convert_friction_coeff_into_angles_of_internal_friction
Convert friction coeff into angles of internal friction
2 parents 77eb7d4 + fbb48f2 commit 0eaaebf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This script can be used to convert a given list of friction coefficients
2+
# into angles of internal friction. This is necessary, because
3+
# most ASPECT material models expect angles of internal friction as input.
4+
#
5+
# The friction coefficient is defined as tan(angle_of_internal_friction)
6+
# where angle_of_internal_friction is in radians.
7+
# To convert the friction coefficient to angle of internal friction in degrees:
8+
# angle_of_internal_friction = arctan(friction_coefficient) * 180 / pi
9+
10+
import numpy as np
11+
12+
friction_coefficient_list = [0.6,0.8,1.3] # List of example friction coefficients. Change these to reflect the friction coefficients appropriate for your composition.
13+
14+
for i in range (len(friction_coefficient_list)):
15+
angle_of_internal_friction = np.arctan(friction_coefficient_list[i]) * 180 / np.pi
16+
print("Friction coefficient: " + str(friction_coefficient_list[i]) + ", Angle of internal friction: " + str(angle_of_internal_friction))
17+
18+

0 commit comments

Comments
 (0)