James Berrow
banner
spacejames.bsky.social
James Berrow
@spacejames.bsky.social
C++/OpenCL/Binary Black Hole collisions. Space and astrophysics, with a side dish of cats

https://20k.github.io
There's always something deeply satisfying about watching a #blackhole pop into the universe
July 17, 2025 at 10:01 PM
You know, somehow I *don't* think that this is how orbits work

It took a while to track this one down, but its related to using trilinear interpolation, instead of a higher order interpolation scheme like tricubic
June 11, 2025 at 5:01 PM
After much umming and erring, I finally figured out an easy way to build a galaxy with a z component that didn't involve like 8 integrals. Time to see if it'll actually simulate correctly!
June 3, 2025 at 6:17 AM
This is how galaxies work, right? Right? Probably needs a bit more work
May 29, 2025 at 10:48 PM
On one hand, being on bsky instead of twitter has hurt me professionally

On the other hand, one of my friend's entire family tree was murdered by nazis, and they're the sole surviving branch of a giant tree of thousands of people

Its not an especially difficult choice. Here's a cat:
May 26, 2025 at 8:22 PM
There's some part of my brain which goes: We've had 1 million stars, but what about 10 million? It turned out to be easier than I expected to optimise - I just had to sort the particles to optimise the memory layout

I'm not even sure what to do with this many stars, and yet *what if 100 million*
May 24, 2025 at 5:43 AM
One way of modelling hawking radiation is as an infalling negative energy. The simulation hates it, but its possible to chuck negative mass particles into a black hole and (partially) evaporate it

Evaporating it more than this has a tendency to cause big explosions, super tricky to model

#astro
May 24, 2025 at 12:39 AM
The coolest thing about doing relativistic N body over newtonian N body?

You can build black holes out of the particles! Its even the correct mass too
May 23, 2025 at 3:31 AM
Some performance optimisations later, and 1M particles is running pretty well now. I tend to leave these test cases going for a while just because they look cool

I think its finally time to go simulate some real things and see how well this works!
May 23, 2025 at 1:41 AM
2 million particles! I left this one running for a while, just because I thought it was pretty darn cool
May 21, 2025 at 10:47 PM
The best part about GPU programming is that once you have 2 of something working, you can just start hitting 0 on your keyboard and see what happens. First test of 200k particles for fully relativistic N-body #astro
May 21, 2025 at 6:15 PM
Finally got the sanity test on the relativistic particle dynamics to work correctly (!) - turns out one of the papers I'm looking at got their equations all wrong which has made this a very good time
May 20, 2025 at 7:17 PM
Oh boy, started working on particles and my favourite bug has turned up - where they just randomly drift off into space because of floating point problems
May 18, 2025 at 7:34 PM
This is really super critical science
May 7, 2025 at 10:40 PM
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
May 3, 2025 at 3:21 AM
This is a colour version of the above, but shorter lived as I was experimenting with some tighter numerical bounds - that didn't pan out (and the sim blew up). Very tempted to try something crazy like the projective reals, or unums or something
April 30, 2025 at 1:35 AM
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
April 30, 2025 at 1:33 AM
Neutron star mergers with colour might be my new favourite thing, it adds a tonne of visual depth to how everything looks #astro
April 29, 2025 at 7:45 PM
I really don't have a good reason for spending so much time putting my cat on neutron stars
April 29, 2025 at 2:36 PM
Its an image I used for an old article:
April 29, 2025 at 5:29 AM
you can never have too many cats
April 29, 2025 at 5:27 AM
mrow
April 29, 2025 at 5:00 AM
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
April 29, 2025 at 4:02 AM
This kind of thing literally never gets old to simulate
April 15, 2025 at 11:05 AM
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
April 8, 2025 at 10:53 PM