AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
300 stars 98 forks source link

Halted pendulum wdmerger ICs #2313

Open maxpkatz opened 1 year ago

maxpkatz commented 1 year ago

We should try the halted pendulum relaxation technique described here for wdmerger initial conditions:

https://arxiv.org/abs/2211.10746v1

maxpkatz commented 1 year ago

The paper describes a method for SPH, but I think the idea applies to wdmerger based on my experience. The challenge with applying a damping force during the binary relaxation phase is that there are two sources of perturbations on the grid. Small-scale perturbations are primarily oscillations of the individual stars about HSE. Large-scale perturbations are oscillations of the stars themselves about their equilibrium orbital distance. It is hard to apply a uniform damping force to the grid that handles both effects well. A relaxation force that is large enough to dampen small-scale perturbations about HSE means that the stars will move very slowly to their equilibrium point in a quasi-static motion, but that could take a very long time. A relaxation force that is small enough to, in principle, get the stars to their equilibrium distance may be simply overwhelmed by the small-scale perturbations, particularly if the stars are not very close to equilibrium at the start.

The insight of the paper is that we don't have to do the damping as a uniform, constant in time force. Instead, we can think about the two stars' oscillations around their equilibrium orbital locations as a pendulum. If the secondary's true equilibrium point is x = a, then the secondary will be oscillating between x = a - L and x = a + L, where L << a is a characteristic oscillation distance. And like a pendulum, we expect the kinetic energy to reach a minimum furthest away from a, and to reach a maximum as it passes through the central point. So what we can do is monitor the kinetic energy of the stars and then apply a damping force when it hits its maximum. Since the mass of each star is approximately constant in this phase, we just need to look at the velocity of each star (which we already measure), and if we see that the star's velocity has reached its maximum, we can simply cut the velocity of that star to zero. With several "pendulum dampings" like this, we may be able to efficiently get the star to near the proper relaxation point much faster than if we had waited a long time for the quasi-static motion under the current relaxation force.