The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
17.1. FLOW PAST A RECTANGLE
135
is parallel to the xaxis, must be constant. Matching the constant to the value of
on the midline, we obtain = 0 along the boundary of the obstacle.
From the noslip condition, v = 0 on the sides and u = 0 on the top. There
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
12.3. PHASE PORTRAITS
12.3
85
Phase portraits
The phase space of a dynamical system consists of the independent dynamical variables. For example, the phase space of the damped, driven pendulum equations given
by (11.15) is three dimensional and consists o
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
115
The third part of this course considers a problem in computational uid dynamics
(cfd). Namely, we consider the steady twodimensional ow past a rectangle or a circle.
116
Chapter 14
Derivation of the governing
equations
We derive here the governing eq
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
Chapter 16
Stream function, vorticity
equations
16.1
Stream function
A streamline at time t is dened as the curve whose tangent is everywhere parallel to
the velocity vector. With dx along the tangent, we have
u dx = 0;
and with u = (u, v, w) and dx = (dx
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
10.2. PERIOD OF MOTION
65
the real parts and the imaginary parts of (10.6), and we nd
r
T
,
m
g sin .
r2 = g cos
r + 2r =
(10.7)
(10.8)
If the connector is a rigid rod, as we initially assumed, then r = l, r = 0, and r = 0.
The rst equation (10.7) is the
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
5.2. LU DECOMPOSITION
35
where L is a lower triangular matrix and U is an upper triangular matrix.
Using the same matrix A as in the last section, we show how this factorization
is realized. We have
0
1
0
1
3
2
1
3
2
1
@ 6
2
5A = M1 A,
6
7A ! @ 0
0
2
3
3
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
13.5. PERIOD DOUBLING IN THE LOGISTIC MAP
105
A period2 cycle of the map f (x) necessarily corresponds to two distinct xed points
of the composite map (13.7). We denote these two xed points by x0 and x1 , which
satisfy
x1 = f (x0 ), x0 = f (x1 ).
We will
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
Chapter 1
IEEE arithmetic
1.1
Denitions
The real line is continuous, while computer numbers are discrete. We learn
here how numbers are represented in the computer, and how this can lead to
roundo errors. A number can be represented in the computer as a
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
Chapter 4
Dierential equations
We now discuss the numerical solution of ordinary dierential equations. We
will include the initial value problem and the boundary value problem.
4.1
Initial value problem
We begin with the simple Euler method, then discuss
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
2.5. ORDER OF CONVERGENCE
15
or
n+1 = n +
f (xn )
.
f 0 (xn )
(2.1)
We use Taylor series to expand the functions f (xn ) and f 0 (xn ) about the root
r, using f (r) = 0. We have
1
r)f 0 (r) + (xn
2
f (xn ) = f (r) + (xn
r)2 f 00 (r) + . . . ,
1
n f 0 (r)
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
Chapter 7
Iterative methods
7.1
Jacobi, GaussSeidel and SOR methods
Iterative methods are often used for solving a system of nonlinear equations.
Even for linear systems, iterative methods have some advantages. They may
require less memory and may be com
The Hong Kong University of Science and Technology
Scientific Computing
MATH 164

Fall 2013
11.2. THE NONLINEAR PENDULUM
75
t, and reuse some of the other parameter names, with the understanding that the
damped, driven pendulum equation that we will now study numerically is dimensionless. We will therefore study the equation
1
+ + sin = f cos