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

Fix bugs in friction angle and thrustFault indicator #3

Merged
merged 4 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions SOSAT/constraints/breakout_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ def loglikelihood(self, ss):
rock_friction_i = rock_friction_i.to('radians').magnitude

# convert into more convenient parameters
phi_i = np.arctan(rock_friction_i)
Co_i = UCS_i * 0.5 * (1.0 - np.sin(phi_i)) / np.cos(phi_i)
# phi_i = np.arctan(rock_friction_i)
# Co_i = UCS_i * 0.5 * (1.0 - np.sin(phi_i)) / np.cos(phi_i)
Co_i = UCS_i * 0.5 * (1.0 - np.sin(rock_friction_i)) \
/ np.cos(rock_friction_i)

# these should both have the same units now and the pint
# unit should have been stripped
Expand All @@ -254,7 +256,7 @@ def loglikelihood(self, ss):

# the stresses going in here shoudl all have had the pint
# units stripped after ensuring they were compatible
BO = MCfail(sig1, sig3, phi_i, Co_i)
BO = MCfail(sig1, sig3, rock_friction_i, Co_i)
# increment the breakout count at locations where BO > 0.0
NBO[BO > 0.0] += 1
# increment the iteration count and realization count
Expand Down
2 changes: 1 addition & 1 deletion SOSAT/risk_analysis/critically_oriented_fault.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def EvaluatePfail(self, Npressures=20, Nsamples=1e6):

# evaluate faulting regime at perturbed state
NF = sv_eff > shmax_eff
TF = sv_eff < shmax_eff
TF = sv_eff < shmin_eff
SS = ~NF & ~TF

S1_eff = np.zeros(Nsamples, dtype=np.float64)
Expand Down
Loading