Skip to content

Commit

Permalink
OXRX_Class.py -- explicitly set tcginv and len_ to avoid future issue…
Browse files Browse the repository at this point in the history
…s with undefined variables, as noted in PR #159.
  • Loading branch information
PaulDudaRESPEC committed May 1, 2024
1 parent 2e414f9 commit 059ea16
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions HSP2/OXRX_Class.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,20 @@ def __init__(self, siminfo, nexits, vol, ui_rq, ui, ts):
self.expred = 0.0; self.exprev = 0.0
self.expod = 0.0; self.exprel = 0.0

self.len_ = ui['LEN'] * 5280.0 # mi to feet
if self.uunits == 2:
self.len_ = ui['LEN'] * 1000.0 # length of reach, in meters

if self.LKFG == 1:
self.cforea = ui['CFOREA'] # reaeration parameter from table-type ox-cforea
self.tcginv = 0

elif self.REAMFG == 1: # tsivoglou method; table-type ox-tsivoglou
self.reakt = ui['REAKT']
self.tcginv = ui['TCGINV']

self.len_ = ui['LEN'] * 5280.0 # mi to feet

self.delth = ui['DELTH']
if self.uunits == 2:
self.len_ = ui['LEN'] * 1000.0 # length of reach, in meters
self.delth = ui['DELTH'] * 1000.0 # convert to meters

elif self.REAMFG == 2: # owen/churchill/o'connor-dobbins; table-type ox-tcginv
Expand Down

0 comments on commit 059ea16

Please sign in to comment.