aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-14 22:29:19 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-14 22:29:19 +0100
commitc9c002df8c28a37d47bb665f18e34060701e5fd3 (patch)
treeaea3e344f92d332cf57cdb4ac4b4ffbc5282e7de
parent8ed5b09202a5d0eecfd57d75ff6584d93d62b1ad (diff)
downloadfullSWOF-utils-c9c002df8c28a37d47bb665f18e34060701e5fd3.tar.gz
use list to store Manning's n coefficients.
-rw-r--r--boundaryDefinition.txt6
-rwxr-xr-xmakeBoundary.py9
2 files changed, 6 insertions, 9 deletions
diff --git a/boundaryDefinition.txt b/boundaryDefinition.txt
index 31d2ea5..fb6be58 100644
--- a/boundaryDefinition.txt
+++ b/boundaryDefinition.txt
@@ -23,10 +23,8 @@ channel: 0
# Overtopping tolerance (/m):
ztol: 0.01
-# Manning's n coefficients:
-n_co_chan: 0.035
-n_co_west: 0.040
-n_co_east: 0.040
+# Manning's n coefficients (comma-separated list, ordered by panel index):
+n_co: [0.035, 0.040]
# number of height intervals:
numH: 50
diff --git a/makeBoundary.py b/makeBoundary.py
index 5cc4e2d..f20ed2e 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -23,10 +23,9 @@ definition_dict = read_definition('boundaryDefinition.txt')
slope = abs(definition_dict["slope"]) # slope at top boundary
target_flow = definition_dict["target_flow"] # imposed discharge
location = definition_dict["location"] # boundary location
-n_co_chan = definition_dict["n_co_chan"] # coefficient for inland water
-n_co_west = definition_dict["n_co_west"] # coefficient for general surface
-n_co_east = definition_dict["n_co_east"] # coefficient for general surface
-# TODO: use weighted mean 'n' value. See http://help.floodmodeller.com/isis/ISIS/River_Section.htm (Eq. 4)
+n_co = definition_dict["n_co"] # Manning's 'n' coefficients
+# TODO: use weighted mean 'n' values. See
+# http://help.floodmodeller.com/isis/ISIS/River_Section.htm (Eq. 4)
# Note: weighted mean calculation requires roughness map.
height_data = definition_dict["height_data"] # topography
markers = definition_dict["markers"] # distances from corner point
@@ -200,7 +199,7 @@ Q_i = [[] for _ in range(num_panels)]
for p in range(num_panels):
p_i[p], A_i[p], r_h[p], h_i[p], K_i[p], Q_i[p] = conveyance(
numH,
- n_co_chan,
+ n_co[p],
xregion[p],
zregion[p],
zmin[p],