Skip to main content

Transport surrogate models for Tokamak fusion.

Project description

Fusion surrogates

A library of surrogate models for tokamak fusion.

This library provides both inference code and model weights and metadata. It is designed to provide surrogate models for TORAX, but the models should be usable by other fusion simulators.

QLKNN_7_11

Currently, this library only holds the QLKNN_7_11 model. This model is a surrogate of Qualikiz, a quasilinear gyrokinetic code for turbulent transport in tokamaks.

It is based on the original QLKNN10D model by Van de Plassche et al. PoP 2020 (also available on arxiv). It was trained by combining data for the QLKNN11D dataset and QLKNN7D-edge dataset. A paper describing the details of the model is in the works and should be published soon.

The model takes as input:

  • Normalized logarithmic heat and density gradients for electrons and main ions ($$R/L_{Te}$$, $$R/L_{Ti}$$, $$R/L_{ne}$$, $$R/L_{ni}$$)
  • Safety factor ($$q$$)
  • Magnetic shear ($$\hat{s}$$)
  • Local inverse aspect ratio ($$r/R_{maj}$$)
  • ion-electron temperature ratio ($$T_i/T_e$$)
  • Logarithmic ion-electron normalized collisionality ($$\mathrm{log}(\nu^*)$$)
  • Normalized density ($$n_i/n_e$$)

It outputs ion and electron heat and particle fluxes for each transport mode (Ion Temperature Gradient [ITG], Electron Temperature Gradient [ETG], Trapped Electron Modes [TEM]), as well as the the maximum growth rate on ion gyroradius scales. Specifically, we output the leading flux for that mode (ion heat flux for ITG, electron heat flux for TEM and ETG), and ratios of the relevant secondary fluxes to the leading flux of that mode.

More details on the inputs and outputs mentioned above can be found in the Qualikiz documentation.

Installation instructions

Virtual environment

It is recommended to use a virtual environment to install fusion_surrogates.

To install venv:

pip install --upgrade pip
pip install virtualenv

To create and activate a venv:

python3 -m venv .venv
source .venv/bin/activate

Once you are done with your session, you can exit the venv:

deactivate

Installing the library

To install the library:

pip install fusion_surrogates

If you want to run unit tests, install with the testing option:

pip install -e .[testing]
pytest .venv/lib/python*/site-packages/fusion_surrogates

Disclaimer

Copyright 2025 Google LLC

All software is licensed under the Apache License, Version 2.0 (Apache 2.0); you may not use this file except in compliance with the Apache 2.0 license. You may obtain a copy of the Apache 2.0 license at: https://www.apache.org/licenses/LICENSE-2.0

All other materials are licensed under the Creative Commons Attribution 4.0 International License (CC-BY). You may obtain a copy of the CC-BY license at: https://creativecommons.org/licenses/by/4.0/legalcode

Unless required by applicable law or agreed to in writing, all software and materials distributed here under the Apache 2.0 or CC-BY licenses are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the licenses for the specific language governing permissions and limitations under those licenses.

This is not an official Google product.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fusion_surrogates-0.4.3.tar.gz (580.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fusion_surrogates-0.4.3-py3-none-any.whl (585.9 kB view details)

Uploaded Python 3

File details

Details for the file fusion_surrogates-0.4.3.tar.gz.

File metadata

  • Download URL: fusion_surrogates-0.4.3.tar.gz
  • Upload date:
  • Size: 580.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fusion_surrogates-0.4.3.tar.gz
Algorithm Hash digest
SHA256 10ea691a2d33d41e92c1d97b7f945633a04f7f75b89a52bcb689ce5da2c62ae1
MD5 48331d0e9d81705d2bbc379911a76a6c
BLAKE2b-256 a9501b347c2d96d382e2e6943a5e5fbf3c3ab365ba3d2cd02831d71a99c6e300

See more details on using hashes here.

File details

Details for the file fusion_surrogates-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for fusion_surrogates-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 85d9ccdd51e0dfab21651a4b08f6320a4208b7f2be1febd7668bf329beba7cb4
MD5 3087401825d38b62a7d532452547014f
BLAKE2b-256 0d83bd38cac5a62e74eaae8cd8aecf0278029f01b71be83abe9413d1f2da4fa8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page