Back to all tutorials

Wing - CFD Simulation CFD Software Tutorial

front-image

1. Introduction

In this tutorial, we are examining the airflow around the wing’s profile. We will focus on the two-dimensional flow around the wing’s airfoil. To enhance precision, we will implement the second-order velocity discretization method following the initial run. The presentation of results will be done in ParaView, utilizing streamlines.

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 wing

  1. Click New
  2. Provide name wing
  3. Click Create to open a new case
simflow-launcher

4. Import Geometry

Firstly, we need to Download GeometryWing

  1. Click Import Geometry
  2. Select geometry file wing.stl
  3. Click Open
Wing 02 Import Geometry

5. Imported Geometry Units

The STL format does not contain the unit information which are defined during the geometry export. If we do not know the exported unit, we can estimate it based on the total size of the model. It is displayed next to Geometry size label. In our case, the default unit meter is correct.

  1. To confirm default unit meter, press OK
Wing 02 unit

6. Geometry - Wing

After importing geometry, it will appear in the 3D window.

  1. Set the XY orientation View XY
  2. Click Fit View to fit geometry in the view
Wing 03 Geometry

7. Meshing Parameters - Wing

In order to create the mesh, we need to specify geometry options for the meshing process. We will increase mesh resolution near the wing surface.

  1. Go to Hex Meshing panel
  2. Select wing
  3. Enable Mesh Geometry
  4. Enable Create Boundary Layer Mesh
  5. Set Refinement to Min 4 Max 7
Wing 04 Hex meshing

8. Base Mesh - Domain

Our simulation will be limited to a 2D flow. This can be accomplished by choosing the Plate type as the background mesh.

  1. Go to Base tab
  2. Select Plate as a Base Mesh Type
  3. Define minimum and maximum extend
    Min \({\sf [m]}\)-15-15
    Max \({\sf [m]}\)2015
  4. Set the division of the base mesh
    Division10590
Wing 05 Base

9. 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 around the wing we need to place the material point outside the geometry.

  1. Go to Point tab
  2. Specify location inside base mesh but outside wing geometry
    Material Point-200

You can specify the point location from the 3D view. Hold the CTRL key and drag the arrows to the destination.

Wing 06 Mat point

10. Start Meshing

We can define the count of the buffer cells between refinement levels. This parameter determines the width of the transition zone between refined and background mesh. A higher value of this parameter will increase the overall cells count.

  1. Switch to Mesh tab
  2. Go to Settings
  3. Change Cells Between Levels to 5
  4. Start the meshing process with Mesh button
Wing 07 Meshing

11. Mesh

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

  1. Click Fit View to fit mesh in the view
Wing 08 Mesh

12. Examine Mesh

For further examination, we should zoom in to see the refinement mesh. Additionally, we can switch projection view from perspective to parallel as the parallel view is more appropriate for visualizing 2D objects.

  1. Zoom in the mesh - use the Scroll Wheel or drag mouse with RMB (right mouse button) pressed
  2. Click on Change View Projection
  3. Select Parallel view
Wing 09 Mesh 2

13. Select Solver - SIMPLE

We want to compute the steady-state solution of the incompressible turbulent flow around the airfoil. For this purpose, we will use the SIMPLE (simpleFoam) solver.

  1. Go to SETUP panel
  2. Select Steady State filter
  3. Check Incompressible flow
  4. Pick SIMPLE (simpleFoam) solver
  5. Select solver
Wing 10 Solver

14. Turbulence

For the purpose of this tutorial, we will simulate the turbulence phenomenon using the \(k{-}\omega \; SST\) model.

  1. Go to Turbulence panel
  2. Select RANS turbulence formulation
  3. Select \(k{-}\omega \; SST\) model
Wing 11 Turbulence

15. Boundary Conditions - Boundaries (Flow)

The domain has only one external boundary. We will use the Free Stream character type to model the far field conditions. The flow will be aligned with the x-axis.

  1. Go to Boundary Conditions panel
  2. Select boundaries
  3. Set the Free Stream character
  4. 5 Change the velocity type and value accordingly
    U TypeFree Stream
    U Freestream Value \({\sf [m/s]}\)4000
Wing 12 BC inlet

16. Boundary Conditions - Boundaries (Turbulence)

Additionally, to flow conditions, we will modify default free stream turbulence properties.

  1. Switch to Turbulence tab
  2. Set the k Intensity [-] to 1e-02
Wing 13 BC turbulece

17. Monitors - Forces

In order to measure aerodynamic forces, we will use the force monitor. We will observe drag and lift force coefficients on the aerofoil boundary.

  1. Go to Monitors panel
  2. Switch to Forces tab
  3. Expand Monitored Boundaries list and check wing
  4. Check Monitor Coefficients option
  5. Set lift direction vector along Y axis
    Lift Direction010
  6. Set pitch axis vector along Z axis
    Pitch Axis001
  7. Set the reference velocity
    \(U_{\infty}\) \({\sf [m/s]}\)40
Wing 14 Monitor Force

18. Run - Time Control

  1. Go to RUN panel
  2. Set the maximal Number of Iterations to 250
  3. Click Run Simulation button
Wing 15 RUN

19. Results - Force Coefficient

During the simulation, we can observe whether forces on the wing stabilize which will mean that our simulation converges

  1. Go to Force Coefficient tab
Wing 15 1 Residuals

20. Postprocessing - ParaView

After the computation is finished we can do a comprehensive visualization of our results with ParaView.

  1. Go to POSTPROCESSING panel
  2. Click on Run ParaView
Wing 16 PV postprocessing

21. ParaView - Load Results

After opening the ParaView, we need to load the simulation results from SimFlow.

  1. Select your case wing.foam
  2. Click Apply to load results into ParaView
  3. Click Load a color palette and choose White Background
  4. Select the velocity U from the list
  5. Load the latest results by clicking Last Frame icon
  6. Click Rescale to data range
  7. After loading results they will be shown in the 3D graphic window. Your default color map may be different than the one below. Go to the next slide and choose an appropriate preset.
Wing 17 PV import results

22. ParaView - Choose Preset

  1. Click Edit Color Map from the menu placed on the left side
  2. Select Choose Preset from the Color Map Editor placed by default on the right side of the ParaView
  3. Search rainbow
  4. Choose Blue to Red Rainbow preset
  5. Apply changes
  6. Close Choose Preset window
  7. Set Number of Table Values to 20
  8. Click Save current color map settings values as default for all arrays
Wing 18 PV preset

23. ParaView - Streamlines

We can visualize the flow by displaying the streamlines.

  1. Select your case wing.foam
  2. Select Stream Tracer from top menu
  3. Set the start point and end point of the streamline source
    Point1-5-30.5
    Point2-530.5
  4. Set the number of streamlines
    Resolution300
  5. Click Apply
  6. Select StreamTracer1
  7. Select the velocity U from the list
  8. Zoom in to the wing profile
Wing 18 PV Streamlines settings

24. ParaView - Import Wing Geometry (I)

To display the wing geometry with the streamlines, we need to read the geometry file to the ParaView.

  1. Select Open from top menu
  2. From the bottom left menu select wing folder
  3. From the right menu open constant and than triSurface folder
  4. Select wing.stl
  5. Press OK
Wing 19 PV Import geometry

25. ParaView - Import Wing Geometry (II)

Confirm default properties and display geometries with streamlines.

  1. Click Apply to load geometry
  2. After loading geometry, it will be shown in the 3D graphic window
Wing 20 PV Import geometry 2

26. Discretization - Convection

After preliminary calculation, we will continue with a more accurate algorithm. Go back to the Simflow but do not close the ParaView yet. Change velocity discretization to the Linear Upwind scheme. This will decrease numerical diffusion affecting the results.

  1. Go to Discretization panel
  2. Switch to Convection tab
  3. Click on Upwind to extend the list
  4. Select Linear Upwind
Wing 21 Discretization

27. Run - Continue Simulation

  1. Go to RUN panel
  2. Increase the Number of Iterations to 500
  3. Click Continue Simulation button

Estimated computation time: 1 minute

Wing 22 RUN 2

28. Force Coefficient

You can observe in the Force Coefficient plot that after switching to second-order the coefficients started to oscillate.

  1. Switch tab to Force Coefficient
Wing 23 Force coeff

29. ParaView - Reload the results

Switch window to ParaView once again. To read newly calculated steps we need to reload the results.

  1. Click Refresh
  2. Click Last Frame to display the latest results
Wing 24 PV Streamlines update

30. ParaView - Streamlines Results

Finally, we can see the results in the 3D window. We observe the flow separation on the second flap. This separation is the cause of the flow instability that we have observed as oscillating values of the force coefficients.

Wing 25 PV Streamlines

31. 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.