anuga.Absorbing_wave_boundary

class anuga.Absorbing_wave_boundary(domain=None, function=None, default_boundary=0.0)[source]

Bases: Boundary

Active-absorption open boundary with prescribed incoming wave.

Simultaneously prescribes an incoming wave and absorbs outgoing (reflected) waves by setting the ghost-cell stage to:

stage_ghost = 2 * wave(t) - stage_interior

so that the boundary face always sees exactly wave(t) regardless of what is propagating back from inside the domain. The ghost normal momentum is set to ghost_depth × interior_velocity (velocity- preserving transmissive): this keeps the ghost velocity bounded when ghost depth is small (e.g. after bed-clamping) and gives the correct incoming-wave energy flux. Zero ghost momentum would halve the incoming wave amplitude. Tangential momentum is zeroed. When the ghost cell is dry (bed-clamped to zero depth), both momentum components are set to zero to avoid a pathological dry-ghost state in the Riemann solver.

This is the numerical equivalent of an active-absorption wavemaker used in physical wave-tank experiments: the paddle continuously adjusts to cancel any reflected wave arriving at the boundary while still generating the desired incoming signal.

Note

Absorption efficiency depends on the phase of the standing-wave cycle. At a standing-wave antinode (u 0 at the boundary) the net momentum flux is zero and energy drains slowly over multiple wave periods. For highly reflective short-domain problems (e.g. the Okushiri benchmark) this is still preferable to a pure Flather condition, which can exhibit 2× stage amplification at the boundary gauge.

Parameters:
  • domain (anuga.Domain) – The domain to which this boundary is attached.

  • function (callable) – A function f(t) returning the prescribed stage at model time t. Typically a file_function() time series.

  • default_boundary (float, optional) – Stage returned when model time exceeds the range of function. Defaults to 0.0.

Examples

>>> import anuga
>>> domain = anuga.rectangular_cross_domain(10, 10)
>>> Ba = anuga.Absorbing_wave_boundary(domain, lambda t: 0.1 * (t < 5))
>>> domain.set_boundary({'left': Ba, 'right': Ba, 'top': Ba, 'bottom': Ba})
__init__(domain=None, function=None, default_boundary=0.0)[source]

Initialise an active-absorption open boundary.

Parameters:
  • domain (anuga.Domain) – The domain to which this boundary is attached.

  • function (callable) – Prescribed stage function f(t).

  • default_boundary (float, optional) – Fallback stage when model time is out of range. Default 0.0.

Raises:

Exception – If domain or function is None.

Methods

__init__([domain, function, default_boundary])

Initialise an active-absorption open boundary.

evaluate(vol_id, edge_id)

Return ghost-cell state for active-absorption boundary.

evaluate_segment(domain, segment_edges)

Vectorised form for speed.

get_boundary_values([t])

get_time()

evaluate(vol_id, edge_id)[source]

Return ghost-cell state for active-absorption boundary.

evaluate_segment(domain, segment_edges)[source]

Vectorised form for speed.