John C. Chien
|
October 29, 1998 17:40 |
Re: grid generation
(1). equation-18a,18b,18c define coordinate transformation factors between (X,Y) and (XI,ETA) coordinate systems.(2). equation-20 is a vector equation for vector-r, which need to be written in two separate equations, one for X and one for Y. (3). for X-equation, it now takes the form: g22*(X,xi,xi + P * X,xi ) + g11 * ( X,eta,eta + Q * X,eta ) - 2.0* g12 * X,xi,eta =0. (4). the first order derivatives ( or the transformation factors ) can be evaluated during the iteration as, say, X,xi = ( X(i+1,j)-X(i-1,j) )/ ( xi(i+1,j)- xi(i-1,j) ). if we assume the transformed mesh ( XI, YI ) is divided into one unit square, then (xi(i+1,j)-xi(i-1,j))=2 units. and the first order derivative X,xi = 0.5 * ( X(i+1,j) - X(i-1,j) ). (5). for the second order derivatives, such as X,xi,xi= ( X(i+1,j) - 2.0 * X(i,j) + X(i-1,j) ), it is a second order central difference. (6). the mixed derivative is done is two steps, first find the first order derivatives at j+1 and j-1 locations, then use these two to find the second order mixed derivatives. (7). when you substitute these finite-difference form of the transformation factors into the equation in step-3 above, you are going to get an equation with a lot of X(i,j), X(i+1,j), X(i-1,j),......So, it is very important to group terms with X(i,j) into one group, and keep the rest of the terms in another group. (8). rearrange the equation into the form: X(i,j) = ( the rest of the terms which include X(i+1,j), X(i-1,j),...etc...), (9). the S.O.R. method says that you can update the field point ( X(i,j) ) one-by-one in a loop ( loop 750) by using "old neighboring point values ( X(i+1,j),.. just calculated )". (10). the newly calculated value of X(i,j) is stored at XTEMP and the O.R. (over-relaxation) part is carried out using the orve-relaxation factor w (set equal to 1.8).(11). there are a couple of typo in the code such as YTENP, XTENP. (12). time's up , I have to go now.
|