Computational Physics: (Modeling, Numerical Methods, and Problem Solving)
Computational Physics: (Modeling, Numerical Methods, and Problem Solving)
Computational Physics: (Modeling, Numerical Methods, and Problem Solving)
Computational Physics
(Modeling, Numerical Methods, and Problem Solving)
What is Computational physics?
Computational physics is the study and implementation
of numerical algorithms in order to solve problems in
physics for which a quantitative theory already exists. It is
often regarded as a subdiscipline of theoretical physics but
some consider it an intermediate branch between
theoretical and experimental physics.
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
(Latin-means from the beginning) in order to produce a
useful prediction is not practical. This is especially true
with quantum mechanics, where only a handful of simple
models have complete analytic solutions. In cases where
the systems only have numerical solutions, computational
methods are used.
Applications of computational physics
Computation now represents an essential component of
modern research in accelerator physics, astrophysics,
fluid mechanics, lattice field theory/lattice gauge theory
(especially lattice quantum chromodynamics), plasma
physics and solid state physics. Computational solid
state physics, for example, uses density functional
theory to calculate properties of solids, a method similar
to that used by chemists to study molecules.
Many other more general numerical problems fall loosely
under the domain of computational physics, although
they could easily be considered pure mathematics or
part of any number of applied areas.
These include
Solving differential equations
Evaluating integrals
Stochastic methods, especially Monte Carlo methods
Specialized partial differential equation methods, for example the
finite difference method and the finite element method
The matrix eigenvalue problem – the problem of finding
eigenvalues of very large matrices, and their corresponding
eigenvectors (eigenstates in quantum physics)
The pseudo-spectral method
All these methods (and several others) are used to calculate
physical properties of the modeled systems. Computational Physics
also encompasses the tuning of the software/hardware structure to
solve the problems (as the problems usually can be very large, in
processing power need or in memory requests).
Problem statement:
Suppose that a bungee-jumping company hires you.
Your task is to predict the velocity of a jumper as a
function of time during the free-fall.
The information will be used as part of a larger analysis
to determine the length and required strength of the
bungee cord for jumpers of different mass.
You know from your studies of physics that the
acceleration should be equal to the ratio of the force to
the mass (Newton’s second law).
1.1 A Simple Model
A model (or so call mathematical model) can be
broadly defined as a formulation or
equation that expresses the essential
features of a physical system or process in
mathematical terms.
Models can be represented by a functional
relationship between dependent variables,
independent variables, parameters, and
forcing functions.
Model Function
Dependent independent forcing
f , parameters,
variable variables functions
gm gc
vt tanh d
t
cd m
Dependent variable - velocity v
Independent variables - time t
Parameters - mass m, drag coefficient
cd
Forcing function - gravitational
acceleration g
Detail of analytical modeling
F ma F FD FU
F FD mg
a
m FU cd v 2
dv F 2
dv
g
cd v
dt m dt m
Advance technique in calculus
gcd
vt
gm
tanh t
cd m
Analytical Model Results
Using a computer (or a calculator), the model can be used
to generate a graphical representation of the system. For
example, the graph below represents the velocity of a 68.1
kg jumper, assuming a drag coefficient of 0.25 kg/m
9.81(0.25)
vt
9.81(68.1)
tanh t
0.25 68.1
t(s) v (m/s)
0 0
2 18.7292
4 33.1118
6 42.0762
8 46.9575
10 49.4214
12 50.6175
51.6938
Numerical Modeling
Some system models will be given as implicit
functions or as differential equations - these can
be solved either using analytical methods or
numerical methods.
Example - the bungee jumper velocity equation
from before is the analytical solution to the
differential equation
dv cd 2
g v
dt m
where the change in velocity is determined by
the gravitational forces acting on the jumper
versus the drag force.
Numerical Methods
To solve the problem using a numerical
method, note that the time rate of change
of velocity can be approximated as:
dv v vti 1 vti
dt t ti 1 ti
detail of numerical methods
vti 1 vti
g vti
cd 2
ti 1 ti m
2
vti 1 vti g vti ti 1 ti
cd
m t(s) v (m/s)
0 0
2 19.6200
t0 0, t1 2, v0 0 : 4 36.4137
6 46.2983
0.25 2
v 0 9.81 0 x 2 19.62 m/s 8 50.1802
68.1 10 51.3123
t1 2, t 2 4, v1 19.62m/s : 12 51.6008
51.6938
v 19.62 9.81
0.25
19.622 x 2 36.4137 m/s
68.1
Numerical Results
As shown in later chapters, the efficiency and
accuracy of numerical methods will depend
upon how the method is applied.
Applying the previous method in 2 s intervals
yields:
Solving a problem in physics
Problem statement defines the problem
Formulation of the solution the model (physical law or
laws)
Programming (of numerical solution) algorithm
(accuracy, length of calculations, difficulty in programming)
Interpretation of the solution errors (or bugs).
Can be verified by substituting the solution back in the question,
compared with a known solution of a similar problem, different
numerical methods.
1.2 Representation of Numbers on a Computer
Decimal and binary representation
Computers store and process numbers in binary form. Each binary digit
(1 or 0) is called a bit.
Floating point representation
To accommodate large and small numbers, real numbers are written
in floating point representation. Decimal floating point representation
(also called scientific notation) has the form: d.ddddd x 10P
6519.23 6.51923 x 10 3
decimal point mantissa order of
0.00000391 3.91 x 10 -6