What is Computational Physics (Science)?

Standard

As a senior physics undergraduate I have come to believe that scientific computation must be part of the physics curriculum. It is true that physics students are required to study and master many topics, languages, techniques, and skills like mathematics, linguistics, & science communication, still I think that computational physics should be a major part of the curriculum. It is not logical to be in the age of supercomputers and the physics curriculum remain bound to pen and paper as it used to be before the advent of computers! I am not suggesting that physics should all be done on computers; absolutely not. The student must acquire the necessary theoretical and mathematical concepts and skills, besides the physics thinking, before delving in computational physics! What use would a computer have if its user doesn’t know what he wants to use it for? In other words, how would a physics student who hasn’t studied classical mechanics be able to solve a classical mechanics problem on a computer? He will surely not be able to do so, since he will not be able to appropriately instruct the computer due to his lack of conceptual physics and paper & pen problem solving skills. In short, “a computer is as dumb as its user is dump, and a computer is as smart as a smart user; the smarter and knowledgeable the user, the more productive and efficient the computer is”!

The computer is a little over 70 years old. The first computer, many articles & resources claim, is the “Electronic Numerical Integrator And Computer“, or ENIAC for short, which is not technically correct. Many other computers preceded ENIAC most of which were developed for military purposes (e.g; calculation of artillery, cryptoanalysis, etc…) and were analogue (or electro-mechanical) & programmed by punched cards. ENIAC was a room-sized computer that required several people to operate by turning on/off switches that made use of vacuum tubes the ancestor of the modern transistor.

One particularly interesting electromechanical machine (could be called a computer) was the “bombe” [1] which was [designed] by the mathematician Alan Turing to be used to crack the Enigma, the code used by the Nazi to encrypt messages.

Working rebuilt bombe at Bletchley Park [2].
Interior of the rebuilt bombe at Bletchley Park.
The bombe was in part successful in breaking the Enigma. Moreover, Alan Turing has impacted the modern day internet as well; everyone of us using the internet have definitely faced the “CAPTCHA” which are used to counter-bots & make sure the user is an actual human being & not a bot (from robot). CAPTCHA is an abbreviation for “Completely Automated Public Turing test to tell Computers and Humans Apart”. And yes, Turing in CAPTCHA is the same as Turing the mathematician of the 1940’s, though the original Turing test was a human against a machine test not the other way round!

At the start of the modern computer era, operating systems, OS for short, were hardware specific (i.e; a certain OS could work on a particular hardware configuration but not on other configurations). The UNIX overcame this issue and people were able to have the same OS on different hardware configurations. Moreover, UNIX’s nature enabled people (mostly programmers) to make their own UNIX flavor (i.e; modifying UNIX for their own needs).
Then in the 1980’s & 90’s came Linus Torvalds, a computer science student at the University of Helsinki in Finland, who was determined to make a new OS that would better suit his needs. Linux was thus born & it’s first release came out in 1991.
It is worth to mention that Linux is the leading operating system for servers, supercomputers and mainframe computers (i.e; most of the World Wide Web -WWW- is hosted on Linux computers). (It is also worth noting that the famous Mac OS is a Unix-like OS and hence shares with Linux its Unix-brotherhood but not the price, since Linux is free while Mac is commercial.) This is not to mention that it is (i.e; Linux) embedded in many everyday devices (e.g; wifi routers, tablets, smart phones, TV’s). The best thing about Linux is that it is “free and open source”. Keep this in mind; you’ll read and hear it alot. Free means that you are not required to pay to get it (you can freely download it online or buy it as a CD/DVD, where in the latter case the fee depends on who is selling). A popular phrase used is “free as in free beer”. On the other hand open source implies that anyone can modify Linux for his own use without prior permission, on the basis that he gives back to the community by uploading his variant Linux for others to check & use if they like. This is so since Linux is licensed under the GNU General Public License (GPL). This “variant” of Linux is called a “distribution“, and there are numerous distributions (see distrowatch.com) to choose from (e.g; Fedora, Ubuntu, Mint, CentOS, Suse, etc…). This doesn’t stop here, since another great thing about Linux is that almost all of its software are also free and open source; they are usually licensed under the same license as Linux or a slightly different license. Moreover, regular users can contribute to the development of most Linux distributions in several ways, hence such distributions are said to be community-driven.
To sum up on Linux, Linux is an operating system that is free, open source, alternative to and competing with Mac and Windows on almost every level you could imagine. It is fast, reliable (rarely does it crash or require a reboot), efficient, the choice of network administrators, security specialists, researchers, academic and research institutions (e.g; CERN), and even companies. This is the reason why I introduced Linux; since it is very often the choice for computational science!
Physics as you know uses mathematics as its main tool for calculations. Usually, a physicist studying a new problem simplifies the problem to its bare-bones (i.e; its most vital components) for ease of study, then starts to add to the problem one complexity at a time until the problem at its full complexity is realized & understood. Such complex problems come form real life. In most cases, particularly today, paper & pen are not practically useful. For such a reason, and given that computers are much faster at performing routine calculations than humans with paper and pen, it would be very logical to make use of computers to help physicists and scientists reach their solutions. It is important to mention that computers only aid scientists, they do not solve problems on their own; they need very precise and accurate instructions from the user and here comes the role of the scientist to study another language, the computational language (not every computational & programming language, but only those he needs to continue his work or make it easier & simpler), besides his linguistic  and mathematical languages. Moreover, though computers and corresponding software can do simple calculations which humans could as easily do, the main role of computers is to do “number crunching” or “solve by brute force” (see end paragraph) which humans aren’t capable of doing efficiently and in a few seconds as a computer can.
In other words, computational physics (science) is the use of the computational powers (speed, efficiency, automation, etc…) to process, calculate, and solve physical (scientific) problems. Obviously, a computer or computer software won’t do this on its own; it needs input. As such, the physicist (scientist) makes use of a programming language (e.g; C, C++, python, etc…) or a previously compiled software (e.g; FORTRAN, octave, etc…) to instruct the computer, using the syntax of the programming language or software of choice, to take certain steps to solve the given problem. Here’s what Wikipedia mentions:

“Computational Physics is the study and implementation of numerical algorithms to solve problems in physics for which a quantitative theory already exists…. Physicists often have a very precise mathematical theory describing how a system will behave. Unfortunately, it is often the case that solving the theory’s equations ab initio*…is not practical.”

Computational physics and computational science (incl. mathematics) has produced and makes use of a vast number of software including but not limited to C++, the popular FORTRAN, gnuplot, ROOT, Maple (TM), Mathematica (TM), Matlab (TM), Octave (Matlab-like and Matlab-compatible), Python, NumPy, Scientific Python, etc…
In physics, many problems can be easily visualized (e.g; oscillating string, two objects colliding, etc…) but there are problems and even entire fields where visualization is not possible (e.g; wave-particle duality & quantum mechanics). As such, software have been developed to “model” physical systems (i.e; replicate it digitally & computationally), “simulate” the system (i.e; make the system dynamic over time, say), and “visualize” the system (i.e; produce visual & graphical outputs in the form of static images or dynamic 3D models). These three terms, model, simulate, & visualize are the main components of scientific computing, and are sometimes summed up under the term modeling (I will be using this term to refer to all three). One immediate example of this is the modelling of molecular compounds in the field of chemistry. Other areas of computational physics include numerical analysis and data analysis.I’ll end this post with an image the graph of the probability density for the 30th state of the quantum harmonic oscillator (HO). This was the result of solving the HO by the brute force power series method (i.e; analytically). The mathematical solution is outlined in David J. Griffith’s Introduction to Quantum Mechanics (section 2.3.2). The section ends with an image (fig. 2.7) of the 100th state as borrowed from Stephen Gasiorowicz’s Quantum Physics. (Maybe with a future post I will outline how to produce probability density for the 100th or any state of the HO).
Graph of the probability distribution of the 100th state of the quantum
harmonic oscillator (generated using the power series method).
Finally, if you have any comments or opinions, I’d be delighted to read them as a comment below.
Further reading.

[1] Bletchley Park
[2] The British Bombe: CANTAB The Rebuild Project

Thanks for reading
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s