Simulate how gamma photons convert to electric energy through quantum dot interactions (via photoelectric effect or Compton scattering).
Results: Absorbed Fraction: 0, Usable Energy: 0 keV, Electric Current: 0 mA, Efficiency: 0%
This web application simulates the conversion of gamma photons into electric energy using quantum dot materials through the photoelectric effect and Compton scattering.
The interface is built with HTML5, Bootstrap 5.3, and Chart.js for dynamic graph plotting and real-time simulation updates.
The webpage is structured into a single interface where users select a material, adjust its thickness, and modify the photon energy. Results are displayed in real-time, including absorbed energy, electric current, and conversion efficiency.
JavaScript functions handle the simulation's calculations and graph updates, providing real-time feedback based on user input.
The HTML file begins with the usual <!DOCTYPE html>
declaration. The body contains a <div>
with the class container
that centers the main content. It includes a material selector, photon energy, and thickness input, followed by a results box and graph container.
The main logic lies in the updateSimulation()
function, which calculates the absorbed fraction of photon energy and its conversion into electric energy.
updateSimulation()
: This function computes the energy absorbed by quantum dot material based on its thickness and photon energy, estimates the electric current generated, and updates the results dynamically.updateChart()
: Updates the bar chart displaying absorbed energy and usable energy.1 - Math.exp(-attenuationCoeff * thickness / 10)
energyAbsorbed * 0.35
(Assuming 35% conversion efficiency)(usableEnergy * 1.6e-19 * 1e9)
mA.Below is the main HTML code for the Gamma-Photon to Electric Energy Conversion project. Feel free to scroll and explore the code structure!
To run the simulation:
No additional dependencies are required, as Bootstrap and Chart.js are loaded from a CDN.