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

add support for 2D spherical geometry #3670

Open
zingale opened this issue Dec 14, 2023 · 1 comment
Open

add support for 2D spherical geometry #3670

zingale opened this issue Dec 14, 2023 · 1 comment

Comments

@zingale
Copy link
Member

zingale commented Dec 14, 2023

We'd like to model a thin surface layer on a star in 2d spherical geometry (r, theta) with phi axisymmetry. Here theta is the angle from the +z axis.

The geometry should look like the attached:

2d_spherical.pdf

We'll use this issue to track the changes needed in AMReX

@zingale
Copy link
Member Author

zingale commented Dec 14, 2023

We want to allow for Coord() == 2 in 2-d

Here are the places where the geometry matters and what needs to be done (if anything):

  • volume and area factors need to be added to AMReX_COORDSYS_2D_C.H and we need to make sure that AMReX_Geometry.cpp doesn't abort for our geometry
  • we need to ensure that the interpolation works with this geometry. In particular we want the conversed interpolation to work. Note: we can debug this with piecewise constant to start
  • the restriction should "just work" so long as the volume factors are in place. But we should check the avgDown functions to see if there are aborts
  • we rely on the muligrid apply_op to compute the diffusion term. At the moment, in Castro, we seem to do this by applying metric factors on the application side, so we need to add those metrics. Alternately, the linear solvers can now handle geometry for us, so we should consider switching to that and then we need to make sure that this new geometry is supported.
  • the flux correction for hyperbolic should also be fine, since the area factors are in place

WeiqunZhang pushed a commit that referenced this issue Sep 12, 2024
## Summary
This adds the appropriate geometric terms (area and volume) for
spherical 2D geometry. We assume dx[0]=dr, and dx[1]=d$`\theta`$.

## Additional background
This intended to deal with issue #3670
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

1 participant