sxs-collaboration / spectre

SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
https://spectre-code.org
Other
158 stars 187 forks source link

Neutron star surface finder algorithm #4383

Open nilsvu opened 1 year ago

nilsvu commented 1 year ago

Find the surface of a neutron star in numeric volume data. This is needed to adapt the computational grid to the stellar surface so the surface discontinuity doesn't spoil exponential convergence of our initial data solver. It's also useful to impose the regularity condition on the elliptic equation for the velocity potential, which we want to solve only within the star. Basic idea:

Literature: Read up on "surface-fitting coordinates" in the context of binary neutron star initial data. Also talk to me.

PunJustice commented 1 year ago

Working on this! :)

isaaclegred commented 1 year ago

Just a note on this, @yoonso0-0 and I have recently found that after some evolution the surface can get a bit "fuzzy" (like the density goes is small but not atmosphere near the surface of the star) so it will be really helpful to have an algorithm which can find along any enthalpy/density contour, +bonus points for bonus points

nilsvu commented 1 year ago

Here's the plan we came up with today (involved were @PunJustice @ffoucart @nilsdeppe):

nilsvu commented 1 year ago

Suggested plan for the parallel algorithm / communication pattern:

nilsdeppe commented 1 year ago

I don't understand why we need a surface finder component. Can't the elements just send the surface they find directly to the non-const global cache?

nilsvu commented 1 year ago

We need a place to assemble the radii coming from different elements into one Strahlkorper. I think we need a component with a DataBox for that, to keep track of filled/missing Strahlkorper collocation points.

nilsdeppe commented 1 year ago

Ah okay. Could we just have one component rather than an array? Since all elements need to do a reduction over the entire domain, we need to have a vector of N CoM calculations anyway and each element decidse which one it contributes to. So naively I think a singleton should be the right answer that then just sends to the different control systems.