How to set different types of boundaries
dili5 opened this issue · 1 comments
Hello, Professor:
domain.set_boundary({'1': Br, '2': inflow_bc, '3': water_level_bc})
How I can set the '2' boundary type as a time varying flow process and the '3' boundary type as a time varying water level process.
Thanks!
@dili5 Setting inflow boundaries can be a bit of an art. Mathematically the number of boundary conditions depends on whether the inflow is sub or supercritical ( u_n < sqrt(gh) or u_n > sqrt(gh)). And within ANUGA
the boundary condition is specified by setting the stage, xmomentum and ymomentum on the outside of the boundary, and letting the code calculate the resulting fluxes. So it is a little difficult to exactly specify the inflow.
As a way around this problem I usually make that part of the boundary reflective and setup an Inlet_operator
just inside the domain with the exact specified discharge and let ANUGA
calculate the resultant flow.
Regarding the water level boundary condition water_level_bc
, this is usually allied along an ocean boundary. For that boundary I would use either
anuga.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary
or
anuga.Flather_external_stage_zero_velocity_boundary
These are setup via:
Bs = anuga.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary(domain,tide_fun)
Bf = anuga.Flather_external_stage_zero_velocity_boundary(domain,tide_fun)
where tide_fun
is just a function of time.