google-deepmind / google-deepmind/torax

Make geometry builders differentiable

Open
#2,356 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
721
Forks
145
Avg merge
2d 14h
Merged PRs (30d)
49

Description

The ability to quantify how the profiles will evolve with respect to changes in the geometry would be extremely useful for trajectory optimization.

The geometry builders (circular, fbt, eqdsk, etc.) are not presently implemented in a way which allows this. Ideally, they should be differentiable with respect to the inputs (use jnp instead of np and ensure operations produce smooth gradients).

The circular geometry builder mostly captures the case where the LCFS shape is treated as the control input, which is similar to how a lot of plasma control systems are set up. To investigate some more sophisticated control setups though it would be nice to have every geometry builder be differentiable.

Say for instance I had a JAX model which took as input controlled coil currents and output something like the FBT LY or the EQDSK psi grid. Then if I could pass that geometry to TORAX in a way that preserved the gradients it would enable determining how each control coil influenced the transport.

Contributor guide

Open the contributing guide

Research direction

Start by locating the circular, FBT, and EQDSK geometry builders and reviewing where they use np versus jnp. Check how a JAX model passes geometry into TORAX, then define completion as preserving gradients from each builder's inputs through its generated geometry; the issue names no tests or specific files.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.