You are on page 1of 13

HOMEWORK 4

Sebastian Calero
TASK 1
SIMPLER 1.0:
First, we start with random initial guesses:
SIMPLER 1.1:
Then, the matrices A and B are assembled using each of the 15 u and 15 v momentum
equations without the pressure terms:

A B

u-momentum

v-momentum
SIMPLER 1.2
Then, the matrix A is split into a diagonal part (Adiag) and a neighbouring part (Anb):

A Adiag Anb

= +
SIMPLER 1.3:
Adiag and Anb are used to compute [𝑢,
ො 𝑣]:

[𝑢, 𝑣] [𝑢,
ො 𝑣]

SIMPLER 1.4
Using [𝑢,
ො 𝑣]
ො and Adiag, the matrices 𝐴𝑝 and 𝐵𝑝 are obtained to build the pressure correction equations

Although I tried, I wasn’t able to find or plot 𝐴𝑝 and 𝐵𝑝 which supposedly had 20 rows for the
20 unknown pressures, so instead I got the normal A and B which I show next:

A B
SIMPLER 1.5
Solving 𝐴𝑃 𝑋𝑃 + 𝐵𝑃 = 0 we obtain the new pressure p vector (𝑋𝑃 ):

[𝑢, 𝑣] [𝑢,
ො 𝑣]
ො and the new p
SIMPLER 2.1
We update B with the pressure terms from each of the 15 u and 15 v momentum
equations using the newly obtained p:
A B

u-momentum

v-momentum
SIMPLER 2.2
Solving 𝐴𝑢𝑣 𝑋𝑢𝑣 + 𝐵𝑢𝑣 = 0 we obtain the new 𝑢∗ and 𝑣 ∗ :

[𝑢,
ො 𝑣]
ො and the new p [𝑢∗ , 𝑣 ∗ ] and the new p
SIMPLER 3
Using [𝑢∗ , 𝑣 ∗ ] and the Adiag, 𝐴𝑝′ and 𝐵𝑝′ are obtained to build the pressure correction equations

Again, although I tried, I wasn’t able to find or plot 𝐴𝑝′ and 𝐵𝑝′ which supposedly had 20 rows
for the 20 unknown pressures, so instead I got the normal A and B which I show next:

A B
SIMPLER 4
Solving 𝐴𝑝′ 𝑋𝑝′ + 𝐵𝑝′ = 0 we obtain the pressure correction vector p’ and then apply it to obtain the new u and v:

[𝑢∗ , 𝑣 ∗ ] and the new p [𝑢, 𝑣] and the new p


SIMPLER Outer-iteration

Final converged solution

You might also like