




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture is for Computational Physics course. It was delivered by Dr. Hanif Durad at Pakistan Institute of Engineering and Applied Sciences, Islamabad (PIEAS). It includes: Computational, Physics, Computer, Arithmetic, Approximations, Visualization, Probabilistic, Approach, Linear, Algebra, Difference, Calculus
Typology: Slides
1 / 106
This page cannot be seen from the preview
Don't miss anything!





























































































Dr. Hanif Durad
2
Dr. Hanif Durad
3
^ Computational physics (CP) is a subfield ofcomputational science. ^ CP is a multidisciplinary subject that combinesaspects of physics, applied mathematics, andcomputer science ^ With the aim of solving realistic physicsproblems
Dr. Hanif Durad
[Landau,P-2]
^ Deterministic Approach^ ^
Solve the governing equations by analytical ornumerical methods ^ Probabilistic Approach^ ^ Model^ Model the various processes as they actually happenwithout solving the equations
Solution
Visualization
^ What is scientific computing?^ ^
Design and analysis of algorithms for solvingmathematical problems in science and engineeringnumerically ^ Traditionally called numerical analysis ^ Distinguishing features:^ ^
continuous quantities effects of approximations
Dr. Hanif Durad
8
Dr. Hanif Durad
9
^ Replace difficult problem by easier one havingsame or closely related solution^ ^
Infinite
→^ finite (space, integral sum) ^ Differential
→^ algebraic
^ Nonlinear
→^ linear ^ Complicated
simple
^ Solution obtained may only
approximate
that of
original problem
Dr. Hanif Durad
11
[P-3]
^ Before computation:^ ^
modeling empirical measurements ^ During computation:^ ^
previous computations truncation or discretization rounding ^ Accuracy of final result reflects all these ^ Uncertainty in input may be amplified by problem ^ Perturbations during computation may be amplified by algo.
^ Absolute error
= approx value
−^ true value
^ Relative error
=(absolute error /true value)
^ Equivalently,^ ^
Approx value = (true value)(1 + rel. error) ^ True value
usually unknown, so
estimate
or^ bound
error rather than compute it exactly Relative error
often taken relative to approximate
value, rather than (unknown) true value
Dr. Hanif Durad
14
^ Typical problem: compute value of functionfor given argument= true value of input,
= desired result= approximate (inexact) input= approximate function computedTotal error =
= computational error + propagated data error ^ Algorithm has no effect on propagated data error
Dr. Hanif Durad
15
x ( ) f x x f
( )^
( )^
(
)^
) )
(^
(
(^
)^
f^ x^
f^ x
x
f^
f^
f x^
x
x^ f
^ ^
^
^
^
^
, which does not depend on
the algorithm, might already be present in theinput data; computational error
, which does depend on the
algorithm, might be introduced by thecomputational process into the output data.
Dr. Hanif Durad
17
[Adopted from Robert D. Skeel notes CS515,file 1.pdf
→P-13/41 ]
^ Truncation error : difference between true result (for actual input)and result produced by given algorithm
using exact arithmetic
^ Due to approximations such as truncating infinite series or terminatingiterative sequence before convergence Rounding error : difference between result produced by givenalgorithm using exact arithmetic and result produced by samealgorithm using limited precision arithmetic ^ Due to inexact representation of real numbers and arithmetic operationsupon them Computational error is sum of truncation error and rounding error,but one of these usually dominates
Dr. Hanif Durad
18