Creates tokamak and fusion point sources for OpenMC
Project description
OpenMC-plasma-source
This python-based package offers a collection of pre-built OpenMC neutron sources for fusion applications.
Installation
OpenMC is required to use this package.
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. The OpenMC sources are ring sources which reduces the computational cost and the settings.xml file size. Each source has its own strength (or probability that a neutron spawns in this location).
The equations implemented here are taken from this paper.
from openmc_plasma_source import tokamak_source
my_sources = tokamak_source(
elongation=1.557,
ion_density_centre=1.09e20,
ion_density_pedestal=1.09e20,
ion_density_peaking_factor=1,
ion_density_separatrix=3e19,
ion_temperature_centre=45.9e3,
ion_temperature_pedestal=6.09e3,
ion_temperature_separatrix=0.1e3,
ion_temperature_peaking_factor=8.06,
ion_temperature_beta=6,
major_radius=906,
minor_radius=292.258,
pedestal_radius=0.8 * 292.258,
mode="H",
shafranov_factor=0.44789,
triangularity=0.270,
fuel={"D": 0.5, "T": 0.5},
)
For a more complete example check out the example script.
Ring Source
Create a ring source with temperature distribution of a 2000 eV plasma.
from openmc_plasma_source import fusion_ring_source
my_source = fusion_ring_source(
radius=700,
angles=(0.0, 2 * math.pi), # 360deg source
temperature=20000.0,
fuel={"D": 0.5, "T": 0.5},
)
Point Source
Create a point source with temperature distribution of a 2000 eV plasma.
from openmc_plasma_source import fusion_point_source
my_source = fusion_point_source(
coordinate=(0, 0, 0),
temperature=20000.0,
fuel={"D": 0.09, "T": 0.91}, # note this is mainly tritium fuel so that TT reactions are more likely
)
Testing
To run the tests, simply run
pytest tests
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openmc_plasma_source-0.4.0.tar.gz.
File metadata
- Download URL: openmc_plasma_source-0.4.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ec6e5c083fbc2e044bfb408b7be7cd0800968e54b0f540a90468cb728b9a898
|
|
| MD5 |
259b6ae2e8c72bd9fbaa59cb43536310
|
|
| BLAKE2b-256 |
30306bfdd6111489a9e7d14cd2b833b6cd63e5325e49be91941735587192f93c
|
Provenance
The following attestation bundles were made for openmc_plasma_source-0.4.0.tar.gz:
Publisher:
python-publish.yml on fusion-energy/openmc-plasma-source
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openmc_plasma_source-0.4.0.tar.gz -
Subject digest:
9ec6e5c083fbc2e044bfb408b7be7cd0800968e54b0f540a90468cb728b9a898 - Sigstore transparency entry: 245933521
- Sigstore integration time:
-
Permalink:
fusion-energy/openmc-plasma-source@3d17caa4bd7e858743cec439dcab59e4da10b542 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/fusion-energy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3d17caa4bd7e858743cec439dcab59e4da10b542 -
Trigger Event:
release
-
Statement type:
File details
Details for the file openmc_plasma_source-0.4.0-py3-none-any.whl.
File metadata
- Download URL: openmc_plasma_source-0.4.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8fbe79ebef8663092f75886ab8b72ce8bda414b6eb75c33d77b278da286c806
|
|
| MD5 |
ade2c6d70c21f7543632d872f1770926
|
|
| BLAKE2b-256 |
b51b3c69b6fb940a66a650e9f37e8fd1249b381e0afda4b15d50af63ed34aad7
|
Provenance
The following attestation bundles were made for openmc_plasma_source-0.4.0-py3-none-any.whl:
Publisher:
python-publish.yml on fusion-energy/openmc-plasma-source
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openmc_plasma_source-0.4.0-py3-none-any.whl -
Subject digest:
c8fbe79ebef8663092f75886ab8b72ce8bda414b6eb75c33d77b278da286c806 - Sigstore transparency entry: 245933522
- Sigstore integration time:
-
Permalink:
fusion-energy/openmc-plasma-source@3d17caa4bd7e858743cec439dcab59e4da10b542 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/fusion-energy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3d17caa4bd7e858743cec439dcab59e4da10b542 -
Trigger Event:
release
-
Statement type: