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

Use a uniform convention for boundary condition input parameters #534

Open
felker opened this issue Jul 7, 2023 · 4 comments
Open

Use a uniform convention for boundary condition input parameters #534

felker opened this issue Jul 7, 2023 · 4 comments

Comments

@felker
Copy link
Contributor

felker commented Jul 7, 2023

Following up on #492, specifically #492 (comment)

I understand that we want different BCs for different fields.... but the way BCs are being set in the input file is getting confusing.

why does mesh/ix1_bc correspond to hydro/field/fft_gravity physics BCs, mesh/ix1_rad_bc correspond to rad BCs, yet gravity/ix1_bc sets multigrid gravity boundaries.

In seems that every physics package should set its boundary conditions uniquely in the input file.

@pdmullen are you suggesting that we add even more BC flags, too? And change mesh/ix1_rad_bc to radiation/ix1_bc? FFT gravity boundary conditions are always periodic, right?

Copy link
Contributor

yanfeij commented Jul 7, 2023

ix1_rad_bc is not used anymore. Radiation shares the same boundary flag as hydro. If we want to use different boundary for hydro and radiation, then just use user defined boundary flag

@pdmullen
Copy link
Contributor

pdmullen commented Jul 7, 2023

(1) To take a step back, it is clear that we definitely want the functionality of setting different BCs on different physics.

(2) As @yanfeij mentions, this can of course be handled via a user-defined boundary condition.

(3) Future extensions could consider enabling boundary condition specification for individual physics inside the input file (thereby eliminating the need to write a user-defined boundary condition for some problem configurations).

(4) Despite (1) -- (3), I would argue that it is still a bit confusing to set BCs for <mesh> and, for example, <grav> as in Athena++ main (see multigrid gravity BCs here). In the linked example, mesh BCs are set to periodic, and gravity BCs are set to multipole.

FFT gravity boundary conditions are always periodic, right?

Correct. However, one could imagine extensions to FFT gravity (i.e., James' algorithm) that enable open BCs. Would those then be set in <mesh> or <grav>? Should <mesh> BCs only every correspond to hydro & field & radiation?

My initial reaction to this was triggered by the existence of a mesh/ix1_rad_bc in PR #492... i.e., why are radiation BCs tunable inside <mesh> but not other physics? and why is it in <mesh> and not <radiation> (in analogy to gravity). However, @yanfeij informs us that this usage is deprecated...

@felker
Copy link
Contributor Author

felker commented Jul 7, 2023

These are all great questions that deserve a longer discussion from more stakeholders. We can change things after merging #492 without breaking too much.

I agree we should at least decide on a consistent input file organization. I would lean to keeping mesh/ix1_bc be the fluid boundary condition, and any other BC-related input flags stuck in <grav>, <radiation>, <particles> ...

@yanfeij, just to be clear, ix1_rad_bc etc. are no longer anywhere in the pull request, right?

@yanfeij
Copy link
Contributor

yanfeij commented Jul 7, 2023 via email

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

3 participants