A lightweight computational physics framework, which implements a "Simulation, PhysicsModule, ComputeTool" class hierarchy.
Project description
turboPy
A lightweight computational physics framework, based on the organization of turboWAVE. Implements a "Simulation, PhysicsModule, ComputeTool" class hierarchy.
Motivation
Computational physics problems often have a common set of aspects to them that any particular numerical code will have to address. Because these aspects are common to many problems, having a framework already designed and ready to use will not only speed the development of new codes, but also enhance compatibility between codes.
Some of the most common aspects of computational physics problems are: a grid, a clock which tracks the flow of the simulation, and a set of models describing the dynamics of various quantities on the grid. Having a framework that could deal with these basic aspects of the simulation in a common way could provide great value to computational scientists by solving various numerical and class design issues that routinely arise.
This paper describes the newly developed computational framework that we have built for rapidly prototyping new physics codes. This framework, called turboPy, is a lightweight physics modeling framework based on the design of the particle-in-cell code turboWAVE
. It implements a class (called Simulation
) which drives the simulation and manages communication between physics modules, a class (called PhysicsModule
) which handles the details of the dynamics of the various parts of the problem, and some additional classes such as a Grid
class and a Diagnostic
class to handle various ancillary issues that commonly arise.
More Resources
- Official turboWAVE Repo
- TurboWAVE Documentation
- The current html turboPy documentation can be found here
- The preprint of the turboPy paper can be found here
turboPy Conda environment
- Create a conda environment for turboPy:
conda env create -f environment.yml
- Activate:
conda activate turbopy
- Install turboPy into the environment (from the main folder where setup.py is):
- Install turboPy in editable mode (i.e. setuptools "develop mode") if you are modifying turboPy itself:
pip install -e .
- If you just plan to develop a code using the existing turboPy framework:
pip install .
- Install turboPy in editable mode (i.e. setuptools "develop mode") if you are modifying turboPy itself:
- Run tests:
pytest
turboPy development environment
If using pylint
(which you should!) add variable-rgx=[a-z0-9_]{1,30}$
to your .pylintrc file to allow single character variable names.
Merge requests are encouraged!
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 turbopy-2020.8.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 609d154f2204323bfb68dca4a6a50d44e801c55c728b05ac9d91cbcc3216471b |
|
MD5 | 8a763f706df1c9b50865c970180cb062 |
|
BLAKE2b-256 | 033e8ebac222f3ad6d1615e8c2fa3e08a111a97352f85ded3cb6414891b4c3da |