work on rubar3

master
Theophile Terraz 2025-09-29 15:25:35 +02:00
parent da03f39425
commit 706a900c8e
1 changed files with 14 additions and 13 deletions

View File

@ -74,10 +74,10 @@ class Rubar3(CommandLineSolver):
("rubarbe_tf_5", "y"),
("rubarbe_tf_6", "n"),
("rubarbe_trased", "y"),
("rubarbe_optfpc", "0"),
("rubarbe_ros", "2650.0"),
("rubarbe_dm", "0.1"),
("rubarbe_segma", "1.0"),
#("rubarbe_optfpc", "0"),
#("rubarbe_ros", "2650.0"),
#("rubarbe_dm", "0.1"),
#("rubarbe_segma", "1.0"),
# Sediment parameters
("rubarbe_sediment_ros", "2650.0"),
("rubarbe_sediment_por", "0.4"),
@ -167,7 +167,7 @@ class Rubar3(CommandLineSolver):
it = iter(params)
line = 0
while line < 29:
while line < 25:
param = next(it)
name = param.name
value = param.value
@ -277,19 +277,20 @@ class Rubar3(CommandLineSolver):
f.write(f"{ind:>4} {rk:>11.3f} {n_points:>4}\n")
for point in profile.points:
station = profile.get_station()
for i, point in enumerate(profile.points):
label = point.name.lower()
if label != "":
if label[0] == "r":
label = label[1].upper()
else:
label = label[1].upper()
label = " "
else:
label = " "
y = point.y
y = station[i]
z = point.z
dcs = 0.001
dcs = 1.0
scs = 1.0
tmcs = 0.0
@ -444,10 +445,10 @@ class Rubar3(CommandLineSolver):
z = data[profile.rk][0]
q = data[profile.rk][1]
# height = z - profile.z_min()
height = z - profile.z_min()
speed = profile.speed(q, z)
return z, speed
return height, speed
def _export_hydro(self, study, repertory, qlog, name="0"):
if qlog is not None:
@ -470,7 +471,7 @@ class Rubar3(CommandLineSolver):
for bc in bcs:
f.write(f"{len(bc)}\n")
for d0, d1 in bc.data:
f.write(f"{d0} {d1}\n")
f.write(f"{d1} {d0}\n")
def _export_condav(self, study, repertory, qlog, name="0"):
if qlog is not None:
@ -493,7 +494,7 @@ class Rubar3(CommandLineSolver):
for bc in bcs:
f.write(f"{len(bc)}\n")
for d0, d1 in bc.data:
f.write(f"{d0} {d1}\n")
f.write(f"{d1} {d0}\n")
class RubarBE(Rubar3):