Skip to content

Comment on TORAX is a differentiable tokamak core transport simulatorparent

Comments

Unfortunately it’s for my work so not currently public. One chunk of it which I would love to open source sometime, is basically just TRANSPORT but modern Python. Despite being a million years old, just second order matrix-style beam optics is actually still a really useful place to start for a lot of stuff. And with it all differentiable, one can do way more kinds of interesting optimisations.

What’s interesting is that the old Fortran source code for TRANSPORT is still out there if one digs, and most of it is taken up by thousands of lines of code that (1) implement a bunch of matrix multiplication that is now just one call to “jnp.einsum()“, and (2) implementing a tedious by-hand differentiation of those same calculations, in a few parameters, which is now basically inferior to just one call to “jax.grad()”. It’s amazing how modern tools can make hard stuff truly trivial.

Despite being a million years old, just second order matrix-style beam optics is actually still a really useful place to start for a lot of stuff

ha, you bet

TRANSPORT and MAD(X)

Yup! Still used all the time! And both (IMHO) super un-ergonomic.

If you have any interest in single-particle tracking for ion optics. I'd encourage you to check out https://github.com/KATRIN-Experiment/Kassiopeia. It can do both exact and adiabatic tracking of particles (and will solve for B and E-fields in complex electrode geometries). However, as far as I know it only handles static electric fields for now.

Cool, thanks for the link it's always interesting to see what's out there (there's so much interesting code around!).

My quick look at that makes me think it's more like a modern SIMION than a modern TRANSPORT.

I'm more interested at the level of accelerator beamlines (ensembles of magnets with high energy beams), and how to reduce the "impedence mismatch" between that process and the physical design optimization of individual magnets.

Thanks!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.