diff options
author | Paul Garlick <pgarlick@tourbillion-technology.com> | 2019-10-29 13:44:47 +0000 |
---|---|---|
committer | Paul Garlick <pgarlick@tourbillion-technology.com> | 2019-10-29 13:44:47 +0000 |
commit | e5b8f01b57823c7acf94f3f6f1eabe43f481b02a (patch) | |
tree | 01da417f560111b8b3fc79045b4324c658998061 | |
parent | 549f625a5b8495ed2f645aa4c85db0b4c81346fd (diff) | |
download | fullSWOF-utils-e5b8f01b57823c7acf94f3f6f1eabe43f481b02a.tar.gz |
specify boundary type in boundary definition file.
-rw-r--r-- | boundaryBottom.txt | 3 | ||||
-rw-r--r-- | boundaryTop.txt | 3 | ||||
-rwxr-xr-x | makeBoundary | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/boundaryBottom.txt b/boundaryBottom.txt index 4e26056..11c9a8d 100644 --- a/boundaryBottom.txt +++ b/boundaryBottom.txt @@ -2,6 +2,9 @@ # Boundary Definition File # +# Boundary type (1=height, 2=wall, 3=Neumann, 4=periodic, 5=discharge): +type: 1 + # Enable plotting (True or False): plotting: True diff --git a/boundaryTop.txt b/boundaryTop.txt index a37d928..ebcb5f7 100644 --- a/boundaryTop.txt +++ b/boundaryTop.txt @@ -2,6 +2,9 @@ # Boundary Definition File # +# Boundary type (1=height, 2=wall, 3=Neumann, 4=periodic, 5=discharge): +type: 5 + # Enable plotting (True or False): plotting: True diff --git a/makeBoundary b/makeBoundary index 590bcaf..fbb99f0 100755 --- a/makeBoundary +++ b/makeBoundary @@ -102,13 +102,13 @@ def save_bc(outputfile): elif panel_x == panel[ind_p]: # imposed discharge within part-filled panel f.write('{:6.2f} {:>2} {:10.6f} {:9.6f}\n'.format( - xitem, 5, + xitem, btype, -csa[ind_z]*panel_target_flow/csa_p[panel_x], h_extra-zitem)) else: # imposed discharge within filled panels f.write('{:6.2f} {:>2} {:10.6f} {:9.6f}\n'.format( - xitem, 5, + xitem, btype, -csa[ind_z]*Q_i[panel_x][-1]/csa_p[panel_x], zmax-zitem)) @@ -141,6 +141,7 @@ elif args.location == 'right': 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 target_flow = definition_dict["target_flow"] # imposed discharge plotting = definition_dict["plotting"] # enable or disable plotting |