aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfullswof-utils/makeBoundary4
1 files changed, 2 insertions, 2 deletions
diff --git a/fullswof-utils/makeBoundary b/fullswof-utils/makeBoundary
index 2c1dbf2..097ae9e 100755
--- a/fullswof-utils/makeBoundary
+++ b/fullswof-utils/makeBoundary
@@ -66,7 +66,7 @@ def conveyance(numH, n_co, xregion, zregion, zmin, zmax):
r_h.append(A_i[i]/p_i[i]) # ratio of area and wetted perimeter
#print('hydraulic radius =', r_h[i])
K_i.append(A_i[i]*(1/n_co)*r_h[i]**(2/3)) # conveyance
- Q_i.append(K_i[i]*slope**0.5) # discharge
+ Q_i.append(K_i[i]*abs(slope)**0.5) # discharge
return p_i, A_i, r_h, h_i, K_i, Q_i
@@ -143,7 +143,7 @@ definition_dict = read_definition(inputFilename)
#for dd in definition_dict:
# print(definition_dict[dd])
btype = definition_dict["type"] # boundary type (1--5)
-slope = abs(definition_dict["slope"]) # slope at top boundary
+slope = definition_dict["slope"] # slope at top boundary
target_flow = definition_dict["target_flow"] # imposed discharge
plotting = definition_dict["plotting"] # enable or disable plotting
printing = definition_dict["printing"] # enable or disable printing