Opened 18 years ago

Last modified 18 years ago

#175 closed enhancement

Compute flow through a cross section — at Version 1

Reported by: ole Owned by: ole
Priority: highest Milestone:
Component: Functionality and features Version:
Severity: normal Keywords:
Cc:

Description (last modified by ole)

For ANUGA to be used with flood modelling it will need a way to compute flow through an arbitrary cross section. The output, Q, would be a vector of flows for each stored timesteps. This was initially suggested by Rudy van Drie.

The function could be called as follows:

Q = flow_at_cross_section(‘model.sww’, polyline, verbose=True)

Where polyline has the form
[p_1, p_2, p_3, …..] 
and
p_i = [x,y]

Q is a vector of flows with units [m^3/s]

The algorithm would be as follows:

1: Obtain all intersections between polyline and triangle edges
2: From these, derive for each triangle: length of intersecting segment and its midpoint.
3: Obtain from file_function (or Interpolation_function) interpolated values for xmomentum and ymomentum at each segment midpoint. The units are [m^2/s].
4: Compute the momentum along the normal vector of the segment at its midpoint.
5: Multiply the normal momentum with the segment length to obtain flow for that triangle. The unit is now [m^3/s].
6: Sum up normal flows for all participating triangles and enter into Q.  

A simple unit test would consist of a channel flow on a flat bed with a known inflow and the same outflow. Flow across a cross section in the channel should equal the inflow.

Issues include: What if the polyline has a corner inside a triangle? Maybe, we only do this for straight lines to begin with.

Change History (1)

comment:1 Changed 18 years ago by ole

Description: modified (diff)
Note: See TracTickets for help on using tickets.