Topic 0

EP208
Computational Methods in Physics
INTRODUCTION
TO
COURSE
Department of
Engineering Physics
University of Gaziantep
Feb 2014
Sayfa 1
Content
 Introduction
 The Course
 Example Numerical Problems
Sayfa 2
Introduction
 This is an introductory level course in numerical and
computational methods with emphasis on applied
computing.
 Solving problems in engineering often relies on a numerical
method when an analytical method is complex or not
available. In such cases computers are employed to perform
the numerical calculations with speed and accuracy.
 Numerical analysis is very large discipline;
see the list of topics given in wikipedia.
Sayfa 3
By the end of the course, the student will be able to approach
some problems from a computational point of view and be able
to implement solutions in the form of dedicated computer
programs.
We will use
 C++ Programming Language for the implementation of the
numerical methods on the computer.
 gnuplot for plotting data
 Processing for plotting data
Sayfa 4
Course Web Page

http://www.gantep.edu.tr/~bingul/ep208
 Also search Google and Wikipedia for any
of the expressions used in this course.
Sayfa 5
Course Content
1.
2.
3.
4.
5.
Sources of Errors
Numerical Differentiation
Roots of Equations
Optimization
Numerical Integration
6. Solutions of Differential Equations
7. Least Square Fitting
8. Monte Carlo Methods
Sayfa 6
Lectures, Labs, Attendance, Exams
 Mondays – 08:30-10:20 (17:00-18:40)
two-hour lecture
 Thursdays – 13:30-15:20 (19:45-21:30)
two-hour lab
 Attendance
You must attend at least 70% of the course
 Exams
 Mid-term s
 Quiz
 Final
40%
20%
40%
Sayfa 7
Grading
FIRST & SECOND EDUCATION
Independent from the arithmetic mean of the class,
the following rules will be applied for each student:
 00-19 -> FF
 20-29 -> FD
 30-39 -> DD
 40-49 -> DC
 50-59 -> CC
 60-66 -> CB
 67-75 -> BB
 75-84 -> BA
 85-99 -> AA
Sayfa 8
Computer Labs
 We’ll use Windows and/or Linux operating systems
 Every week, there will be a QUIZ
 You may need to save them on a flash drive or on the
internet.
DO NOT FORGET TO BRING
YOUR LAPTOP or FLASH DISK WITH YOU
Sayfa 9
Example Numerical Problems
1. Find the root of the equation:
cos( x) x
0
3
exp( x 2 )dx
2. Evaluate the integral:
0
3. Solve the differential equation:
d2y
9 sin y 0
2
dt
y (0) 0.1 and y ' (0) 0.0
Sayfa 10
Example Numerical Problems
Aerospace engineers sometimes compute the trajectories (path) of
projectiles like rockets. A trajectory of a rocket is defined by a (x, y)
coordinates and is modelled by
y
y0
(tan ) x
g
2v02 cos 2
x2
Find the appropriate
initial angle θ if v0 = 200 m/s
and x = 1950 m
(a) For y0 = 0 and y1 = 0
(a) For y0 = 28 m and
y1 = 123 m.
Sayfa 11
Solution:
(a) We have analytical solution
9.8
2
0 0 (tan )(1950)
(
1950
)
2(200) 2 cos 2
(b) 123
28 (tan )(1950)
9.8
2
(
1950
)
2(200) 2 cos 2
14.269 o
?
It is not easy to find the
analytical solution of
the last equation.
We can use a numerical
method which gives
17.246 o
We’ll see later…
Sayfa 12