JAMES F. WRIGHT, Ph.D Ltd. Co.

Monte Carlo Simulation in
Scientific & Engineered Systems


"Monte Carlo Risk Analysis and Due Diligence of New Business Ventures"
is an important new book by Dr. Wright. It was published on October 15, 2002,
and is available at retail outlets. Click on the red book title above for more information.


Navigation Bar

Place mouse on line with
symbol to expand menu.
















Download Dr. Wright's Free Animated PowerPoint Presentation on "Generic Monte Carlo Simulation"

Left Click to View or Right Click to Download Report Now

THE USE OF MONTE CARLO SIMULATION IN
MECHANICAL, PHYSICAL, CHEMICAL,
AND NUCLEAR SYSTEMS


Below is a brief introduction of the Monte Carlo Simulation process that is used to model real-world scientific and engineered systems. However, if you are interested in Monte Carlo Risk Analysis of Investments rather than these Scientific and Engineered Applications, please click on this green button .

I have both developed and used Monte Carlo simulations to model the following complex scientific and engineering systems. This includes both dynamic and static 1-, 2- and 3-dimensional transport through layers of different materials in complex geometries.

  1. Developed and Used Monte Carlo Simulation Techniques to model diffusion of certain chemical species through polymers and other porous, permeable and semi-permeable materials
  2. Used Monte Carlo Simulation Techniques to aid in the design of nuclear weapons for the United States (with MCNP at the Los Alamos National Laboratory)
  3. Developed and Used Monte Carlo Simulation Techniques to calculate reaction rates in complex radiochemical systems
  4. Developed and Used Monte Carlo Simulation Techniques to calculate the rate of heat transfer in complex, many-component systems
  5. Used Monte Carlo Simulation Techniques to aid in the Design of Delayed-Neutron detectors and Experiments (with MCNP at the Los Alamos National Laboratory)
The Table of Contents below will help you navigate to the portion of this introduction on Monte Carlo Simulation you wish to read.

Table of Contents
1. Introduction
2. What is the Monte Carlo Model?
3. Developing the Distributions
A. Different Distributions
4. Selecting the Metric
5. The Iterative Process
6. The Results



1. Introduction

The Monte Carlo Method has been successfully used in scientific applications for at least 75 years. The technique is a cornerstone of US programs involving Nuclear Weapon Design, all NASA Projects, and the solution of other basic and applied scientific and engineering programs across the world.

Monte Carlo Simulation is named after the famous Casino in the Mediterranean Principality of Monaco. However, the use of the name "Monte Carlo" does not mean to imply that the method is either a "gamble" or "risky". It simply refers to the manner in which individual numbers are selected from valid "representative collections of input data" so they can be used in an iterative calculation process. These "representative collections of data" are some sort of a "Frequency Distribution" that is converted to a Probability Distribution. Monte Carlo Simulation methods are primarily used in situations where:
  • The system being studied can be mathematically described by a metric, which can be either parametric or analytic.
  • The Input Data can be written as some sort of a frequency distribution.
  • The "answer", or Output, must accurately represent the Input Data;
  • The calculated distribution histogram of the "answer", or Output, must accurately reflect the Input data; and
  • The calculated uncertainty in the "answer", or Output, must be an accurate measure of the validity of the model.


Go to Top of Page


2. What is the Monte Carlo Model?

Since Monte Carlo is a Simulation technique, let's first define exactly what we mean by Simulation.

A true Simulation will merely describe a system, not optimize it!

(However, it should be noted that a true simulation may be modified in a manner
such that it can be used to significantly enhance the efficiency of a system.)

Therefore, our primary goal in Simulation is to build an experimental model that will accurately and precisely describe the real system.

However, the breadth and extent of Simulation models is extensive! This can be illustrated by considering the three general "classifications" of Simulation Models, below. And in each of these "classifications", I have defined two possible "characteristics".
1. Functional Classification
Deterministic Characteristic - These are "exact" models that will produce the same outcome each time they are run.
Stochastic Characteristic - These models include some "randomness" that may produce a different outcome each time it is run. This randomness forces us to make a large number of runs to develop a "trend" in our "collection" of outcomes. Further, the exact number of how many "runs" you must make to obtain the "right trend" is simply a matter of statistics.
2. Time Dependence
Static Characteristic - These models are not time-dependent. This even includes the calculation of a specific variable after a fixed period of time.
Dynamic Characteristic - These models depict the change in a system over many time intervals during the calculation process.
3. Input Data
Discrete Characteristic - The input data form a discrete frequency distribution. Discrete frequency distributons are characterized by the random variable X taking on an enumerable number of values xi that each have a corresponding frequency, or count, pi.
Continuous Characteristic - The input data can be described by a continuous frequency distribution. Continuous frequency distributions are characterized by a continuous analytical function of the form y = ƒ (x) where y is defined as the frequency of x. This definition is valid for all possible values of x (over the domain of the function).
We can now say that Monte Carlo Simulations are "True Stochastic Simulations" in that they describe the "final state" of a model by just knowing the frequency distributions of the parameters describing the "begining state" and the appropriate metric that maps, or transforms, the begining state to the final state. They can also be either static (easy) or dynamic (more difficult). If a prediction were required, then "every possible" option would have to be considered and this is where the well-known "Variance Reduction Methods" (antithetic variables, correlated sampling, geometry splitting, source biasing, etc.) would be used to reduce the number of iterations required in the simulation.



Go to Top of Page


3. Developing the Distributions

Go to the link for distribution functions to see the various types of input data that are typically used in these Monte Carlo Simulations. Figure 1 is a "typical" frequency distribution for a variable "x" and has the general "bell shape" that represents the statistics of many natural, or measured, phenomena. The horizontal axis is the "value" of the variable "x" and the vertical axis is the number of members in the distribution that have the "value" of x. The label commonly given to the vertical axis is the "frequency" (hence the name frequency distribution). It must also be remembered that a frequency distribution can be either discrete or continuous.
By examining Figure 1, it can be seen that the highest frequency occurs for a single value of "x" (near the center). This value of "x" for which the frequency is largest is defined as the "most likely value" value of "x". The minimum and maximum values of "x" (xMin and xMax) are usually at the "end-points" of the curve. In fact, most "real-world" systems of this type of data have xMin and xMax that lie at the endpoints of the distribution with frequencies that are very near to the minimum values.
Next, let's "normalize" this frequency distribution function. This means that we will multiply the frequencies of the distribution function by a normalization constant such that the area under the "new" normalized distribution is equal to "1". It should be noted that both discrete and continuous distributions may be normalized.

The area under a discrete frequency distribution is determined by summing each of the discrete frequency values (pi) from xMin to xMax. Therefore normalization of a discrete distribution requires that
a Σ pi = 1
where the sum is over all values and a is the normalization constant.

The area under a continuous distribution is determined by integrating the analytical function y = ƒ (x) between its minimum (xMin) and maximum (xMax) values. Therefore normalization of a continuous distribution requires that
bƒ (x) dx
where the limits of the integral are from xMin to xMax and b is the normalization constant.

Next we will generate cumulative distributions for both the normalized discrete distribution and the normalized continuous distribution. Furthermore these two new cumulative distributions will in fact be probability distributions because of their normalization. This concept of normalization allows us to state that a fraction of the area under the "new" normalized frequency distribution between xMin and another number, xi, has a unique value between 0 and 1 (as long as our xi is between xMin and xMax).

For the discrete distribution we can write the probability that Xxi is:
P{Xxi} = Σ pj
where the sum is over all xjxi

For the continuous distribution we can write the probability that Xxi is:
P{Xxi} = ∫ F(x) dx
where the limits of integration are from xMin to xMin.

We can now summarize what we have accomplished.
  • We have a method to use random numbers between the value of "0" and "1" to always "randomly select" a "weighted" value of xi, for all i.
  • Further, the set of all xi will always fall within our Frequency Distribution as long as xMinxixMax.
This is a fundamental concept of the Monte Carlo Simulation Process!

Now we are ready to use a random number generator (actually a psuedo-random-number generator since it is philosophically impossible to write an algorithm to generate somethng truly random!) to give us random numbers that can operate on cumulative distributions to provide input values for the metric to be used in our simulation calculation.



Go to Top of Page


4. Selecting the Metric

Recall that the basic definition of our metric is a mathematical function that will use our input data to accurately and concisely describe the real system we are modeling. It is imporant to note that in order for our metric to describe the real system we are modeling in a simulation, it only needs to be able to map our begining state into the final state we actually observe. This is one of the real advantages of any simulation process. We are not held to some scientific theory that may not work because it is not valid in the regimes in which we are operating, or it is difficult, if not impossible, to use in a mathematically closed form. A good example of this is how Monte Carlo and other simulators are used by the US in the design and development of nuclear weapons.

Nuclear weapons operate on a time scale and under physical conditions (temperatures and pressures) that we are not able to reproduce in any experimental apparatus on earth. Therefore, we do the experiments we are able to perform and then extrapolate that data with the help of parameterized metrics in Monte Carlo and other simulators to replicate the results we see and measure. In creating a metric, we usually start with the best conventional theory we have and then modify it with parameters (derived experimentally) in order to correctly map the begining state into the final state.



Go to Top of Page


5. The Iterative Process

The steps of the iterative calculation used by the Monte Carlo simulation process are as follows:
  1. Use the existing data to create a Cumulative Distribution Function for each input variable that will be used by the metric.
  2. Create an empty Frequency Distribution Histogram that will be incremented during each iteration.
  3. Start the "ith" iteration
    1. Loop over each input variable used by the metric
      1. Use a random number (generated by a pseudo-random-number generator) between 0 and 1 with the Cumulative Distribution Function to obtain a weighted value for each input variable.
    2. Use the weighted value of all input variables in the metric to calculate a representative answer.
    3. Use the representative answer to determine which bin in the final Frequency Distribution Histogram should be incremented.
    4. Increment the appropriate bin in the Frequency Distribution Histogram by 1.
  4. Repeat Step 3 (A, B, C and D) if the final Frequency Distribution Histogram in Step 3.D, is not "smoothly varying" (and therefore complete). A large number of iterations (like 50,000) will ensure that this Frequency Distribution is complete.
  5. Normalize the Frequency Distribution Histogram (forming a Discrete Probability Distribution Function) and then create its Discrete Cumulative Distribution Function (or, Discrete Probability Distribution).


Go to Top of Page


6. The Results

As noted above, the final results from a Monte Carlo simulation include the Discrete Probability Distribution Function and the corresponding Discrete Cumulative Distribution Function. These two discrete functions allow us to extract an amazing amount of relevant and useful information from our Monte Carlo simulation.

The last item of business in our Monte Carlo simulation is to perform relevant calculations using these Discrete Probability Distribution Function and Discrete Cumulative Distribution Function. These calculations are briefly summarized below.
  • Average Value - This is actually the arithmetic mean.
  • Most Likely Value - this is the most likely value of x and it will almost never be the same as the Average Value.
  • Standard Deviation - This is the conventional Standard Deviation but it will reflect the unsymmetrical nature of the distribution. This is because the real-world Frequency Distribution Histogram will almost certainly be unsymmetrical.
  • P{xxi} - The Probability that the metric will have a value of at least xi

    Go to Top of Page





| | Home | | Technical Due Diligence | | Process Chemistry & R&D | | Quick Answers | | Qualifications | | Search | | Contact | |
| | Links | | Credit Card Pay| | New Book Info | |

URL=http://www.drjfwright.com/c/montecarlosimulation.html
(Last Modified 12/01/04)