Helper package for the PaTriC particle tracking code.
Project description
README for PyPaTriC
This is a helper package for writing input decks for the particle tracking code known as PaTriC located at https://github.com/hafizmdyasir/PaTriC. Contents include classes.py, keys.py, deck_tools.py, electric.py, magnetic.py, units.py, and deck_tools.py.
classes.py
The classes.py file contains various classes that can be used as helpers for declaring the initial positions and velocities of particles, as well as some basic electric and magnetic field geometries. PaTriC ships with support for a few predefined options like uniformly placing particles, randomly distributing particles, among other things. These can be requested via the classes defined here.
For electric and magnetic fields, common classes like Static, SinField, GaussField, etc. are defined here while separate files exist for specific geometries like Coil, Dipole etc.
keys.py
The input deck is defined using four dictionaries, namely, Control, Particle, Fields, and Output. The keys used to define them are special and are stored in this file. This minimises errors and mitigates unexpected behaviour.
units.py
The units.py file contains various functions that can be used to convert between different units. Furthermore, a few helper constants to quickly convert length and time into micro, nano, and other units are also defined.
electric.py and magnetic.py
These two modules contain classes that are specifically for supplying pre-defined electric and magnetic fields to the simulation. They inherit a few common classes from classes.py.
deck_tools.py
This is the heart of the package and the user must always import everything from it using from codecat_pypatric.deck_tools import *. Refer to the documentation website for more information.
Usage
You can either download the package from its GitHub repository, or using pip. The syntax for the latter is pip install codecat_pypatric. For a detailed guide, refer to the documentation at https://www.github.com/hafizmdyasir/PaTriC.
Once installed, import everything from deck_tools.py to get started with the bare minimum. Creating the input deck is explained in the documentation for PaTriC. Optionally, you can import pypatric.units for some unit conversions and manipulations.
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 codecat_pypatric-1.0.tar.gz.
File metadata
- Download URL: codecat_pypatric-1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38c8b19595d07e02ed5d846b4dc852118282434589568dabeced1ff9906ac133
|
|
| MD5 |
80beab1038fadda084e268b60a6a1c55
|
|
| BLAKE2b-256 |
cac895e7c929e3f308acf2cf7952209596dc2b6eab15e8eb44825e509ba5798f
|
File details
Details for the file codecat_pypatric-1.0-py3-none-any.whl.
File metadata
- Download URL: codecat_pypatric-1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
117e8f1ff00d49146ed2a3629e137ba07b8e3020b3493670ba349504e0887a14
|
|
| MD5 |
b6f7aaa94ef7333254db3046da02d177
|
|
| BLAKE2b-256 |
5f4b7491a6135199ad038eb52efac49d1d077a592358cdd86622f541ef4236bf
|