Computer simulation is the process of
mathematical modelling, performed on a
computer
A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
, which is designed to predict the behaviour of, or the outcome of, a real-world or physical system. The reliability of some mathematical models can be determined by comparing their results to the real-world outcomes they aim to predict. Computer simulations have become a useful tool for the mathematical modeling of many natural systems in
physics (
computational physics),
astrophysics
Astrophysics is a science that employs the methods and principles of physics and chemistry in the study of astronomical objects and phenomena. As one of the founders of the discipline said, Astrophysics "seeks to ascertain the nature of the h ...
,
climatology,
chemistry
Chemistry is the science, scientific study of the properties and behavior of matter. It is a natural science that covers the Chemical element, elements that make up matter to the chemical compound, compounds made of atoms, molecules and ions ...
,
biology and
manufacturing, as well as human systems in
economics,
psychology,
social science,
health care
Health care or healthcare is the improvement of health via the prevention, diagnosis, treatment, amelioration or cure of disease, illness, injury, and other physical and mental impairments in people. Health care is delivered by health profe ...
and
engineering. Simulation of a system is represented as the running of the system's model. It can be used to explore and gain new insights into new
technology and to estimate the performance of systems too complex for
analytical solution
Generally speaking, analytic (from el, ἀναλυτικός, ''analytikos'') refers to the "having the ability to analyze" or "division into elements or principles".
Analytic or analytical can also have the following meanings:
Chemistry
* A ...
s.
Computer simulations are realized by running
computer programs that can be either small, running almost instantly on small devices, or large-scale programs that run for hours or days on network-based groups of computers. The scale of events being simulated by computer simulations has far exceeded anything possible (or perhaps even imaginable) using traditional paper-and-pencil mathematical modeling. In 1997, a desert-battle simulation of one force invading another involved the modeling of 66,239 tanks, trucks and other vehicles on simulated terrain around
Kuwait, using multiple supercomputers in the
DoD High Performance Computer Modernization Program.
"Researchers stage largest Military Simulation ever"
, Jet Propulsion Laboratory, Caltech, December 1997,
Other examples include a 1-billion-atom model of material deformation; a 2.64-million-atom model of the complex protein-producing organelle of all living organisms, the
ribosome
Ribosomes ( ) are macromolecular machines, found within all cells, that perform biological protein synthesis (mRNA translation). Ribosomes link amino acids together in the order specified by the codons of messenger RNA (mRNA) molecules to ...
, in 2005;
[
"Largest computational biology simulation mimics life's most essential nanomachine" (news),
News Release,
Nancy Ambrosiano, Los Alamos National Laboratory,
Los Alamos, NM, October 2005, webpage:
]
LANL-Fuse-story7428
.
a complete simulation of the life cycle of ''
Mycoplasma genitalium'' in 2012; and the
Blue Brain
The Blue Brain Project is a Swiss brain research initiative that aims to create a digital reconstruction of the mouse brain. The project was founded in May 2005 by the Brain and Mind Institute of ''École Polytechnique Fédérale de Lausanne'' (EP ...
project at
EPFL (Switzerland), begun in May 2005 to create the first computer simulation of the entire human brain, right down to the molecular level.
["Mission to build a simulated brain begins"](_blank)
, project of the institute at the École Polytechnique Fédérale de Lausanne (EPFL), Switzerland, '' New Scientist'', June 2005.
Because of the computational cost of simulation,
computer experiments are used to perform inference such as
uncertainty quantification.
Simulation versus model
A computer model is the algorithms and equations used to capture the behavior of the system being modeled. By contrast, computer simulation is the actual running of the program that contains these equations or algorithms. Simulation, therefore, is the process of running a model. Thus one would not "build a simulation"; instead, one would "build a model (or a simulator)", and then either "run the model" or equivalently "run a simulation".
History
Computer simulation developed hand-in-hand with the rapid growth of the computer, following its first large-scale deployment during the
Manhattan Project in
World War II to model the process of
nuclear detonation. It was a simulation of 12
hard spheres using a
Monte Carlo algorithm. Computer simulation is often used as an adjunct to, or substitute for, modeling systems for which simple
closed form analytic solutions are not possible. There are many types of computer simulations; their common feature is the attempt to generate a sample of representative scenarios for a model in which a complete enumeration of all possible states of the model would be prohibitive or impossible.
Data preparation
The external data requirements of simulations and models vary widely. For some, the input might be just a few numbers (for example, simulation of a waveform of AC electricity on a wire), while others might require terabytes of information (such as weather and climate models).
Input sources also vary widely:
* Sensors and other physical devices connected to the model;
* Control surfaces used to direct the progress of the simulation in some way;
* Current or historical data entered by hand;
* Values extracted as a by-product from other processes;
* Values output for the purpose by other simulations, models, or processes.
Lastly, the time at which data is available varies:
* "invariant" data is often built into the model code, either because the value is truly invariant (e.g., the value of π) or because the designers consider the value to be invariant for all cases of interest;
* data can be entered into the simulation when it starts up, for example by reading one or more files, or by reading data from a
preprocessor;
* data can be provided during the simulation run, for example by a sensor network.
Because of this variety, and because diverse simulation systems have many common elements, there are a large number of specialized
simulation languages. The best-known may be
Simula
Simula is the name of two simulation programming languages, Simula I and Simula 67, developed in the 1960s at the Norwegian Computing Center in Oslo, by Ole-Johan Dahl and Kristen Nygaard. Syntactically, it is an approximate superset of ALGOL 6 ...
. There are now many others.
Systems that accept data from external sources must be very careful in knowing what they are receiving. While it is easy for computers to read in values from text or binary files, what is much harder is knowing what the
accuracy (compared to
measurement resolution and
precision) of the values are. Often they are expressed as "error bars", a minimum and maximum deviation from the value range within which the true value (is expected to) lie. Because digital computer mathematics is not perfect, rounding and truncation errors multiply this error, so it is useful to perform an "error analysis"
to confirm that values output by the simulation will still be usefully accurate.
Types
Computer models can be classified according to several independent pairs of attributes, including:
*
Stochastic
Stochastic (, ) refers to the property of being well described by a random probability distribution. Although stochasticity and randomness are distinct in that the former refers to a modeling approach and the latter refers to phenomena themselv ...
or
deterministic
Determinism is a philosophical view, where all events are determined completely by previously existing causes. Deterministic theories throughout the history of philosophy have developed from diverse and sometimes overlapping motives and consi ...
(and as a special case of deterministic, chaotic) – see external links below for examples of stochastic vs. deterministic simulations
* Steady-state or dynamic
*
Continuous or
discrete (and as an important special case of discrete,
discrete event or DE models)
*
Dynamic system simulation, e.g. electric systems, hydraulic systems or multi-body mechanical systems (described primarily by DAE:s) or dynamics simulation of field problems, e.g. CFD of FEM simulations (described by PDE:s).
* Local or
distributed.
Another way of categorizing models is to look at the underlying data structures. For time-stepped simulations, there are two main classes:
* Simulations which store their data in regular grids and require only next-neighbor access are called
stencil codes. Many
CFD applications belong to this category.
* If the underlying graph is not a regular grid, the model may belong to the
meshfree method
In the field of numerical analysis, meshfree methods are those that do not require connection between nodes of the simulation domain, i.e. a mesh, but are rather based on interaction of each node with all its neighbors. As a consequence, origina ...
class.
Equations define the relationships between elements of the modeled system and attempt to find a state in which the system is in equilibrium. Such models are often used in simulating physical systems, as a simpler modeling case before dynamic simulation is attempted.
*Dynamic simulations model changes in a system in response to (usually changing) input signals.
*''
Stochastic
Stochastic (, ) refers to the property of being well described by a random probability distribution. Although stochasticity and randomness are distinct in that the former refers to a modeling approach and the latter refers to phenomena themselv ...
'' models use ''
random number generators'' to model chance or random events;
*A ''
discrete event simulation'' (DES) manages events in time. Most computer, logic-test and fault-tree simulations are of this type. In this type of simulation, the simulator maintains a queue of events sorted by the simulated time they should occur. The simulator reads the queue and triggers new events as each event is processed. It is not important to execute the simulation in real time. It is often more important to be able to access the data produced by the simulation and to discover logic defects in the design or the sequence of events.
*A ''continuous dynamic simulation'' performs numerical solution of
differential-algebraic equations or
differential equations
In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, an ...
(either
partial or
ordinary
Ordinary or The Ordinary often refer to:
Music
* ''Ordinary'' (EP) (2015), by South Korean group Beast
* ''Ordinary'' (Every Little Thing album) (2011)
* "Ordinary" (Two Door Cinema Club song) (2016)
* "Ordinary" (Wayne Brady song) (2008)
* ...
). Periodically, the simulation program solves all the equations and uses the numbers to change the state and output of the simulation. Applications include flight simulators,
construction and management simulation games,
chemical process modeling, and simulations of
electrical circuit
An electrical network is an interconnection of electrical components (e.g., batteries, resistors, inductors, capacitors, switches, transistors) or a model of such an interconnection, consisting of electrical elements (e.g., voltage sources, ...
s. Originally, these kinds of simulations were actually implemented on
analog computers, where the differential equations could be represented directly by various electrical components such as
op-amp
An operational amplifier (often op amp or opamp) is a DC-coupled high-gain electronic voltage amplifier with a differential input and, usually, a single-ended output. In this configuration, an op amp produces an output potential (relative to c ...
s. By the late 1980s, however, most "analog" simulations were run on conventional
digital computers that
emulate the behavior of an analog computer.
*A special type of discrete simulation that does not rely on a model with an underlying equation, but can nonetheless be represented formally, is
agent-based simulation. In agent-based simulation, the individual entities (such as molecules, cells, trees or consumers) in the model are represented directly (rather than by their density or concentration) and possess an internal state and set of behaviors or rules that determine how the agent's state is updated from one time-step to the next.
*
Distributed models run on a network of interconnected computers, possibly through the
Internet. Simulations dispersed across multiple host computers like this are often referred to as "distributed simulations". There are several standards for distributed simulation, including
Aggregate Level Simulation Protocol (ALSP),
Distributed Interactive Simulation (DIS), the
High Level Architecture (simulation) (HLA) and the
Test and Training Enabling Architecture (TENA).
Visualization
Formerly, the output data from a computer simulation was sometimes presented in a table or a matrix showing how data were affected by numerous changes in the simulation
parameters. The use of the matrix format was related to traditional use of the matrix concept in
mathematical model
A mathematical model is a description of a system using mathematical concepts and language. The process of developing a mathematical model is termed mathematical modeling. Mathematical models are used in the natural sciences (such as physics, ...
s. However, psychologists and others noted that humans could quickly perceive trends by looking at graphs or even moving-images or motion-pictures generated from the data, as displayed by
computer-generated-imagery (CGI) animation. Although observers could not necessarily read out numbers or quote math formulas, from observing a moving weather chart they might be able to predict events (and "see that rain was headed their way") much faster than by scanning tables of rain-cloud
coordinates. Such intense graphical displays, which transcended the world of numbers and formulae, sometimes also led to output that lacked a coordinate grid or omitted timestamps, as if straying too far from numeric data displays. Today,
weather forecasting models tend to balance the view of moving rain/snow clouds against a map that uses numeric coordinates and numeric timestamps of events.
Similarly, CGI computer simulations of
CAT scan
A computed tomography scan (CT scan; formerly called computed axial tomography scan or CAT scan) is a medical imaging technique used to obtain detailed internal images of the body. The personnel that perform CT scans are called radiographers ...
s can simulate how a
tumor might shrink or change during an extended period of medical treatment, presenting the passage of time as a spinning view of the visible human head, as the tumor changes.
Other applications of CGI computer simulations are being developed to graphically display large amounts of data, in motion, as changes occur during a simulation run.
In science
Generic examples of types of computer simulations in science, which are derived from an underlying mathematical description:
* a numerical simulation of
differential equations that cannot be solved analytically, theories that involve continuous systems such as phenomena in
physical cosmology,
fluid dynamics
In physics and engineering, fluid dynamics is a subdiscipline of fluid mechanics that describes the flow of fluids— liquids and gases. It has several subdisciplines, including ''aerodynamics'' (the study of air and other gases in motion) an ...
(e.g.,
climate models,
roadway noise
Roadway noise is the collective sound energy emanating from motor vehicles. It consists chiefly of road surface, tire, engine/transmission, aerodynamic, and braking elements. Noise of rolling tires driving on pavement is found to be the biggest ...
models,
roadway air dispersion models),
continuum mechanics
Continuum mechanics is a branch of mechanics that deals with the mechanical behavior of materials modeled as a continuous mass rather than as discrete particles. The French mathematician Augustin-Louis Cauchy was the first to formulate such m ...
and
chemical kinetics fall into this category.
* a
stochastic
Stochastic (, ) refers to the property of being well described by a random probability distribution. Although stochasticity and randomness are distinct in that the former refers to a modeling approach and the latter refers to phenomena themselv ...
simulation, typically used for discrete systems where events occur
probabilistic
Probability is the branch of mathematics concerning numerical descriptions of how likely an Event (probability theory), event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and ...
ally and which cannot be described directly with differential equations (this is a ''discrete'' simulation in the above sense). Phenomena in this category include
genetic drift,
biochemical
Biochemistry or biological chemistry is the study of chemical processes within and relating to living organisms. A sub-discipline of both chemistry and biology, biochemistry may be divided into three fields: structural biology, enzymology an ...
or
gene regulatory networks with small numbers of molecules. (see also:
Monte Carlo method).
* multiparticle simulation of the response of nanomaterials at multiple scales to an applied force for the purpose of modeling their thermoelastic and thermodynamic properties. Techniques used for such simulations are
Molecular dynamics,
Molecular mechanics,
Monte Carlo method, and
Multiscale Green's function.
Specific examples of computer simulations include:
* statistical simulations based upon an agglomeration of a large number of input profiles, such as the forecasting of equilibrium
temperature of receiving waters, allowing the gamut of
meteorological
Meteorology is a branch of the atmospheric sciences (which include atmospheric chemistry and physics) with a major focus on weather forecasting. The study of meteorology dates back millennia, though significant progress in meteorology did not ...
data to be input for a specific locale. This technique was developed for
thermal pollution forecasting.
* agent based simulation has been used effectively in
ecology, where it is often called "individual based modeling" and is used in situations for which individual variability in the agents cannot be neglected, such as
population dynamics
Population dynamics is the type of mathematics used to model and study the size and age composition of populations as dynamical systems.
History
Population dynamics has traditionally been the dominant branch of mathematical biology, which has ...
of
salmon and
trout (most purely mathematical models assume all trout behave identically).
* time stepped dynamic model. In hydrology there are several such
hydrology transport models such as the
SWMM and
DSSAM Models developed by the
U.S. Environmental Protection Agency for river water quality forecasting.
* computer simulations have also been used to formally model theories of human cognition and performance, e.g.,
ACT-R.
* computer simulation using
molecular modeling for
drug discovery
In the fields of medicine, biotechnology and pharmacology, drug discovery is the process by which new candidate medications are discovered.
Historically, drugs were discovered by identifying the active ingredient from traditional remedies or by ...
.
*computer simulation to model viral infection in mammalian cells.
* computer simulation for studying the selective sensitivity of bonds by mechanochemistry during grinding of organic molecules.
*
Computational fluid dynamics simulations are used to simulate the behaviour of flowing air, water and other fluids. One-, two- and three-dimensional models are used. A one-dimensional model might simulate the effects of
water hammer in a pipe. A two-dimensional model might be used to simulate the drag forces on the cross-section of an aeroplane wing. A three-dimensional simulation might estimate the heating and cooling requirements of a large building.
* An understanding of statistical thermodynamic molecular theory is fundamental to the appreciation of molecular solutions. Development of the Potential Distribution Theorem (PDT) allows this complex subject to be simplified to down-to-earth presentations of molecular theory.
Notable, and sometimes controversial, computer simulations used in science include:
Donella Meadows'
World3
The World3 model is a system dynamics model for computer simulation of interactions between population, industrial growth, food production and limits in the ecosystems of the earth. It was originally produced and used by a Club of Rome study that p ...
used in the ''
Limits to Growth'',
James Lovelock's Daisyworld and Thomas Ray's
Tierra.
In social sciences, computer simulation is an integral component of the five angles of analysis fostered by the data percolation methodology, which also includes qualitative and quantitative methods, reviews of the literature (including scholarly), and interviews with experts, and which forms an extension of data triangulation. Of course, similar to any other scientific method,
replication
Replication may refer to:
Science
* Replication (scientific method), one of the main principles of the scientific method, a.k.a. reproducibility
** Replication (statistics), the repetition of a test or complete experiment
** Replication crisi ...
is an important part of computational modeling
In practical contexts
Computer simulations are used in a wide variety of practical contexts, such as:
* analysis of
air pollutant dispersion using
atmospheric dispersion modeling
* design of complex systems such as
aircraft and also
logistics systems.
* design of
noise barrier
A noise barrier (also called a soundwall, noise wall, sound berm, sound barrier, or acoustical barrier) is an exterior structure designed to protect inhabitants of sensitive land use areas from noise pollution. Noise barriers are the most effecti ...
s to effect roadway
noise mitigation
* modeling of
application performance
Business transaction management (BTM), also known as business transaction monitoring, application transaction profiling or user defined transaction profiling, is the practice of managing information technology (IT) from a business transaction per ...
*
flight simulators to train pilots
*
weather forecasting
*
forecasting of risk
* simulation of electrical circuits
*
Power system simulation
* simulation of other computers is
emulation.
* forecasting of prices on financial markets (for example
Adaptive Modeler)
* behavior of structures (such as buildings and industrial parts) under stress and other conditions
* design of industrial processes, such as chemical processing plants
*
strategic management
In the field of management, strategic management involves the formulation and implementation of the major goals and initiatives taken by an organization's managers on behalf of stakeholders, based on consideration of Resource management, resour ...
and
organizational studies
*
reservoir simulation for the petroleum engineering to model the subsurface reservoir
* process engineering simulation tools.
*
robot simulators for the design of robots and robot control algorithms
*
urban simulation models that simulate dynamic patterns of urban development and responses to urban land use and transportation policies.
*
traffic engineering to plan or redesign parts of the street network from single junctions over cities to a national highway network to transportation system planning, design and operations. See a more detailed article on
Simulation in Transportation.
* modeling car crashes to test safety mechanisms in new vehicle models.
*
crop-soil systems in agriculture, via dedicated software frameworks (e.g.
BioMA, OMS3, APSIM)
The reliability and the trust people put in computer simulations depends on the
validity of the simulation
model, therefore
verification and validation are of crucial importance in the development of computer simulations. Another important aspect of computer simulations is that of reproducibility of the results, meaning that a simulation model should not provide a different answer for each execution. Although this might seem obvious, this is a special point of attention in
stochastic simulations, where random numbers should actually be semi-random numbers. An exception to reproducibility are human-in-the-loop simulations such as flight simulations and
computer games
A personal computer game, also known as a PC game or computer game, is a type of video game played on a personal computer (PC) rather than a video game console or arcade machine. Its defining characteristics include: more diverse and user-deter ...
. Here a human is part of the simulation and thus influences the outcome in a way that is hard, if not impossible, to reproduce exactly.
Vehicle manufacturers make use of computer simulation to test safety features in new designs. By building a copy of the car in a physics simulation environment, they can save the hundreds of thousands of dollars that would otherwise be required to build and test a unique prototype. Engineers can step through the simulation milliseconds at a time to determine the exact stresses being put upon each section of the prototype.
[Baase, Sara. A Gift of Fire: Social, Legal, and Ethical Issues for Computing and the Internet. 3. Upper Saddle River: Prentice Hall, 2007. Pages 363–364. .]
Computer graphics can be used to display the results of a computer simulation.
Animations can be used to experience a simulation in real-time, e.g., in
training simulations. In some cases animations may also be useful in faster than real-time or even slower than real-time modes. For example, faster than real-time animations can be useful in visualizing the buildup of queues in the simulation of humans evacuating a building. Furthermore, simulation results are often aggregated into static images using various ways of
scientific visualization.
In debugging, simulating a program execution under test (rather than executing natively) can detect far more errors than the hardware itself can detect and, at the same time, log useful debugging information such as instruction trace, memory alterations and instruction counts. This technique can also detect
buffer overflow and similar "hard to detect" errors as well as produce performance information and
tuning data.
Pitfalls
Although sometimes ignored in computer simulations, it is very important to perform a
sensitivity analysis to ensure that the accuracy of the results is properly understood. For example, the probabilistic risk analysis of factors determining the success of an oilfield exploration program involves combining samples from a variety of statistical distributions using the
Monte Carlo method. If, for instance, one of the key parameters (e.g., the net ratio of oil-bearing strata) is known to only one significant figure, then the result of the simulation might not be more precise than one significant figure, although it might (misleadingly) be presented as having four significant figures.
See also
*
Computational model
*
Digital Twin
*
Illustris project
*
List of computer simulation software
*
Scene generator
*
Simulation
*
Simulation hypothesis
The simulation hypothesis proposes that all of our existence is a simulated reality, such as a computer simulation.
The simulation hypothesis bears a close resemblance to various other skeptical scenarios from throughout the history of philosophy. ...
*
Simulation video game
*
UniverseMachine
*
Virtual prototyping
*
Virtual reality
*
Web-based simulation Web-based simulation (WBS) is the invocation of computer simulation services over the World Wide Web, specifically through a web browser. Increasingly, the web is being looked upon as an environment for providing modeling and simulation applications ...
References
Further reading
* Young, Joseph and Findley, Michael. 2014. "Computational Modeling to Study Conflicts and Terrorism.
Routledge Handbook of Research Methods in Military Studiesedited by Soeters, Joseph; Shields, Patricia and Rietjens, Sebastiaan. pp. 249–260. New York: Routledge,
* R. Frigg and S. Hartmann
Models in Science Entry in the ''
Stanford Encyclopedia of Philosophy
The ''Stanford Encyclopedia of Philosophy'' (''SEP'') combines an online encyclopedia of philosophy with peer-reviewed publication of original papers in philosophy, freely accessible to Internet users. It is maintained by Stanford University. Eac ...
''.
*E. Winsber
Simulation in Science Entry in the ''
Stanford Encyclopedia of Philosophy
The ''Stanford Encyclopedia of Philosophy'' (''SEP'') combines an online encyclopedia of philosophy with peer-reviewed publication of original papers in philosophy, freely accessible to Internet users. It is maintained by Stanford University. Eac ...
''.
* S. Hartmann
The World as a Process: Simulations in the Natural and Social Sciences in: R. Hegselmann et al. (eds.), ''Modelling and Simulation in the Social Sciences from the Philosophy of Science Point of View'', Theory and Decision Library. Dordrecht:
Kluwer 1996, 77–100.
* E. Winsberg, ''Science in the Age of Computer Simulation''. Chicago:
University of Chicago Press, 2010.
* P. Humphreys, ''Extending Ourselves: Computational Science, Empiricism, and Scientific Method''. Oxford:
Oxford University Press, 2004.
*
* Desa, W. L. H. M., Kamaruddin, S., & Nawawi, M. K. M. (2012). Modeling of Aircraft Composite Parts Using Simulation. Advanced Material Research, 591–593, 557–560.
External links
Guide to the Computer Simulation Oral History Archive 2003-2018
{{Authority control
Computational science
Virtual reality
Alternatives to animal testing
Computational fields of study