Back to all tutorials

Von Karman Vortex Street - CFD Simulation SimFlow Tutorial

1. Introduction

In this tutorial, we simulate the process of von Karman vortex street formation. We model on 2D water flow around a cylinder. We show the parametrization possibilities at each modeling stage (geometry, mesh, and setup). We will monitor the forces exerted on the cylinder and visualize the vorticity fields behind it using ParaView.

2. Download SimFlow

SimFlow is a general purpose CFD Software

To follow this tutorial, you will need SimFlow free version, you may download it via the following link:
Download SimFlow

3. Create Case

Open SimFlow and create a new case named vortex street

  1. Click New
  2. Provide name vortex street
  3. Click Create to open a new case

4. Create Geometry Parameters

We will be using parameters extensively during this simulation. Therefore, we will add d parameter denoting cylinder diameter.

  1. Go to Parameters panel
  2. Define the new parameter
  3. Click Enter or Create Parameter button
  4. The newly created parameter will be shown in the parameters list.
von Karman 02 Parameters

5. Create Geometry - Cylinder

By using the d parameter, we will create a cylinder geometry. The cylinder will be used as an obstacle in the flow path.

  1. Go to Geometry panel
  2. Select Create Cylinder
  3. Set the origin:
    Origin \({\sf [m]}\)00-1e-02
  4. Set the cylinder dimensions:
    Length \({\sf [m]}\)0.02
    Radius \({\sf [m]}\)d/2
von Karman 03 Geometry Cylinder

6. Create Geometry - Cylinder Refinement

For better flow prediction in the region near and downstream of the cylinder, we will refine the mesh. For this purpose, we will create refinement geometry.

  1. Expand options list for cylinder_1
  2. Select duplicate
  3. Change geometry name from cylinder_2 to cylinder_refinement
    (double click to edit name and press Enter to confirm)
  4. Change the cylinder radius to
    Radius \({\sf [m]}\)d*2
von Karman 04 Geometry Cylinder ref

7. Create Geometry - Box Refinement

  1. Select Create Box
  2. Change geometry name from box_1 to box_refinement
  3. Set the origin and box dimensions
    Origin \({\sf [m]}\)0-2*d-1e-02
    Dimensions \({\sf [m]}\)15*d4*d0.02
von Karman 05 Geometry box refi

8. Meshing Parameters - Cylinder

Set the meshing parameters for the cylinder geometry. This geometry will be used as a wall, therefore we will additionally enable the boundary layer option.

  1. Go to Hex Meshing panel
  2. Select cylinder_1
  3. Enable Mesh Geometry
  4. Enable Create Boundary Layer Mesh
  5. Make sure that Create Boundary Layer On This Group options is pressed
von Karman 06 Mesh Cylinder Prop

9. Meshing Parameters - Box Refinement

The box_refinement and cylinder_refinement geometries should be used only for marking refinement zones. Set the proper parameters for the refinement regions.

  1. Select box_refinement from the list
  2. Enable Refine Geometry
  3. Set the refinement Level to 1
von Karman 07 Mesh Refinement Prop 1

10. Meshing Parameters - Cylinder Refinement

  1. Select cylinder_refinement from the list
  2. Enable Refine Geometry
  3. Set the refinement Level to 1
von Karman 08 Mesh Refinement Prop 2

11. Base Mesh

We will define the base mesh now. Our simulation will be limited to a 2D flow. This can be accomplished by choosing the Plate type as the background mesh. We will use predefine parameter d to define the outer flow domain.

  1. Go to Base tab
  2. Select the Plate as a Base Mesh Type
  3. Set the size of base mesh
    \(\;\)X \(\quad\)Y\(\quad\)
    Min \({\sf [m]}\)-5*d-5*d
    Max \({\sf [m]}\)15*d5*d `
  4. Define the number of divisions
  5. Change the following boundary names accordingly
    X- inlet
    X+ outlet
von Karman 09 Base Mesh

12. Material Point

Material Point tells the meshing algorithm on which side of the geometry the mesh is to be retained. Since we are considering flow outside the cylinder we can use predefined parameter d to specify the desired point location.

  1. Go to Point tab
  2. Specify location inside base mesh but outside cylinder_1 geometry
    Material Point0d0
von Karman 10 Material Point

13. Start Meshing

Everything is now set up for meshing

  1. Go to Mesh tab
  2. Press the Mesh button to start meshing process
von Karman 11 Meshing

14. Mesh

After the meshing process is finished the mesh should appear in the graphics window.

  1. Set the XY orientation View XZ
  2. Click Fit View
von Karman 12 Mesh

15. Boundaries

  1. Define boundary types accordingly
    boundaries patch
    cylinder_1 wall
    empty empty
    inlet patch
    outlet patch
von Karman 13 Boundaries

16. Select Solver - PISO

We want to analyze the transient and incompressible flow. For this purpose, we will use the PISO (pisoFoam) solver.

  1. Go to SETUP panel
  2. Pick PISO (pisoFoam) solver
  3. Select solver
von Karman 14 Solver

17. Create Simulation Parameters (I)

We need to define a few parameters that will be used in the simulation setup. First one is a kinematic viscosity of the air nu . This value can be found in Material Database .

  1. Go to Parameters panel
  2. Define new parameter Name as nu
  3. Click on Select Material Property
  4. Extend air property list
  5. Select kinematic viscosity nu
  6. Click enter or Create Parameter button
  7. The newly created parameter will be shown in the parameters list.
von Karman 15 Parameters nu

18. Create Simulation Parameters (II)

Also, we will define the flow velocity and period of the vortex shedding, which can be defined as the time interval between the appearance of successive vortices. Both properties depend on each other while the relationship can be described empirically Karman vortex street . By using this fact, we will calculate the velocity value as a function of the vortex shedding period. At the end, we will compare the assumed time to simulation results.

  1. Define the period of vortex shedding
  2. Click enter or Create Parameter button
  3. The newly created parameter will be shown in the parameters list.
von Karman 16 Parameters T

19. Create Simulation Parameters (III)

Define the velocity magnitude parameter.

  1. Define the velocity parameter
  2. Click enter or Create Parameter button
  3. The newly created parameter will be shown in the parameters list.
    According to empirical equation flow velocity should be equal 0.13 m/s
von Karman 17 Parameters u

20. Transport Properties

Change kinematic viscosity to the parametrized value nu

  1. Go to Transport Properties panel
  2. Set the kinematic viscosity \(\nu \; [m^2/s]\) to nu
von Karman 18 Transport Properties

21. Discretization - Time

For the better accuracy of our solution, we will use the 2nd order scheme for the discretization of the time derivatives.

  1. Go to Discretization panel
  2. Select Backward
von Karman 19 Discretization time

22. Discretization - Convection

Change velocity discretization to the LUST scheme. It is a second-order spatial discretization scheme that allows to reduce the numerical diffusion.

  1. Go to Convection tab
  2. Click on default scheme Upwind
  3. Select LUST
von Karman 20 Discretization Convection

23. Boundary Conditions - Boundaries

The sides of the domain will be set to the Outflow character which should adjust velocity and pressure at the boundaries to the flow inside the domain.

  1. Go to Boundary Conditions panel
  2. Select boundaries
  3. Set the Outflow character
von Karman 21 Boundary Conditions

24. Boundary Conditions - Inlet

Now we will apply the computed velocity parameter to the inlet boundary.

  1. Select inlet boundary
  2. Set the Velocity Inlet character
  3. Set the velocity Reference Value [m/s] to u parameter
von Karman 22 Boundary Conditions Copy

25. Initial Conditions

Before we start simulation we need to define the initial state. We will specify a linear velocity profile that changes from zero at the bottom of the domain to 50% of the velocity magnitude. We will use the profile to boost instabilities appearance by introducing flow asymmetry at the initial state. The von Karman instabilities under certain conditions would appear spontaneously, but it might require a longer time for instabilities to arrive if we would start with a uniform velocity.

  1. Go to Initial Conditions panel
  2. Set the initial velocity
von Karman 23 Initial Condition

26. Monitors - Forces

In order to track periodic features in the flow, we will use the force monitor. We will observe drag and lift on the cylinder boundary.

  1. Go to Monitors panel
  2. Switch to Forces tab
  3. Expand Monitored Boundaries list and check cylinder_1
  4. Check Monitor Coefficients option
  5. Set Lift Direction vector along Y axis
    Lift Direction010
  6. Set the reference area \(A_{ref} \; [m^2]\) to d*0.001
  7. Set the free stream velocity \(U_{\infty} \; [m/s]\) to u
von Karman 24 Monitors

27. Run - Time Control

Before running computations adjust the time controls in order to capture appropriate time scales of the flow features.

  1. Go to RUN panel
  2. Set the Simulation Time [s] to 5
  3. Set the Time Stepping \(\Delta t \; [s]\) to 1e-03
von Karman 25 RUN SIMULATION

28. Run - Output

We will write the results in the interval of 0.025 seconds (every 25 steps).

  1. Switch to Output tab
  2. Set the Interval [s] to 0.025
von Karman 26 RUN OUTPUT

29. Run - CPU

To speed up the calculation process increase the number of CPUs basing on your PC capability. The free version allows you to use only 2 processors in parallel mode. To get the full version, you can use the contact form to Request 30-day Trial

Estimated computation time for 2 processors: 5 minutes

  1. Switch to CPU tab
  2. Use parallel mode
  3. Increase the Number of processors
  4. Click Run Simulation button
von Karman 26 RUN CPU

30. Results - Force Coefficients

We are going to read the period of the vortex shedding. To do so we will read the time of two last extrema for the Cl coefficient. The difference between them gives us the periods of the vortex shedding.

  1. Switch to Force Coefficient tab
  2. Click on the Adjust Axes
  3. Set the Axes Bounds
    X Min3
    X Max5
    Y Min-0.5
    Y Max2
  4. Check the Lookup Data button
  5. Click on the last Cl extremum to read the coordinates
  6. Click on the one before last Cl extremum to read the coordinates
  7. Selected points are listed below the chart. Report time values that we will use later.
von Karman 27 Force monitor

31. Output Parameters - Tcalc

Finally, we will compare the assumed period of the vortex shedding with the result of our simulation. The assumed period is 0.5 second, while the simulation one can be computed as a time difference between the occurrences of the two last Lift Coefficient maxima.

  1. Define the Tcalc parameter
  2. Add a new parameter
  3. Parameter will be added to the list above
von Karman 28 Parameter Tcalc

32. Output Parameters - Terr

Additionally, we will present the result as a relative error between the expected value and obtained one.

  1. Define the Terr parameter
  2. Add a new parameter
  3. Parameter will be added to the list above. Read the value of Terr
von Karman 29 Parameter Terr

33. Calculate Vorticity

The vorticity is not being computed by default during solver computations. In order to visualize it, we will compute the vorticity variable by using already existing data.

  1. Go to Calculate panel
  2. Select Full Time Range
  3. Click on Calculate
von Karman 30 Calculate Fields

34. Postprocessing - ParaView

Start ParaView to visualize the vorticity field.

  1. Go to POSTPROCESSING panel
  2. Click on Run ParaView
von Karman 31 Postprocessing ParaView

35. ParaView - Load Results (I)

Load the results into the program.

  1. Select vortex_street
  2. Click Apply to load results into ParaView
  3. After loading results they will be shown in the 3D graphic window
von Karman 32 ParaView Open

36. ParaView - Load Results (II)

ParaView skips the initial point by default, therefore we need to add the zero time point to simulation.

  1. Uncheck Skip Zero Time
  2. Click Apply
  3. Set the time or time step to 0
von Karman 33 ParaView Zero

37. ParaView - Vorticity

We will look at the vorticity contour map. Change the scale range parameters to improve flow features visibility.

  1. Select vorticity from the list
  2. Click Rescale to Custom Data Range
  3. Set the range for the color map from 0 to 25
  4. Click Rescale and disable automatic rescaling
  5. Play with an animation buttons to track the results of analysis.
von Karman 34 ParaView vorticity

38. Advanced Postprocessing with ParaView

This concludes the tutorial, covering all the aspects we intended to showcase. For a finely tuned presentation of the results, you may take advantage of the more advanced features.

In ParaView, you can display streamlines, contour plots, vector fields, line or time plots, calculating volume or surface integrals and create animations.

To familiarize yourself with the ParaView capabilities, it’s worth checking out our video tutorial, Paraview CFD Tutorial - Advanced Postprocessing in ParaView, in which we demonstrate some of the most commonly used post-processing techniques.