Flow Around a Cylinder

    Because of the complexity of the process, we will create and define a Mathematica command called CylinderFlow that takes as input the (x, y) coordinates of the center of the circle, the radius r of the circle, and a time t. It returns a picture of the vector field, the initial circle, and the resulting shape the circle has been deformed into after it has flowed with the vector field for the specified time. Here is the Mathematica code that accomplishes this task.

Needs["Graphics`PlotField`"] ; CylinderFlow[{xcenter_, ycenter_}, radius_, time_] := ... 2371;DisplayFunction$DisplayFunction, PlotRange {{-3R, 3R}, {-3R, 3R}}] ]

    To see what happens to a circle of radius 1/2 centered at (-2, 1) after 2 units of time, we simply execute the following.

CylinderFlow[{-2, 1}, 1/2, 2] ;

[Graphics:../HTMLFiles/index_353.gif]

    It is even more interesting to animate the result; the following Mathematica function, called AnimateCylinderFlow does that. Like CylinderFlow it takes as input the (x, y) coordinates of the center of the circle, the radius r of the circle, and a time t which is the end time of the animation. It also takes a timestep, which is the amount of time that passes between frames. Here is the necessary Mathematica code.

Needs["Graphics`PlotField`"] ; AnimateCylinderFlow[{xcenter_, ycente ... 2754;$DisplayFunction],  {tau, 0, time, timestep}] ; Return[picture] ; ] ;

    Here is the result for a circle of radius 1/2 and center (-2, 2) for R = 1 and U = 1/2.

AnimateCylinderFlow[{-2, 2}, 1/2, 10, 0.25] ;

Cylinder Flow (-2,2)

We can compare the results as we change the center point through (-2, 1), (-2, 1/2), and (-2, 0).

AnimateCylinderFlow[{-2, 1}, 1/2, 10, 0.25] ;

Cylinder Flow (-2,1)

AnimateCylinderFlow[{-2, 1/2}, 1/2, 10, 0.25] ;

Cylinder Flow (-2,1/2)

AnimateCylinderFlow[{-2, 0}, 1/2, 10, 0.25] ;

Cylinder Flow (-2,0)