Compton scatter: Difference between revisions
Jump to navigation
Jump to search
Created page with '== 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. <source lang="a4c"> REQ…' |
|||
| Line 11: | Line 11: | ||
Escat IS_A solver_var; (*Scattering Energy*) | Escat IS_A solver_var; (*Scattering Energy*) | ||
E IS_A solver_var; (*Incident Energy (MeV)*) | E IS_A solver_var; (*Incident Energy (MeV)*) | ||
ERM IS_A solver_var; (*Electron Rest Mass Energy (MeV*) | ERM IS_A solver_var; (*Electron Rest Mass Energy (MeV)*) | ||
degree IS_A solver_var; (*Scattering Angle (degrees) *) | degree IS_A solver_var; (*Scattering Angle (degrees) *) | ||
| Line 36: | Line 36: | ||
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. | 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. | ||
== References == | == References == | ||
Kenneth, J., and Richard E. Fundamentals of nuclear science and engineering. 2nd. CRC, 2008. 179. Print. | Kenneth, J., and Richard E. Fundamentals of nuclear science and engineering. 2nd. CRC, 2008. 179. Print. | ||
Revision as of 23:05, 3 April 2011
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.
REQUIRE "system.a4l"; REQUIRE "atoms.a4l"; MODEL ComptonScatter; theta IS_A angle; (*Degrees in Radians*) Escat IS_A solver_var; (*Scattering Energy*) E IS_A solver_var; (*Incident Energy (MeV)*) ERM IS_A solver_var; (*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; ERM := 0.511; degree := 1; END values; METHOD specify; FIX E, ERM, degree; END specify; END ComptonScatter;
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.
References
Kenneth, J., and Richard E. Fundamentals of nuclear science and engineering. 2nd. CRC, 2008. 179. Print.