Jump to content

Computer simulation

From Wikipedia, the free encyclopedia
(Redirected fromNumerical simulation)
A 48-hour computer simulation ofTyphoon Mawarusing theWeather Research and Forecasting model
Process of building a computer model, and the interplay between experiment, simulation, and theory

Computer simulationis the running of amathematical modelon acomputer,themodelbeing designed to represent 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. Computersimulationshave become a useful tool for the mathematical modeling of many natural systems inphysics(computational physics),astrophysics,climatology,chemistry,biologyandmanufacturing,as well as human systems ineconomics,psychology,social science,health careandengineering.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 newtechnologyand to estimate the performance of systems too complex foranalytical solutions.[1]

Computer simulations are realized by runningcomputer programsthat 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 aroundKuwait,using multiple supercomputers in theDoDHigh Performance Computer Modernization Program.[2] Other examples include a 1-billion-atom model of material deformation;[3]a 2.64-million-atom model of the complex protein-producing organelle of all living organisms, theribosome,in 2005;[4] a complete simulation of the life cycle ofMycoplasma genitaliumin 2012; and theBlue Brainproject atEPFL(Switzerland), begun in May 2005 to create the first computer simulation of the entire human brain, right down to the molecular level.[5]

Because of the computational cost of simulation,computer experimentsare used to perform inference such asuncertainty quantification.[6]

Simulation versus model

[edit]

A model consists of the equations used to capture the behavior of a system. By contrast, computer simulation is the actual running of the program that perform algorithms which solve those equations, often in an approximate manner. 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

[edit]

Computer simulation developed hand-in-hand with the rapid growth of the computer, following its first large-scale deployment during theManhattan ProjectinWorld War IIto model the process ofnuclear detonation.It was a simulation of 12hard spheresusing aMonte Carlo algorithm.Computer simulation is often used as an adjunct to, or substitute for, modeling systems for which simpleclosed form analytic solutionsare 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.[7]

Data preparation

[edit]

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 apreprocessor;
  • 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 specializedsimulation languages.The best-known may beSimula.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 theaccuracy(compared tomeasurement resolutionandprecision) 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"[8]to confirm that values output by the simulation will still be usefully accurate.

Types

[edit]

Models used for computer simulations can be classified according to several independent pairs of attributes, including:

  • Stochasticordeterministic(and as a special case of deterministic, chaotic) – see external links below for examples of stochastic vs. deterministic simulations
  • Steady-state or dynamic
  • Continuousordiscrete(and as an important special case of discrete,discrete eventor 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 ordistributed.

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 calledstencil codes.ManyCFDapplications belong to this category.
  • If the underlying graph is not a regular grid, the model may belong to themeshfree methodclass.

For steady-state simulations, 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 attempt to capture changes in a system in response to (usually changing) input signals.
  • Stochasticmodels userandom number generatorsto model chance or random events;
  • Adiscrete 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.
  • Acontinuous dynamic simulationperforms numerical solution ofdifferential-algebraic equationsordifferential equations(eitherpartialorordinary). 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 ofelectrical circuits.Originally, these kinds of simulations were actually implemented onanalog computers,where the differential equations could be represented directly by various electrical components such asop-amps.By the late 1980s, however, most "analog" simulations were run on conventionaldigital computersthatemulatethe 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, isagent-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.
  • Distributedmodels run on a network of interconnected computers, possibly through theInternet.Simulations dispersed across multiple host computers like this are often referred to as "distributed simulations". There are several standards for distributed simulation, includingAggregate Level Simulation Protocol(ALSP),Distributed Interactive Simulation(DIS), theHigh Level Architecture (simulation)(HLA) and theTest and Training Enabling Architecture(TENA).

Visualization

[edit]

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 simulationparameters.The use of the matrix format was related to traditional use of the matrix concept inmathematical models.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 bycomputer-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-cloudcoordinates.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 forecastingmodels 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 ofCAT scanscan simulate how atumormight 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[as of?]to graphically display large amounts of data, in motion, as changes occur during a simulation run.

In science

[edit]
Computer simulation of the process ofosmosis

Generic examples of types of computer simulations in science, which are derived from an underlying mathematical description:

Specific examples of computer simulations include:

  • statistical simulations based upon an agglomeration of a large number of input profiles, such as the forecasting of equilibriumtemperatureof receiving waters, allowing the gamut ofmeteorologicaldata to be input for a specific locale. This technique was developed forthermal pollutionforecasting.
  • agent based simulation has been used effectively inecology,where it is often called "individual based modeling" and is used in situations for which individual variability in the agents cannot be neglected, such aspopulation dynamicsofsalmonandtrout(most purely mathematical models assume all trout behave identically).
  • time stepped dynamic model. In hydrology there are several suchhydrology transport modelssuch as theSWMMandDSSAM Modelsdeveloped by theU.S. Environmental Protection Agencyfor river water quality forecasting.
  • computer simulations have also been used to formallymodel theories of human cognitionand performance, e.g.,ACT-R.
  • computer simulation usingmolecular modelingfordrug discovery.[10]
  • computer simulation to model viral infection in mammalian cells.[9]
  • computer simulation for studying the selective sensitivity of bonds by mechanochemistry during grinding of organic molecules.[11]
  • Computational fluid dynamicssimulations 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 ofwater hammerin 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'World3used in theLimits to Growth,James Lovelock'sDaisyworldand Thomas Ray'sTierra.

In social sciences, computer simulation is an integral component of the five angles of analysis fostered by the data percolation methodology,[12]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,replicationis an important part of computational modeling[13]

In practical contexts

[edit]

Computer simulations are used in a wide variety of practical contexts, such as:

The reliability and the trust people put in computer simulations depends on thevalidityof the simulationmodel,thereforeverification and validationare 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[editorializing]instochastic simulations,where random numbers should actually be semi-random numbers. An exception to reproducibility are human-in-the-loop simulations such as flight simulations andcomputer games.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.

Vehiclemanufacturers 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.[15]

Computer graphicscan be used to display the results of a computer simulation.Animationscan be used to experience a simulation in real-time, e.g., intraining 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 ofscientific 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 detectbuffer overflowand similar "hard to detect" errors as well as produce performance information andtuningdata.

Pitfalls

[edit]

Although sometimes ignored in computer simulations, it is very important[editorializing]to perform asensitivity analysisto 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 theMonte 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

[edit]

References

[edit]
  1. ^Strogatz, Steven (2007). "The End of Insight". In Brockman, John (ed.).What is your dangerous idea?.HarperCollins.ISBN9780061214950.
  2. ^"Researchers stage largest Military Simulation ever".Jet Propulsion Laboratory.Caltech.December 4, 1997. Archived fromthe originalon 2008-01-22.
  3. ^"Molecular Simulation of Macroscopic Phenomena".IBM Research - Almaden.Archived fromthe originalon 2013-05-22.
  4. ^Ambrosiano, Nancy (October 19, 2005)."Largest computational biology simulation mimics life's most essential nanomachine".Los Alamos, NM:Los Alamos National Laboratory.Archived fromthe originalon 2007-07-04.
  5. ^Graham-Rowe, Duncan (June 6, 2005)."Mission to build a simulated brain begins".New Scientist.Archivedfrom the original on 2015-02-09.
  6. ^Santner, Thomas J; Williams, Brian J; Notz, William I (2003).The design and analysis of computer experiments.Springer Verlag.
  7. ^Bratley, Paul; Fox, Bennet L.; Schrage, Linus E. (2011-06-28).A Guide to Simulation.Springer Science & Business Media.ISBN9781441987242.
  8. ^John Robert Taylor (1999).An Introduction to Error Analysis: The Study of Uncertainties in Physical Measurements.University Science Books. pp. 128–129.ISBN978-0-935702-75-0.Archivedfrom the original on 2015-03-16.
  9. ^abGupta, Ankur; Rawlings, James B. (April 2014)."Comparison of Parameter Estimation Methods in Stochastic Chemical Kinetic Models: Examples in Systems Biology".AIChE Journal.60(4): 1253–1268.Bibcode:2014AIChE..60.1253G.doi:10.1002/aic.14409.ISSN0001-1541.PMC4946376.PMID27429455.
  10. ^Atanasov, AG; Waltenberger, B; Pferschy-Wenzig, EM; Linder, T; Wawrosch, C; Uhrin, P; Temml, V; Wang, L; Schwaiger, S; Heiss, EH; Rollinger, JM; Schuster, D; Breuss, JM; Bochkov, V; Mihovilovic, MD; Kopp, B; Bauer, R; Dirsch, VM; Stuppner, H (2015)."Discovery and resupply of pharmacologically active plant-derived natural products: A review".Biotechnol Adv.33(8): 1582–614.doi:10.1016/j.biotechadv.2015.08.001.PMC4748402.PMID26281720.
  11. ^Mizukami, Koichi; Saito, Fumio; Baron, Michel.Study on grinding of pharmaceutical products with an aid of computer simulationArchived2011-07-21 at theWayback Machine
  12. ^Mesly, Olivier (2015).Creating Models in Psychological Research.United States: Springer Psychology: 126 pages.ISBN978-3-319-15752-8
  13. ^Wilensky, Uri; Rand, William (2007)."Making Models Match: Replicating an Agent-Based Model".Journal of Artificial Societies and Social Simulation.10(4): 2.
  14. ^Wescott, Bob (2013).The Every Computer Performance Book, Chapter 7: Modeling Computer Performance.CreateSpace.ISBN978-1482657753.
  15. ^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.ISBN0-13-600848-8.

Further reading

[edit]
[edit]