MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

17
MCRT: L0 Some background, what previous courses students should look over, gentle introduction/recap of probabilities Get an idea of computer programming experience of the class Overview of course structure and assessment

Transcript of MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Page 1: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

MCRT: L0

•  Some background, what previous courses students should look over, gentle introduction/recap of probabilities

•  Get an idea of computer programming experience of the class

•  Overview of course structure and assessment

Page 2: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Monte Carlo Radiation Transport Kenny Wood

[email protected] •  A practical approach to the numerical simulation of

radiation transport •  Develop programs for the random walks of photons and

neutrons using Monte Carlo techniques •  Will refer to previous courses on optics, radiation,

neutrons, atomic physics, biological tissue structure, some hydrodynamics

•  Guest lectures in week 3 from Prof Steve Jacques (Oregon) on Monte Carlo radiation transfer in biological tissue and medical physics

Page 3: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Astrophysics Interpreting data via 3D radiation transfer modeling Heating of dust and gas, thermal pressure, radiation pressure Radiation-magneto-hydrodynamics

Page 4: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Dusty Ultra Compact H II Regions

Indebetouw, Whitney, Johnson, & Wood (2006)

ONE 3D model can explain ALL UCHII SEDs!!

Page 5: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Hierarchical Density Structure

Elmegreen (1997)

Fractal generating algorithm reproduces observed structure and fractal dimension, D, of clouds in interstellar medium 2D: P ~ AD/2 ; Circle: D =1 ISM clouds: D ~ 1.3 Radiation transfer in clouds…

Page 6: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Mathis, Whitney, & Wood (2002)

3D density: viewing angle effects

NGC 7023 Reflection Nebula Monte Carlo scattered light

Simulations of fractal clouds

Page 7: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Atmospheric Physics Clouds important for photon transport and temperature structure of atmosphere

Page 8: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Medical Physics Light activated treatments such as photodynamic therapy: how deep does the radiation penetrate into skin and tissue? Imaging using x-ray, ultraviolet, optical, infrared, & polarised light Optical tweezers, photo-acoustic imaging, nuclear medicine, etc, etc

Monte Carlo simulations of computed topography (CT) x-ray imaging doses Rensselaer Polytechnic Institute

Page 9: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Nuclear Physics & Neutron Transport Compute controlled criticality assemblies & geometries for nuclear fission reactors Nuclear safety – radioactive shielding calculations Uncontrolled reactions – critical masses for bombs

Chain reaction in 235U Chicago Pile 1, December 1942 World’s first artificial nuclear reactor

Page 10: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Course Structure •  Lectures on MCRT techniques and outline of

FORTRAN programs •  Computer lab sessions for what you’ll need in

FORTRAN and to develop a code for photon random walks in a uniform density sphere

•  Tutorial-style problems to do in groups •  No final exam, 100% continuous assessment:

–  40% for two homework sheets of written problems and short programs & subroutines

–  40% for one large project –  20% for one short project

Page 11: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Remind yourself of… •  Refractive index, Snell’s Law, Fresnel reflection &

refraction (PH1011 Waves & Optics) •  Polarization (PH3007 Electromagnetism & PH4035

Principles of Optics) •  Ionization potentials, atomic term diagrams PH4037

(Physics of Atoms) •  Equations of hydrodynamics, pressure & forces (PH4031

Fluids)

•  Probability theory: probability distribution function (PDF) and cumulative distribution function (CDF)

•  Numerical integration, Simpsons rule, quadrature

Page 12: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

•  Intensity, luminosity, flux, radiation pressure (many astronomy courses)

•  Biological tissue optics, skin structure, light-tissue interactions (PH5016 Biophotonics)

•  Neutron cross sections: scattering, absorption, fission •  Fission products, slow/fast & prompt/delayed neutrons •  Chain reactions, critical mass, moderators •  PH4022 or PH4040 (Nuclear & Particle Physics)

Page 13: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Programming in FORTRAN77

•  You’ll need: text editor; FORTRAN compiler (gfortran); graphics package for plotting lines, contours, 3D visualisation

•  By Monday create file called hello.f •  Compile it: gfortran hello.f •  Run the executable: ./a.out

program hello implicit none print *, ‘Hello’ stop end

Note six spaces before text starts on each line!

Page 14: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Buffon’s needles

What is the probability that a needle will cross a line?

Georges-Louis Leclerc Comte de Buffon

1707-1788

Page 15: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Needles of length l Line separation s x = distance from needle centre to closest line Needle touches/crosses line if Probability density function: function of a variable that gives

probability for variable to take a given value Exponential distribution: p(x) = e-x , for x in range 0 to infinity Uniform distribution: p(x) = 1/L , for x in range 0 to L Normalised over all x:

x ≤l2sinθ

p(x)dx0

∫ =1

s l

x θ

Page 16: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Probability x lies in range a < x < b is ratio of “areas under the curve” x is distributed uniformly between (0, s/2), θ in range (0, π/2)

p(x) = 2/s, p(θ) = 2/π Variables x and θ independent, so joint probability is

p(x, θ) = 4/(s π)

P =p(x)dx

a

b∫p(x)dx

0

Page 17: MCRT: L0 - ASTRONOMY GROUP – University of St Andrews

Probability of a needle touching a line (l < s) is Drop lots of needles. Probability of needle crossing line is Can estimate π :

P =4sπ0

l / 2 sinθ∫0

π / 2∫ dx dθ =

2 lsπ

P =Number of needles crossing linesTotal number of needles dropped

π =2 lsP