0% found this document useful (0 votes)
39 views7 pages

Project 01

This document discusses computer simulations in physics. It begins by introducing the four main uses of computers in physics: numerical computation, symbolic computation, real-time control, and simulation. Simulation involves including basic laws of a model in a program to study its behavior over time without full analysis. Examples of simulations discussed include radioactive decay and solving the Schrodinger equation. The key steps of simulations are defined as problem definition, model building, flowcharting, programming, validation, execution and analysis. Simulations are useful when problems are too complex for exact analysis or when solutions are too computationally expensive. C++ is emerging as a popular programming language for simulations due to its object-oriented features. There is no single unified theory of computer

Uploaded by

Rajneesh Perhate
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
39 views7 pages

Project 01

This document discusses computer simulations in physics. It begins by introducing the four main uses of computers in physics: numerical computation, symbolic computation, real-time control, and simulation. Simulation involves including basic laws of a model in a program to study its behavior over time without full analysis. Examples of simulations discussed include radioactive decay and solving the Schrodinger equation. The key steps of simulations are defined as problem definition, model building, flowcharting, programming, validation, execution and analysis. Simulations are useful when problems are too complex for exact analysis or when solutions are too computationally expensive. C++ is emerging as a popular programming language for simulations due to its object-oriented features. There is no single unified theory of computer

Uploaded by

Rajneesh Perhate
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

Chapter 1

SIMULATIONS IN PHYSICS
1.1

INTRODUCTION:

Computing has become necessary for scientific analysis. It is not only the
modern societies which rely only on computers, the ancient societies also had
to deal with computation and quantify their knowledge and events e.g., the
Mayans recorded multiplication tables in the form of bar and dots and used
the tables to figure out the period of lunar eclipses [1].
We can divide the use of computer in Physics into four categories:
1. Numerical computation
2. Symbolic computation
3. Real time control
4. Simulation
In the Numerical computation the simplifying physical principles are discovered before computation. For example the solution of many problems in
Physics can be reduced to the solution of a set of simultaneous linear equations.
The second one is the Symbolic computation. It becomes very important in
theoretical Physics. As an example, suppose we want to know the solution to
the quadratic equation.ax2 + bx + c = 0. A Symbolicmanipulation program
(b b2 4ac)
can give us the solution in symbolic form x =
. Mathematical
2a
expressions such as differentiation, integration, equation solutions and power
series expansions can be performed using a typical Symbolic manipulation.
In simulation mode, the basic laws of the model are included in the program
1

with a minimum of analysis


Computers are also important tools in experimental physics. Computers are
often involved in all phases of laboratory experiments these days, from the
design of the apparatus, control of the apparatus during experimental runs,
and the collection and analysis of the data. This involvement of the computers has not only allowed experimentalists to sleep better at night, it has
made possible experiments which would otherwise be impossible. Some of
these task such as the design of an apparatus or the analysis of the data
are similar to those encountered in theoretical computation. However, the
task involved in control and interactive data analysis are qualitatively different and involve a real-time programing and the interfacing of computer
hardware to various types of instrumentation. [2].

1.2

SIMULATION- A FEW EXAMPLES

Simulation is a powerful technique for solving a wide variety of problems.


Simulation means to copy the behaviour of the system or phenomenon under
study.
As an example, we can understand simulation by example of radio active
decay performed on a computer. By doing this simulation experiment on
computer, we can easily understand the phenomenon of radio-activity and
conjecture decay law. Although radio-activity is a random phenomenon but
there is some order in this randomness.We can perform Monte Carlo1 simulations of this phenomenon on PC.
We begin radio active decay with N0 nuclei in the sample. Then we introduce
a probability p of the decay in a certain time. To each N0 , we assign a
random number x lying in the range (0,1). Now we ask a question what if
x < p?. If this is true, then nucleus has decayed and decrement the number
of parent nuclei by one and increment the number of daughters by one. This
completes one interval. The same process is repeated for successive intervals.
This process ends when no parent nuclei is left [3].
Another example is in solving Schrodinger equation for triangular well potential which otherwise is not solvable by analytical methods.
Also, simulation has great importance in defence and research area e.g. ,it
has provided a new way to do Physics also called computational Physics.
For example molecular dynamics simulation is used for studying behaviour
of liquids and solids by Physicists and chemists routinely. The behaviour of
motion of particles under the influence of a force law is conducted and how
1

A Monte Carlo method is a technique making use of random numbers to solve a


problem.

the motion evolves is studied over successive times as if particles are actually
moving. In aircraft flight simulators, wind tunnel, river basin model, network
analysers,simulations are used intensively.

1.3

WHEN TO SIMULATE and HOW TO


SIMULATE

In our daily life, we face so many problems, which although mathematical in


nature are very complex and not amenable to exact mathematical analysis.
The performance of such system (say, weather or traffic jam) may be difficult
to predict, there may be many reasons of this such as the system itself is
complex or the theory is not yet sufficiently developed. The difficulty in
handling such problems (by means of classical mathematical tools) may also
arise due to the effect of uncertainties or due to dynamic interaction between
decisions and subsequent events or due to complex interdependencies among
variables in the system or due to some combination of these. Formely, in
such situation either an intuitive decision was made, or if the stakes were
too high to rely on intuition, elaborate laboratory experiments had to be
conducted, which were usually expensive and time consuming. Simulation
provides a third alternative which is cheap and fast, and thus fills the gap
between exact analysis and physical intuition.
Simulation is also used when an exact analytic solution is possible, but it is
too expensive in terms of computation time[4].
In any simulation experiment we have a system whose behaviour we are
studying. In other words, system is a collection of distinct objects which
interacts with each other. In order to study a system, we generally gather
some relevant information about it. The collection of pertinent information
about a system is called a MODEL of the system. The construction of
appropriate mathematical model is at the core of simulation. Modelling is
the process of translating a physical problem in to a mathematical tractable
problem The following are the steps used for simulation of a problem on PC:
1. Problem definition and Planning of study.
2. Model building: The mathematical model consists of formulation of
certain mathematical equations which expresses the essential feature
of a physical system. Equation can be simple algebraic equations to
complex set of differential equations.
3. Flowcharting: to show the logical steps to be performed by the computer in simulating the mathematical model.
3

Table 1.1: Comparison of laboratory experiment with computer simulation


Laboratory Experiment Computer Simulation
Physical apparatus Computer program
Calibration Testing of program
Measurement Computation
Data analysis Data analysis
4. The choice of programming language.
5. Program writing.
6. Validation of the model.
7. Execution of simulation run, analysis and interpretation of results.
The whole procedure for simulation is shown pictorially below in fig.1.1.
Figure1.1 gives pictorially the strategy adopted for performing numerical
simulation on a computer which is reliable and well tested. [5]

1.4

REAL EXPERIMENT VERSUS COMPUTER SIMULATION

Computer simulation are some time compared with or called as computer


experiment because they share much in common with the laboratory experiment Some of the analogies are given below[2]:

1.5

COMPUTATIONAL ENVIRONMENT

For implemention of the strategy depicted in fig.1.1, we require resources


such as computer hardware, operating system and other system software,
language compilers, actual application program and other software tools to
manipulate data and provide output in desired form (viz.GNU plotter).
These days, Linux is the most popular operating system for scientific computing which is available as an open source software. The programming
languages which are generally used for these purpose are FORTRAN, C,
C++. Though Fortran is the most favourite programming language among
Physicists, slowly a change over is being made to C or C++. [5]
4

Figure 1.1: Numerical Simulation Process

1.6

WHY C++ ?

Among above mentioned languages, C++ is emerging as popular language.


The reason is, it has some important concepts such as Encapsulation, inheritance, polymorphism and operator overloading. It supports the idea that
program units should interact with one another only through clearly defined
interfaces [6]

1.7

NO UNIFIED THEORY

In performing simulations, it must be remembered that there is no unifying


theory of computer simulation. Learning simulations does not consists of
learning of few fundamental theorems and then using them and their various
corollaries to solve problems. There are no underlying principles guiding the
formulations of simulation models. Each application of simulation is ad hoc
to a great extent in this sense simulation is an art and that is one often
hears this phrase Simulation is an Art [4].

1.8

SUMMARY

In this chapter, we have introduced the basic philosophy of simulations and


discussed the steps involved in solving a physical problem using simulation.
We also discussed the computer resources and languages required for implementing the numerical methods.

REFERENCES
1. Pang Tao, An Introduction to Computational Physics(Cambridge,1997)
2. Gould/Tobochink,An Introduction Simulation Method(Addison-Wasley,1988)
3. Verma R.C., Ahluwalia P.K., Sharma K.C, Computational Physics: An
Introduction(NEW AGE INTERNATIONAL(P) LIMITED,2005)
4. Deo Narsingh, System Simulation with Digital Computer(Prentice Hall
of India,2009)
5. Balagurusamy E., Numerical Methods(Tata McGraw-Hill,2008)
6. Balagurusamy E.,OOP with C++(Tata McGraw-Hill,2009)

You might also like