From bea857dc8251e298dafb56350aefe6db4d5c6b2e Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Fri, 4 Oct 2019 15:49:41 +0100 Subject: add variable to specify tolerance in overtopping height. --- makeBoundary.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/makeBoundary.py b/makeBoundary.py index a6daae0..1808bf9 100755 --- a/makeBoundary.py +++ b/makeBoundary.py @@ -27,11 +27,6 @@ definition_dict = read_definition('boundaryDefinition.txt') # m, c = np.polyfit(ych, zch, 1) # print('gradient =', m, 'intercept =', c) -slope = abs(definition_dict["slope"]) # slope at top boundary -target_flow = definition_dict["target_flow"] # imposed discharge -location = definition_dict["location"] # boundary location -print(location) - with open('../topography/top_boundary.xyz', "r") as topo: xin, yin, zin = np.loadtxt(topo, delimiter=' ', unpack=True) @@ -48,8 +43,9 @@ zregion_east = zin[300:408] #print(zregion) +ztol = 0.01 # tolerance in overtopping height zmin = zregion.min() # minimum height -zmax = zregion[-1]-0.01 # overtopping height +zmax = zregion[-1]-ztol # overtopping height zmax_west = zmax zmax_east = zmax @@ -58,13 +54,17 @@ zmin_east = zregion_east.min() print(zmin_east) -numH = 50 # number of height intervals -n_co_chan = 0.035 # Manning's coefficient for inland water -n_co_west = 0.040 # Manning's coefficient for general surface -n_co_east = 0.040 # Manning's coefficient for general surface +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) # Note: weighted mean calculation requires roughness map. +numH = 50 # number of height intervals + def conveyance(numH, n_co, xregion, zregion, zmin, zmax): p_i = [] # wetted perimeter A_i = [] # area -- cgit