fusion-surrogates


Namefusion-surrogates JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryTransport surrogate models for Tokamak fusion.
upload_time2025-08-21 17:51:22
maintainerNone
docs_urlNone
authorDeepMind
requires_python>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/google-deepmind/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](https://gitlab.com/qualikiz-group/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](https://doi.org/10.1063/1.5134126)
([also available on arxiv](https://arxiv.org/abs/1911.05617)).
It was trained by combining data for the
[QLKNN11D dataset](https://zenodo.org/record/8017522) and
[QLKNN7D-edge dataset](https://zenodo.org/record/8106431). A paper describing
the details of the model is in the works and should be published soon.

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

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](https://gitlab.com/qualikiz-group/QuaLiKiz/-/wikis/QuaLiKiz/Input-and-output-variables).

## Installation instructions

### Virtual environment

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

To install venv:

```shell
pip install --upgrade pip
pip install virtualenv
```

To create and activate a `venv`:

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

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

```shell
deactivate
```

### Installing the library

To install the library:

```shell
pip install fusion_surrogates
```

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

```shell
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fusion-surrogates",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "DeepMind",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/2e/9a/4d7e761eb67a038f4344bca2b9d2a0a3dfd103adc2dcbff0a32b1a0096a7/fusion_surrogates-0.4.0.tar.gz",
    "platform": null,
    "description": "# Fusion surrogates\n\nA library of surrogate models for tokamak fusion.\n\nThis library provides both inference code and model weights and metadata. It is\ndesigned to provide surrogate models for\n[TORAX](https://github.com/google-deepmind/torax), but\nthe models should be usable by other fusion simulators.\n\n## QLKNN_7_11\nCurrently, this library only holds the QLKNN_7_11 model. This model is a\nsurrogate of [Qualikiz](https://gitlab.com/qualikiz-group/QuaLiKiz), a\nquasilinear gyrokinetic code for turbulent transport in tokamaks.\n\nIt is based on the original QLKNN10D model by\n[Van de Plassche et al. PoP 2020](https://doi.org/10.1063/1.5134126)\n([also available on arxiv](https://arxiv.org/abs/1911.05617)).\nIt was trained by combining data for the\n[QLKNN11D dataset](https://zenodo.org/record/8017522) and\n[QLKNN7D-edge dataset](https://zenodo.org/record/8106431). A paper describing\nthe details of the model is in the works and should be published soon.\n\nThe model takes as input:\n<ul>\n <li>Normalized logarithmic heat and density gradients for electrons and main\nions ($$R/L_{Te}$$, $$R/L_{Ti}$$, $$R/L_{ne}$$, $$R/L_{ni}$$)</li>\n <li>Safety factor ($$q$$)</li>\n <li>Magnetic shear ($$\\hat{s}$$)</li>\n <li>Local inverse aspect ratio ($$r/R_{maj}$$)</li>\n <li>ion-electron temperature ratio ($$T_i/T_e$$)</li>\n <li>Logarithmic ion-electron normalized collisionality ($$\\mathrm{log}(\\nu^*)$$)</li>\n <li>Normalized density ($$n_i/n_e$$)</li>\n</ul>\n\nIt outputs ion and electron heat and particle fluxes for each transport mode\n(Ion Temperature Gradient [ITG], Electron Temperature Gradient [ETG], Trapped\nElectron Modes [TEM]), as well as the the maximum growth rate on ion gyroradius\nscales. Specifically, we output the leading flux for that mode\n(ion heat flux for ITG, electron heat flux for TEM and ETG),\nand ratios of the relevant secondary fluxes to the leading flux of that mode.\n\nMore details on the inputs and outputs mentioned above can be found in the\n[Qualikiz documentation](https://gitlab.com/qualikiz-group/QuaLiKiz/-/wikis/QuaLiKiz/Input-and-output-variables).\n\n## Installation instructions\n\n### Virtual environment\n\nIt is recommended to use a virtual environment to install `fusion_surrogates`.\n\nTo install venv:\n\n```shell\npip install --upgrade pip\npip install virtualenv\n```\n\nTo create and activate a `venv`:\n\n``` shell\npython3 -m venv .venv\nsource .venv/bin/activate\n```\n\nOnce you are done with your session, you can exit the `venv`:\n\n```shell\ndeactivate\n```\n\n### Installing the library\n\nTo install the library:\n\n```shell\npip install fusion_surrogates\n```\n\nIf you want to run unit tests, install with the `testing` option:\n\n```shell\npip install -e .[testing]\npytest .venv/lib/python*/site-packages/fusion_surrogates\n```\n\n## Disclaimer\nCopyright 2025 Google LLC\n\nAll software is licensed under the Apache License, Version 2.0 (Apache 2.0);\nyou may not use this file except in compliance with the Apache 2.0 license.\nYou may obtain a copy of the Apache 2.0 license at:\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nAll other materials are licensed under the Creative Commons Attribution 4.0\nInternational License (CC-BY). You may obtain a copy of the CC-BY license\nat: https://creativecommons.org/licenses/by/4.0/legalcode\n\nUnless required by applicable law or agreed to in writing, all software and\nmaterials distributed here under the Apache 2.0 or CC-BY licenses are\ndistributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\neither express or implied. See the licenses for the specific language governing\npermissions and limitations under those licenses.\n\nThis is not an official Google product.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Transport surrogate models for Tokamak fusion.",
    "version": "0.4.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "537c1a5beb493295e5d0217aeede5d164e3916289286dde4740533aa099ba7cc",
                "md5": "821236b4a0df712b35bf5ccb7f142644",
                "sha256": "c420917c6f16bdb4d4bcdd5803bb49c941e0165b44899e00c270052be4fc2f2b"
            },
            "downloads": -1,
            "filename": "fusion_surrogates-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "821236b4a0df712b35bf5ccb7f142644",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 589924,
            "upload_time": "2025-08-21T17:51:21",
            "upload_time_iso_8601": "2025-08-21T17:51:21.037243Z",
            "url": "https://files.pythonhosted.org/packages/53/7c/1a5beb493295e5d0217aeede5d164e3916289286dde4740533aa099ba7cc/fusion_surrogates-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2e9a4d7e761eb67a038f4344bca2b9d2a0a3dfd103adc2dcbff0a32b1a0096a7",
                "md5": "3131276f06319f34a2d239266d269f7e",
                "sha256": "91e11fae552ae716753be7b03e91ad795158e7e1b7bc09ad1d424b1cc1a0740f"
            },
            "downloads": -1,
            "filename": "fusion_surrogates-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3131276f06319f34a2d239266d269f7e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 582671,
            "upload_time": "2025-08-21T17:51:22",
            "upload_time_iso_8601": "2025-08-21T17:51:22.135544Z",
            "url": "https://files.pythonhosted.org/packages/2e/9a/4d7e761eb67a038f4344bca2b9d2a0a3dfd103adc2dcbff0a32b1a0096a7/fusion_surrogates-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-21 17:51:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fusion-surrogates"
}
        
Elapsed time: 0.89867s