Skip to content

Commit

Permalink
Fix bugs in friction angle and thrustFault indicator (#3)
Browse files Browse the repository at this point in the history
* change critically_oriented_fault.py for Thrust Fault indicator

* change breakout_constraint.py to remove arctan in the frictional angle
  • Loading branch information
wangwj679 authored Sep 19, 2023
1 parent 59fb812 commit b462ec3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit b462ec3

Please sign in to comment.