Step 5: Solve!
Set Solution Controls
Main Menu > Solve > Controls > Solution...
Select PISO from the Pressure-Velocity Coupling drop-down list.
PISO allows the use of higher time step size without affecting the stability of the solution. Hence it is recommended pressure-velocity coupling for solving transient applications.
Uncheck Skewnes-Neighbor Coupling.
Select Second Order Upwind from the Momentum drop-down list in the Discretization group box. Click OK to close the Solution Controls panel.
Set Initial Guess
Initialize the flow field to the values at the inlet:
Main Menu > Solve > Initialize > Initialize...
In the Solution Initialization menu that comes up, choose farfield1 under Compute From. The X Velocity for all cells will be set to 1 m/s, the Y Velocity to 0 m/s and the Gauge Pressure to 0 Pa. These values have been taken from the farfield1 boundary condition.
Click Init. This completes the initialization. Close the window.
Patch Region
We will patch the upper region downstream of the flow to create asymmetry so that we can obtain stable oscillation of vortex shedding faster.
To do this, we will create a register to patch the Y velocity in downstream of cylinder.
Main Menu > Adapt > Region...
Enter 1
and 40
for X Min and X Max. Enter 0
and 10
for Y Min and Y Max. Click Mark. FLUENT will print the following message in the console window:
5416 cells marked for refinement, 0 cells marked for coarsening
Close the Region Adaption panel.
We will now patch Y velocity in the registered region.
Main Menu > Solve > Initializate > Patch...
Select hexahedron-r0 from the Registers to Patch. Select Y Velocity from the Variable selection list. Enter 0.3
for Value. Click Patch.
To check whether you have patch the region, plot contour of velocity in the y direction.
Main Menu > Display > Contours...
Select Velocity... and Y Velocity under Contours of drop-down list. Make sure to check the Filled under Options. Click Display.
As can be seen, the Y Velocity is zero everywhere except for the patched region, we have Y Velocity of 0.3 m/s.
Set Convergence Criteria
FLUENT reports a residual for each governing equation being solved. The residual is a measure of how well the current solution satisfies the discrete form of each governing equation. We'll iterate the solution until the residual for each equation falls below 1e-3.
Main Menu > Solve > Monitors > Residual...
Default value for Convergence Criterion for continuity, x-velocity, and y-velocity is 1e-3
.
Also, under Options, select Plot and Print. This will plot the residuals in the graphics window as they are calculated.
Click OK.
Monitor also the lift coefficient on the cylinder.
Main Menu > Solve > Monitors > Force...
Under Coefficient, select Lift. Select cylinder under Wall Zones. Under Options, select Print, Plot and Write. Note that Plot Window is 1. Click Apply.
Set Reference Values
The reference values are used to non-dimensionalize the forces and moments action on the wall surface.
Main Menu > Reference Values...
Select farfield1 from the Compute From drop-down list. FLUENT will update the reference values based on the boundary conditions at farfield1. Change Area to 2
. Click OK.
Note that cross sectional area for a 2D cylinder is the diameter of the cylinder. Setting the right area is important for getting correct drag coefficient.
Set Animation Control (Optional)
Let's set the animation to observe the vorticity magnitude.
Main Menu > Solve > Animate > Define...
Increase the Animation Sequences to 1
. Enter 10
for Every. Select Time Step from When drop-down list. Click Define... for sequence-1 to open the Animation Sequence panel.
Increase Window to 2
and click the Set button to open a graphics window. Select Contours from the Display Type list to open the Contours panel. Select Velocity... and Vorticity Magnitude from the Contours of drop-down lists.
Disable Auto Range and Clip to Range from the Options group box. Enter 0.0001
and 2
for Min and Max, respectively. Select Levels to 50. Click Display. Click OK to close the Animation Sequence panel. Click OK to close the Solution Animation panel. This will save .hmf file after every 10 time steps. We can later create an animation in the form of movie clip using these files. Save the case and data files.
Main Menu > File > Write > Case & Data...
Reviewing Animation
We can review the animation created after we are done with iterations.
Solve > Animate > Playback...
To write in MPEG format, go to Write/Record Format, select MPEG. Click Write.
Note that you don't necessarily get a good format when exporting to MPEG. It is advisable to use the available playback option.
Iterate the Solution
Main Menu > Solve > Iterate...
You will have to input the time step size for iteration. Smaller time step means more accurate result but more computational time. We need to find the balance between accuracy and computational time.
Calculating Time Step Size
The Strouhal number for flow past cylinder is roughly 0.183 as reported by Williamson .
In order to capture the shedding correctly, we should have at least 20 to 25 time steps in one shedding cycle. Let's use 25 for our case.
For our case, D = 2, U = 1
Therefore, shedding frequency f = 0.0915
Cycle time,
Therefore, Time Step Size = 10.9/25 = 0.436 sec ~ 0.4 sec
Enter 0.4
for Time Step Size (s). Enter 30
for Max. Iterrations per Time Step. Enter 800
for Number of Time Steps. Click Apply. Click Iterate to start the iterations.
We can see a clear sinusoidal pattern, a sign of sustained vortex shedding process after 40s. Stop the iteration after about 350s.
Save the case and solution.
Main Menu > File > Write > Case & Data...
Use the default name (Mesh's file name "cylinder") and click OK.