Skip to main content

Python package for running and analysing gyrokinetic simulations

Project description

# Pyrokinetics

This project aims to standardise gyrokinetic analysis.

A general pyro object can be loaded either from simulation/experimental data or from an existing gyrokinetics file.

In general pyrokinetics can do the following

  • Read data in from:
    • Gyrokinetic input files

    • Simulations outputs

  • Write input files for various GK codes

  • WIP: Generate N-D pyro object for scans

  • WIP: Read in gyrokinetic outputs

  • WIP: Standardise analysis of gk outputs

At a minimum pyrokinetics needs the local geometry and species data. Example scripts can be found in the examples folder

## Documentation

[Documentation](https://pyrokinetics.readthedocs.io/en/latest/)

## Installation

Install pyrokinetics with pip as follows

`bash pip install --user pyrokinetics `

Otherwise, for the latest version install directly with

`bash $ git clone https://github.com/pyro-kinetics/pyrokinetics.git $ cd pyrokinetics $ python setup.py install --user ` ## Code structure

Pyro object comprised of

  • Equilibrium
    • LocalGeometry
      • Miller

      • Fourier (to be added)

  • Kinetics
    • LocalSpecies

  • Numerics

  • GKCodes

  • GKOutput
    • For nonlinear simulations
      • Fields (field, kx, ky, theta, time)

      • Fluxes (field, species, moment, ky, theta, time)

    • For linear simulations
      • Fields (field, kx, ky, theta, time)

      • Fluxes (field, species, moment, ky, theta, time)

      • Eigenfunctions (field, ky, theta, time)

      • Eigenvalues - growth rate and mode freq (ky, time)

There also exists the PyroScan object which allows you to make a N-D parameter scan of Pyro objects

## Supports sources of Equilibrium data pyrokinetics currently supports * GEQDSK

Future formats to be added are * CHEASE

## Supported sources of Kinetic data

Sources of kinetic profile data currently supported are * SCENE * JETTO * TRANSP

Future codes to be add * SimDB * OMFIT

## Supported GK codes

The following gk codes are supported in pyrokinetics

  • CGYRO

  • GS2

  • GENE

Codes to be added in the future * TGLF

## Note on units

The pyro object uses standardised reference values to normalise the results. It will automatically handle converting to a GK codes standard units.

Note any scans/parameter changes made will be in standard pyro units so please account for this.

Reference values - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20T_%7Bref%7D%20%3D%20T_e” /> - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20n_%7Bref%7D%20%3D%20n_e” /> - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20m_%7Bref%7D%20%3D%20m_D” /> - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20v_%7Bref%7D%20%3D%20c_s%20%3D%20%5Csqrt%7BT_e/m_D%7D” /> - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20B_%7Bref%7D%20%3D%20B_0” /> - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20L_%7Bref%7D%20%3D%20a_%7Bmin%7D” /> - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20t_%7Bref%7D%20%3D%20a_%7Bmin%7D/c_s” /> - <img src=”https://latex.codecogs.com/gif.latex?%5Cbg_white%20%5CLARGE%20%5Crho_%7Bref%7D%20%3D%20%5Cfrac%7Bc_s%7D%7BeB_0/m_D%7D” />

It is possible to change the reference units but proceed with caution

## Used By

This project is used by the following institutions

  • CCFE

  • University of York

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

pyrokinetics-0.0.1.tar.gz (31.3 MB view details)

Uploaded Source

Built Distribution

pyrokinetics-0.0.1-py3-none-any.whl (31.4 MB view details)

Uploaded Python 3

File details

Details for the file pyrokinetics-0.0.1.tar.gz.

File metadata

  • Download URL: pyrokinetics-0.0.1.tar.gz
  • Upload date:
  • Size: 31.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pyrokinetics-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2297931989622e05d29b386f55e07da374dc9de511e22a84d35b5406078918d0
MD5 aa97ab1bfd611807557557933f3938d4
BLAKE2b-256 0306a2d7149d0c2b6cf855952cbffd6d955a92fcf9bea8c82846484b4da1115e

See more details on using hashes here.

File details

Details for the file pyrokinetics-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyrokinetics-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 31.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pyrokinetics-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b66dcb0f0aa04e3d6127ef2aa2ac4ef2d2081a91bffd153e0de814899e85ad3
MD5 b00d79569500749f34513783028d563a
BLAKE2b-256 1d88c5f793498f8764dd8eb0244b3804fb51d93cbef6c5b9ad1243666f201fc5

See more details on using hashes here.

Supported by

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