Skip to content

Commit

Permalink
update: updating RMR hlw Tong et.al (2022) (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
febrifahmi committed Feb 26, 2023
1 parent 620cefe commit 107b1f7
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 3 deletions.
Binary file modified .coverage
Binary file not shown.
106 changes: 105 additions & 1 deletion src/geotekppu/rmr/rmr_hlw_tong_etal2022.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def AdjustedR1ucs(strength):
"""
val_r1_adj = 0
if strength <= 250:
val_r1_adj = ((0.6343*math.log(strength,10))-0.3627)
val_r1_adj = 10**((0.6343*math.log(strength,10))-0.3627)
elif strength > 250:
val_r1_adj = 15
return round(val_r1_adj,4)
Expand Down Expand Up @@ -62,4 +62,108 @@ def AdjustedR2(rqd):
return round(val_r2_adj,4)


def AdjustedR3(spacing):
"""
Adjusted R3 - adjustment of rating value based on joint spacing.
Parameters:
-----------
- spacing: space of discontinuity
Return:
-------
val_r3_adj: value of r3 adjusted.
"""
val_r3_adj = 0
if spacing < 2:
val_r3_adj = 10**((0.1799*((math.log(spacing,10))**3)) + (0.3834*((math.log(spacing,10))**2)) + (0.4462*math.log(spacing,10)) + 1.125)
elif spacing >= 2:
val_r3_adj = 20
else:
val_r3_adj = None
return round(val_r3_adj,4)


# R4, R5, R6 is the same with the traditional or modified RMR system (no adjustment)
#

def CalcR6():
val_r6 = 0
return val_r6

def CalcR7(sum_ri,per_i):
"""
Geostress correction / strength-stress ratio index / in-situ stress modification index (R7) as proposed in Tong et.al (2022) (a ration to measure the risk of rock bursts).
Denoted by the equation:
R7 = Sum of Ri x Percentage of (i)
Where Ri for specific rock burst grade:
I (no rock burst) --> Ri = 0
II (slight rock burst) --> Ri = -4
III (moderate rock burst) --> Ri = -8
IV (severe rock burst) --> Ri = -12
Parameters:
-----------
- Sum of Ri: score of Ri based on rock burst grade
- Per(i): percentage of different rock burst grade
Return:
-------
val_r7: value of R7
"""
val_r7 = sum_ri * per_i
return val_r7


def CalcR8(perm_co):
"""
Rock Mass Permeability Index as main factor influence the water seepage in rocks material.
This value defined as:
R8 = -12 x (1 - Perm(<=10^-9m/s))
Parameters:
-----------
- perm_co: coefficient of permeability value and it should within the range <=10^-9 m/s. If permeability coefficient value == <=10^-9 m/s == 1, then R8 = -12 x (1-1) = 0. Otherwise, when permeability coefficient value == <=10^-9 m/s == 0, R8 is -12. The coefficient is between 0 and 1.
Return:
-------
val_r8: value of R8
"""
val_r8 = -12 * (1 - perm_co)
return round(val_r8,2)


def CalcR9():
"""
The gorundwater chemistry index as proposed by Tong et.al (2022).
Parameters:
-----------
- pH: pH (acidity)
- tds: total dissolved solids (g/L)
- cl-: non/negatively charged chlorine (g/L)
Return:
-------
val_r9
"""
val_r9 = 0

return val_r9
26 changes: 24 additions & 2 deletions tests/test_rmrhlw.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import unittest
from src.geotekppu.rmr.rmr_hlw_tong_etal2022 import AdjustedR1ucs, AdjustedR2
from src.geotekppu.rmr.rmr_hlw_tong_etal2022 import AdjustedR1ucs, AdjustedR2, AdjustedR3, CalcR7, CalcR8


class TestRMRhlw(unittest.TestCase):

# Test function AdjustedR1ucs
def test_AdjustedR1_1(self):
self.assertEqual(AdjustedR1ucs(200),1.0968)
self.assertEqual(AdjustedR1ucs(200),12.4981)

def test_AdjustedR1_2(self):
self.assertEqual(AdjustedR1ucs(245),14.215)

def test_AdjustedR1_3(self):
self.assertEqual(AdjustedR1ucs(25),3.3421)

def test_AdjustedR1_2(self):
self.assertEqual(AdjustedR1ucs(251),15)
Expand All @@ -15,5 +21,21 @@ def test_AdjustedR1_2(self):
def test_adjustedR2_1(self):
self.assertEqual(AdjustedR2(245),48.6194)

# Test function AdjustedR3
def test_adjustedR3_1(self):
self.assertEqual(AdjustedR3(2.0),20)

def test_adjustedR3_1(self):
self.assertEqual(AdjustedR3(1.9),19.1897)

# Test function CalcR7
def test_adjustedR7_1(self):
self.assertEqual(CalcR7(-4,80),-320)


# Test function CalcR8
def test_adjustedR8_1(self):
self.assertEqual(CalcR8(0.6),-4.80)

if __name__ == '__main__':
unittest.main()

0 comments on commit 107b1f7

Please sign in to comment.