u, x + v, y = 0
(1)
u,t + ( uu ), x + ( vu ), y =
v, t + ( uv ), x + ( vv ), y =
p, x + ( u, xx + u, yy )
(2)
p, y + ( v, xx + v, yy ) g
(3)
u, x =
v, y =
u, xx =
v, yy =
ui +1, j ui 1, j
2hx
vi , j +1 vi , j 1
2 hy
, u, y =
, v, x =
ui +1, j 2ui , j + ui 1, j
hx2
vi , j +1 2vi , j + vi , j 1
2
y
ui , j +1 ui , j 1
2hy
vi +1, j vi 1, j
2hx
, u, yy =
, v, xx =
ui , j +1 2ui , j + ui , j 1
(4)
hy2
vi +1, j 2vi , j + vi 1, j
hx2
ui +1 j ui 1 j
2hx
vij +1 vij 1
2hy
=0
(5)
uij , t + uij
vij , t + uij
ui +1 j ui 1 j
2hx
vi +1 j vi 1 j
2hx
+ vij
+ vij
uij +1 uij 1
2 hy
vij +1 vij 1
2hy
hx2
hy2
h
h
x
y
(6)
(7)
uij , t = f u ( u , v )
vij , t = f v ( u , v )
(8)
We will discretise these equations in time with the use of the Adam Bashfort 2
method for time discretisation. We will first calculate a guess for the velocity and
use the pressure from the old time level. After that we will update the pressure
with the use of equation (1) and calculate the velocities for the new time level.
The Adam Bashfort 2 scheme is given as:
3
1
fu ( u n , v n ) f u ( u n 1 , v n 1 )
2
2
3
1
v* = v n + f v ( u n , v n ) f v ( u n 1 , v n 1 )
2
2
u* = u n +
u * = u n + fu ( u n , v n )
v* = v n + f v ( u n , v n )
Staggered pressure correction can be found in other scannend file.
(9)