Computational Physics an Introduction-Computational Physics-Lecture Slides, Slides of Computational Physics

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

2011/2012

Uploaded on 07/19/2012

numaira
numaira 🇵🇰

4

(1)

10 documents

1 / 106

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Dr. Hanif Durad 2
Lecture Outline
Computational Physics
Scientific computing
Approximations
Computer Arithmetic
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Computational Physics an Introduction-Computational Physics-Lecture Slides and more Slides Computational Physics in PDF only on Docsity!

Dr. Hanif Durad

2

Lecture Outline  Computational Physics  Scientific computing  Approximations  Computer Arithmetic

Dr. Hanif Durad

3

Computational Physics (1/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

Computational Physics (3/3)

[Landau,P-2]

Physics Problems &(Computational Methods)

^ 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

My Part

Scientific Computing

^ 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

Why scientific computing?  Simulation of physical phenomena  Virtual prototyping of products

Dr. Hanif Durad

9

1.1.1 General Strategy

^ 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]

1.2.1 Sources of Approximation

^ 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.

1.2.2 Absolute Error and RelativeError

^ 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

Data Error and ComputationalError (1/3)

^ 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

f:^

x ( ) f xxf

( )^

( )^

(

)^

) )

(^

(

(^

)^

f^ x^

f^ x

x

f^

f^

f x^

x

x^ f

^ ^

^

^

^

^

Data Error and ComputationalError (3/3)  propagated data error

, 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 and RoundingError

^ 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

Example: Finite Difference

Approximation

Forward and Backward Error