Skip to content

Commit

Permalink
#14 friction settings added to inifile
Browse files Browse the repository at this point in the history
  • Loading branch information
rhutten committed Dec 21, 2020
1 parent 67096eb commit ec9dab6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion data/osm/osm_settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ culverts = id, oneway, drain_type, material, smoothness, wi
ProjectedCRS = EPSG:32737
inletLossCoefCulvert = 0.6
outletLossCoefCulvert = 1.0
frictiontype = manning
frictiontype = Manning # Options: Chezy, Manning, wallLawNikuradse, WhiteColebrook, StricklerNikuradse, Strickler, deBosBijkerk
frictionmaterials = default, concrete, steel, plastic, rock, sand # Always start with default
frictionvalues = 0.02, 0.02, 0.014, 0.012, 0.035, 0.025 # Give values corresponding to material above

[output]
OutputDirectory = ../data/osm/fm
Expand Down
2 changes: 0 additions & 2 deletions delft3dfmpy/datamodels/osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def __init__(self, extent_file=None, data_columns=None, proj_crs = None, logger=
# FIXME: ensure that all culvert types and properties can be handled. We probably have circular and box-shaped culverts, sometimes with multiple openings
self.culverts = ExtendedGeoDataFrame(geotype=LineString, required_columns=self.get_columns('culverts'))

self.bridges = ExtendedGeoDataFrame(geotype=Point, required_columns=self.get_columns('bridges'))

# # FIXME: not sure what laterals in this context mean, but I don't think we need it at this stage.
# self.laterals = ExtendedGeoDataFrame(geotype=Point, required_columns=[
# 'code',
Expand Down
6 changes: 4 additions & 2 deletions examples/test_osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
osm.branches.plot(ax=ax1, label='Channel')
osm.profiles.geometry.plot(ax=ax1, marker='.', color='r' , markersize=5, label='Cross section')
osm.culverts.centroid.plot(ax=ax1, color='yellow', label='Culvert', markersize=5, zorder=10)
plt.show()
#plt.show()

# TODO: CROSS SECTION LOCATION - add cross sections at start and end of branch. Take the longitudinal slope with SHIFT parameter into account
# TODO: replace dummy dem values of dem at cross-sections, dem at leftlevel, dem at rightlevel for profiles and culverts
Expand Down Expand Up @@ -148,7 +148,6 @@
osm.culverts['crosssection'] = [{} for _ in range(len(osm.culverts))]

for culvert in osm.culverts.itertuples():

# Generate cross section definition name
if culvert.profile == 'round':
crosssection = {'shape': 'circle', 'diameter': culvert.diameter}
Expand All @@ -167,7 +166,10 @@
osm.culverts['numlosscoef'] = 0

# TODO: bedfrictiontype - inifile
friction_type = parameters['frictiontype']

# TODO: bedfrictionvalue - material and smoothness, inifile
friction_values = dict(zip(parameters['frictionmaterials'].split(','), list(map(float,parameters['frictionvalues'].split(',')))))

osm.culverts.columns
# TODO: CROSS SECTIONS DEFINTION - specify roughness dependent on material add this
Expand Down

0 comments on commit ec9dab6

Please sign in to comment.