Remove old inp in routine

This commit is contained in:
WQY\qiong
2023-03-21 21:18:53 +08:00
parent 8681a56ed7
commit 9f9d3227b9
28 changed files with 83 additions and 642 deletions

View File

@@ -192,37 +192,9 @@ def set_tank_reaction(name: str, cs: ChangeSet) -> ChangeSet:
# LIMITING POTENTIAL value
# ROUGHNESS CORRELATION value
#--------------------------------------------------------------
def inp_in_reaction(section: list[str]) -> ChangeSet:
cs = ChangeSet()
for s in section:
if s.startswith(';'):
continue
tokens = s.strip().split()
token0 = tokens[0].upper()
if token0 == 'BULK' or token0 == 'WALL':
pipe = tokens[1]
key = token0.lower()
value = tokens[2]
cs.append(g_update_prefix | { 'type' : 'pipe_reaction', 'pipe' : pipe, key: value })
elif token0 == 'TANK':
tank = tokens[1]
value = tokens[2]
cs.append(g_update_prefix | { 'type' : 'tank_reaction', 'tank' : tank, 'value': value })
else:
line = s.upper().strip()
for key in get_reaction_schema('').keys():
if line.startswith(key):
value = line.removeprefix(key).strip()
cs.append(g_update_prefix | { 'type' : 'reaction', key : value })
return cs
def inp_in_reaction_new(line: str) -> str:
def inp_in_reaction(line: str) -> str:
tokens = line.split()
token0 = tokens[0].upper()
if token0 == 'BULK' or token0 == 'WALL':