Skip to content

Neural networks as surrogate models that emulate the TGLF quasilinear plasma turbulent transport simulator and that is valid in the operating space of STEP

License

Notifications You must be signed in to change notification settings

ukaea/tglfnn-ukaea

Repository files navigation

tglfnn-ukaea

Neural networks as surrogate models that emulate the TGLF quasilinear plasma turbulent transport simulator in various parameter spaces. Each folder includes both ONNX and Pytorch models traced via TorchScript.

Using the traced PyTorch models in Fortran

The traced PyTorch models can be used in Fortran with FTorch, which provides Fortran bindings for LibTorch (the C++ backend of PyTorch). Please cite the Ftorch publication if using these models from Fortran.

Prerequisites

  • LibTorch: Download the appropriate version (CPU or GPU) from the PyTorch website and ensure it is accessible in your environment. CPU versions of the LibTorch and Pip packages have been tested. The LibTorch version requires no Python to install or run. It is suggested to look at the FTorch instructions below first.
  • FTorch: Install the FTorch library following the instructions in the FTorch repository. This also provides a compiler specific module (ftorch.mod).
  • Fortran Compiler: Use a modern Fortran compiler (e.g., gfortran or ifort) compatible with FTorch.
  • CMake: Version >= 3.1 required to build FTorch. Not essential, but helpful for building final Fortran code.

About

Neural networks as surrogate models that emulate the TGLF quasilinear plasma turbulent transport simulator and that is valid in the operating space of STEP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published