Need to get flow around cylinders in a channel by creating


Question: You need to get flow around cylinders in a channel by creating a grid and specifying the intial flow velocity.

1. Consider the 4 × 2m channel to be covered by an x-y grid of finite spacing ? = ?x = ?y. The aim is to determine the stream function at each grid point on the grid. Select a grid spacing such that the height of the channel is eg. 50? and the width 75?.

2. Use meshgrid to define arrays x arr and y arr that contain the x and y co-ordinates of all points in the grid. Define an array Psi in which to store the estimated stream function values at each grid point.

3. Put Psi = Uo * y arr this will generate a uniform stream function at each grid point.

4. Now accumulate the contributions from each cylinder, eg. for i = 1:no_of_cyls x_norm = x_arr - x_c(i); y_norm = y_arr - y_c(i); Psi = Psi - Uo .* radii(i)^2 .* y_norm ./(x_norm.^2 + y_norm.^2); end

5. Specify a starting guess for the stream function by evaluating the analytical estimate at each point on the grid.

6. Calculate the corrected stream function Ψc = Ψ1+Ψ2+Ψ3+Ψ4 4 for each grid point (xi , yj ) inside the domain.

7. Set the stream function of all points coinciding with the boundary streamline of each cylinder as the average of all such boundary values.

8. The top and bottom edges of the domain are streamlines, so the stream function must be constant on these edges.

9. At inlet and outlet the stream function of the boundary points should be reset to their original free-stream values with no interior obstacles (uniform flow U0y) 21

10. Every 50 iterations visualise the stream function using the Matlab functions contour(Psi) and mesh(Psi). Velocity vectors can be plotted using the quiver command, you will need to differentiate the stream function to obtain them.

11. Iterate: repeat from step 6 until changes at each iteration are below some small level (eg 0.01%)

As its a 2d grid the mass is accumulated as the y value increases.

An inital stream function is calculated by adding up 4 points and taking the mean.

the stream function is then corrected until the change each time is smaller than a given value

The problem i have is that not all the 6 cylinders are showing up on my final contour plot

Request for Solution File

Ask an Expert for Answer!!
Mechanical Engineering: Need to get flow around cylinders in a channel by creating
Reference No:- TGS0962124

Expected delivery within 24 Hours