Magnetic saturation: educated guessing

In finite-element solutions at low magnetic fields, the properties of ferromagnetic materials are not critically important. The quantity used in the solutions is γ= 1/μr. In this case, both 1/800 and 1/8000 are close to zero compared to unity; therefore, the details of the μr(B) curve make little difference in the solution. On the other hand, the variation of relative permeability may be quite important at high field levels where the materials are driven into saturation. Unfortunately, the available data in tabulations of μr(B) are generally the iverse of what we need: there is extensive information at low B but most tabulations end well below the saturation region. The subject of this article is how to guess μr(B) at high field levels from the low-field behavior. Sounds impossible, but its actually easy thanks to two factors:

• Magnetic saturation occurs smoothly (i.e., there are no abrupt changes).
• We know the variation at extremely high fields.

The key is choosing a good method to plot the data.

First, some background. The typical measurement setup is a torus of material with a drive coil winding. The quantity H (in A/m) is the magnetic field produced by the coil in the absence of the material. A useful quantity is B0 = μ0*H (in Tesla), the magnetic flux density produced by the coil inside the torus with no material. The quantity B is the total flux density in the torus with the material present. In this case, alignment of atomic currents adds to the field value so that B > B0. In a soft magnetic material (i.e., no permanent magnetization), both B0 and B equal zero when there is no drive current. The alignment of magnetic domains increases as the drive current increases; therefore, B grows faster than B0. The relative magnetic permeability is defined as μr = B/B0. At high values of drive current, all the material domains have been aligned. In this state, the material makes a maximum contribution to the total flux density of Bs (the saturation flux density). This contribution does not change with higher drive current. For high values of B0, the total flux density is approximated by

B ≅ B0 + Bs.  (1)

To illustrate the estimation procedure, we’ll consider the specific example of Magnifer 50 RG, a nickle alloy with a high value of Bs. Figure 1 shows a graph from a data sheet supplied by VDM Metals. The sheet lists the saturation flux density as Bs = 1.55 T. The plot shows B (in mT) versus H (mA/cm) at several frequencies. Because we are interested in the static properties, we’ll consider only curve 1. The data extend to a peak value of H = 200 A/m. At this point, μr > 1000, so that the material is well below saturation. I have an application where the material is driven well into to saturation by applied fields up to H = 5000 A/m, about 400 times the highest known value! Is it possible to make calculations with confidence?

Figure 1. Data from VDM Metals on Magnifer 50 RG, B versus H.

The first step is convert the graphics data to a number set. The FP Universal Scale is the ideal tool for this task. After setting the correct log scales, I could record a set of points with simple mouse clicks, including the conversion factors to create a list of B versus B0 in units of Tesla. In this case, the relative magnetic permeability is the ratio μr = B/B0.

The key to estimating the missing values is to create plots of the material behavior at the two extremes: the tabulated values at low B0 and predictions from Eq. 1 at high B0. To ensure the validity of Eq. 1, I picked B0 values corresponding to highly saturated material: 0.1, 0.2 and 0.5 T. The art is picking the right type of plot. Figure 2 shows B versus B0 with log-log scales. With the requirement of a smooth variation, clearly the unknown values must lie close to the dashed red line connecting the data extremes. Accordingly, I used the Universal Scale to find several points along the line. I combined the interpolated values with the low field tabulated values and the high-field predictions to build a data set that spans the complete range of behavior for Magnifer 50. The new data are available on our magnetic materials page.

Figure 2. Plot of B versus B0 for Magnifer 50 showing values at high and low field with a proposed interpolation (dashed red line).

Finally, Figure 3 shows alternate plots to Fig. 2: B0 versus μr and B versus μr. In all cases, the variation over the unknown saturation region is well approximated by a simple straight-line fit.

Figure 3. Alternative plots and interpolations for Magnifer 50 RG: B0 and B versus relative magnetic permeability.

Footnotes

Many processes represented by GamBet, such as the emission of bremsstrahlung photons and Compton electrons, involve interactions with atomic electrons. Particle emission may also follow from reactions within nucleii. Although GamBet does not address nuclear physics, the program can determine the histories of particles created by nuclear events. There are two types of processes: nuclear reactions and radioactivity. A nuclear reaction is a response to specific event, like fission following absorption of a neutron. On the other hand, radioactive events occur spontaneously at random times. Some nucleii are inherently unstable but in a state of local equilibrium. A transition can occur through quantum tunneling, a random process. For X-ray applications, we will limit attention to radioactivity. To begin, we’ll review some nomenclature and characteristics of sources. The second part of the article deals with specific GamBet strategies.

Four types of particles may be generated in radioactive events:

• Fast electrons and positrons (beta rays)
• Photons (gamma rays)
• Heavy charged particles (protons, alpha rays,…)
• Neutrons.

This article deals with first two types. Radioactive sources of beta and gamma rays have extensive applications in areas such as medical treatments, food irradiation and detector calibration.

The activity of a radioactive source is determined by law of radioactive decay (Eq, 1). In the equation, the quantity N equals the total number of nucleii in the source. The left-hand side is the number of nucleii that decay per second. The quantity λ (with units of 1/s) is the decay constant. It depends on the energy state and quantum barrier of the nucleus. Accordingly, sources exhibit huge variations of λ. The historical units of activity for a source is the curie (Ci). One curie equals 3.7 × 10^10 decays/s (approximately equal the activity of 1 gram of Ra226. The modern standard unit is the becquerel (Bq) equal to 1 decay/s (1 Bq = 2.703 × 10^-11 Ci).

We can also interpret the decay constant in terms of a single nucleus. The probability that a nucleus has not decayed after a time t is given by Eq. 2. The average lifetime (the mean of the distribution) is 1/λ. The halflife is another useful quantity. It equals the time for half of the nucleii present in a source at t = 0.0 to decay. Equation 2 leads to the expression for the halflife of Eq. 3.

In comparison to particle accelerators, the main advantage of radioactive isotopes as sources is that they do not require power input and expensive ancillary equipment (e.g., power supplies, vacuum systems,…). Many isotopes are produced by exposure in a nuclear reactor and may be relatively inexpensive when reactors are available. The disadvantages of radioactive sources are that they run continuously and produce a broad energy spectrum of electrons and positrons.

The most important nuclear processes for the production of beta and gamma rays are beta decay and electron capture. Figure 1  shows the atomic mass of the most stable isotopes as a function of atomic number Z. Isotopes above the line have an excess of neutrons — their usual route toward stability is to emit a β- particle (electron), converting a neutron to a proton while preserving the number of nucleons. In other words, the nucleus changes its isotopic identity while preserving its isomer identity. Similarly, isotopes with an excess of protons emit β+ particles (positrons). Both forms of nuclear transformations are called beta decay.

Figure 1. Atomic weight of the most stable isotopes as a function of atomic number Z. The dashed line shows the mass for equal numbers of neutrons and protons.

First, consider β- emission. There are two isotopes commonly used in research and industry: Cs137 and Co60. Nuclear processes are commonly illustrated with energy-level diagrams — Fig. 2a shows the decay scheme for Cs137. The horizontal axis represents isomer identity and the vertical axis shows energy levels. Dark lines indicate a nucleus in the ground state and light lines designate an excited state. The arrows indicate the directions of transformations. The starting point is the ground state of Cs137. The figure 30.17 years is the half-life for decay. Decay events of type ß- convert the nucleus to the more stable isomer, Ba137. The arrows indicate that there are two decay paths. In 94.6% of the decays, the emission process carries off 0.512 MeV (shared between the emitted electron and an anti-neutrino) and leaves the Ba137 nucleus in an excited state. The state decays with a half-life of 2.55 minutes, resulting in emission of a 0.662 MeV gamma ray. In 5.4% of the events, the ß- particle and antineutrino carry of 1.174 MeV and leaving the product nucleus in the ground state.

Figure 2. Energy level diagrams for the radioactive decay of Cs137 and Na22.

The emission process does not produce a single ß- particle of energy 0.512 or 1.174 MeV, but rather a broad spectrum of electrons with kinetic energy spread between zero and the maximum. The reason is the condition of conservation of spin. Nucleii have spin values an integer multiple of h/2π while electrons have spin ½(h/2π). For balance, an additional particle is required with half-integer spin. In his theory of beta decay, Fermi postulated the existence of neutrinos and antineutrinos, neutral particles with spin ½(h/2π) and very small mass, thereby almost undetectable. In a ß- decay, the available energy is partitioned between the electron, the nucleus and an antineutrino. The theory to determine the spectrum is complex — all ß- decays give rise to a spectrum similar to that of Fig. 3. The spectrum is skewed toward lower energy by the effect of Coulomb attraction as the electron escapes from the nucleus. Generally, Cs137 is used as a a source of 0.662 gamma rays because the ß- particles are preferentially absorbed by the source and surrounding structure and the antineutrinos pass away with no effect.

Figure 3. Distribution of electron energy for the radioactive decay of C14.

We next consider proton-rich isotopes that approach the stability line through emission of positrons. The mechanism is similar to ß- emission with the exceptions that a neutrino is emitted and the positron emission spectrum shifted toward higher energies because of Coulomb force repulsion from nucleus. Figure 2b shows the energy-level diagram for Na22, a positron emitter. The halflife for all decay processes is 2.60 years. There are several decay pathways. The most likely event (90.33% probability) is that a proton changes to a neutron by emission of a positron, leaving the product isotope Ne22 in an excited state. A gamma ray of energy 1.275 MeV is released almost immediately as the nucleus relaxes to the ground state. In this case, the maximum positron energy is 0.545 MeV. In rare instances, a positron with energy ≤1.82 MeV is released, leaving the product nucleus in the ground state. A third process that may occur is electron capture. In 9.62% of the decays, an inner orbital electron is captured by the nucleus, again resulting in the conversion of a proton to a neutron. The Ne22 nucleus is left in the same excited state as with ß+ emission, again followed by the release of a 1.27 MeV γ. The difference from ß+ decay is that no positron or neutrino is emitted. Electron capture leaves a vacancy in the K or L shell of the electron cloud, so characteristic X-rays are also emitted as the atom relaxes.

This table lists useful commercial radioactive sources of electrons, photons and positrons. A common feature is a halflife of one to a few years. For isotopes with lower values, it would be necessary to produce and use them quickly. A long half life means reduced activity.

We’ll now turn to GamBet modeling techniques, in particular how to create a particle input file to represent a radioactive source. There are some challenges:

• Particles are emitted over an extended spatial region, the volume of the source.
• Electrons and positrons have a broad energy distributions.
• Often, we want to normalize particle flux to represent a specific source activity.

Particle file creation is greatly facilitated through the use of statistical codes like R (Link to a comprehensive short course with examples on using R with GamBet).

Dealing with the finite source size is relatively easy. If the activity is uniform over the source volume, then the probability density for emission is uniform over the volume. As an example, consider a cylindrical source of length L and radius R. Given a routine that creates a random variable ξ in the range 0 ≤ ξ ≤ 1.0, then values of the z coordinate (along the cylinder axis) are assigned according to Eq. 4. We can use the rejection method to determine coordinates in the x-y plane. We assign coordinates by Eqs. 5 and 6 and keep only instances that satisfy Eq. 7.

With regard to energy distributions, photons from sources like Cs137 and Na22 are essentially monoenergetic. In contrast, the β particles have an energy distribution like that of Fig. 3. In principle, thin films could be used as sources of electrons or positrons. In this case, it would be necessary to represent the spectrum and to determine the effect of energy loss in the film The spectral shape and endpoint energy vary with the type of isotope. Chapter 10 of the reference Using R for GamBet Statistical Analysis discusses methods for creating arbitrary distributions. In practice, an exact model may not be necessary and the data may not even be available. In applications such as estimating shield effectiveness, it may be sufficient to model the β decay spectrum with a simple function like that of Eq. 8. In the equation, Emax is the maximum β energy. Taking the integral gives the cumulative probability distribution (i.e., the probability that a β has energy less than or equal to E) of Eq. 9. Values of P(E) range from 0.0 to 1.0. We can obtain the desired distribution by assigning energy from a random-uniform variable ξ using Eq. 10, the inverse of Eq. 9. Figure 4 shows the result with 10,000 particles having endpoint energy Emax = 0.512 MeV.

Figure 4. Generation of the spectrum of Eq. 8 with 10,000 particles using assignment from Eq. 10.

To conclude, we’ll address how to create a GamBet source file to represent a given source activity. We’ll follow a specific example — a Co60 source with activity 10 Ci. This figure corresponds to a disintegration rate of Rd = 3.7 × 10^11 1/s. Figure 5 shows an energy level diagram. The isotope decays through β- decay with a halflife of 5.27 years. Almost all events result in a excited state of the Ni60 nucleus that relaxes to the stable ground state by almost instantaneous emission of γ rays of energy 1.17 and 1.33 MeV. A source assembly typically consists of the source combined with shielding and collimators to create a directional photon flux. A goal of a calculation could be to compare radiation fluxes in the forward and reverse directions.

Figure 5. Energy level diagram for the radioactive decay of Co60.

We specify Np = 1000 model emission points uniformly distributed over the source volume using techniques like those discussed previously. At each emission point, we generate Ng = 500 photons of energy 1.17 MeV and Ng photons of energy 1.33 MeV. The photons are randomly distributed over 4π steradians of solid angle. Equations 11 and 12 can be used to pick the azimuthal and polar angles. In the continuous-beam mode of GamBet, each photon in the file should be assigned a flux value given by Eq. 12. In this case, GamBet gives absolute values of particle flux through and deposited dose in structure surrounding the source assembly. Note that this case is relatively simple because almost all events follow the same decay path. In the case of Cs137 (Fig. 2a), we need to multiply Rd by 0.946 to get the correct absolute flux of 0.617 MeV γ rays.

The procedure as described may be inefficient to calculate forward photon flux or shielding leakage because most of the model particles would not contribute. A simple variance reduction technique is to limit the range of solid angle dΩ so that photons are preferentially directed toward the measure point. The solid angle should be large enough to include the possibility of scattering from the shield or collimator. To properly normalize the calculation, the photon flux values should be adjusted by a factor dΩ/4π.

Footnotes

[1] Use this link for a copy of the full report in PDF format: Modeling radioactive sources with GamBet.

Particle transport C: Monte Carlo methods versus moment equations

This is the concluding of three articles introducing the basic concepts of the Monte Carlo method for radiation transport calculations. The demonstration calculations discussed in the previous articles give a basis for comparing the relative benefits and drawbacks of the Monte Carlo and transport equation approaches. We have seen that both strategies are based on averages over random distributions of particles whose statistical properties are known. Both methods give the same result in the limit of a large number of model particles. The main difference is that the averaging process is performed at the beginning of the transport equation calculation but at the end of the Monte Carlo solution.

• In the transport equation approach to the two-dimensional random walk, the idea is to seek average quantities n or J and to find relationships between them (like Fick’s first and second laws). These relationships are accurate when there are large numbers of particles. To illustrate the meaning of large, note that the number of electrons in one cubic micrometer of aluminum equals 3 × 10^15. When averages are taken over such large numbers, the transport equations are effectively deterministic.
• In the Monte Carlo method, the idea is to follow individual particles based on a knowledge of their interaction mechanisms. A practical computer simulation may involve millions of model particles, orders of magnitude below the actual particle number. Therefore, each model particle represents the average behavior of a large group of actual particles. In contrast to transport equations, the accuracy of Monte Carlo calculations is dominated by statistic variations.

An additional benefit of transport equations is that they often have closed-form solutions that lead to scaling relationships like Eq. 22 of the previous article. We could extract an approximation to the relationship from Monte Carlo results, although at the expense of some labor.

Despite the apparently favorable features of the transport equations, Monte Carlo is the primary tool for electron/photon transport. Let’s understand why. One advantage is apparent comparing the relative effort in the demonstration solutions — the Monte Carlo calculation is much easier to understand. A clear definition of physical properties of particle collisions was combined with a few simple rules. The only derivation required was that for the mean free path. The entire physical model was contained in a few lines of code. In contrast, the transport model required considerable insight and the derivation of several equations. In addition, it was necessary to introduce additional results like the divergence theorem. Most of us feel more comfortable staying close to the physics with a minimum of intervening mathematical constructions. This attitude represents good strategy, not laziness. Less abstraction means less chance for error. A computer calculation that closely adheres to the physics is called a simulation. Program managers and funding agents have a warm feeling for simulations.

Beyond the emotional appeal, there is an over-riding practical reason to apply Monte Carlo to electron/photon transport in matter. Transport equations become untenable when the interaction physics becomes complex. For example, consider the following scenario for a demonstration calculation:

In 20% of collisions, a particle splits into two particles with velocity 0.5v0 and 0.2v0. The two particles are emitted at a random angles separated by 60°. Each secondary particle has its own cross section for interaction with the background obstacles.

It would be relatively easy to modify the code of the first article to represent this history and even more complex ones. On the other hand, it would be require consider effort and theoretical insight to modify a transport equation. As a second example, suppose the medium were not uniform but had inclusions with different cross sections and with dimensions less than λ. In this case, the derivation of Fick’s first law is invalid. A much more complex relationship would be needed. Again, it would relatively simple to incorporate such a change in a Monte Carlo model. Although these scenarios may sound arbitrary, they are precisely the type of processes that occur in electron/photon showers.

In summary, the goal in collective physics is to describe behavior of huge numbers of particles. We have discussed two approaches:

• Monte Carlo method. Define a large but reasonable set of model particles, where each model particle represents the behavior of a group of real particles with similar properties. Propagate the model particles as single particles using known physics and probabilities of interactions. Then, take averages to infer the group behavior.
• Transport equation method. Define macroscopic quantities, averages over particle distributions. Derive and solve differential equations that describe the behavior of the macroscopic quantities.

The choice of method depends on the nature of the particles and their interaction mechanisms. Often, practical calculations usually use a combination of the two approaches. For example, consider the three types of calculations required for the design of X-ray devices (supported in our Xenos package):

• Radiation transport in matter. Photons may be treated with the Monte Carlo technique, but mixed methods are necessary for electrons and positrons. In addition to discrete events (hard interactions) like Compton scattering, energetic electrons in matter undergo small angle scattering and energy loss with a vast number of background electrons (soft interactions). It would be impossible to model each interaction individually. Instead, averages based on transport calculations are used.
• Heat transfer. Here, particles are the energy transferred from one atom to an adjacent one. Because the interaction model is simple and the mean-free-path is extremely small, transport equations are clearly the best choice.
• Electric and magnetic fields. The standard approach is through the Maxwell equations. They are transport type equations, derived by taking averages over a large number of charges. On the other other hand, we employ Monte-Carlo-type methods to treat contributions to fields from high-current electron beams.

Footnotes

[1] Use this link for a copy of the full report in PDF format: Monte Carlo method report.

Particle transport B: Monte Carlo methods versus moment equations

This is the second of three articles introducing the basic concepts of the Monte Carlo method for radiation transport calculations. In this article, we’ll consider an alternative to the Monte Carlo treatment of the two-dimensional random walk: the derivation and solution of a transport equation. Here, we define an appropriate quantity averaged over a random distribution of particles and seek a differential equation that describes how the quantity varies. For this calculation, the quantity is the average density of particles n(x,y,t) in the plane with units of number/m^2. The quantity is plotted in Fig. 1 (this figure also appeared in the preceding article). To make a direct comparison with the Monte Carlo results, we must carefully set model constraints:

• Although the density may vary in space, the distribution of particle velocities is the same at all points. Particles all have constant speed v0 and there is an isotropic distribution of direction vectors.
• There is a uniform-random background density of scattering objects.
• Equation 8 of the previous article gives the probability distribution of a (the distance particles travel between collisions) in terms of the mean-free-path λ.

Figure 1. Particle density as a function of radius (distance from the source), with mean-free-path equal to 1.0 and 100 collisions. The solid line is the solution of the two-dimensional diffusion equation and the points are the results of the Monte Carlo solution.

We want to find how the density changes as particles perform their random walk. Changes occur if, on the average, there is a flow of particles (a flux) from one region of space to another. If the density n is uniform, the same number of particles flow in one direction as the other, so the average flux is zero. Therefore, we expect that fluxes depend on gradients of the particle density. We can find the dependence using the construction of Fig. 2. Assume that the particle density varies in x near a point x0. Using a coordinate system with origin at x0, the first order density variation is given by Eq. 9. The goal is to find an expression for the number of particles per second passing through the line element Δy. To carry out derivation, we assume the following two conditions:

• The material is homogeneous. Equivalently, λ has the same value everywhere.
• Over scale length λ, relative changes in n are small.

Figure 2. Construction to relate flux to density gradient.

Using polar coordinates shown centered on the line element, consider an element in the plane of area (r Δθ)(Δr)\$. We want to find how many particles per second originating from this region pass through Δy. We can write the quantity as the product Jx Δy, where Jx is the linear flow density in units of particles/m-s. On the average, every particle in the calculation volume has the same average number of collisions per second, given by Eq. 10. The rate of scattering events in the area element equals ν times the number of particles in the area (Eq. 11). The fraction of scattered particles aimed at the segment is given by Eq. 12.

Finally, the probability that a particle scattered out of the area element reaches the line element was given in the previous article as exp(-r/λ). Combining this expression with Eqs. 10 and 11, we can determine the current density from all elements surrounding the line segment. Taking the density variation in the form of Eq. 13 leads to the expression of Eq. 14. The integral of the first term in brackets equals zero, so that only the term proportional to the density gradient contributes. Carrying out the integrals, the linear current density is given by Eq. 15. The planar diffusion coefficient (with units m^2/s) is given by Eq. 16. Generalizing to possible variations in both x and y, can write Eq. 15 in the form of Eq. 17.  This relationship between the vector current density and the gradient of density is called Fick’s first law. Equation 18 lists Fick’s second law, a statement of conservation of particles. In the equation, the quantity ∇•J is the divergence of flux from a point and S is the source of particles at that point (particles/m^2-s). Equation 18 is the diffusion equation for particles in a plane. It states that the density at a point changes in time if there is a divergence of flux or a source or sink.

We are now ready to compare the predictions of the model with the Monte Carlo results of the previous section. Equation 19 gives is solution to the diffusion equation for particles emission from the origin of the plane. The quantity r equals √(x^2 + y^2). We can verify Eq. 19 by direct substitution by using the cylindrical form of the divergence and gradient operators and taking D as uniform in space. In order to make a comparison with the Monte Carlo calculation, we pick a time value t0 = Nc λ/v0 and evaluate A based on the condition of Eq. 20. The resulting expression for the density at time t0 is given by Eq. 21. The prediction of Eq. 21 s plotted as the solid line in Fig. 1. The results from the two methods show close absolute agreement.

Finally, we can determine the theoretical 1/e radius of the particle cloud from Eq. 21 to yield Eq. 22. In a random walk, the particle spread increases as the square root of the number of transits between collisions. For Nc = 100, the value is re/λ ≅ 14.1.

Footnotes

[1] Use this link for a copy of the full report in PDF format: Monte Carlo method report.

Particle transport A: Monte Carlo methods versus moment equations

This is the first of three articles giving a brief introduction to Monte Carlo methods applied to electron/photon transport, the foundation of our GamBet package for X-ray science. In particular, I will use a simple example to show how Monte Carlo compares to transport equations (e.g., the diffusion equation). The fundamental issue is how to deal with extremely large numbers of objects. Calculating the history of every particle is beyond the capabilities of even the most powerful computers. Instead, we seek the average properties of large groups.

In the Monte Carlo method, the full set of particles is represented by a calculable set of model particles. In this case, each model particle represents a group. We follow detailed histories of model particles as they undergo random events like collisions with atoms. Characteristically, we use a random-number generator with a known probability distribution to determine the outcomes of the events. In the end, the core assumption is that averages over model particles represent the average behavior of the entire group. The alternative to this approach is the derivation and solution of moment (or transport) equations. The following article covers this technique.

Instead of an abstract discussion, we’ll address a specific example to illustrate the Monte Carlo method. Consider a random walk in a plane. As shown in Fig. 1, particles emerge from a source at the origin with uniform speed v0. They move freely over the surface unless they strike an obstacle. The figure represents the obstacles as circles of diameter w. The obstacles are distributed randomly and drift about so we can never be sure of their position. The velocity of obstacles is much smaller than v0. If a particle strikes an obstacle, we’ll assume it bounces off at a random direction with no change in speed. The obstacles are unaffected by the collisions.

Figure 1. Random walk in a plane.

In a few sentences, we have set some important constraints on the physical model:

• The nature of the particles (constant speed v0).
• The nature of the obstacles (diameter w, high mass compared to the particles),
• The nature of the interaction (elastic collision with isotropic emission from the collision point)

The same type of considerations apply to calculations of radiation transport. The differences are that 1) the model particles have the properties of photons and electrons, 2) the obstacles are the atoms of materials and 3) there are more complex collision models based on experimental data and theory. To continue, we need to firm up the features of the calculation. Let’s assume that 10^10 particles are released at the origin at time t = 0. Clearly, there are too many particles to handle on a computer. Instead, we start Np = 10,000 model particles and assume that they will give a good idea of the average behavior. In this case, each model particle represent 10^6 real particles. We want to find the approximate distribution of particle positions after they make Nc collisions. The logic of a Monte Carlo calculation for this problem is straightforward. The first model particle starts from the origin moving in a random direction. We follow its history through Nc collisions and record its final position. We continue with the other Np – 1 model particles and then interpret the resulting distribution of final positions.

The source position is x = 0, y = 0. To find the emission direction, we use a random number generator, a component of all programing languages and spreadsheets. Typically, the generator returns a random number ξ equally likely to occur anywhere over the interval of Eq. 1. Adjusting the range of values to span the range 0 → 2π, the initial unit direction vector is given by Eq. 2.

The particle moves a distance a from its initial position and then has it first collision. The question is, how do we determine a? It must be a random quantity because we are uncertain how the obstacles are lined up at any time. In this case, we seek the distribution of expectations that the particle has a collision at distance a, where the distance may range from 0 to ∞. To answer the question, we’ll make a brief excursion into probability theory.

Let P(a) equal the probability that the particle moves a distance a without a collision with an object. By convention, a probability value of 0.0 corresponds to an impossible event and 1.0 indicates a certain event. Therefore, P(0) = 1.0 (there is no collision if the particle does not move) and P(∞) = 0.0 (a particle traveling an infinite distance must encounter an object). We can calculate P(a) from the construction of Figure 2. The probability that a particle reaches a + Δa equals the probability that the particle reaches a times the probability that it passes through the layer of thickness Δa without a collision. The second quantity equals 1.0 minus the probability of a collision.

Figure 2. Probability of a collision in a differential element.

To find the probability of a collision in the layer, consider a segment of height h. If the average surface density of obstacles is N particles/m^2, then the segment is expected to contain Nh Δa obstacles. Each obstacle is a circle of diameter w. The distance range for an interaction with an obstacle is called the cross-section σ. In this case, we will associate the interaction width with the obstacle diameter, or σ = w. The fraction of the height of the segment obscured by obstacles is given by Eq. 3. The exit probability is given by Eq. 4.

A first-order Taylor expansion (Eq. 5) leads to Eq. 6. Equation 6 defines another useful quantity, the macroscopic cross section Σ = n σ with dimensions 1/m. Solving Eq. 6 leads to Eq. 7. The new quantity in Eq. 7 is the mean free path, λ. It equals the average value of a for the exponential probability distribution. The ideas of cross section, macroscopic cross section and mean-free path are central to particle transport.

We can now solidify our procedure for a Monte Carlo calculation. The first step is to emit a particle at the origin in the direction determined by Eq. 2. Then we move the particle forward a distance a consistent with the probability function of Eq. 7. One practical question is, how do we create an exponential distribution with a random number generator that produces only a uniform distribution in the interval of Eq, 1? The plot of the probability distribution of Eq. 7 in Fig. 3 suggests a method. Consider the 10% of particles with collision probabilities between P(0.3) and P(0.4). The corresponding range of paths extends from a(0.6)/λ = -ln(0.4) = 0.9163 to – \ln(0.3) = 1.204. If we assign path lengths from the uniform random variable according to Eq, 8, then we can be assured that on the average 10% will lie in the range a/λ = 0.9163 to 1.204. By extension, if we apply the transformation of Eq. 8 to a uniform distribution, the resulting distribution will be exponential. To confirm, the lower section of Fig. 3 shows a random distribution calculation with 5000 particles.

Figure 3. Exponential distribution. a) Relationship between intervals of P(a) and a. b) Testing assignment of the collision distance, 5000 particles with mean-free-path equal to 1.0.

To continue the Monte Carlo procedure, we stop the particle at a collision point a distance a from the starting point determined by Eq. 8 and then generate a new random number ξ to determine the new direction according to Eq. 2. Another call to the random-number generator gives a new propagation distance a from Eq. 8. The particle is moved to the next collision point. After Nc events, we record the final position and start the next particle. The simple programing task with the choice λ = 1 is performed by the following code:

DO Np=1,NShower ! Start from center XOld = 0.0 YOld = 0.0 ! Loop over steps DO Nc=1,NStep ! Random direction CALL RANDOM_NUMBER(Xi) Angle = DTwoPi*Xi ! Random length CALL RANDOM_NUMBER(Xi) Length = -LOG(Xi) ! Add the vector X = XOld + Length*COS(Angle) Y = YOld + Length*SIN(Angle) XOld = X YOld = Y END DO END DO 

Figure 4 shows the results for λ = 1 (equivalently, the plot is scaled in units of mean-free-paths). The left-hand side shows the trajectories of 10 particles for Nc = 100 steps. With only a few particles, there are large statistical variations, making the distribution in angle skewed. We expect that the distribution will become more uniform as the number of particles increases because there is no preferred emission direction. The right-hand side is a plot of final positions for Np = 10,000 particles. The distribution is relatively symmetric, clustered within roughly 15 mean-free-parts of the origin. In comparison, the average total distance traversed by each particle is 100.

Figure 4. Random walk in a plane with mean-free-path equal to 1.0 and 100 collisions. a) Sample trajectories for 10 model particles. b) Final positions of 10,000 model particles.

Beyond the visual indication of Fig. 4, we want quantitative information about how far particles move from the axis. To determine density as a function of radius, we divide the occupied region into radial shells of thickness Δr and count the number of final particle positions in each shell and divide by the area of the shell. Figure 5 shows the results. The circles indicate the relative density of particles in shells of width 0.8λ. Such a plot is called a histogram and the individual shells (containers) are called bins. Histograms are one of the primary methods of displaying Monte Carlo results. Note that the points follow a smooth variation at large radius, but that they have noticeable statistical variations at small radius. The reason is that the shells near the origin have smaller area, and therefore contain fewer particles to contribute to the average. Statistical variations are the prime concern for the accuracy of Monte Carlo calculations.

Figure 5. Particle density as a function of radius (distance from the source), with mean-free-path equal to 1.0 and 100 collisions. The solid line is the solution of the two-dimensional diffusion equation and the points are the results of the Monte Carlo solution.

Footnotes

[1] Use this link for a copy of the full report in PDF format: Monte Carlo method report.