Application Center - Maplesoft

App Preview:

Fluid Flow Past a Cylinder

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application





Fluid Flow Past a Cylinder 

? 2008 Waterloo Maple Inc 




This worksheet demonstrates how Maple can be used in the field of fluid dynamics. We analyze and illustrate various flows past a cylinder of radius 1. First, a written procedure creates a Maple plot structure that displays a cylinder of radius 1 and the streamlines related to the input function. 



Procedure to Graph Streamlines Past a Cylinder 

A procedure called 'streams' will take four values as input. These parameters are:       n, the number of stream lines to be displayed,       fcn, the stream function to be plotted,       pts, the value of numpoints in a plot structure, and       name, the title of the graph 


Click on the code edit button to define the 'streams' procedure. To view to code for yourself, right click on the button and select "Expand Code Edit Region." 


Button#Defining Streams  



Flow of an Inviscid, Irrotational Fluid Past a Disk 


First, use the circle theorem (Milne-Thompson Theorem) to find the complex potential of the flow past a disk of radius 1. Then separate the terms to find the velocity potential of the flow and the stream function of the flow. Finally, we use the procedure 'streams' to plot the streamlimes of the flow past the disk. 


Uniform flow is given by  


`:=`(f, proc (z) options operator, arrow; `*`(U, `*`(z)) end proc); -1 


Where U is the velocity of the flow of the fluid. Now the circle theorem gives 


`:=`(W, proc (z) options operator, arrow; evalc(`+`(f(z), f(`/`(`*`(`^`(a, 2)), `*`(z))))) end proc); -1 


The complex potential, W(z), of the flow is given by: 



`+`(`*`(U, `*`(z)), `/`(`*`(U, `*`(`^`(a, 2))), `*`(z))) (3.1)

Letting z = `*`(x, `*`(exp(`*`(I, `*`(y))))); -1, assuming the variables x, y are real, and assigning values to U and a, we obtain the following: 


assume(x, real, y, real, z, real); 1; `:=`(U, 1); -1; `:=`(a, 1); -1 


`+`(z, `/`(1, `*`(z))) (3.2)


`:=`(ComplexPotential, W(`*`(x, `*`(exp(`*`(I, `*`(y))))))) 

`+`(`*`(x, `*`(cos(y))), `/`(`*`(cos(y)), `*`(x, `*`(`+`(`*`(`^`(cos(y), 2)), `*`(`^`(sin(y), 2)))))), `*`(I, `*`(`+`(`*`(x, `*`(sin(y))), `-`(`/`(`*`(sin(y)), `*`(x, `*`(`+`(`*`(`^`(cos(y), 2)), `*`(... (3.3)


`:=`(VelPlot, Re(ComplexPotential)) 

`+`(`*`(x, `*`(cos(y))), `/`(`*`(cos(y)), `*`(x, `*`(`+`(`*`(`^`(cos(y), 2)), `*`(`^`(sin(y), 2))))))) (3.4)

`/`(`*`(`+`(1, `*`(`^`(x, 2))), `*`(cos(y))), `*`(x))`:=`(StrmFcn, Im(ComplexPotential)) 

`+`(`*`(x, `*`(sin(y))), `-`(`/`(`*`(sin(y)), `*`(x, `*`(`+`(`*`(`^`(cos(y), 2)), `*`(`^`(sin(y), 2)))))))) (3.5)


`/`(`*`(`+`(`-`(1), `*`(`^`(x, 2))), `*`(sin(y))), `*`(x)) (3.6)



Now, use the 'streams' procedure to plot this. 


streams(10, StrmFcn, 1000,  





Modify the Angle of Attack 

Calculate the flow past a disk of radius 1 with the angle of attack to be `+`(`*`(`/`(1, 6), `*`(Pi))) radians below the x-axis. 

`:=`(fcn2, `*`(`+`(x, `-`(`/`(1, `*`(x)))), `*`(sin(`+`(y, `-`(`*`(`/`(1, 6), `*`(Pi)))))))); -1 

streams(10, fcn2, 1000,  



Fluids with Circulation 


In this case, the fluid flow has a circulation of 8 past a disk of radius 1, with an angle of attack of `+`(`-`(`*`(`/`(1, 6), `*`(Pi)))).This is simply to illustrate the graphics and to provide another example. 


`:=`(fcn3, `+`(`*`(`+`(x, `-`(`/`(1, `*`(x)))), `*`(sin(`+`(y, `*`(`/`(1, 6), `*`(Pi)))))), `*`(8, `*`(ln(x), `*`(`/`(`+`(`*`(2, `*`(Pi))))))))); -1 

streams(10, fcn3, 1000,  





Display an animation of the circulation of the fluid changing from -8 to 8 as it flows past a disk of radius 1, with an angle of attack `+`(`-`(`*`(`/`(1, 4), `*`(Pi)))). To view the animation click on the plot once it has been generated, and use the animation button bar or 'animation' on your context-sensitive menu (right-click your mouse on the plot with a PC). 


`:=`(fcn, proc (circ) options operator, arrow; `+`(`*`(`+`(x, `-`(`/`(1, `*`(x)))), `*`(sin(`+`(y, `*`(`/`(1, 4), `*`(Pi)))))), `/`(`*`(`/`(1, 2), `*`(circ, `*`(ln(x)))), `*`(Pi))) end proc); -1 

`:=`(A, [seq(streams(10, fcn(`*`(2.5, `+`(i, `-`(9)))), 300,
`:=`(A, [seq(streams(10, fcn(`*`(2.5, `+`(i, `-`(9)))), 300,

display(A, seq(A[`+`(15, `-`(i))], i = 1 .. 14), insequence = true, scaling = constrained); 1 





Legal Notice: The copyright for this application is owned by Maplesoft. The application is intended to demonstrate the use of Maple to solve a particular problem. It has been made available for product evaluation purposes only and may not be used in any other context without the express permission of Maplesoft.