Opened 15 years ago

Closed 15 years ago

#175 closed enhancement (fixed)

Compute flow through a cross section

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

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, …..] 
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 (5)

comment:1 Changed 15 years ago by ole

  • Description modified (diff)

comment:2 Changed 15 years ago by ole

Alternatively, one could implement something like


to be computed at run-time. I don't know which would be best?

comment:3 Changed 15 years ago by duncan

domain.flow_across_boundary('outflow_tag') seems easier, since it's using the existing mesh structure.

comment:4 Changed 15 years ago by ole

  • Priority changed from normal to highest

This was raised again by Rudy 2 April 2008 and suggested as a very high priority in order for hydrological engineers to be comfortable with the correctness of the predicted flows.

comment:5 Changed 15 years ago by ole

  • Resolution set to fixed
  • Status changed from new to closed

First version implemented in changeset:5288

I will close this for now but reopen if issues arise when the function is tested in the wild.

Note: See TracTickets for help on using tickets.