Discretization

The equations (a) and (b) from the "Numerical Calculations" page are the fundamental equations.

(a)

(b)

Discretize these equations to calculate with computer.

  Here, Forward difference is like this,

  Central difference is,

  Backward difference is,

  Second order central difference is,


How to handle the Coordinates

We use staggered grid for MAC method. It have pressure node in between velocity nodes.

Like the picture above, put a pressure node at the center of cell, and put velocity nodes at the both edges.

So that the forward difference of velocity will be at the center of the cell, and it agree with the central difference of pressure.

Discretize the fundarmental equation (a) (b)

Expanse the left side of the equation (a),

Discretize this,

   

       

   

               

Here for is the sequence of the nodes. It should be written like for three dimensions, but I write only the concerning direction and drop the others so that it's easy to read.

Talking about  , it also should be considered its value at the center of the cells. So to calculate , those should be on the extension of the center of the cells.

 For example, to get  , average those four circled by the blue line and s circled by the red line are for . Do the same thing for ,,, and . Here, indicates those averaged values lake down below,

   

       

           

               

Name the calculated right side as .

   

Rewrite it as a equation for .

   

We can't calculate it at once because there is in the both side. So we calculate it for all the nodes again and again and converge it gradually.



Discretize equation (b),

   

First, break down the for component.

   

Note that and in the right side is the current value.

Discretize this,

   

       

Here in this equation are averaged values of four surrounding because we consider things on , like we did it with the equation (a) before. The same for .

Do the same thing for .

   

               

   

               

Calculate the next by these equations. Then back to the first sequence to calculate , then do for next again.

Home > Fluid Solver

Copyright(C) Since 2007 DeepDigital Co.,Ltd. All Rights Reserved.