Castro icon indicating copy to clipboard operation
Castro copied to clipboard

2D spherical geometry

Open zingale opened this issue 1 year ago • 2 comments

We want to add 2D spherical geometry $(r, \theta)$ on the grid with axisymmetry in $\phi$.

The following tasks need to be done:

  • [x] update the geometry source terms in Castro/Source/sources/Castro_geom.cpp to have the geometric terms (done in https://github.com/AMReX-Astro/Castro/pull/2955)
  • [x] add the primitive variable source terms (perhaps via #2473) and ensure that d/dtheta has 1/r in interface prediction (done in #2964)
  • [x] make sure that the geometry terms are included in the transverse flux correction functions (done in https://github.com/AMReX-Astro/Castro/pull/2961)
  • [x] add the geometry factors to diffusion (added in https://github.com/AMReX-Astro/Castro/pull/3048 and further verified in https://github.com/AMReX-Astro/Castro/pull/3054)
  • [x] update artifical viscosity (done in https://github.com/AMReX-Astro/Castro/pull/2954)
  • [x] update the shock detection algorithm (done in https://github.com/AMReX-Astro/Castro/pull/2959)
  • [x] add the correct cross product for the Coriolis force in the rotational source term (done in #2967)
  • [x] update AMReX to know about the area and volume factors (done in https://github.com/AMReX-Codes/amrex/pull/4141)
  • [x] make constant gravity work in the radial direction (done in https://github.com/AMReX-Astro/Castro/pull/2957)
  • [x] update our local area and volume functions (in Castro_util.H) to have the same factors (done in https://github.com/AMReX-Astro/Castro/pull/2953)
  • [x] address mom_flux_has_p (done in https://github.com/AMReX-Astro/Castro/pull/2958)
  • [ ] add a ptheta flux register analogous to the pradial one (done in https://github.com/AMReX-Astro/Castro/pull/2960)
  • [x] make sure that the interpolation in AMReX uses the edge volume weights (these were inlined--see discussion in https://github.com/AMReX-Codes/amrex/pull/4141)(Done in https://github.com/AMReX-Codes/amrex/pull/4441)
  • [x] update the timestep computation (to use r dtheta) (done in https://github.com/AMReX-Astro/Castro/pull/2962)

zingale avatar Jul 24 '24 16:07 zingale

I think also update mom_flux_has_p and related stuff

zhichen3 avatar Jul 31 '24 04:07 zhichen3

also need to modify cfl_violation/timestep constraint since in spherical2d dy is just dtheta but we want physical length , so rdtheta, when checking and determining timestep

zhichen3 avatar Sep 18 '24 23:09 zhichen3