Documente Academic
Documente Profesional
Documente Cultură
This document is the property of United Technologies Corporation (UTC). You may not possess, use, copy or
disclose this document or any information in it, for any purpose without UTC's express written permission.
Neither receipt nor possession of this document alone, from any source, constitutes such permission.
Possession, use, copying or disclosure by anyone without UTC's express written
permission is not authorized and may result in criminal and/or civil liability.
Introduction to
MONTE CARLO
Simulation
Jim Breneman
P&W Fellow, Reliability & Statistics
Export controlled Material March 14, 2007
Unpublished Work - © United Technologies Corporation 2006
Introduction to Monte Carlo Simulation … outline
• Background
• Definition & history of Monte Carlo
Simulation
• Fundamentals of using EXCEL™ for
Monte Carlo simulation
• In-class examples
• Buffon needle problem
• Tolerancing using Monte Carlo Simulation
• Calculating Load
• Monte Carlo simulation of fleet reliability
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
2 of 116
Unpublished Work - © United Technologies Corporation 2007
Simulation
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
3 of 116
Unpublished Work - © United Technologies Corporation 2007
Simulation History (Continued)
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
4 of 116
Unpublished Work - © United Technologies Corporation 2007
The Cliff-hanger..what’s his chance of surviving
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
5 of 116
Unpublished Work - © United Technologies Corporation 2007
Monte Carlo Simulation Uses
• Manufacturing systems:
The possible permutations and combinations of
workpieces, tools, pallets, transport vehicles, routes,
operations.
• Service systems:
The complexities of customer scheduling, staffing,
resource management, customer flow, and info
processing.
• Design systems:
Variation in stresses, temperatures, mission,
tolerances, flow, pressure drop, material properties.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
6 of 116
Unpublished Work - © United Technologies Corporation 2007
Objective
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
7 of 116
Unpublished Work - © United Technologies Corporation 2007
Detailed Learning Objectives
The objective of this class is to introduce the Monte Carlo simulation concept, to learn how
to use Monte Carlo simulation in EXCEL, and to learn how to use the results to answer
various engineering questions.
This “Introduction to Monte Carlo” simulation class is ~3 hours in length and has the
following major learning objectives:
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
8 of 116
Unpublished Work - © United Technologies Corporation 2007
Example of Monte Carlo simulation link to Standard Work
SDCI/RMS:DP-IN: 97-211
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
9 of 116
Unpublished Work - © United Technologies Corporation 2007
History of Monte Carlo simulation
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
10 of 116
Unpublished Work - © United Technologies Corporation 2007
Why the name Monte Carlo ?
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
11 of 116
Unpublished Work - © United Technologies Corporation 2007
Monte Carlo Simulation...Definition
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
12 of 116
Unpublished Work - © United Technologies Corporation 2007
Random Numbers
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
13 of 116
Unpublished Work - © United Technologies Corporation 2007
Summarizing so far………
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
14 of 116
Unpublished Work - © United Technologies Corporation 2007
Two types of Monte Carlo Simulation
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
15 of 116
Unpublished Work - © United Technologies Corporation 2007
Major Components of a Monte Carlo Simulation
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
16 of 116
Unpublished Work - © United Technologies Corporation 2007
How to build a simulator
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
17 of 116
Unpublished Work - © United Technologies Corporation 2007
Transforming Random Numbers to Random
Variables
Uniform (0,1)
random number
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
19 of 116
Unpublished Work - © United Technologies Corporation 2007
Generating Pseudo-random Numbers
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
20 of 116
Unpublished Work - © United Technologies Corporation 2007
What makes random numbers random?
The basic idea is that if you take three random numbers on [0,1] and sum them, the fractional part of the sum is itself a random number
on [0,1]. The statements in the Fortran code listing from the original Wichman and Hill article are:
C IX, IY, IZ SHOULD BE SET TO INTEGER VALUES BETWEEN 1 AND 30000 BEFORE FIRST ENTRY
*Wichman, B.A. and I.D. Hill, Algorithm AS 183: An Efficient and Portable Pseudo-Random Number Generator, Applied Statistics, 31, 188-190, 1982.
Cycle =10^13
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
23 of 116
Unpublished Work - © United Technologies Corporation 2007
Results of Uniform Random Number Generator
80
60
40
20
0
0 0.2 0.4 0.6 0.8 1
Uniform Random Numbers
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
24 of 116
Unpublished Work - © United Technologies Corporation 2007
The CDF Method...Weibull case
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
25 of 116
Unpublished Work - © United Technologies Corporation 2007
The CDF Method...Normal case
While the Weibull CDF is invertible, the Normal CDF is not, so a rational
polynomial approximation can be used to convert uniform random
deviates to normal random deviates.
(Typical of what software packages use)
z=t-(2.515517+.802853*t+.010328*t^2)/
(1+1.432788*t+.189269*t^2+.001308*t^3)
where t=sqrt(ln(1/p^2)), where p is the uniform random deviate.
z is the standard deviation units from the mean (in standardized normal
units). To convert this to a random normal variate x with mean
µ and standard deviation σ, remember that z=(x-µ)/σ, so
x=z*σ+µ.
But, there are many other ways to generate normal random deviates.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
26 of 116
Unpublished Work - © United Technologies Corporation 2007
Random Number Generation in Excel
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
27 of 116
Unpublished Work - © United Technologies Corporation 2007
Examples of random number generation in EXCEL
Normal Distribution: Mean 10, Std Dev 2. Lognormal: Log mean=2,Log Std Dev=.3
200 160
160
frequency
120
frequency
120
80
80
40 40
0 0
0 3 6 9 12 15 18 0 3 6 9 12 15 18
Value Value
frequency
80
60
60
40 40
20 20
0 0
0 0.4 0.8 1.2 1.6 2 2 2.5 3 3.5 4 4.5 5
(X 1000)
Value Value
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
28 of 116
Unpublished Work - © United Technologies Corporation 2007
EXCEL
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
29 of 116
Unpublished Work - © United Technologies Corporation 2007
Buffon’s Needle Problem
1707-1788
• Buffon's Needle is one of the oldest problems
in the field of geometrical probability. It was
first stated in 1777. It involves dropping a
needle on a lined sheet of paper and
determining the probability of the needle
crossing one of the lines on the page. The
remarkable result is that the probability is
directly related to the value of pi.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
30 of 116
Unpublished Work - © United Technologies Corporation 2007
Buffon Needle… simplest case
• In this case, the length of the needle is one unit and the distance
between the lines is also one unit. There are two variables, the angle at
which the needle falls (theta) and the distance from the center of the
needle to the closest line (D). Theta can vary from 0 to 180 degrees
and is measured against a line parallel to the lines on the paper. The
distance from the center to the closest line can never be more that half
the distance between the lines.
• The needle in the picture misses the line. The needle will hit the line if
the closest distance to a line (D) is less than or equal to 1/2 times the
sine of theta. That is, D ≤ (1/2)sin(theta). How often will this occur? Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
31 of 116
Unpublished Work - © United Technologies Corporation 2007
Buffon Needle… simplest case
F(x)
0.8
Step 2: Generate
random number, u 0.5
0.1
Step 3: Locate 0 x
5 20 30 50
r.v. x
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
35 of 116
Unpublished Work - © United Technologies Corporation 2007
Example: generate discrete random variable(r.v.)
Demand 5 20 30 50
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
36 of 116
Unpublished Work - © United Technologies Corporation 2007
Random number range Demand (x)
0 - 0.1 5
0.1 - 0.5 20
0.5 - 0.8 30
0.8 - 1.0 50
Replication Random numbers Demand
1 0.76269 30
2 0.93813 50
3 0.57897 30
4 0.25200 20
5 0.14009 20
6 0.98889 50
7 0.07436 5
8 0.47831 20
9 0.66928 30
10 0.19625 20
11 0.55519 30
12 0.45593 20 Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
37 of 116
Unpublished Work - © United Technologies Corporation 2007
Generating Discrete r.v. in Excel
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
38 of 116
Unpublished Work - © United Technologies Corporation 2007
EXCEL
Generating Discrete r.v. in Excel
2
3 Random number range Demand
4 0 0.1 5
5 0.1 0.5 20
6 0.5 0.8 30
7 0.8 1 50
8
9 Random number Outcome
10 0.474424547 20 The range A4:C7 has Values
11 0.713128343 30 needed
12 0.844783096 50
13 0.826109451 50
14 0.432246824 20
15 0.307382727 20
16 0.01709212 5
17
18
A B C D E F G
9 Random number Outcome
The second column in the Table range
10 =RAND() =VLOOKUP(A10,A4:C7,3) (A4:C7) is not necessary. Without it
11 =RAND() =VLOOKUP(A10,A4:C7,3) (only two columns in the TABLE
12 =RAND() =VLOOKUP(A10,A4:C7,3) range), the VLOOKUP function will be
13 =RAND() =VLOOKUP(A10,A4:C7,3) VLOOKUP(A10,A4:B7,2)
14 =RAND() =VLOOKUP(A10,A4:C7,3)
15 =RAND() =VLOOKUP(A10,A4:C7,3)
16 =RAND() =VLOOKUP(A10,A4:C7,3) Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
39 of 116 17 Unpublished Work - © United Technologies Corporation 2007
Comparison of Analytical vs Monte Carlo Modeling
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
40 of 116
Unpublished Work - © United Technologies Corporation 2007
One More Thing: Simulation vs Optimization
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
41 of 116
Unpublished Work - © United Technologies Corporation 2007
Monte Carlo in-class work
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
42 of 116
Unpublished Work - © United Technologies Corporation 2007
Monte Carlo Tolerancing
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
43 of 116
Unpublished Work - © United Technologies Corporation 2007
Three kinds of Tolerancing
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
44 of 116
Unpublished Work - © United Technologies Corporation 2007
Tolerancing using Monte Carlo Simulation
X2
X5
X4 Blueprint dimensions:
X1 Spacer .095”-.105”
X2 Disk .179”-.183”
X3 Key washer .027”-.0295”
X4 Tierod .345”-.375”
X1 X5 Tierod nut .050”-.070”
X3
Interference occurs when X1+X2+X3-X4+X5<0
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
45 of 116
Unpublished Work - © United Technologies Corporation 2007
Options for Tolerancing
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
46 of 116
Unpublished Work - © United Technologies Corporation 2007
Case 1:Tolerancing using “Worst Case”
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
48 of 116
Unpublished Work - © United Technologies Corporation 2007
Normal Distribution overview
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
49 of 116
Unpublished Work - © United Technologies Corporation 2007
Case 2:Tolerancing using RSS or RMS method(continued)
RSS = ( X 1) 2 + ( X 2) 2 + ( X 3) 2 + ( X 4) 2 + ( X 5) 2
RSS = (.00167) 2 + (.00067) 2 + (.0004167) 2 + (.005) 2 + (.00333) 2
RSS = 0.0000395
RSS = .006285 which is 1σ for the tolerance stack
So, looking at the int erval 0.00925"± 3(.006285)
[.00925 − .018855,.00925 + .018855] = [−0.009605, 0.028105]
And the probability of int erference is
0.0 − 0.00925
Pr ob( Z < 0.0) = Z ( ) = Z (−1.47)
.006285
From Normal tables, Pr ob of int erference = 0.0708
or 708 /10, 000
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
50 of 116
Unpublished Work - © United Technologies Corporation 2007
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
51 of 116
Unpublished Work - © United Technologies Corporation 2007
Case 3: Tolerancing using Monte Carlo Simulation
• Simulator outline:
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
52 of 116
Unpublished Work - © United Technologies Corporation 2007
EXCEL
Case 3: Tolerancing using Monte Carlo Simulation
Using Uniform distribution assumptions
Probability of Interference=2110/10000
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
53 of 116
Unpublished Work - © United Technologies Corporation 2007
Case 3: Tolerancing using Monte Carlo Simulation
Using Normal distribution assumptions
Tierod Clearance
Spacer Disk Washer Tierod Nut or
Sample (X1) (X2) (X3) (X4) (X5) Interference
1 0.1016 0.1816 0.0286 0.3526 0.0660 0.0252(C)
Blueprint dimensions:
X2 X1 Spacer .095”-.105”
X2 Disk .179”-.183”
X5 X3 Key washer .027”-.0295”
X4 X4 Tierod .345”-.375”
X5 Tierod nut .050”-.070”
X1
X3
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
56 of 116
Unpublished Work - © United Technologies Corporation 2007
EXCEL
Case 3: Tolerancing using Monte Carlo Simulation
Using “realistic” distribution assumptions(continued)
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
57 of 116
Unpublished Work - © United Technologies Corporation 2007
Tolerancing using Monte Carlo Simulation
Using Crystal Ball™
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
58 of 116
Unpublished Work - © United Technologies Corporation 2007
Monte Carlo Simulation of Load
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
59 of 116
Unpublished Work - © United Technologies Corporation 2007
In Class Example
PROBLEM:
1000 parts are each subjected to an axial load. The load varies
from part to part, and is normally distributed with a mean of
1000 pounds and a standard deviation of 200 pounds.
The cross section of the part is circular, with a radius r. Fun Class Participation
r is uniformly distributed between 0.9 inches and 1.1 inches.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
60 of 116
Unpublished Work - © United Technologies Corporation 2007
In Class Example (Continued)
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
61 of 116
Unpublished Work - © United Technologies Corporation 2007
In Class Example (Continued)
If you are using FORTRAN or C
Start
NO
YES
Normal Random
Determine Axial Load Another Part
Number
Repeat for
1,000 parts
Uniform Random
Determine Radius
Number
π = 3.141592654
Calculate Stress
NO
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
62 of 116
Unpublished Work - © United Technologies Corporation 2007
In Class Example (Continued)
Start
1,000 parts).
Calculate Area - A Monte Carlo
Simulation averages
Calculate Stress
NO the results from
Normal Random YES
Number Calculate UTS Stress > UTS Fail = Fail + 1.0
multiple iterations.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
63 of 116
Unpublished Work - © United Technologies Corporation 2007
In Class Example (Continued)
Start
Calculate Average
Number of Failures End
For all Trials
Set Counter: Fail = 0.0
NO Averaging multiple
YES Repeat for
Set Counter: Failx = 0.0 Another Trial
100.000 trials iterations provides
the required
Fail = Fail + Failx
output.
NO
YES
Determine Axial Load Another Part
Repeat for
Determine Radius 1,000 parts
Calculate Area
Calculate Stress NO
YES
Calculate UTS Stress > UTS Failx = Failx + 1.0
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
64 of 116
Unpublished Work - © United Technologies Corporation 2007
EXCEL
In Class Example (Continued)
Now that we have the flow chart – let’s put together the simulator:
• Basic simulators (like this example) can be constructed in EXCEL™.
• More complex simulations will require packages like Crystal Ball™
• Very complex simulations will still require FORTRAN or C.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
65 of 116
Unpublished Work - © United Technologies Corporation 2007
Probability of an F-16 pilot finding a
runway
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
66 of 116
Unpublished Work - © United Technologies Corporation 2007
How Can You Solve This?
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
67 of 116
Unpublished Work - © United Technologies Corporation 2007
If the dry run time is constant...easy solution.
Therefore, Prob(Finding a
Runway)= 0.85
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
68 of 116
Unpublished Work - © United Technologies Corporation 2007
BUT, Dry run time is random
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
69 of 116
Unpublished Work - © United Technologies Corporation 2007
Finding a Runway
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
70 of 116
Unpublished Work - © United Technologies Corporation 2007
Flying with Zero Oil Pressure
(minutes)
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
71 of 116
Unpublished Work - © United Technologies Corporation 2007
Finding a Runway
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
72 of 116
Unpublished Work - © United Technologies Corporation 2007
EXCEL
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
73 of 116
Unpublished Work - © United Technologies Corporation 2007
More (general) Safety risk….
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
74 of 116
Unpublished Work - © United Technologies Corporation 2007
Monte Carlo Simulation of Fleet Reliability
+ • Exposure time
• Corrective actions
3.5
Cumulative Expected Incidents
2.5
1.5
0.5
0
Jim Breneman
0 5 10 15 20 25 30
Introduction to Monte Carlo Simulation 860-565-3959
75 of 116 Months from Now
Unpublished Work - © United Technologies Corporation 2007
Monte Carlo Simulation of Fleet Reliability
Example using 4 failure modes
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
76 of 116
Unpublished Work - © United Technologies Corporation 2007
Procedure for Calculating Incidents Using A
Weibull Life Distribution
1 - F(c i )
βˆ, ηˆ are MLE' s of β, η
2. Sum the individual risk contributions over all operating units to compute
total fleet-wide risk
F(c i + ∆ i ) - F(c i )
Risk = ∑
operating
units
1 - F(c i )
Assumptions: Units are not repaired or replaced with a similar unit at time
of failure, having the same Weibull life distribution.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
77 of 116
Unpublished Work - © United Technologies Corporation 2007
Compiled FORTRAN
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
78 of 116
Unpublished Work - © United Technologies Corporation 2007
Compiled FORTRAN
1. Run MONTE with MONTEONE input; note the cumulative failures after 60 months.
2. Change the usage rate to 54 hours per month, rerun, note the increase in risk.
3. Change the usage rate back to 27 hours per month and rerun… did the answer change
from 1)?.. Why?
4. Now change the Weibull failure parameters to β=2, η=1000 hours, rerun and note the
change in risk.
5. Change the Weibull failure parameters to β=3, η=1000 hours and rerun, noting the
change in risk… repeat for β=4, & β=5 (leaving η alone).
6. Change the Weibull failure parameters to β=3, η=2000 and change the usage rate to
54 hours per month… rerun the risk, noting the cumulative risk.
7. Change the renewals parameter to turn renewals “ON”… rerun and note the increase
in risk.
8. Change the inspection interval to 1200 hours. Rerun the risk and note the decrease.
This is the affect of the inspection interval making the units “good as new.”
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
79 of 116
Unpublished Work - © United Technologies Corporation 2007
EXCEL
Procedure for Calculating Incidents Using a Weibull
Life Distribution
• The program Risk_analyzer.xls is supplied for this exercise.
• With a failure mode β=1, η=1000 hours; β=2, η=1500 hours
β=3, η=2000 hours, β=4, η=3000 hours. Usage rate=27 hours/month
• Risk length of 5 years(60 months).
• Use the population of 100 engines in column 1 of input.
• Set EFH/Month=20.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
81 of 116
Unpublished Work - © United Technologies Corporation 2007
Macro for running Multi-runs
To do this macro (or any macro for that matter) in EXCEL:
In EXCEL (in the case the Buffon Needle problem .xls):
Select Tools, Macro, Visual Basic Editor, Insert, Module
Type in this macro:
Sub MonteIter() Name of macro is up to you
the 100 is the number of samples of 1000 I decided to do
Calculate resets all the random numbers to new random numbers
For sample = 1 To 100 Cells(sample,8).value=Cells(3,6).value copies the result of the
iteration into the cell (sample,8), I.e. the 1st sample is in 1,8,
the 2nd sample is in 2,8, etc. (Note that Visual Basic refers to
Calculate the cells in EXCEL differently than EXCEL does.VB uses
standard matrix notation. 1,8 is element in 1st row, 8th column)
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
84 of 116
Unpublished Work - © United Technologies Corporation 2007
F100 Operational Support Model
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
85 of 116
Unpublished Work - © United Technologies Corporation 2007
Cumulative Depot Modules Helps Determine
Depot Workload
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
86 of 116
Unpublished Work - © United Technologies Corporation 2007
Going to 1350 Cycles Saves Depot Visits
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
87 of 116
Unpublished Work - © United Technologies Corporation 2007
F15 /F16 HPT 3600/4100 Depot Inspections
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
88 of 116
Unpublished Work - © United Technologies Corporation 2007
F15 HPC Module Demands
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
89 of 116
Unpublished Work - © United Technologies Corporation 2007
Aids in LCC Payoff
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
90 of 116
Unpublished Work - © United Technologies Corporation 2007
Increased CIP Funding Saves LCC$
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
91 of 116
Unpublished Work - © United Technologies Corporation 2007
Aids in Determining Which Failure Modes are
Most Important
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
92 of 116
Unpublished Work - © United Technologies Corporation 2007
Weibull Plot input for Risk Analysis
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
93 of 116
Unpublished Work - © United Technologies Corporation 2007
Number 4 Oil Tube Chafe & ‘B’ Nut
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
94 of 116
Unpublished Work - © United Technologies Corporation 2007
Advantages of F100 O&S Simulation
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
95 of 116
Unpublished Work - © United Technologies Corporation 2007
Saudi Arabian Crude Oil Pipeline
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
97 of 116
Unpublished Work - © United Technologies Corporation 2007
Saudi Pipeline Simulation...Spares distribution
Repair:
* Repairs done by captured crews at repair sites and the major repair facility.
* Lack of spares results in wait Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
98 of 116
Unpublished Work - © United Technologies Corporation 2007
Saudi Pipeline Simulation...Module Repair Times
Engine Remove
Failure & Repair
Item Chance(%) Replace Time
LPC 21 1 day 2-4 weeks
HPC 28 4 days 1.5-3 weeks
HPT 27 3 days 1-2 weeks
LPT 16 1 day 1-2 weeks
Exh case 2 1/2 day 3-6 days
Bearings 5 1/2 day -
Gearbox 1 1/2 day 4-8 days
100
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
99 of 116
Unpublished Work - © United Technologies Corporation 2007
Saudi Pipeline Simulation
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
100 of 116
Unpublished Work - © United Technologies Corporation 2007
Saudi Pipeline Simulation....options
Possibility Answer
More repair crews No change required
More spare modules Additional compressor
module as spares
More repair facilities Add 2 additional
repair facilities
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
101 of 116
Unpublished Work - © United Technologies Corporation 2007
The Need for a Probabilistic Approach in Design
• Strength uncertainties
• Material properties
• Machining & processing operations
• Assembly operations
• Effects of time(cycling)
• Stress uncertainties
• Stress analysis assumptions
• Magnitude of peak loads
• Discontinuities and stress concentrations
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
103 of 116
Unpublished Work - © United Technologies Corporation 2007
General Approach
A, area
R, strength
S, stress Stress Strength
Conclusion
• Easy to formulate, easy to program (FORTRAN,C,PASCAL, even SAS)
• Computer time is no longer a concern with faster processors.
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
105 of 116
Unpublished Work - © United Technologies Corporation 2007
Example: F100 3-4 Spacer .2% Creep
Stress
- Spacer thickness
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
106 of 116
Unpublished Work - © United Technologies Corporation 2007
Example input
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
107 of 116
Unpublished Work - © United Technologies Corporation 2007
Output
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
108 of 116
Unpublished Work - © United Technologies Corporation 2007
Output, Assessing the impact of increasing FTIT 1000
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
109 of 116
Unpublished Work - © United Technologies Corporation 2007
FORTRAN Routines for Random Number
Generation
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
110 of 116
Unpublished Work - © United Technologies Corporation 2007
FORTRAN routines for Random number
generation
• Uniform random number generation:
1. Intrinsic function random_number(harvest)
generates uniform random numbers either one at a time or as an array.
2. Functions ran1(idum), ran2(idum), ran3(idum) (in back of presentation)
These all use a negative integer to initialize, and are good uniform
random number generators (see “Numerical Recipes in FORTRAN 77”)
FUNCTION RAN2(IDUM)
PARAMETER (M=714025,IA=1366,IC=150889,RM=1.4005112E-6)
DIMENSION IR(97)
DATA IFF /0/
IF(IDUM.LT.0.OR.IFF.EQ.0)THEN
IFF=1
IDUM=MOD(IC-IDUM,M)
DO 11 J=1,97
IDUM=MOD(IA*IDUM+IC,M)
IR(J)=IDUM
11 CONTINUE
IDUM=MOD(IA*IDUM+IC,M)
IY=IDUM
ENDIF
J=1+(97*IY)/M
IF(J.GT.97.OR.J.LT.1)PAUSE
IY=IR(J)
RAN2=IY*RM
IDUM=MOD(IA*IDUM+IC,M)
IR(J)=IDUM
RETURN
END
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
113 of 116
Unpublished Work - © United Technologies Corporation 2007
Algorithm for Generating Uniform Random numbers.. #3
FUNCTION gasdev(idum)
integer idum
real gasdev
integer iset
real fac,gset,rsq,v1,v2,ran1
save iset, gset
data iset/0/
if (iset .eq. 0) then
1 call random_number(ran1)
v1=2.*ran1-1.
call random_number(ran1)
v2=2.*ran1-1.
rsq=v1**2+v2**2
if (rsq .ge. 1. .or. rsq .eq. 0.)goto 1
fac=sqrt(-2.*log(rsq)/rsq)
gset=v1*fac
gasdev=v2*fac
iset=1
else
gasdev=gset
iset=0
endif
return
end
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
115 of 116
Unpublished Work - © United Technologies Corporation 2007
Algorithm for Generating Normal Random numbers.. #2
SUBROUTINE GAUSS6(IX,SIGMA,XMEAN,X)
DATA XI/2.2160359/ F = EXP(-(T**2)/2.) / 2.5066283 - .1800252 * (XI - ABS(T))
C IF (A.LE.F) GO TO 100
C KINDERMAN/RAMAGE NORMAL RANDOM NUMBER GENERATOR GO TO 25
C REFERENCE : JASA, DECEMBER 1976, PAGES 893 - 896 30 IF (U.LT..9113128) GO TO 40
C PROGRAMMER : GRANT REINMAN 35 IX = IX * 65549
C V = .5 + FLOAT(IX) * .2328306E-9
IX = IX * 65549 IX = IX * 65549
U = .5 + FLOAT(IX) * .2328306E-9 W = .5 + FLOAT(IX) * .2328306E-9
IF (U.GE..884074) GO TO 10 Z=V-W
IX = IX * 65549 T = .4797274 + 1.1054737 * AMIN1(V,W)
V = .5 + FLOAT(IX) * .2328306E-9 IF (AMAX1(V,W).LE..872835) GO TO 100
X = XI * (1.1311316 * U + V - 1.) A = .0492645 * ABS(Z)
X = XMEAN + X * SIGMA F = EXP(-(T**2)/2.) / 2.5066283 - .1800252 * (XI - ABS(T))
RETURN IF (A.LE.F) GO TO 100
10 IF (U.LT..973311) GO TO 20 GO TO 35
15 IX = IX * 65549 40 IX = IX * 65549
V = .5 + FLOAT(IX) * .2328306E-9 V = .5 + FLOAT(IX) * .2328306E-9
IX = IX * 65549 IX = IX * 65549
W = .5 + FLOAT(IX) * .2328306E-9 W = .5 + FLOAT(IX) * .2328306E-9
T = (XI**2) / 2. - ALOG(W) Z=V-W
IF ((T*V**2).GT.((XI**2)/2.)) GO TO 15 T = .4797274 - .5955071 * AMIN1(V,W)
X = -SQRT(2.*T) IF (AMAX1(V,W).LE..8055779) GO TO 100
IF (U.LT..9866555) X = SQRT(2.*T) A = .0533775 * ABS(Z)
X = XMEAN + X * SIGMA F = EXP(-(T**2)/2.) / 2.5066283 - .1800252 * (XI - ABS(T))
RETURN IF (A.GT.F) GO TO 40
20 IF (U.LT..9587208) GO TO 30 100 X = XMEAN + SIGMA * T
25 IX = IX * 65549 IF (Z.GE.0.) X = XMEAN - SIGMA * T
V = .5 + FLOAT(IX) * .2328306E-9 RETURN
IX = IX * 65549 END
W = .5 + FLOAT(IX) * .2328306E-9
Z=V-W
T = XI - .6308348 * AMIN1(V,W)
IF (AMAX1(V,W).LE..7555915) GO TO 100
A = .0342405 * ABS(Z)
Jim Breneman
Introduction to Monte Carlo Simulation 860-565-3959
116 of 116
Unpublished Work - © United Technologies Corporation 2007