Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set different types of boundaries #271

Open
dili5 opened this issue Mar 26, 2024 · 1 comment
Open

How to set different types of boundaries #271

dili5 opened this issue Mar 26, 2024 · 1 comment

Comments

@dili5
Copy link

dili5 commented Mar 26, 2024

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!

@stoiver
Copy link
Member

stoiver commented Mar 27, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants