CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   divergence in MAC Method (

Maciej Matyka December 15, 2000 07:53

divergence in MAC Method

i have new problem with my program.

i see than divergence equations fails. my divergence equation is:

D[i][j] = (U[i][j] - U[i-1][j])/dx + (V[i][j] - V[i][j-1];

in paper by Harlow Welch (MAC method) he write than divergence cannot be larger than 3.5 * 10^(-4). Ok, but when divergence is too big for one of cells, then i cannot make it smaller (when i less dt, Divergence dont change). Any ideas?

/// maq

ps. just small question - width of output = 256

height of output = 256

number of cells x = 64

number of cells y = 64

thats means than dx,dy = 256/4 ???

Maciej Matyka December 15, 2000 12:00

errata :)
sorry: of corse:

D[i][j] = (U[i][j] - U[i-1][j])/dx + (V[i][j] - V[i][j-1];


dx,dy = 256/64???


anyway anybody know?

Senthil December 19, 2000 11:43

Re: errata :)
dear maq check ur D eqns, dy is missing there.if it is the typing mistake here alone, then the culprit is the way u evaluate the u and v.

u(i,j) is average of u(i,j) and u(i-1,j) and

u(i-1,j) is average of u(i-2,j) and u(i-1,j) and so forth.check this out by senthil.

All times are GMT -4. The time now is 07:30.