Compton scatter
Compton Scatter
Below is a program that will calculate the scattering energy of a photon based off of the initial energy and the scattering angle. It also calculates the microscopic cross section of a particular atom with Z number of electrons
REQUIRE "system.a4l"; REQUIRE "atoms.a4l"; MODEL ComptonScatterEnergyvsAngle; theta IS_A angle; (*Degrees in Radians*) Escat IS_A energy; (*Scattering Energy*) E IS_A energy; (*Incident Energy (MeV)*) ERM IS_A energy; (*Electron Rest Mass Energy (MeV*) degree IS_A solver_var; (*Scattering Angle (degrees) *) convert: theta = degree * 1{PI} / 180.; Escat = E/(1 + (E/ERM)*(1 - cos(theta))); METHODS METHOD on_load; RUN values; RUN specify; END on_load; METHOD values; E := 1.0 {MeV}; ERM := 0.511 {MeV}; degree := 1; END values; METHOD specify; FIX E, ERM, degree; END specify; END ComptonScatterEnergyvsAngle; MODEL ComptonScatterEnergyvsCrosssection; E IS_A solver_var; Z IS_A solver_var; Lambda IS_A solver_var; Re IS_A solver_var; Xsection IS_A solver_var; ERM IS_A solver_var; calculate: Lambda = ERM/E; Xsection = 1{PI} * Z * Re^2 * Lambda*((1 - 2*Lambda - 2*Lambda^2 )*ln(1 + 2/Lambda) + 2*(1 + 9*Lambda + 8*Lambda^2 + 2*Lambda^3)/(Lambda+2)^2); METHODS METHOD on_load; RUN values; RUN specify; END on_load; METHOD values; E := 0.01; Z := 207.0; Re := 2.8179e-13; ERM := .511; END values; METHOD specify; FIX E, Z, Re, ERM; END specify; END ComptonScatterEnergyvsCrosssection;
This is a very basic model that can be improved in many ways. One of the ways would be to use specific variables instead of the general solver_var. Another would be to make the degree variable automatically convert to radians instead of having to manually convert it. The actually calculation is correct however. One bug that I am having is making the cross section calculation refresh when I change a parameter, as of now I have to change in manually in the code, any bug fixes are welcome.
Note: The cross section calculation yields results in cm^2, not barns. These two models fail when the photon energy approaches the binding energy of the atom.
References
Kenneth, J., and Richard E. Fundamentals of nuclear science and engineering. 2nd. CRC, 2008. 179. Print.