Skip to content

PlasmaFAIR/zdPlasmaPyCourse

 
 

Repository files navigation

zdPlasmaPy: Course Edition

ZDPlasmaPy is a flexible 0D global model for simulating low-temperature plasma chemistry, coupled with non-equilibrium electron energy distribution functions (EEDF).

This repository is a sanitized version designed for plasma physics simulation courses. It focuses on the validation of Argon kinetics against COMSOL Multiphysics reference data.

Overview

ZDPlasmaPy integrates an external electron Boltzmann equation solver (LoKI-B) with a highly extensible Python-based global model. It enables the calculation of species concentration, mean electron energy, and macroscopic discharge parameters over time within a unified gas-plasma framework.

This approach bridges user-defined complex plasma chemistry (via YAML) with rigorous kinetic electron energy distributions.

Key Features

  • Flexible Engine: Core global model is decoupled from chemistry definitions, easily editable in chemistry.yml.
  • Dynamic Coupling: Solves Maxwellian rates and directly maps them against live EEDF triggers, utilizing pre-computed lookup grids.
  • Robust Solver: Leverages SciPy's BDF stiff ODE routines to resolve multi-scale temporal stiffness.
  • Validation Case: Ships with a detailed Argon benchmarking case compared against COMSOL Multiphysics 6.3.

Code Architecture

zdPlasmaPy/
├── cases/              # Course benchmarks (comsolArgonEEDF)
├── docs/               # Theoretical and integration guides
├── scripts/            # Environment setup scripts
├── src/                # Core Python execution engine
└── main.py             # CLI runner

Getting Started

1. Prerequisites

The easiest way to run this project is via GitHub Codespaces. The provided .devcontainer configuration automatically installs all system dependencies, Python environments, and then build manually the external Boltzmann solver.

bash external/setup_loki_b.sh

If running locally, you need Python 3.10+, Git, and CMake.

2. Installation (Local)

# 1. System dependencies
sudo apt update && sudo apt install cmake g++ libeigen3-dev nlohmann-json3-dev

# 2. Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# 3. Build LoKI-B
bash external/setup_loki_b.sh

3. Running the Argon Case

Activate your environment and supply the path to the configuration file:

source .venv/bin/activate
python main.py cases/comsolArgonEEDF/calibration/config.yml

Results (data, matrices, and plots) are saved dynamically into the output/ directory of the case folder.

4. Running the EEDF Course Notebook

The EEDF sensitivity study notebook is located at:

cases/comsolArgonEEDF/eedf_physics_study/eedf_sensitivity.ipynb

To use it, simply open the notebook in VS Code or GitHub Codespaces and follow the instructions provided in the notebook cells. The notebook demonstrates how to run the EEDF solver and explore the effects of different physical parameters.

Data Input Requirements

  • config.yml: Initializes geometry, timestamps, EEDF grid ranges, and overarching physical settings.
  • chemistry.yml: Human-readable reaction mapping identifying species parameters and rate coefficients.

Documentation

  • Theory Guide: Outline of the plasma bulk coupled ODE implementation.
  • EEDF Integration: The bridging pipeline connecting ZDPlasmaPy to LoKI-B.

License

Disclaimer: This project was built as a flexible open-source wrapper. ZDPlasmaPy incorporates LoKI-B as an isolated component.


License Compatibility Notice

This project is licensed under the Apache License 2.0, including the wrapper to LoKI-B. LoKI-B is licensed under GPLv3 and not distributed via this repository. Please note that Apache 2.0 and GPLv3 are not fully compatible. If you distribute a combined work including LoKI-B, the terms of the GPLv3 will apply to the combined work.

For details, see:

About

A simple course for EEDF solvers, and global model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 67.7%
  • Python 31.7%
  • Other 0.6%