Skip to content

budjensen/test-particle-sim-1D

Repository files navigation

test-particle-sim-1D

A Monte Carlo test-particle simulator developed for APC 524 — designed to model charged-particle motion and collisions in prescribed electromagnetic fields, bridging between full Particle-in-Cell (PIC) and swarm Monte Carlo (MC) approaches.

Installation (with uv)

uv is a fast Python package/environment manager developed by Astral.

1. Install uv

If you don’t already have it:

curl -LsSf https://astral.sh/uv/install.sh | sh

Then restart your shell (or run source ~/.bashrc / source ~/.zshrc).

Check installation:

uv --version

2. Clone the repository

git clone https://github.com/your-username/test-particle-sim-1D.git
cd test-particle-sim-1D

3. Create and sync environment

uv sync

This installs all dependencies defined in pyproject.toml.

To activate the environment:

uv run python

or for any command:

uv run <command>

Example:

uv run pytest -v

Development Tools

Run linters and formatters

uv run pre-commit run --all-files

The pre-commit hooks include:

  • ruff for linting and formatting
  • nbstripout for cleaning notebooks
  • Basic style checks (whitespace, merge conflicts, etc.)

Run tests

uv run pytest -v

About

Test particle simulator for APC 524

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages