anuga.Reflective_boundary

class anuga.Reflective_boundary(domain=None)[source]

Bases: Boundary

Reflective boundary condition.

Returns the same conserved quantities as the neighbour volume edge but with the normal momentum component negated, so the net mass flux through the boundary is zero (wall / no-slip analogue for the shallow-water equations).

Parameters:

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

Examples

>>> import anuga
>>> domain = anuga.rectangular_cross_domain(10, 10)
>>> Br = anuga.Reflective_boundary(domain)
>>> domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
__init__(domain=None)[source]

Initialise a reflective boundary.

Parameters:

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

Raises:

Exception – If domain is None.

Methods

__init__([domain])

Initialise a reflective boundary.

evaluate(vol_id, edge_id)

Calculate BC associated to specified edge

evaluate_segment(domain, segment_edges)

Apply BC on the boundary edges defined by segment_edges

get_boundary_values([t])

get_time()

evaluate(vol_id, edge_id)[source]

Calculate BC associated to specified edge

Parameters:
  • vol_id (int) – Triangle ID

  • edge_id (int) – Edge opposite to Vertex ID

evaluate_segment(domain, segment_edges)[source]

Apply BC on the boundary edges defined by segment_edges

Parameters:
  • domain – Apply BC on this domain

  • segment_edges – List of boundary cells on which to apply BC