Computing & Digital Codexery

Computer simulation

Running mathematical models on computers to represent real-world systems.

Computer simulation

A computer simulation involves running a mathematical model on a computer, where that model is built to mimic how a real-world or physical system behaves or what it produces. The accuracy of some models can be checked by comparing their outputs to actual real-world results. This technique has become a valuable tool for modeling a wide range of natural systems—such as those studied in physics, astrophysics, climatology, chemistry, and biology—as well as human systems like economics, psychology, social science, healthcare, and engineering. Running a simulation means executing the system’s model, which can help explore new technologies and estimate the performance of systems too complex for straightforward analytical solutions.

Simulations are carried out by computer programs that can be tiny and run almost instantly on small devices, or they can be large-scale programs that take hours or days to run on networked groups of computers. The scale of events simulated has far surpassed what was possible with traditional paper-and-pencil math. For instance, a 1997 desert-battle simulation of an invasion involved modeling 66,239 tanks, trucks, and other vehicles on simulated terrain around Kuwait, using multiple supercomputers from the DoD High Performance Computer Modernization Program. Other examples include a model of material deformation with one billion atoms; a 2005 model of the ribosome (the protein-producing organelle in all living organisms) using 2.64 million atoms; a 2012 complete simulation of the life cycle of *Mycoplasma genitalium*; and the Blue Brain project at EPFL in Switzerland, started in May 2005, aiming to create the first computer simulation of the entire human brain down to the molecular level. Because simulations are computationally expensive, computer experiments are often used to perform inference, such as uncertainty quantification.

**Simulation versus model** A model is made up of the equations that capture a system’s behavior. In contrast, computer simulation is the actual running of the program that executes algorithms to solve those equations, often approximately. So simulation is the process of running a model. You wouldn’t “build a simulation”; instead, you “build a model (or a simulator)” and then “run the model” or “run a simulation.”

**History** Computer simulation grew alongside the rapid development of computers, starting with its first large-scale use during the Manhattan Project in World War II to model nuclear detonation—a simulation of 12 hard spheres using a Monte Carlo algorithm. It is often used as a supplement or substitute for modeling systems where simple, closed-form analytical solutions aren’t possible. Many types of simulations exist, but they all share the goal of generating a sample of representative scenarios for a model where listing every possible state would be impossible or impractical.

**Data preparation** The external data needs of simulations vary widely. Some require just a few numbers (like simulating an AC waveform on a wire), while others need terabytes of information (like weather and climate models). Input sources also differ: sensors or physical devices connected to the model; control surfaces to direct the simulation; current or historical data entered by hand; values extracted as by-products from other processes; or values output by other simulations, models, or processes. The timing of data availability also varies: “invariant” data (like the value of π) is often built into the model code; data can be entered at startup (e.g., from files or a preprocessor); or data can be provided during the run (e.g., from a sensor network). Because of this variety and the common elements across simulation systems, many specialized simulation languages exist—the best-known being Simula, with many others now available. Systems that accept external data must be careful about what they receive. While reading values from files is easy, knowing their accuracy (relative to measurement resolution and precision) is harder. This is often expressed as “error bars”—a range of minimum and maximum deviation from the value where the true value is expected to lie. Since digital computer math isn’t perfect, rounding and truncation errors multiply this error, so an “error analysis” is useful to confirm that output values remain usefully accurate.

**Types** Models used for computer simulations can be classified by several independent pairs of attributes, including: stochastic or deterministic (with chaotic as a special case of deterministic); steady-state or dynamic; continuous or discrete (with discrete event or DE models as an important special case of discrete); dynamic system simulation (e.g., electric, hydraulic, or multi-body mechanical systems described by DAEs, or field problems like CFD or FEM described by PDEs); and local or distributed. Another way to categorize models is by their underlying data structures.

field
Computational science
known_for
Running mathematical models on computers to simulate real-world systems
first_large_scale_deployment
Manhattan Project, World War II
early_example
Simulation of 12 hard spheres using a Monte Carlo algorithm

Lore & Background

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. That early simulation involved 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. Simulations are realized by running computer programs that can be small and run almost instantly, or large-scale programs that run for hours or days on network-based groups of computers. The scale of events simulated has far exceeded anything possible with traditional paper-and-pencil modeling. Models used for computer simulations can be classified according to several attributes: stochastic or deterministic, steady-state or dynamic, continuous or discrete, local or distributed. A special type of discrete simulation is agent-based simulation, where individual entities are represented directly with internal states and behaviors. Distributed models run on a network of interconnected computers, often referred to as distributed simulations.

Reader's Guide

Computer simulation has become an essential tool across many fields because it allows exploration of systems too complex for analytical solutions. Its reliability can be determined by comparing results to real-world outcomes. The computational cost of simulation has led to the use of computer experiments for inference such as uncertainty quantification. The distinction between model and simulation is important: a model consists of equations, while simulation is the actual running of programs that solve those equations. Data preparation varies widely, from a few numbers to terabytes of information, and input sources include sensors, control surfaces, historical data, and outputs from other simulations. Because digital mathematics is imperfect, rounding and truncation errors multiply, making error analysis useful to confirm output accuracy. The variety of simulation systems has led to many specialized simulation languages, the best-known being Simula. The scale of simulations has grown enormously, from early nuclear detonation models to billion-atom material deformation models and whole-organism simulations, demonstrating the expanding capability and importance of computer simulation in research and development.

Did You Know?

More in Computing & Digital 1-24

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →