James Berrow
C++/OpenCL/Binary Black Hole collisions. Space and astrophysics, with a side dish of cats
https://20k.github.io
- 20k.github.io/c++/2025/05/... I've finished writing up how to implement #neutronstar collisions (with code!), and follow them through to collapsing into a black hole. Turned out quite well! There's also a small side venture on how to put a cat onto a neutron star, which is v important #astrocode
- Herbie (herbie.uwplse.org) has got to be one of the coolest tools for improving floating point equations. I don't think I've ever seen it call out one of my equations for being quite *this* terrible before though! Though, for some reason herbie has developed a passionate hatred for squaring things
- Super duper long running inspiral of some low mass neutron stars. Interesting to watch a whole bunch of material get jettisoned, as well as the resulting accretion disk getting eaten. Some problems with mass loss here due to the numerics sadly
- Neutron star mergers with colour might be my new favourite thing, it adds a tonne of visual depth to how everything looks #astro
- I really don't have a good reason for spending so much time putting my cat on neutron stars
- Finally got around to something I've been wanting to do for yonks, which is arbitrary colour distributions for neutron stars. Now you can watch them spin, and see how they mix internally! The spin conservation is also way *way* better than I ever expected, so that's exciting too #astro
- 20k.github.io/c++/2025/04/... Ever felt like building a #neutronstar, for a numerical relativistic simulation? Here's how! This is a programmer's guide (with code) on how to wrangle a specific set of initial conditions, so in the future we can smash some neutron stars together #astrocode
- Neutron stars: One thing I think is interesting is that there's no unique way to determine the density at the centre of a neutron star, just from its mass. Here's a plot central matter densities (ie follow the curve from the top left, rightwards, this is increasing density), showing multiple options
- I've had my crash course in fluid dynamics now and implemented a flux conservative high resolution shock capturing scheme. Super interesting to see just how much better the results are vs a traditional discretisation if you're a nooby pde solver like me! Still some minor mass gain to sort out
- Fluid dynamics is even worse than NR! I have no idea how people working on hydrodynamics stay sane. On the plus size, I've ironed out a dozen bugs with these neutron star collisions now, so some aspects of this are looking a lot less sketchy now
- Chasing down a nasty error: Left is a standard substitution of the christoffel symbol, right is with that substitution disabled. Top left is a measure of the Γᶦ error: Left clearly has higher error, yet much better results, as the right sim fails!
- Most hydrodynamic simulations have a pervasive thin atmosphere in the simulation, and I'm starting to see why. The issue is, at the edge of the star in non atmospheric hydro, there's a true discontinuity which can severely affect inspiral based on minor numerical changes
- Neutron star inspirals are pretty awesome: I rotated the background so you can see the gravitational lensing better. Testing out some different initial gauge conditions, which seems to have made a surprisingly large difference to energy conservation! #astro
- So many orbits, so few numerical problems (!). If anyone just so happens to have a physical neutron star test case that includes the linear ADM momentum on hand, I can offer you pictures of my cat in exchange. Surprisingly hard to find explicit numbers for test cases here
- It looks like the next step to get circular neutron star inspirals is (..finally) working nicely. Its good enough that I think I can declare the underlying hydrodynamics functional! Turns out there was a lot of gauge-condition-itus, as well as some constraint-damping-itus, as per normal. #astro
- Pinned down why my neutron stars blow up after an orbit (its always the gauge conditions), and now its looking a lot better! Getting circular inspirals is going to be a lot more work
- My next job is getting binary neutron inspirals to work accurately, which involves a lot of simulating and debugging. This I thought was a very fun case along the way, showing two neutron stars getting absolutely shredded, before recoalescing and forming a #blackhole