This project simulates neutron transport and nuclear fission processes using a Monte Carlo method. The simulation tracks neutron movements, interactions, and fission events within a defined geometry and material.
- Installation
- Usage
- Classes and Functions
- Simulation Parameters
- Plotting and Analysis
- Contributing
- License
To run this project, you need Python 3 and the following packages:
- numpy
- matplotlib
- scipy
- pandas
- seaborn
- scikit-learn
You can install the required packages using pip:
pip install numpy matplotlib scipy pandas seaborn scikit-learnTo run the simulation, execute the nuclear_fission_simulation.py file:
python nuclear_fission_simulation.pyThis document provides a mathematical explanation of the nuclear fission simulation using Monte Carlo methods.
The Watt spectrum describes the distribution of neutron energies emitted during fission:
The cross-section data for each isotope is interpolated using cubic splines:
Neutrons scatter isotropically according to Maxwell-Boltzmann distribution:
The Monte Carlo simulation progresses through several steps:
- Initialization of neutrons and materials.
- Transport simulation using random walk.
- Interaction determination (fission, absorption, or scattering).
- Temperature evolution and energy deposition calculations.
- Criticality analysis based on neutron flux and reaction rates.
Generates synthetic cross-section data for different isotopes.
Represents an isotope with its properties and cross-section data.
Represents a neutron with its position, direction, and energy.
Represents a material composed of different isotopes and manages its temperature and density.
Defines a spherical shell geometry for the simulation space.
Handles the neutron transport, interactions, and fission processes.
initialize_neutrons(num_neutrons): Initializes neutrons in the geometry.simulate_transport(time_step): Simulates neutron transport and interactions for a given time step.criticality_analysis(total_time, initial_time_step): Analyzes the system for criticality over a given total time.spatial_reaction_distribution(): Returns the spatial distribution of fission events.plot_results(model): Plots the results of the simulation, including reaction rates, fission event locations, neutron energy distribution, and temperature evolution.analyze_results(model): Analyzes the results of the simulation, including clustering of fission events, neutron lifecycle analysis, and reactivity calculation.monte_carlo_simulation(num_neutrons, material, geometry, total_time, initial_time_step): Runs the Monte Carlo simulation with the specified parameters.
num_neutrons: Initial number of neutrons.material: Material object containing isotopes and temperature.geometry: Geometry object defining the simulation space.total_time: Total time for the simulation.initial_time_step: Initial time step for the simulation.
The simulation results are visualized and analyzed through various plots and statistical methods:
- Reaction Rate Plot: Shows the reaction rate over time.
- 3D Fission Events Plot: Displays the locations and temperatures of fission events.
- Neutron Energy Distribution: Histogram of neutron energies.
- Temperature Evolution: Tracks the temperature changes over time.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.