CharmKiT is a benchmarking suite for the CharmNet project, providing automated parameter studies and test case management for the KiT-RT PDE simulator. It enables reproducible runs of radiative transfer test cases such as the lattice and hohlraum setups, using Python scripts to manage parameter sweeps, configuration, and result collection. CharmKiT supports both high-performance computing (HPC) and local (no-HPC) execution modes, leveraging Singularity containers for reproducibility.
Preliminaries:
-
Install Singularity on your system.
-
Clone the
CharmKiTGithub repository:git clone git@github.com:ScSteffen/CharmKiT.git -
Create a local Python environment and install requirements:
python3 -m venv ./venv source venv/bin/activate pip install -r requirements.txt -
Install KiT-RT as a submodule using the provided installer. (Requires root for container build.)
sh install_KiT-RT.shIf updating KiT-RT:
sh update_KiT-RT.shIf on a cluster without root, build the container locally and upload it to
CharmKiT/KiT-RT/tools/singularity/.
CharmKiT automates the setup, execution, and result collection for radiative transfer test cases using the KiT-RT solver. The workflow is managed by Python scripts (e.g., run_hohlraum.py, run_lattice.py) that:
- Define parameter sweeps for each test case (e.g., mesh size, quadrature order, absorption/scattering coefficients).
- Generate the necessary configuration files for KiT-RT.
- Run the KiT-RT solver inside a Singularity container for each parameter combination.
- Collect and save the results (e.g., quantities of interest) as
.npzfiles for further analysis.
Scripts support both HPC (SLURM) and local (no-HPC) execution.
CharmKiT provides Python scripts for each test case. These scripts can be run in two modes:
- HPC mode: Submits jobs to a SLURM cluster (using
--hpcflag). - No-HPC (local) mode: Runs all simulations sequentially on your local machine (default).
- Activate your Python environment:
source venv/bin/activate - Run the script:
This will execute all parameter combinations locally, running KiT-RT inside the Singularity container for each case. Results are saved as
python run_hohlraum.py --no-hpc.npzfiles in the working directory.
- Activate your Python environment:
source venv/bin/activate - Run the script:
python run_lattice.py --no-hpc
Both scripts support various command-line arguments:
--no-hpc: Run locally (default is HPC SLURM execution - requires SLURM setup).--no-singularity: Don't use the Singularity container (default: enabled).--load-from-npz: Loads design and grid parameters from npz file instead of using the presets in the run scripts.
The lattice test case models an isotropic radiative source at the center of a 2D domain, surrounded by a periodic arrangement of blue, red, and white squares. Each color represents a different material with specific absorption, scattering, and source properties:

| Region | Absorption | Scattering | Source |
|---|---|---|---|
| Blue | 10 | 0 | 0 |
| Red | 0 | 1 | 1 |
| White | 0 | 1 | 0 |
The main design parameters are:
- Number of grid points per square side
- Quadrature order (velocity space)
- Absorption in blue squares
- Scattering in white squares
The script run_lattice.py automates parameter sweeps over these variables, generating KiT-RT config files and collecting results. Quantities of interest include outflow and absorption metrics, as well as wall time. The mesh and configuration can be customized via script arguments.
See benchmarks/lattice/ for config templates and mesh files.
The hohlraum test case simulates radiative transfer in a symmetric 2D cavity (hohlraum) with specified boundary conditions and material properties. The setup is designed to study energy transport and absorption in a geometry relevant to inertial confinement fusion and high-energy density physics.
Key features:
- Central cavity with reflecting and absorbing boundaries
- Parameter sweep over mesh resolution and quadrature order
- Quantities of interest: outflow, absorption, and time-resolved metrics
The script run_hohlraum.py manages the parameter study, config generation, and result collection. All runs are executed via the Singularity-encapsulated KiT-RT solver.
See benchmarks/hohlraum/ for config templates and mesh files.
For more details on the scientific background and test case motivation, see the accompanying paper and the documentation in documentation/.
If you use CharmKiT or the provided benchmarks in your research, please cite:
@misc{schotthöfer2025referencesolutionslinearradiation,
title={Reference solutions for linear radiation transport: the Hohlraum and Lattice benchmarks},
author={Steffen Schotthöfer and Cory Hauck},
year={2025},
eprint={2505.17284},
archivePrefix={arXiv},
primaryClass={physics.comp-ph},
url={https://arxiv.org/abs/2505.17284},
}