Creates tokamak plasma sources for OpenMC
Project description
openmc-plasma-source
This python-based package offers a way of creating a parametric OpenMC plasma source from plasma parameters. The OpenMC sources are ring sources which reduces the computational cost and the settings.xml file size.
The equations implemented here are taken from this paper.
Installation
To install openmc-plasma-source, simply run:
pip install openmc-plasma-source
Usage
Tokamak Source
Create a source with a spatial and temperature distribution of a tokamak plasma.
from openmc_plasma_source import TokamakSource
my_plasma = TokamakSource(
elongation=1.557,
ion_density_centre=1.09e20,
ion_density_peaking_factor=1,
ion_density_pedestal=1.09e20,
ion_density_separatrix=3e19,
ion_temperature_centre=45.9,
ion_temperature_peaking_factor=8.06,
ion_temperature_pedestal=6.09,
ion_temperature_separatrix=0.1,
major_radius=9.06,
minor_radius=2.92258,
pedestal_radius=0.8 * 2.92258,
mode="H",
shafranov_factor=0.44789,
triangularity=0.270,
ion_temperature_beta=6
)
my_plasma.sample_sources()
my_sources = my_plasma.make_openmc_sources()
For a more complete example check out the example script.
Ring Source
Create a ring source with temperature distribution of a 2000eV plasma.
my_plasma = FusionRingSource(
start_angle = 0.,
stop_angle = 6.28318530718, # input is in radians
temperature = 20000.,
fuel='DT'
)
Point Source
Create a point source with temperature distribution of a 2000eV plasma.
my_plasma = FusionPointSource(
coordinate = (0, 0, 0),
temperature = 20000.,
fuel = 'DT'
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for openmc_plasma_source-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 258831ea047e7a64a3cb9099a24bc49fb3e47bb1a373f8bce496bceaa10bdd74 |
|
MD5 | 53e94a9ed3df93b1aec4417b4ba0cf11 |
|
BLAKE2b-256 | 7e5f87178bf64a933d909b67944f831e71e0d50e85012bcfdc80b48def71d49e |