# Computational physics

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Computational_physics
> Markdown URL: https://mediated.wiki/source/Computational_physics.md
> Source: https://en.wikipedia.org/wiki/Computational_physics
> Source revision: 1323914937
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

This article is about computational science applied in physics. For theories comparing the universe to a computer, see [Digital physics](/source/Digital_physics). For the study of the fundamental physical limits of computers, see [Physics of computation](/source/Physics_of_computation).

**Computational physics** is the study and implementation of [numerical analysis](/source/Numerical_analysis) to solve problems in [physics](/source/Physics).[1] Historically, computational physics was the first application of modern computers in science, and is now a subset of [computational science](/source/Computational_science). It is sometimes regarded as a subdiscipline (or offshoot) of [theoretical physics](/source/Theoretical_physics), but others consider it an intermediate branch between theoretical and [experimental physics](/source/Experimental_physics) — an area of study which supplements both theory and experiment.[2]

## Overview

In physics, different [theories](/source/Theory) based on mathematical models provide very precise predictions on how systems behave. Unfortunately, it is often the case that solving the mathematical model for a particular system in order to produce a useful prediction is not feasible. This can occur, for instance, when the solution does not have a [closed-form expression](/source/Closed-form_expression), or is too complicated. In such cases, numerical approximations are required. Computational physics is the subject that deals with these numerical approximations: the approximation of the solution is written as a finite (and typically large) number of simple mathematical operations ([algorithm](/source/Algorithm)), and a computer is used to perform these operations and compute an approximated solution and respective [error](/source/Approximation_error).[1]

### Status in physics

There is a debate about the status of computation within the scientific method.[3] Sometimes it is regarded as more akin to theoretical physics; some others regard computer simulation as "[computer experiments](/source/Computer_experiment)",[3] yet still others consider it an intermediate or different branch between theoretical and [experimental physics](/source/Experimental_physics), a third way that supplements theory and experiment. While computers can be used in experiments for the measurement and recording (and storage) of data, this clearly does not constitute a computational approach.

## Challenges in computational physics

Computational physics problems are in general very difficult to solve exactly. This is due to several (mathematical) reasons: lack of algebraic and/or analytic solvability, [complexity](/source/Complexity), and chaos. For example, even apparently simple problems, such as calculating the [wavefunction](/source/Wavefunction) of an electron orbiting an atom in a strong [electric field](/source/Electric_field) ([Stark effect](/source/Stark_effect)), may require great effort to formulate a practical algorithm (if one can be found); other cruder or brute-force techniques, such as [graphical methods](/source/Graphical_method) or [root finding](/source/Root_finding), may be required. On the more advanced side, mathematical [perturbation theory](/source/Perturbation_theory) is also sometimes used (a working is shown for this particular example [here](/source/Perturbation_theory#Example_of_degenerate_perturbation_theory_–_Stark_effect_in_resonant_rotating_wave)). In addition, the [computational cost](/source/Computational_cost) and [computational complexity](/source/Computational_complexity_theory) for [many-body problems](/source/Many-body_problem) (and their [classical counterparts](/source/N-body_problem)) tend to grow quickly. A macroscopic system typically has a size of the order of 10^{23} constituent particles, so it is somewhat of a problem. Solving quantum mechanical problems is generally of [exponential order](/source/EXP) in the size of the system[4] and for classical N-body it is of order N-squared. Finally, many physical systems are inherently nonlinear at best, and at worst [chaotic](/source/Chaos_theory): this means it can be difficult to ensure any [numerical errors](/source/Numerical_error) do not grow to the point of rendering the 'solution' useless.[5]

## Methods and algorithms

Because computational physics uses a broad class of problems, it is generally divided amongst the different mathematical problems it numerically solves, or the methods it applies. Between them, one can consider:

- [root finding](/source/Root-finding_algorithm) (using e.g. [Newton-Raphson method](/source/Newton's_method))
- [system of linear equations](/source/System_of_linear_equations) (using e.g. [LU decomposition](/source/LU_decomposition))
- [ordinary differential equations](/source/Ordinary_differential_equation) (using e.g. [Runge–Kutta methods](/source/Runge%E2%80%93Kutta_methods))
- [integration](/source/Integral) (using e.g. [Romberg method](/source/Romberg's_method) and [Monte Carlo integration](/source/Monte_Carlo_integration))
- [partial differential equations](/source/Partial_differential_equation) (using e.g. [finite difference](/source/Finite_difference) method and [relaxation](/source/Relaxation_(iterative_method)) method)
- [matrix eigenvalue problem](/source/Matrix_eigenvalue_problem) (using e.g. [Jacobi eigenvalue algorithm](/source/Jacobi_eigenvalue_algorithm) and [power iteration](/source/Power_iteration))

All these methods (and several others) are used to calculate physical properties of the modeled systems.

Computational physics also borrows a number of ideas from [computational chemistry](/source/Computational_chemistry) - for example, the [density functional theory](/source/Density_functional_theory) used by computational solid state physicists to calculate properties of solids is basically the same as that used by chemists to calculate the properties of molecules.

Furthermore, computational physics encompasses the [tuning](/source/Performance_tuning) of the [software](/source/Self-tuning#Examples)/hardware structure to solve the problems (as the problems usually can be very large, in [processing power need](/source/High_performance_computing) or in [memory requests](/source/High-throughput_computing)).

## Divisions

It is possible to find a corresponding computational branch for every major field in physics:

- [Computational mechanics](/source/Computational_mechanics) consists of [computational fluid dynamics](/source/Computational_fluid_dynamics) (CFD), computational [solid mechanics](/source/Solid_mechanics) and computational [contact mechanics](/source/Contact_mechanics).

- [Computational electrodynamics](/source/Computational_electrodynamics) is the process of modeling the interaction of [electromagnetic fields](/source/Electromagnetic_fields) with physical objects and the environment. One subfield at the confluence between CFD and electromagnetic modelling is [computational magnetohydrodynamics](/source/Computational_magnetohydrodynamics).

- [Computational chemistry](/source/Computational_chemistry) is a rapidly growing field that was developed due to the [quantum many-body problem](/source/Quantum_many-body_problem).

- Computational [solid state physics](/source/Solid_state_physics) is a very important division of computational physics dealing directly with [material science](/source/Material_science).

- Computational [statistical mechanics](/source/Statistical_mechanics) is a field related to computational [condensed matter](/source/Condensed_matter) which deals with the simulation of models and theories (such as [percolation](/source/Percolation) and [spin models](/source/Spin_model)) that are difficult to solve otherwise.

- Computational [statistical physics](/source/Statistical_physics) makes heavy use of Monte Carlo-like methods. More broadly, (particularly through the use of [agent based modeling](/source/Agent_based_modeling) and [cellular automata](/source/Cellular_automata)) it also concerns itself with (and finds application in, through the use of its techniques) in the [social sciences](/source/Social_sciences), [network theory](/source/Network_theory), and mathematical models for the propagation of disease (most notably, the [SIR Model](/source/Compartmental_models_in_epidemiology#SIR_Model_on_Networks)) and the [spread of forest fires](/source/Wildfire_modeling).

- [Numerical relativity](/source/Numerical_relativity) is a (relatively) new field interested in finding numerical solutions to the field equations of both [special relativity](/source/Special_relativity) and [general relativity](/source/General_relativity).

- [Computational particle physics](/source/Computational_particle_physics) deals with problems motivated by particle physics.

- [Computational astrophysics](/source/Computational_astrophysics) is the application of these techniques and methods to astrophysical problems and phenomena.

- [Computational biophysics](/source/Computational_biophysics) is a branch of biophysics and [computational biology](/source/Computational_biology) itself, applying methods of computer science and physics to large complex biological problems.

## Applications

Due to the broad class of problems computational physics deals, it is an essential component of modern research in different areas of physics, namely: [accelerator physics](/source/Accelerator_physics), [astrophysics](/source/Astrophysics), [general theory of relativity](/source/General_theory_of_relativity) (through [numerical relativity](/source/Numerical_relativity)), [fluid mechanics](/source/Fluid_mechanics) ([computational fluid dynamics](/source/Computational_fluid_dynamics)), [lattice field theory](/source/Lattice_field_theory)/[lattice gauge theory](/source/Lattice_gauge_theory) (especially [lattice quantum chromodynamics](/source/Lattice_QCD)), [plasma physics](/source/Plasma_physics) (see [plasma modeling](/source/Plasma_modeling)), simulating physical systems (using e.g. [molecular dynamics](/source/Molecular_dynamics)), [nuclear engineering computer codes](/source/Nuclear_engineering_computer_codes), [protein structure prediction](/source/Protein_structure_prediction), [weather prediction](/source/Weather_prediction), [solid state physics](/source/Solid_state_physics), [soft condensed matter](/source/Soft_condensed_matter) physics, hypervelocity impact physics etc.

Computational solid state physics, for example, uses [density functional theory](/source/Density_functional_theory) to calculate properties of solids, a method similar to that used by chemists to study molecules. Other quantities of interest in solid state physics, such as the electronic band structure, magnetic properties and charge densities can be calculated by this and several methods, including the [Luttinger-Kohn](/source/Luttinger-Kohn_model)/[k.p method](/source/K.p_method) and [ab-initio](/source/Ab-initio) methods.

On top of advanced physics software, there are also a myriad of tools of analytics available for beginning students of physics such as the PASCO Capstone software.

## Software

See also: [List of computational physics software](/source/List_of_computational_physics_software), [List of open-source physics software](/source/List_of_free_and_open-source_software_packages#Physics), [List of physics engines](/source/Physics_engine#Engines),  and [List of open-source physics engines](/source/List_of_free_and_open-source_software_packages#Physics_engines)

- [Abaqus](/source/Abaqus)
- [ADCIRC](/source/ADCIRC)
- [Algodoo](/source/Algodoo)
- [Ansys Fluids](https://www.ansys.com/products/fluids#tab1-1)
- [Ansys HFSS](/source/Ansys_HFSS)
- [Astropy](/source/Astropy)
- [AWR Analyst](/source/AWR_Corporation)
- [AWR Axiem](/source/AWR_Corporation)
- [CalculiX](/source/Calculix)
- [CICE](/source/CICE_(sea_ice_model))
- [CFD-ACE+](/source/CFD-ACE%2B)
- [CFD-FASTRAN](/source/CFD-FASTRAN)
- [Code Saturne](/source/Code_Saturne)
- [COMSOL Multiphysics](/source/COMSOL_Multiphysics)
- [Coolfluid](/source/Coolfluid)
- [CORSIKA](/source/CORSIKA)
- [CP2K](/source/CP2K)
- [CST Studio Suite](/source/CST_Studio_Suite)
- [EGS](/source/EGS_(program))
- [Elmer FEM solver](/source/Elmer_FEM_solver)
- [FEKO](/source/FEKO)
- [FEniCS Project](/source/FEniCS_Project)
- [FLOW-3D](/source/Flow_Science,_Inc.)
- [FLUKA](/source/FLUKA)
- [FreeFlyer](/source/FreeFlyer)
- [GADGET](/source/GADGET)
- [Gerris](/source/Gerris_(software))
- [Geant4](/source/Geant4)
- [GMAT](/source/GMAT)
- [JCMsuite](/source/JCMsuite)
- [KIVA](/source/KIVA_(software))
- [MCNP](/source/MCNP)
- [Meep](/source/Meep_(software))
- [MFEM](/source/MFEM)
- [Momentum](/source/Momentum_(electromagnetic_simulator))
- [MOOSE](/source/MOOSE_(software))
- [MPMC](/source/MPMC)
- [MRAMS](/source/MRAMS)
- [Nek5000](/source/Nek5000)
- [Nektar++](/source/Nektar%2B%2B)
- [OpenFOAM](/source/OpenFOAM)
- [OpenLB](/source/OpenLB)
- [OpenMC](/source/OpenMC)
- [Orbiter (simulator)](/source/Orbiter_(simulator))
- [PYTHIA](/source/PYTHIA)
- [RELAP5-3D](/source/RELAP5-3D)
- [ROOT](/source/ROOT)
- [Serpent](/source/Serpent_(software))
- [Simcenter STAR-CCM+](/source/Simcenter_STAR-CCM%2B)
- [SPEDAS](/source/SPEDAS)
- [SU2 code](/source/SU2_code)
- [Systems Tool Kit](/source/Systems_Tool_Kit)
- [TELEMAC](/source/TELEMAC)
- [UrQMD](/source/UrQMD)

## See also

- [Advanced Simulation Library](/source/Advanced_Simulation_Library)
- [CECAM - Centre européen de calcul atomique et moléculaire](/source/CECAM)
- [Division of Computational Physics (DCOMP)](/source/DCOMP#DCOMP) of the [American Physical Society](/source/American_Physical_Society)
- [Important publications in computational physics](/source/List_of_publications_in_physics#Computational_physics)
- [List of quantum chemistry and solid-state physics software](/source/List_of_quantum_chemistry_and_solid-state_physics_software)
- [Mathematical](/source/Mathematical_physics) and [theoretical physics](/source/Theoretical_physics)
- [Open Source Physics](/source/Open_Source_Physics), computational physics libraries and pedagogical tools
- [Timeline of computational physics](/source/Timeline_of_computational_physics)
- [Car–Parrinello molecular dynamics](/source/Car%E2%80%93Parrinello_molecular_dynamics)

## References

1. Thijssen, Jos (2007). *Computational Physics*. [Cambridge University Press](/source/Cambridge_University_Press). ISBN 978-0521833462.

1. Landau, Rubin H.; Páez, Manuel J.; Bordeianu, Cristian C. (2015). [*Computational Physics: Problem Solving with Python*](http://www.wiley.com/WileyCDA/WileyTitle/productCd-3527413154.html). [John Wiley & Sons](/source/John_Wiley_%26_Sons)

1. [A molecular dynamics primer](http://www.fisica.uniud.it/~ercolessi/md/md/) [Archived](https://web.archive.org/web/20150111014856/http://www.fisica.uniud.it/~ercolessi/md/md/) 2015-01-11 at the Wayback Machine, Furio Ercolessi, [University of Udine](/source/University_of_Udine), Italy. [Article PDF](http://www.fisica.uniud.it/~ercolessi/md/md.pdf) [Archived](https://web.archive.org/web/20150924013419/http://www.fisica.uniud.it/~ercolessi/md/md.pdf) 2015-09-24 at the Wayback Machine.

1. Feynman, Richard P. (1982). "Simulating physics with computers". *International Journal of Theoretical Physics*. **21** (6–7): 467–488. [Bibcode:1982IJTP...21..467F](https://ui.adsabs.harvard.edu/abs/1982IJTP...21..467F). [doi:10.1007/bf02650179](https://doi.org/10.1007/bf02650179). [ISSN 0020-7748](https://www.worldcat.org/issn/0020-7748). [S2CID 124545445](https://api.semanticscholar.org/CorpusID:124545445) [Article PDF](https://web.archive.org/web/20170812065758/http://www.mrtc.mdh.se/~gdc/work/ARTICLES/2014/3-CiE-journal/Background/SimulatingPhysicsWithComputers.pdf)

1. Sauer, Tim; Grebogi, Celso; Yorke, James A (1997). "How Long Do Numerical Chaotic Solutions Remain Valid?". *Physical Review Letters*. **79** (1): 59–62. [Bibcode:1997PhRvL..79...59S](https://ui.adsabs.harvard.edu/abs/1997PhRvL..79...59S). [doi:10.1103/PhysRevLett.79.59](https://doi.org/10.1103/PhysRevLett.79.59). [S2CID 102493915](https://api.semanticscholar.org/CorpusID:102493915)

## Further reading

- A.K. Hartmann, [Practical Guide to Computer Simulations](https://web.archive.org/web/20090211113048/http://worldscibooks.com/physics/6988.html), [World Scientific](/source/World_Scientific) (2009)
- [International Journal of Modern Physics C (IJMPC): Physics and Computers](http://www.worldscinet.com/ijmpc/ijmpc.shtml) [Archived](https://web.archive.org/web/20041103090645/http://www.worldscinet.com/ijmpc/ijmpc.shtml) 2004-11-03 at the Wayback Machine, [World Scientific](/source/World_Scientific)
- [Steven E. Koonin](/source/Steven_E._Koonin), Computational Physics, [Addison-Wesley](/source/Addison-Wesley) (1986)
- T. Pang, An Introduction to Computational Physics, [Cambridge University Press](/source/Cambridge_University_Press) (2010)
- B. Stickler, E. Schachinger, Basic concepts in computational physics, [Springer Verlag](/source/Springer_Verlag) (2013). ISBN 9783319024349.
- E. Winsberg, *Science in the Age of Computer Simulation*. Chicago: [University of Chicago Press](/source/University_of_Chicago_Press), 2010.

## External links

- [C20 IUPAP Commission on Computational Physics](http://phycomp.technion.ac.il/~C20) [Archived](https://web.archive.org/web/20151115112756/http://phycomp.technion.ac.il/~C20) 2015-11-15 at the Wayback Machine
- [American Physical Society: Division of Computational Physics](http://www.aps.org/units/dcomp/index.cfm)
- [Institute of Physics: Computational Physics Group](http://www.iop.org/activity/groups/subject/comp/index.html) [Archived](https://web.archive.org/web/20150213081724/http://www.iop.org/activity/groups/subject/comp/index.html) 2015-02-13 at the Wayback Machine
- [SciDAC: Scientific Discovery through Advanced Computing](https://web.archive.org/web/20150418013304/http://www.scidac.gov/physics/physics.html)
- [Open Source Physics](http://www.compadre.org/OSP/)
- [SCINET Scientific Software Framework](http://www.obacs.com)
- [Computational Physics Course with youtube videos](http://www.physics.rutgers.edu/~haule/509/)

---
Adapted from the Wikipedia article [Computational physics](https://en.wikipedia.org/wiki/Computational_physics) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Computational_physics?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
