Blog

Implicit Monte Carlo (1)

Implicit Monte Carlo (IMC) is a Monte Carlo method for solving the thermal radiation transport equation, published by Fleck and Cummings in 1971 , according to which:

The method is based upon the concept of effective scattering, wherein a fraction of the radiative energy absorbed is instantaneously and isotropically reradiated in a manner analogous to a scattering process.

This post gives a quick summary.

Not exponential?

I'm not sure if this is saying the observed growth at the time wasn't exponential (at all), or just that the doubling time was 'nowhere near' 7 days. Either way not sure I agree.

Setting up an Amazon EC2 instance LAMP stack

Script to set up a LAMP stack to run a PHP website from an Amazon EC2 instance:

The shallow water equations

The governing equations in geophysical fluid dynamics can be simplified somewhat if the horizontal length and velocity scales are much larger than the vertical length and velocity scales, respectively.

They are commonly used to describe both the ocean and atmosphere, as well as estuaries, rivers and channels.

According to Riddaway and Hortal, the set of coupled non-linear partial differential equations solved in numerical weather prediction (NWP) describe three important dynamical processses:

2. Diffusion

The first two are familiar to the non-meteorologist more used to working with the general equations of fluid motion. The third, adustment, is described as 'how the mass and wind fields adjust to one another'.

Fredholm integral equations and the resolvent kernel

Consider the inhomogeneous Fredholm integral equation:

$H \psi(\mu) = \lambda \int_a^b \sigma(\mu, \mu') \psi(\mu') d\mu' + S(\mu)$

The unknown to be solved for is $$\psi(\mu)$$ where $$a \le \mu \le b$$ is the independent variable, and the known function $$\sigma(\mu, \mu')$$ is known as the kernel. This is an inhomogeneous equation because the known function $$S(\mu) \ne 0$$.

Radiation pressure and the Stefan-Boltzmann law

In a previous post on Kirchhoff's law (1859) and black bodies , we saw that the energy density of thermal radiation is a function of temperature only. The first measurements of thermal radiation (from hot platinum wire) were made by Tyndall, and from his results Stefan concluded, in 1879, that the energy radiated went as the fourth power of the absolute temperature. This empirical relationship was later theoretically determined, for black bodies, by Boltzmann in 1884. The law that bears both their names is:

$R_B = \sigma T^4$

and $$\sigma$$ is known as the Stefan-Boltzmann constant, and $$R_B$$ is the emissive power, the radiant power emitted per unit area.

Thermal radiation, Kirchhoff's law, and black bodies

All matter continuously emits electromagnetic radiation as a consequence of its temperature. This radiation is called thermal radiation or heat radiation (although of course it isn't intrinsically different from electromagnetic radiation generated by any other means). Thermal radiation is what makes thermal imaging possible, and why hot embers glow, etc. From our everyday experience and from experimentation we can see that both the wavelength and intensity of radiation emitted depend in some way on the temperature of the matter.

CUDA basics part 2

Recently, I posted a basic introduction to CUDA C for programming GPUs, which showed how to do a vector addition. This illustrated some of the CUDA basic syntax, but it wasn't a complex-enough example to bring to light some of the trickier issues to do with designing algorithms carefully to minimise data movement. Here we move on to the more complicated algorithm for matrix multiplication, C = AB, where we'll see that elements of the matrices get used multiple times, so we'll want to put them in the shared memory to minimise the number of times they get retrieved from the much slower global (or device) memory. We'll also see that, because data that a thread puts into shared memory is only accessible by the other threads in the same thread block, we need to be careful how we do this.