Utilities for the setup and analysis of 3d feltor simulations
Project description
Utilities for feltor simulations
The goal of this package is to provide utilities for the setup and run of 3d feltor simulations.
It consists of
- a Python module
feltorutilitiescontaining parameter functions and utilities to convert from dimensional to dimensionless parameters and back. - Jupyter notebooks guiding the generation of suitable input parameters for both the feltor and the thermal feltor codes.
Installation
Python module
The python package feltorutilities can be locally installed via
git clone https://github.com/mwiesenberger/feltorutilities
cd feltorutilities
pip install -e .
Jupyter notebooks
The notebooks depend on the pandas and numpy packages and the simplesimdb and pyfeltor module.
The other dependency is the Feltor code repository.
Follow the quick-start guide to install.
It is recommended to keep Feltor and this repository next to each other.
If not, you will need to set the FELTOR_PATH environment variable in order for
feltor.sh, job.sh and feltordiag.sh to work.
Lastly, we need jupyter to run the notebooks.
Usage
A plasma formulary
First, a list of plasma formulas is provided. These functions can be called as
import feltorutilities as fp
fp.rho_s( B_0, m_i, T_e)
# or
parameters = {"B_0" : 0.7, "m_i" : fp.deuteron_mass, "T_e" : 0.07}
fp.rho_s( **parameters)
To get a list of available functions type
function_names = fp.quantities()
A utility function is provided that lets you compute a collection of quantities from given parameters at once, e.g.
parameters = {"B_0" : 0.7, "m_i" : fp.deuteron_mass, "T_e" : 0.07}
values = parameters2quantities( parameters, ["rho_s", "c_s", "omega_0_inv"])
Second we provide a utility function that inverts given numerical (dimensionless) parameters back to the corresponding physical (dimensional) ones. This is useful in analysing simulation data where only the numerical values are stored. For example:
physical = {"R" : 0.6}
numerical = {"mu" : -2.72e-4,"tau":1,"beta":4.11e-4,"resistivity" : 3.81e-5,"R_0" : 91.94}
numerical2physical( numerical, physical)
# now physical contains R, m_i, T_e, n_0, B_0, T_i)
Feltor simulation setup
This package contains two folders feltor and thermal that are intended to serve as templates to start your own project for the corresponding feltor codes.
In order to setup a Feltor simulation you need to
- First, decide if you want to run a isothermal, 2-species Feltor simulation or a thermal, multispecies simulation. In the first case copy the
feltorfolder to a new repository, in the second one use thethermalfolder - If necessary adapt the
FELTOR_PATHvariable to the feltor C++ repository as described above in all*.shfiles. The explanation for the structure of these files can be found in thesimplesimdbpackage. - Run the jupyter notebook in the folder and follow the instructions in the file
- Once you generated satisfactory input parameters, either manually copy them or load them in the
generate_data.pyscript. The idea for this script is to use thesimplesimdbpackage to automatically generate submit scripts on a HPC cluster such that the simulation is automatically restarted if necessary and/or parameter studies are possible.
Author
Matthias Wiesenberger
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 feltorutilities-0.0.0.tar.gz.
File metadata
- Download URL: feltorutilities-0.0.0.tar.gz
- Upload date:
- Size: 5.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d968744a655f9b7ddfc035db8794931118145846cef423974309c175372c27d3
|
|
| MD5 |
69f9d4ad43bdc3c0f8cb5ae99c0b05e6
|
|
| BLAKE2b-256 |
475dcc1da0f5a318ced6d4c7a59b53009e4f349dd3fe70f7806a087fb9fd4f56
|
Provenance
The following attestation bundles were made for feltorutilities-0.0.0.tar.gz:
Publisher:
python_publish.yml on mwiesenberger/feltorutilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feltorutilities-0.0.0.tar.gz -
Subject digest:
d968744a655f9b7ddfc035db8794931118145846cef423974309c175372c27d3 - Sigstore transparency entry: 253378855
- Sigstore integration time:
-
Permalink:
mwiesenberger/feltorutilities@d58c5492cf3ea99d864ab91ceec1abeac12d91d9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mwiesenberger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_publish.yml@d58c5492cf3ea99d864ab91ceec1abeac12d91d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file feltorutilities-0.0.0-py3-none-any.whl.
File metadata
- Download URL: feltorutilities-0.0.0-py3-none-any.whl
- Upload date:
- Size: 10.5 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 |
e1293ddabd95525bafe7f24598cb9f8dda09e6e29ff015f413e9c06e6bc4c29b
|
|
| MD5 |
5dbcf292ff379755a57b7e8e4fa0358f
|
|
| BLAKE2b-256 |
04ea5c3860d55e9c46a16705c6e5085250f9665c7dc30fe97f7ce6949d91cb57
|
Provenance
The following attestation bundles were made for feltorutilities-0.0.0-py3-none-any.whl:
Publisher:
python_publish.yml on mwiesenberger/feltorutilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feltorutilities-0.0.0-py3-none-any.whl -
Subject digest:
e1293ddabd95525bafe7f24598cb9f8dda09e6e29ff015f413e9c06e6bc4c29b - Sigstore transparency entry: 253378873
- Sigstore integration time:
-
Permalink:
mwiesenberger/feltorutilities@d58c5492cf3ea99d864ab91ceec1abeac12d91d9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mwiesenberger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_publish.yml@d58c5492cf3ea99d864ab91ceec1abeac12d91d9 -
Trigger Event:
push
-
Statement type: