Project

Monte Carlo Cloud Radiative-Transfer Simulation

A Monte Carlo photon-transport simulation for cloud radiative transfer, built as a student and later used to grade peers' implementations as a teaching assistant.

  • Python
  • NumPy
  • Jupyter

Light doesn’t travel through a cloud in a straight line — it scatters, bounces, and gets absorbed along a path no equation cleanly predicts. So you stop solving it in closed form and simulate it: send many photons through, one random walk at a time, and let the statistics answer. This was that simulation — first as a student, later as the TA grading other people’s versions.

Context

I built it for PHYS 220, UMBC’s intro computational physics course: a simple version for homework, a fuller one for the final project. The next term I was TA for the same course — grading a roomful of other implementations of it.

The problem

Radiative transfer through a scattering medium has no tidy analytic solution for realistic cases. You want physical quantities out — how much light is transmitted, reflected, absorbed — as a function of cloud thickness and absorption. Monte Carlo gets there without solving the equation: simulate enough photon histories and the aggregate behavior emerges.

Constraints

  • Correctness first — the sampling distributions, the scatter-versus- absorption bookkeeping, and the tallies had to be right before any result meant anything.
  • It’s stochastic — results converge only as you add photons, putting accuracy and runtime directly at odds.
  • Reproducible and legible — it had to run cleanly in a notebook and be readable enough to check the method, not just the output.

Approach

The model follows individual photons through an isotropic-scattering medium:

  • Free path between events sampled from the exponential distribution set by the medium’s optical depth.
  • At each interaction, decide scatter versus absorption; on a scatter, sample a new direction and continue.
  • Tally each photon’s fate — transmitted, reflected, or absorbed — and aggregate over many histories.

Written in Python with NumPy and Matplotlib in a Jupyter notebook.

Outcome

The simulation reproduced the expected behavior — transmittance and reflectance trading off as the cloud thickens — straight from photon statistics, no closed form required. Grading peers’ versions the next year taught me more about the method than writing my own: twenty different ways to build the same simulation, correct and not.