Note: This project is currently under development and solves the Boltzmann equation with energy–spatial coupling under the Continuous Slowing Down (CSD) approximation. To achieve the software’s ultimate objectives, I am now focusing on adding the Fokker–Planck scattering term.
BFP provides a solver for Boltzman Fokker-Plank charged-particle transport problems, seamlessly integrating with: PyMFEM: Python wrapper for MFEM library, supporting FEM simulations. PyGLVis. Interactive visualization tool for finite element methods, designed especially for Jupyter notebooks.
This package simplifies setup and visualization of BFP simulations, designed specifically for Charged Particle Transport Problems.
git clone https://github.com/melekderman/BFP.git
cd BFP
We recommend using an environment.
conda create -n BFP-env python==3.11
conda activate BFP-env
Install BFP along with dependencies using:
pip install .
In a Jupyter notebook:
GlVis_2D(mesh, solution)
or
GlVis_2D(mesh, solution)
After installation, run the provided tests to verify your setup.
cd tests/unit/
python test_coeff.py
python test_mesh.py
python test_prob.py
python test_coeff.py --parallel
python test_mesh.py --parallel
Run a selected problem input function with customizable parameters.
Available problems:
1: Infinite Medium: ψ = Q/σₜ
2: Exponential Attenuation: ψ(x) = ψₗ * exp(-σₜ * x / μ)
3: MMS - Linear in x: ψ = a + b * x
4: MMS - Linear in E: ψ = a + b * E
5: Mixed: ψ = a + b * xE
The following parameters can be provided:
nx (int): Number of cells in the x-direction (default: 10).
nE (int): Number of energy cells (default: 10).
N_ang (int): Number of angles for the SN method (default: 2).
iter_ (int): Maximum number of solver iterations (default: 1000).
tol (float): Solver tolerance (default: 1e-12).
p_level (int): Print level (1 for verbose, 0 for silent; default: 1).
Example usage:
python main.py -p 4 --nx 15 --nE 12
For more information about the modules, please visit the documentation. (The documentation page will be updated soon to include all functions.)
Contributions, bug reports, and feature requests are welcome! Please open an issue: https://github.com/melekderman/BFP/issues or submit a pull request: https://github.com/melekderman/BFP/pulls.
BFP is released under the BSD-3 Clause License. See LICENSE file for details.
This project is supported by the Center for Exascale Monte-Carlo Neutron Transport (CEMeNT), a PSAAP-III project funded by the Department of Energy (DOE), grant number: DE-NA003967.
📮 Contact
For any questions or further details, please contact:
📧 Melek Derman – dermanm@oregonstate.edu