SIMULATION
In real life situation all the engineering problems are solved generally by the following three
techniques:
1) By Analytical work
2) By Experimental work
3) By Numerical simulation
Analytical Work
In engineering, it generally refers to the process of using mathematical principles, scientific
methods, and logical reasoning to understand, design, and optimizes engineering systems. It
involves breaking down complex problems into smaller, more manageable components and
then analyzing those components to find solutions. This involves using fundamental principles
of physics, chemistry, and other sciences to understand how systems work. Analytical
techniques uses mathematical equations and models to represent real-world systems, this
allows to predict how those systems will behave under different conditions. Analytical work
involves identifying the problem, gathering data, analyzing the data to identify the trend, pattern
and relationship, and developing solutions. This data can come from experiments, simulations,
or real-world observations.
In modern data related fields, the term Analytics Engineer or Data Analytics has also come into
common use. This is a more specialized role within the data science field.
Limitations of Analytical work
Analytical models often require simplifying assumptions or made some inexact solutions to make
problems tractable. This can lead to inaccuracies when dealing with highly complex systems.
Analytical models may not fully account for variations in material properties, environmental
factors, or unforeseen interactions. The accuracy of the analytical results depends heavily on
the validity of these assumptions. Gathering comprehensive data can be challenging and costly,
especially for complex systems.
Analytical methods may not fully account for uncertainties like material properties, operating
conditions etc., which leads to potentially inaccurate predictions.
Analytical work is performed by humans, and is therefore subject to human error. Mistakes in
calculations, assumptions, or data entry can lead to incorrect results.
Experimental Work
Experimental work in engineering is a fundamental practice that involves conducting tests and
investigations to gather data and validate theories. It's a very crucial part of the engineering
design process. Some key aspects of experimental work in engineering:
Design of Experiments which involves careful planning of experiments to ensure that the data
collected is accurate and reliable. This techniques help to explore the effects of multiple
variables. In experimental work a variety of tools and techniques are used to collect and analyze
data from experiments. This
1
includes using sensors, measuring instruments, and computer software. Rigorous testing and
validation are essential to ensure that engineering systems are safe and reliable.
In essence, experimental work bridges the gap between theoretical concepts and practical
applications. It's a vital process that drives innovation and ensures the quality and safety of
engineering products and systems.
Building and testing prototypes is a key part of experimental work. Prototypes allow engineers to
evaluate their designs in a real-world setting. In engineering experiments, "model analysis"
refers to the study of a scaled-down or simplified representation of a real-world structure or
system, known as model. This analysis is crucial for predicting and understanding the behavior
of the full-scale prototype. The principle that ensures the model's behavior accurately reflects
the prototypes which involves in maintaining geometric, kinematic, and dynamic similarity
between the model and the prototype is known as similitude. Testing on models can help
visualize and understand complex physical phenomena, such as fluid flow or structural
vibrations etc. it also helps to identify and correct design flaws before constructing the costly
and complex prototype.
Applications of Similitude in different engineering:
Civil Engineering:
Analyzing the stability of dams, bridges, and other structures.
Aerospace Engineering:
Testing the aerodynamic performance of aircraft and spacecraft in wind
tunnels. Naval Engineering:
Evaluating the hydrodynamic performance of ships and submarines in towing
tanks. Mechanical Engineering:
Studying the performance of turbines, pumps, and other machinery.
Limitations of Experimental work
Laboratory setup can create environments that don't accurately reflect real-world conditions.
This can limit the accurate findings of results. Results obtained in controlled experiments may
not always be applicable to diverse real-world scenarios, where numerous uncontrolled
variables are at play.
2
Conducting experiments can be time-consuming and expensive, requiring specialized
equipment, materials, and personnel. Some experiments may be logistically impossible due to
size, scale, or environmental factors.
All measurements are subject to errors, which can affect the accuracy and reliability of
experimental results. Limitations in the precision of measuring instruments can also introduce
errors.
Numerical Simulations
The term ‘Simulation” essentially means a representation of a real-world system. In broader
sense it is an imitation of the operation of a real world process. In our real life situations, there
are many problems which cannot be represented mathematically due to stochastic nature,
complexity or conflicting ideas, which require describing them, for these types of problems
simulation is used. First conceived in 1946 by Polish Mathematician Stanislaw Ulam at Los
Alamos National Laboratory and subsequently developed by John von Neumann, Robert
Richtmyer, and Nick Metropolis, the method was first used to calculate neutron diffusion paths
for the hydrogen bomb. This was driven by the need to solve complex problems related to
nuclear physics, particularly in the Manhattan Project. A significant leap occurred during World
War II with the development of the Monte Carlo method, which was invented by John von
Neumann and Stanislaw Ulam during World War II to improve decision making under uncertain
conditions.
A specific type of simulation where a computer is used to create and run the model is generally
known as computer simulation. It uses a computer to model how a system behaves. This could
be anything from weather patterns to the movement of molecules, or the flow of traffic.
Computer simulations rely on mathematical equations and algorithms to describe the
relationships between different parts of the system. By running the simulation, one can observe
how the system might behave under different conditions, allowing us to analyze and predict
outcomes. Computer simulation can be applied to a wide range of disciplines, like Weather
forecasting, Engineering design, Financial modeling, Medical research, etc.
Advantages of Computer Simulations
Computer simulations offer several distinct advantages over traditional analytical and
experimental methods, particularly when dealing with complex systems.
Setting up physical experiments can be extremely expensive, especially in fields like aerospace
or materials science. Simulations can significantly reduce these costs.
Simulations allow us to test dangerous scenarios without risking human lives or equipment. For
example, simulating nuclear reactor failures or aircraft crashes.
Simulations can save time compared to experimental and analytical work, thus save money
in terms of time and labor.
Simulations offer precise control over variables, allowing for repeatable experiments under
identical conditions, which is often difficult in real-world settings.
Simulations can provide visual representations of complex phenomena, making it easier to
understand and interpret results. Simulations can incorporate random variables and
uncertainties, providing a more realistic representation of real-world systems.
3
Computer simulations provide a powerful tool for analyzing and understanding complex systems.
They offer a cost-effective, safe, and flexible alternative to traditional experimental and
analytical methods.
Limitations of Computer simulation
Computer simulations are incredibly powerful; they do come with certain limitations. Simulations
are only effective when the models are created with all the phenomena and variations. If the
underlying mathematical models or assumptions are inaccurate or incomplete, the simulation
results will also be flawed. Real-world systems are often incredibly complex, and it's difficult to
capture all the interactions in a computer model.
Simulations require large amounts of accurate data to make it effective. If the data is incomplete,
inaccurate, or unavailable, the simulation results will be unreliable. Gathering and validating data
can be a time-consuming and expensive process. Complex simulations can require significant
computational resources, including powerful computers and large amounts of memory. Even
with modern computers, some simulations may take a very long time to run, or may be limited in
their scope. It can be difficult to validate and verify simulation results, especially for complex
systems. Comparing simulation results to real-world data is essential, but this data may not
always be available. As models become more and more complex, they can become harder to
understand, and harder to debug. This can lead to errors that are difficult to find.
Thus Simulation may be defined as a use of system model that has designed the characteristics
of the reality in order to produce the essence of actual operation.
Simulations are mainly classified into two categories:
i. Analogue Simulation or Environment Simulation: Analog simulation involves using a physical
system to model and study the behavior of another system. It relies on creating an
"analogy" between the two systems, where measurable quantities in the simulating
system correspond to
4
quantities in the system being studied. The examples such as Children’s cyclic park with
various traffic signals, testing of an aircraft model in a wind tunnel.
ii. Computer Simulation or System Simulation: For complex and intricate problems,
mathematical models are used for which a computer program is developed and then the
problem is solved with the help of high speed computer. Such type of simulation is
known as a computer simulation or system simulation.
Classification of Simulation Models
The simulation models can be classified into the following four categories:
i. Deterministic Models: In these models, input and output variables are not permitted to be
random variables and models are described by exact functional relationship.
ii. Stochastic Models: In these models, at least one of the variable or functional relationships is
expressed by probability function.
iii. Static Models: In these models, variation of time is not considered.
iv. Dynamic Models: In these models, the variation of time is considered.
Phases of Simulation Model:
There are two important phases for a simulation model:
i. Data Generation: Data generation involves the sample observations of variables and can be
carried out with the help of any of the following methods:
a) Using the random number tables.
b) Restoring the mechanical devices.
c) Using the electronic computer.
ii. Book-keeping: This phase of simulation model deals with updating the system when new
events occur, monitoring and recording the system states as and when they change, and
keeping track of the quantities of interest to compute the measures of effectiveness.
It is very much evident that whenever the characteristics like uncertainty, complexity, dynamic
interaction between the decision and subsequent events and the need to develop detailed
procedures and finely divided intervals, all combined together in one situation, then model
becomes too complex to be solved by any of the techniques of mathematical programming and
probabilistic models. Then such complex model must be analyzed by some other kind of
quantitative technique, which may give accurate and reliable results. Many new techniques are
investigated so far, but among all, the best available is the simulation.
Limitation of simulation technique
i. Optimum results cannot be produced by simulation; the results of simulation are only reliable
approximations involving statistical errors.
ii. In many situations, it is very difficult to quantify all the variables which affect the behavior of
the system.
5
iii. For very large and complex problems, the computer simulation is comparatively costlier and
time consuming method.
Exercise 1:
Consider a situation where customers arrive at a one-man barber shop for hair-cutting with the
inter arrival time of 15 minutes. In case the facility is not free, the customer has to wait till the
facility becomes free. Customer are aware of the fact that for one cutting, the barber takes 20
minutes time and the shop opens from 8:00 Hrs to 12:00 Hrs. The customers will be asked to go
back if they cannot be given service. Calculate the average waiting time for those customers
who waited for the service. Also calculate the idle time for the service.
Solution:
Duration of shop opens = 8:00 Hrs to 12:00 Hrs = 4 hours = 240 minutes
Time taken for one cutting = 20 minutes
Thus only 240/20 or 12 customers will be entertained.
The inter-arrival time = 15 minutes
It is assuming that the first customer comes at 8:00 Hrs and he has not to wait.
The Second customer comes at 8:15 Hrs, since the service facility is still busy, the Second
customer has to wait and he is the first one in the queue.
At 8:20 Hrs the First customer departs leaving the facility free. The service of the second
customer starts at 8:20 Hrs.
The process of arrival and departure of customer continue till 12:00 Hrs as shown in the following
table:
Time Event Customer
8:00 Arrival 1
8:15 Arrival 2
8:20 Departure 1
8:30 Arrival 3
8:40 Departure 2
8:45 Arrival 4
9:00 Arrival 5
9:00 Departure 3
9:15 Arrival 6
9:20 Departure 4
9:30 Arrival 7
9:40 Departure 5
9:45 Arrival 8
10:00 Arrival 9
10:00 Departure 6
6
10:15 Arrival 10
10:20 Departure 7
10:30 Arrival 11
10:40 Departure 8
10:45 Arrival 12
11:00 Departure 9
11:20 Departure 10
11:40 Departure 11
12:00 Departure 12
The waiting time for the customer as following:
Customer Waiting Time in Min.
2 8:20 – 8:15 = 5
3 8:40 – 8:30 = 10
4 9:00 – 8:45 = 15
5 9:20 – 9:00 = 20
6 9:40 – 9:15 = 25
7 10:00 – 9:30 = 30
8 10:20 – 9:45 = 35
9 10:40 – 10:00 = 40
10 11:00 – 10:15 = 45
11 11:20 – 10:30 = 50
12 11:40 – 10:45 = 55
Total 330 minutes
Since there are 11 customers, thus average waiting time = 330/11 = 30 minutes
Since the service was always engaged, the idle time is zero.
Exercise 2
Dr. Alexander is dentist and schedules per patient for 30 minutes appointment. Some of the
persons may take more time and others may take less time as compared to 30 minutes
depending on the type of work to be done. The following summary shows various categories of
works, their probabilities and time actually needed to complete the work.
Work Filling Crown Cleaning Extraction Check up Time (min) 45 60 15 45 15
Probability 0.35 0.10 0.20 0.10 0.25
7
Simulate the dentist’s clinic for the customers who arrive between 8:00 am and 11:30 am and
determine the average waiting time for the patients who arrive within the stipulated time.
Assume that all the patients reach the clinic at exactly their schedule arrival time starting at 8:00
am. Use the following random numbers for handling the simulation.
36 80 13 60 96 17 72 Solution:
As the patients arrive with the interval of 30 minutes, during the period from 8:00 am to 11:30
am, there will 8 patients may be served. Let us assume the numbers 0-99 are allotted in
proportion to the probability associated with each category of work, then the various kinds of
work can be sampled, using random number table.
Work Filling Crown Cleaning Extraction Check up Time (min) 45 60 15 45 15 Probability 0.35
0.10 0.20 0.10 0.25
Random No. 0-34 35-44 45-64 65-74 75-99
Total No. 35 10 20 10 25
Using the given random number, a work-sheet can be prepare as the following:
Patient Arrival Time Random No. Work Service Time (min) 1 8:00 am 36 Crown 60 2 8:30
am 80 Check up 15 3 9:00 am 13 Filling 45 4 9:30 am 23 Filling 45 5 10:00 am 60
Cleaning 15 6 10:30 am 96 Check up 15 7 11:00 am 17 Filling 45
8 11:30 am 72 Extraction 45
Now it can be simulate the dentist’s clinic starting from 8:00 am as the following:
Time Event (Arr/Dep) Patients No. (Service Time) Patient Waiting 8:00 am 1st Arr 1st
(60 min) - 8:30 am 2nd Arr 1st (30 min) 2nd 9:00 am 1st Dep, 3rd Arr 2nd (15 min) 3rd 9:15 am
2nd Dep 3rd (45 min) - 9:30 am 4th Arr 3rd (30 min) 4th 10:00 am 3rd Dep, 5th Arr 4th (45 min)
5th
10:30 am 6th Arr 4th (15 min) 5th & 6th
8
10:45 am 4 Dep 5 (15 min) 6 11:00 am 5th Dep, 7th Arr 6th (15 min) 7th 11:15 am
th th th
6th Dep 7th (45 min) - 11:30 am 8th Arr 7th (30 min) 8th
12:00 noon 7th Dep 8th (45 min) -
12:45 pm 8th Dep - -
This table shows that the dentist was not idle during the entire simulated period. The waiting
times for the patients have been as the following.
Waiting times
Patient Waiting time (min)
2 8:30 – 9:00 = 30 min
3 9:00 – 9:15 = 15 min
4 9:30 – 10:00 = 30 min
5 10:00 – 10:45 = 45 min
6 10:30 – 11:00 = 30 min
7 11:00 – 11:15 = 15 min
8 11:30 – 12:00 = 30 min
Total waiting time 195 min
Thus average waiting time per patient = 195/7 = 27.86 min.
Generating Random Phenomena
Frequently, stochastic simulations require thousands, and sometimes hundreds of thousands, of
draws from the probability distributions contained in the model. The basic building block for
simulating complex random phenomena is the generation of random digits. Random numbers
are essentially the number distributed over the given interval in a random manner. They are not,
however, truly random as they are generated systematically by an arithmetic process. This is
known as Congruential method of generating pseudo-random number.
One popular approach of generating pseudo-random number is so called Multiplicative
Congruential Method. The general formula for producing the random number in the interval [0,
N] is �� ା = (���� + ��)(��������)
where xn is the n-th random number, r a multiplier, and µ another positive integer, generally taken
to zero. In the selection of N and r, the beginning of the random number i.e. x1 has to be assign.
Care must be taken in choosing r and x1. For example, if r = 1 then xn+1 = x1 for all values of n.
Exercise 3
Using the following relation, find out the random numbers where the starting number is 1,
multiplier 13, additive number 0, and the highest vale of a random number should not exceed
the value 100. �� ା = (���� + ��)(��������)
Solution
Here X1 = 1, r = 13, N = 100 and µ is taken as 0. The random numbers can be generated by
using the given relation as
9
X2 – (13 x 1 +0) (mod 100) = 13
X3 = (13 x 13 + 0) (mod 100) = 69
X4 = (13 x 69 + 0) (mod 100) = 97
X5 = (13 x 97 +0) (mod 100) = 61
X6 = (13 x 61 + 0) (mod 100) = 93
X7 = (13 x 93 + 0) (mod 100) = 9
X8 = (13 x 9 + 0) (mod 100) = 17
X9 = (13 x 17 + 0) (mod 100) = 21
X10 = (13 x 21 +0) (mod 100) = 73
X11 = (13 x 73 + 0) (mod 100) = 49
X12 = (13 x 49 + 0)) (mod 100) = 37
X13 = (13 x 37 + 0) (mod 100) = 81
X14 = (13 x 81 + 0) (mod 100) = 53
X15 = (13 x 53 + 0) (mod 100) = 89
X16 = (13 x 89 + 0) (mod 100) = 57
X17 = (13 x 57 + 0) (mod 100) = 41
X18 = (13 x 41 + 0) (mod 100) = 33
X19 = (13 x 33 + 0) (mod 100) = 29
X20 = (13 x 29 + 0) (mod 100) = 77
X21 = (13 x 77 + 0) (mod 100) = 1
Hence the random numbers generated are 1, 13, 69, 97, 61, 93, 9, 17, 21, 73, 49, 37, 81, 53,
89, 57, 41, 33, 29, and 77. The sequence is periodic in nature.
Exercise 4
Using the following relation, find out the random numbers where the starting number is 1,
multiplier 13, additive number 2 and the highest value of random no should not exceed the
value 100.
�� ା = (���� + ��)(��������)
Solution
Here, X1 = 1, r = 13, �� = 2 and N = 100. Thus, the random numbers can be generated by
using the above relation as
X2 = (13 x 1 + 2) (mod 100) = 15
X3 = (13 x 15 + 2) (mod 100) = 97
X4 = (13 x 97 + 2) (mod 100) = 63
X5 = (13 x 63 + 2) (mod 100) = 21
X6 = (13 x 21 + 2) (mod 100) = 75
X7 = (13 x 75 + 2) (mod 100) = 77
X8 = (13 x 77 +2) (mod 100) = 3
X9 = (13 x 3 + 2) (mod 100) = 41
10
X10 = (13 x 41 + 2) (mod 100) = 35
X11 = (13 x 35 + 2) (mod 100) = 57
X12 = (13 x 57 + 2) (mod 100) = 43
X13 = (13 x 43 + 2) (mod 100) = 61
X14 = (13 x 61 + 2) (mod 100) = 95
X15 = (13 x 95 + 2) (mod 100) = 37
X16 = (13 x 37 +2) (mod 100) = 83
X17 = (13 x 83 +2) (mod 100) = 81
X18 = (13 x 81 + 2) (mod 100) = 55
X19 = (13 x 55 + 2) (mod 100) = 17
X20 = (13 x 17 + 2) (mod 100) = 23
X21 = (13 x 23 + 2) (mod 100) = 1
Therefore, the generated random numbers are 1, 15, 97, 63, 21, 75, 77, 3, 41, 35, 57, 43, 61,
95, 37, 83, 81, 55, 17, and 23. The sequence is periodic in nature.
Exercise 5
Using the following relation, find out the random numbers where the starting number is 1,
multiplier 11, additive number 3 and the highest value of a random number should not exceed
the value 110.
�� ା = (���� + ��)(��������)
Solution
Here, x1 = 1, r = 11, �� = 3 and N = 110. Thus, the random numbers can be generated by
using the above relation as
X2 = (11 x 1 + 3) (mod 110) = 14
X3 = (11 x 14 + 3) (mod 110) = 47
X4 = (11 x 47 + 3) (mod 110) = 80
X5 = (11 x 80 + 3) (mod 110) = 3
X6 = (11 x 3 + 3) (mod 110) = 36
X7 = (11 x 36 + 3) (mod 110) = 69
X8 = (13 x 69 + 3) (mod 110) = 102
X9 = (11 x 102 + 3) (mod 110) = 25
11
X10 = (11 x 25 + 3) (mod 110) = 58
X11 = (11 x 58 + 3) (mod 110) = 91
X12 = (11 x 91 + 3) (mod 110) = 14
Therefore, the random numbers generated are as 1, 14, 47, 80, 3, 36, 69, 102, 25, 58,
and 91. The sequence is periodic in nature.
Modeling and Simulation
Constructing set up of systems (models) to facilitate experimentation and assessment
(simulation) is both art and science. The technique is particularly useful in solving problems of
complex systems where easier solutions do not present themselves. Modeling and simulation
methods also allow experimentation that otherwise would be cumbersome or impossible.
Modeling and simulation are used to study systems. A system is defined as the collection of
entities that make up the facility or process of interest. To facilitate experimentation and
assessment of a system, a representation called a model is constructed. Physical models
represent systems as actual hardware, whereas mathematical models represent systems as a
set of computational or logical associations. Models can also be static, representing a system at
a particular point in time, or dynamic, representing how a system changes with time.
In general, systems are modeled as having a number of inputs (or stimuli), xl. x2, … , xr; a
number of outputs (or responses), y1 y2, ... , ys; and a number of system parameters (or
conditions), p1 p2,···, pt. Although each system is unique, inputs often are unpredictable
phenomena, and system parameters often arise as a means for tuning responses in some
desired manner. Thus, inputs commonly are modeled as random processes, and system
parameters as adjustable conditions. For example, model input for a communication network
could include the arrival times of messages and the size of each message. System parameters
could include queuing protocols, the number of transmission channels, and the capacity of
transmission channels at each switching station. Output could include a characterization of the
delays incurred by messages in queues and total end to end delivery time. Thus, a system is
often viewed as a function f that produces output y from inputs x and system parameters p; that
is, y = f(x, p), as shown in Figure.
12
System parameter p
System
Input x Output y
model f
A functional view of system models y= f(x,p)
The process of solving problems using model and simulation has following major steps:
1. Formulate problem and model: Write a problem statement, model system attributes, and
select a solution technique (presumably modeling and simulation).
2. Construct system model: Next, construct conceptual and computerized models and model
input data. 3. Conduct simulation experiments: Design experiments and collect data.
4. Interpret results: Statistically analyze output data and assess their relevance to the study's
objectives.
5. Document study: Write a description of the analysis and by, products associated with
performing each major step in the problem solving process.
6. Implement conclusions: Act upon the decisions produced by the study.
7. Validate model: During each step, assess the accuracy of the analysis. Validation is the
ongoing attempt to ensure high credibility of study conclusions.
13