anuga.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary
- class anuga.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary(domain=None, function=None, default_boundary=0.0)[source]
Bases:
BoundaryTransmissive normal momentum, zero tangential momentum, prescribed stage.
Returns the same momentum component normal to the boundary as the neighbour volume edge. The tangential momentum component is zeroed. Stage is set by a caller-supplied function of time.
- Parameters:
domain (anuga.Domain) – The domain to which this boundary is attached.
function (callable) – A function
f(t)returning the stage at time t.default_boundary (float, optional) – Stage value returned when model time exceeds the range of function. Default is
0.0.
Examples
>>> import anuga >>> domain = anuga.rectangular_cross_domain(10, 10) >>> BC = anuga.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary( ... domain, lambda t: 0.5) >>> domain.set_boundary({'left': BC, 'right': BC, 'top': BC, 'bottom': BC})
- __init__(domain=None, function=None, default_boundary=0.0)[source]
Initialise the boundary.
- Parameters:
domain (anuga.Domain) – The domain to which this boundary is attached.
function (callable) – 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 the boundary.
evaluate(vol_id, edge_id)Transmissive_n_momentum_zero_t_momentum_set_stage_boundary return the edge momentum values of the volume they serve.
evaluate_segment(domain, segment_edges)Apply BC on the boundary edges defined by segment_edges
get_boundary_values([t])get_time()