Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using degrees instead of radians in math.tan() #29

Open
jordisanglas opened this issue Jun 9, 2022 · 1 comment
Open

Using degrees instead of radians in math.tan() #29

jordisanglas opened this issue Jun 9, 2022 · 1 comment

Comments

@jordisanglas
Copy link
Contributor

In file stress.py, found in pydfnworks/pydfnworks/dfnGen/generation, there is the stress_based_apertures function. In line 137:

dilation = min(dilation_tmp, critical_shear_displacement) * m.tan(m.degrees(dilation_angle))

The variable dilation_angle is converted to degrees. However, function m.tan() requires radians. Also, note that the default values for friction_angle and dilation_angle (24.9 and 5) seem to be in degrees. If so, friction_angle should be converted to radians before being used in line 123:

shear_stress_critical = -sigma_mag * m.tan(friction_angle)

@msweeney2796
Copy link
Collaborator

Hello,

Thank you for pointing this issue out. You are correct that both instances should be m.tan(m.radians()). We will fix and push update soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants