Non-uniform grid calculation
A greenhand in CFD asking: Generally people apply non-uniform grid when variable gradient in field change much. This is better than using very fine grid everywhere. However, when using non-uniform grid, extra work are involved:
1. Must keep grid information (say, size )
2. Matrix coeff. (A of Ax=b) is no longer constant. (e.g. in five point scheme U(i,j)=1/4(...)+f, we need not store the coefficient at all, and for all grid point, they are same), this means we need to calculate the coefficient of Matrix each time of iteration or calculate it once for all and store it. However, the former involves huge calculation effort (for each grid point, we need calculate 4 coeff.) or storage spce (each point we have 4 value to store).
My question is:
1. How to evaluate the effectiveness of non-uniform grid?
2. How to cope with that non-constant matrix, shall I calculate once and store it (huge space usage) or calculate it each iteration (huge calculation work). There should be more efficient way to do this, but how?
Re: Non-uniform grid calculation
(1). If you have a boundary layer next to a wall, with a free stream cell size to the wall cell size ratio of 2000, the total number of cells needed for the boundary layer can be reduced to say 20 to 30 cells, depending upon the stretching ratio used. (2). If you use the near-wall cell as the minimum cell size, and if you use the uniform mesh approach, it going to take a large number of mesh points to cover the same area. You can try to calculate it as an exercise. (3).In terms of the geometric information, you need to define the basic location of the mesh points, or vertices. The derived geometric parameters, such as spacings, areas, volume can be computed from the basic parameters. (4). If you store the derived parameters, then you need to have more memory space. Some commercial codes use 1cell to 1000bytes to estimate the RAM requirement, which meand (1000/4)=250 variables are reserved to store various geometric parameters. (5). You don't have to store the derived geometric parameters. That is perfectly all right. If you ask the program to re-calculate it, it will do that for you. (6). So, the answer to the first question is: there is a huge difference in mesh points by using non-uniform mesh vs uniform mesh. And the answer to the second question is: when the memory chips are cheap, store it; when the price is high, re-calculate it. The choice is yours. (7). Optimization? Great, but sometimes it is hard to split Elian into two halves.....not very practical.
|All times are GMT -4. The time now is 21:49.|