# Project description¶

## Given task¶

In this exercise you will generate an inviscid, 2-D computational grid around a modified NACA 00xx series airfoil in a channel. The thickness distribution of a modified NACA 00xx series airfoil is given by:

where the “\(+\)” sign is used for the upper half of the airfoil, the “\(-\)” sign is used for the lower half and \(x_{int} = 1.008930411365\). Note that in the expression above \(x\), \(y\), and \(t\) represent values which have been normalized by the airfoil by the airf oil chord.

A sketch of the computational domain is shown below:

Each grid point can be described by \((x,y)\) location or \((i,j)\) location where \(i\) is the index in the \(\xi\) direction and the \(j\) index is in the \(\eta\) direction. The grid should have imax=41 points in the \(\xi\) direction and jmax=19 points in the \(\eta\) direction. The coordinates of points A-F shown in the figure are given in the following table:

Point | \((i,j)\) | \((x,y)\) | |

A | (1,19) | (-0.8,1.0) | |

B | (41,19) | (1.8,1.0) | |

C | (41,1) | (1.8,0.0) | |

D | (31,1) | (1.0,0.0) | (trailing edge) |

E | (11,1) | (0.0,0.0) | (leading edge) |

F | (1,1) | (-0.8,0.0) |

### Algebraic Grid¶

To complete this project you will first generate a grid using algebraic methods. Use uniform spacing in the \(x\) direction along FE, along ED, and along DC. (However, note that the spacing in the \(x\) direction along FE and DC will be different from the spacing along ED). Use uniform spacing in the \(x\) direction along AB. (However, note that the spacing in the \(x\) direction along AB will be different from that along FE, ED, and DC). For the interior points of the initial algebraic grid use a linear interpolation (in computational space) of the boundary \(x\) values:

Use the following stretching formula to define the spacing in the \(y\) direction:

where \(C_{y}\) is a parameter that controls the amount of grid clustering in the \(y\)-direction. (If nearly uniform spacing were desired we would use \(C_{y}\) = 0.001).

The algebraic grid generated now serves as the initial condition for the subroutines which generate the elliptic grid. The bounday values of the initial algebraic grid will be the same as those of the final elliptic grid.

### Elliptic Grid¶

The elliptic grid will be generated by solving Poisson Equations:

where the source terms,

where the \(A\)‘s must be defined by mathmatical manipulation.

On the boundaries, \(\phi\) and \(\psi\) are defined as follows:

At interior points, \(\phi\) and \(\psi\) are found by linear interpolation (in computational space) of these boundary values. For example,

## Challenges¶

Demonstrate your solver by generating 5 grids (each with 41x19 grid points):

### Grid #1¶

Initial algebraic grid, non-clustered (\(C_{y}\) = 0.001)

### Grid #2¶

Initial algebraic grid, clustered (\(C_{y}\) = 2.0)

### Grid #3¶

Elliptic grid, clustered (\(C_{y}\) = 2.0), no control terms (\(\phi\) = \(\psi\) = 0)

### Grid #4¶

Elliptic grid, clustered (\(C_{y}\) = 2.0), with control terms

### Grid #5¶

Now, use your program to generate the best grid you can for inviscid , subsonic flow in the geometry shown. You must keep imax = 41, jmax = 19 and not change the size or shape of the outer and wall boundaries. You may, however, change the grid spacing along any and all of the boundaries and use different levels of grid clustering wherever you think it is appropriate.