AE/ME 339 Professor of Aerospace Engineering December 21, 2001 topic13_grid_generation 1
The basic idea behind grid generation is the creation of the transformation laws between the phsical space and the computational space. These laws are known as the metrics of the transformation. We have alread performed a simple grid generation without realizing it for the flow over a heated wall when we used the, coordinates for the numerical scheme. This was simpl a transformation from one rectangular domain to another rectangular domain. December 21, 2001 topic13_grid_generation 2
Grid Generation (Chapter 5) Qualit of the CFD solution is strongl dependent on the qualit of the grid. Wh is grid generation necessar? Figure 5.1(net slide)can be used to eplain. Note that the standard finite difference methods require a uniforml spaced rectangular grid. If a rectangular grid is used, few grid points fall on the surface. Flow close to the surface being ver important in terms of forces, heat transfer, etc., a rectangular grid will give poor results in such regions. Also uniform grid spacing often does not ield accurate solutions. Tpicall, the grid will be closel spaced in boundar laers. December 21, 2001 topic13_grid_generation 3
December 21, 2001 topic13_grid_generation 4
Figure shows a phsical flow domain that surrounds the bod and the corresponding rectangular flow domain. Note that if the airfoil is cut and the surface straightened out, it would form the -ais. Similarl, the outer boundar would become the top boundar of the computational domain. The left and right boundaries of the computational domain would represent the cut surface. Note the locations of points a, b, and c in the two figures. December 21, 2001 topic13_grid_generation 5
Note that in the phsical space the cells are not rectangular and the grid is uniforml spaced. There is a one-to-one correspondence between the phsical space and the computational space. Each point in the computational space represents a point in the phsical space. The procedure is as follows: 1. Establish the necessar transformation relations between the phsical space and the computational space 2. Transform the governing equations and the boundar conditions into the computational space. 3. Solve the equations in the computational space using the uniforml spaced rectangular grid. 4. Perform a reverse transformation to represent the flow properties in the phsical space. December 21, 2001 topic13_grid_generation 6
General Transformation Relations Consider a two-dimensional unstead flow with independent variables t,,. The variables in the computational domain are represented b, and The relations between the two sets of variables can be represented as follows. t...(5.1 c), t,...(5.1 a), t,...(5.1 b) December 21, 2001 topic13_grid_generation 7
The derivatives appearing in the governing equations must be transformed using the chain rule of differentiation., t,, t,, t,, t The subscripts are used to emphasize significance of the partial derivatives and the will not be included in the equations that follow. December 21, 2001 topic13_grid_generation 8
...(5.2)...(5.3) t t t t,,,,,,,...(5.4)...(5.5) t t t t December 21, 2001 topic13_grid_generation 9
The first derivatives in the governing equations can be transformed using Eqs. (5.2), (5.3) and (5.5). The coefficients of the transformed derivatives such as the ones given below are known metrics.,,, Similarl, chain rule should be used to transform higher order derivatives. Eample: 2 2 2 2 2 2 2 2 2 2 2 2 2...(5.9) December 21, 2001 topic13_grid_generation 10
Metrics and Jacobian (5.3) In CFD the metric terms are not often available as analtical epressions. Instead the are often represented numericall. The following inverse transformation is often more convenient to use than the original transformation,,...(5.18 a),,...(5.18 b) t t...(5.18 c) December 21, 2001 topic13_grid_generation 11
Let = (), = () and u = u(, ). then we can write u u du d d...(5.19) u u u...(5.21) u u u...(5.20) Eqs. (5.21) and (5.22) are two equations for the two unknown derivatives. December 21, 2001 topic13_grid_generation 12
Solving for the partial derivate w. r. t gives, using Cramer s rule u u u...(5.22) Define the Jacobian J as J,,...(5.22 a) Eq. (5.22) can now be written in terms of J. u 1 u u...(5.23 a) J December 21, 2001 topic13_grid_generation 13
Similarl we can write the derivative w.r.t as u 1 u u...(5.23 b) J and we can define the following 1 u...(5.24 a) J 1...(5.24 b) J December 21, 2001 topic13_grid_generation 14
The above equations can be easil etended to three space dimensions (, an z). The above equations can also be obtained formall as follows,...(5.25 a) d d d...(5.26 a),...(5.25 b) d d d...(5.26 b) d d...(5.27) d d December 21, 2001 topic13_grid_generation 15
Similarl,...(5.28 a),...(5.28 b) d d d...(5.29 a) d d d...(5.29 b) d d...(5.30) d d December 21, 2001 topic13_grid_generation 16
Eq. (5.30) can be solved for d, d 1 d d...(5.31) d d Consider the conservation form 2D flow with no source term U F G 0...(5.37) t December 21, 2001 topic13_grid_generation 17
1...(5.32) Using results from matri algebra for inversion of matrices, RHS can be written as follows...(5.33) December 21, 2001 topic13_grid_generation 18
Since the determinant of a matri and its transpose are the same we can write J...(5.34) Substitute Eq. (5.34) into Eq. (5.33) 1...(5.35) J December 21, 2001 topic13_grid_generation 19
Comparing corresponding elements of the two matrices on the LHS and the RHS gives the following relations. 1 J...(5.36 a) 1 J 1 J...(5.36 b)...(5.36 c) 1...(5.36 d) J December 21, 2001 topic13_grid_generation 20
Consider the conservation form 2D flow with no source term U F G 0...(5.37) t December 21, 2001 topic13_grid_generation 21
The above equation can be transformed to (see section 5.4) U1 F1 G1 0...(5.38) t Where the U1, F1, and G1 are as follows U1 JU...(5.48 a) F1 JF JG...(5.48 b) G1 JF JG...(5.48 c) December 21, 2001 topic13_grid_generation 22
Algebraic Methods Known functions are used to map irregular phsical domain into rectangular computational domains. December 21, 2001 topic13_grid_generation 23
Eample: Grid stretching ma be necessar for some problems such as flow with boundar laers. Let us consider the transformation:...(5.50 a) ln( 1)...(5.50 b) Inverse transformation...(5.51 a) ep( ) 1...(5.51 b) December 21, 2001 topic13_grid_generation 24
The following relation (Eq. 5.52) hold between increments and d d e d e d e...(5.52) December 21, 2001 topic13_grid_generation 25
December 21, 2001 topic13_grid_generation 26 Computational Fluid Dnamics (AE/ME 339) Therefore as increases, increases eponentiall. Thus we can choose constant and still have an eponential stretching of the grid in the -direction. 0...(5.53) ) ( ) ( ) ( ) ( v u 0...(554) ) ( ) ( ) ( ) ( v v u u 1 0 0 1 1 (5.55)
December 21, 2001 topic13_grid_generation 27 Computational Fluid Dnamics (AE/ME 339) Substitute in Eq. (5.54) to get 0...(5.56) ) ( 1 1 ) ( v u 0...(5.57) ) ( 1 ) ( v e u 0 ) ( ) ( v u e Eq. (5.57) is the continuit equation in the computational domain. Thus we have transformed the continuit equation from the phsical space to the computational space.
The metrics carr the specifics of a particular transformation. Boundar Fitted Coordinate Sstem (5.7) Here we consider the flow through a divergent duct as given in Figure 5.6 (net slide). de is the curved upper wall and fg is the centerline. Let s = f() be the function that represents the upper wall. The following transformation will give rise to a rectangular grid. = (5.65) = /s (5.66) To test this choose s = 1.5 and let var from 1 to 5. At = 1, = 1, ma =ma/s = 1, and = 5, = 5, ma = ma/s = 1. Thus the irregular domain is transformed into into a rectangular domain. December 21, 2001 topic13_grid_generation 28
Consider a second case where the Nozzle wall is curved December 21, 2001 topic13_grid_generation 29
...1 2 2 ma ma 1, 0 3 2 2 2 2 1 1 2 2 December 21, 2001 topic13_grid_generation 30
December 21, 2001 topic13_grid_generation 31 Computational Fluid Dnamics (AE/ME 339) The above formulation is analtic,,, The Jacobian is defined as Could also be obtained using central differencing. J ), ( ), (
Consider a point in the domain where we have Let = 1.75, = 0.75 Let us calculate _ analticall and numericall. At this point: 1.75 0.75 (1.75) 2.29688 2 2 0.75 2 2 0.85715 1.75 1.0, 0 December 21, 2001 topic13_grid_generation 32
We can also numericall calculate the derivatives using CD 3.0625 1.53125 3.0625 20.25 1 I J 13.0625 00 3.0625 1.5 : 2.250.75 1.6875 ma ma 2 : 40.75 3.0 3.0 1.6875 2.625 2.0 1.5 2.625 0.85714 I 3.0625 December 21, 2001 topic13_grid_generation 33
December 21, 2001 topic13_grid_generation 34