Fill out the form to download

Required field
Required field
Not a valid email address
Required field


Tutorial: Compressible Flow Simulation Around a Wing

This article provides a step-by-step tutorial for a compressible flow simulation around a wing.

pressure distribution in and around a plane wing
Figure 1: Pressure distribution on and around a wing.


This wing simulation tutorial teaches how to:

  • Set up and run a compressible simulation;
  • Assign topological entity sets;
  • Assign boundary conditions, material, and other properties to the simulation;
  • Mesh with the SimScale standard meshing algorithm;
  • Visually assess the mesh quality.

We are following the typical SimScale workflow:

  1. Preparing the CAD model for the simulation;
  2. Setting up the simulation;
  3. Creating the mesh;
  4. Run the simulation and analyze the results.

1. Prepare the CAD Model and Select the Analysis Type

First of all click, the button below. It will copy the wing simulation tutorial project containing the geometry into your workbench.

The following picture demonstrates what should be visible after importing the tutorial project.

wing simulation geometry to perform a compressible analysis
Figure 2: Imported CAD model of a wing in the SimScale Workbench.

1.1 Creating the Flow Region

To run a wing simulation where you can visualize the airflow, the first step is to create a flow region. This page gives you an overview of SimScale’s flow volume extraction operations.

For this project, the air domain will be created with an External Flow Volume operation, which is available in SimScale’s CAD Mode. Figure 3 shows the icon to access the CAD Mode environment:

entering cad mode in simscale wing tutorial
Figure 3: The CAD Mode environment allows you to run several CAD operations, including the creation of flow volumes.

Within the CAD Mode environment, you will find a large number of operations possible. Using Figure 4 as a reference, you can hover over the Flow Volume icon, and select the External option:

creating an external flow volume in cad mode
Figure 4: For this tutorial, we are going to create an external flow volume.

At this point, you are prompted to define the maximum and minimum dimensions for the flow volume. Please proceed as below:

wind tunnel creation cad mode environment dimensions
Figure 5: Dimensions of the virtual wind tunnel in CAD Mode
  1. After creating the external flow volume operation, please define the minimum and maximum coordinates (in meters) as follows:

    Minimum x: ‘0’
    Minimum y: ‘-90’
    Minimum z: ‘-120’
    Maximum x: ’60’
    Maximum y: ’90’
    Maximum z: ’60’
  2. Hit ‘Apply’ when the coordinates are set

Now the model is almost ready to export to the Workbench. Before doing so, we need to delete the volume that represents the solid wing. To do that, please create a ‘Delete’ body operation and proceed as below:

deleting a part in simscale cad mode
Figure 6: A compressible analysis requires a single volume, representing the flow region. Therefore, we must delete the solid parts of the geometry.
  1. Create a ‘Delete’ body operation
  2. Select the Wing volume
  3. Hit ‘Apply’ to run the operation
  4. Once done, click on ‘Finish’ to export the new CAD model to your Workbench

Did you know?

The boundaries of the domain should be far away from the wing. This is necessary to ensure that the flow near the wing won’t be affected by the conditions at the boundaries.

In a wing, chord length is the distance between the leading and trailing edges.

chord length wing
Figure 7: Linear distance between the leading and trailing edges, known as chord.

In general, the bigger the enclosure, the better. However, keep in mind that a big enclosure will increase the mesh cell count. Find below the minimum recommended size for the enclosure, in terms of chord lengths (L):

enclosure dimensions for a wing
Figure 8: Minimum recommended size for the enclosure. Note that the enclosure is much longer downstream (20 chord lengths) than upstream (10 chord lengths).

1.2 Create the Simulation

The new version of the CAD model is exported into the Workbench named Copy of Wing. You can select this volume and change its name if you would like. At this point, we are ready to ‘Create a Simulation’ for the new geometry:

creating a simulation for an enclosure
Figure 9: You can rename the new CAD model if you would like, before creating a new simulation. Don’t forget to save the changes by clicking on the checkmark.

Hitting the ‘Create Simulation’ button leads to the following options:

analysis types library from simscale
Figure 10: Analysis types selection widget, with the options available in SimScale.

Choose ‘Compressible’ for analysis type and ‘Create the Simulation’.

Now the global simulation setups pop up:

turbulence model for compressible flow analysis
Figure 11: Choosing the turbulence model for the simulation.

Set the turbulence model to ‘k-omega SST’.

2. Assigning the Material and Boundary Conditions

2.1 Define a Material

This simulation will use air as fluid material. Therefore click on the ‘+ button’ next to Materials. Doing this opens the SimScale fluid material library as shown in the figure below:

materials available for flow simulations in simscale
Figure 12: Library of fluid materials available.

Select ‘Air’ and click ‘Apply’. Afterward, a tab with properties opens up. You can leave the default values and assign them to the entire flow region.

2.2 Assign the Boundary Conditions

To have an overview, the following picture shows the boundary conditions applied for this simulation:

boundary conditions applied in simscales compressible aero tutorial
Figure 13: Overview of the boundary conditions for the wing simulation.

Using figure 13 as a reference, the boundary conditions will be assigned.

a. Walls – Slip

Follow the instructions presented in the picture below to add a new boundary condition:

adding a new boundary condition in simscale
Figure 14: Boundary conditions available for a compressible analysis in SimScale.
  1. After hitting the ‘+ button’ next to boundary conditions, a drop-down menu will appear, where one can choose between different boundary conditions.
  2. Select a ‘Wall’ boundary condition.
assigning a slip wall condition to the virtual wind tunnel
Figure 15: Assigning a slip wall condition to the top, bottom, and side of the enclosure.

Change (U) Velocity to ‘Slip’ and Temperature type to ‘Adiabatic’. Assign the side, top, and bottom enclosure boundaries to it.

b. Symmetry

Create a new boundary condition, but this time choose ‘Symmetry’. Assign it to the enclosure face adjacent to the wing.

setting up symmetry bc in simscale
Figure 16: Assigning a symmetry boundary condition.

c. Pressure Outlet

Create yet another boundary condition. Select ‘Pressure outlet’ and assign the following enclosure face to it:

setting up pressure outlet conditions
Figure 17: Assigning a pressure outlet. Pressure levels are fixed at 101325 Pa (default).

d. Velocity Inlet

Due to the high velocities involved, compressible simulations require extra care during the setup phase. Aiming to improve stability in early iterations, the velocity will be ramped, starting from a magnitude of 11.6 m/s at iteration 0, to the final magnitude of 116 m/s at iteration 600.

Furthermore, an angle of attack of 3 degrees for the wing will be taken into account. Therefore, the velocity will have components in the Y and Z directions.

Create a ‘Velocity inlet’ boundary condition and follow the steps demonstrated in the picture:

setting up velocitiy inlet conditions
Figure 18: Opening extra input options for velocity inlet.
  1. Keep ‘Fixed value’ for (U) Velocity;
  2. Set Temperature to ‘0 °C’;
  3. Assign the inlet surface to the boundary condition;
  4. Click on the highlighted icon to access the velocity table and define it as pictured below:
configuring a ramp velocity inlet
Figure 19: Configuring a table input for velocity inlet.
  1. Click ‘Table’ to access the table input.
  2. Define the ramp according to the table below.
  3. Confirm by hitting ‘Apply’.

\begin{array} {|r|r|} \hline t & U<x> & U<y> & U<z> \\ \hline 0 & 0 & 0.6071 & -11.5841 \\ \hline 600 & 0 & 6.071 & -115.841 \\ \hline \end{array}

e. Walls – No-Slip

All solid walls should receive a no-slip condition. With this configuration, the velocity on the assigned entities is set to zero.

Topological entity sets help to assign a group of faces all at once. As we need all the faces of the wing to be modeled as physical walls, let’s group them as a topological entity set.

To create a topological entity set for the wing walls, follow these steps:

creating a topological entity set for wing walls
Figure 20: Using quick face selection tools to select all wing walls.
  1. Enable the select face mode in the viewer
  2. Select all 6 boundary faces of the enclosure
  3. Right-click in the viewer and ‘invert the selection’

Now, all the walls of the wing are selected. Follow the instructions in the figure below to create the set:

steps to create a topological entity set
Figure 21: Finalizing the creating of the wing walls topological entity set.
  • 4: Click on the ‘+ button’ next to topological entity sets;
  • 5: Name your newly created set appropriately. For example, as ‘Walls’.

Now, create a wall boundary condition and assign it to the newly created set. Make sure to set ‘Adiabatic‘ for temperature.

using a topological entity set to assign a boundary condition
Figure 22: Assigning a boundary condition to a topological entity set.


Check out this page, if you are interested in other boundary conditions available in SimScale.

2.3 Initial Conditions

The values for the initial velocity and temperature will require changes from the default. Doing this stabilizes the calculation.

The velocity field will receive the same initialization as the velocity inlet.

initial conditions for velocity compressible simulation wing tutorial
Figure 23: Initializing the velocity fields to stabilize the simulation during early iterations.

Did you know?

Initializing the velocity means that the air around the wing in our virtual wind tunnel is already moving.
If we would not predefine it, there would not be air movement at the beginning of the calculation and the solver would have to calculate it based on the specified inlet velocity.

And, for temperature, please initialize the entire domain with 0 Celsius.

initial condition for temperature
Figure 24: Initializing the global temperature of the domain.

2.4 Numerics

In the Numerics tab, again seeking to improve stability, add 2 non-orthogonal correctors:

non orthogonal correctors cfd simulation
Figure 25: With 2 non-orthogonal correctors, the pressure equation is resolved a total of 3 times, improving stability.

2.5 Simulation Control

Please set up the wing simulation control as shown below:

simulation control parameters
Figure 26: The changes made in the simulation control tab are highlighted.
  • Under Simulation control, define ‘1500’ iterations to End time and Write interval
  • Also, raise the Maximum runtime to ‘30000’ seconds

For more information about the simulation control parameters, check this article.

2.6 Result Control

By setting result controls, you can observe the convergence behavior of several parameters of interest. Hence it is an important indicator to evaluate the quality and trustability of the results.

The first result control to set is a Forces and moments control. Writing the forces data every 10 iterations is enough to assess convergence. Assign it to the ‘Walls’ topological entity set:

creating a forces and moments result control
Figure 27: Forces and moments result control for the wing walls.

Now, click on the ‘+ button’ next to Surface data to create ‘Area averages’. A total of two controls will be created, one for the inlet and one for the outlet.

creating an area average result control
Figure 28: Area average result control for the inlet. Average plots are useful to assess convergence.

Similarly, for the outlet:

area average result control for the outlet
Figure 29: Area average for the outlet.

3. Mesh

To create the mesh, we recommend using the Standard algorithm, which is a good choice in general as it is quite automated and delivers good results for most of the geometries.

From the main settings, disable Automatic boundary layers. Boundary layer refinements will be added later.

standard meshing tool main settings set up
Figure 30: Main settings for the standard mesh.

3.1 Local Element Size Refinement

Click on the ‘+ button’ next to Refinements. A ‘Local element size’ will be assigned to the ‘Walls’ entity set. Limit the element size to ‘0.07’ meters:

local element size refinement for a wing
Figure 31: Local element size refinement applied to the wing walls.

3.2 Inflate Boundary Layer Refinement

The boundary layer refinement is important to capture the near-wall profiles appropriately. Create an ‘Inflate boundary layer’ refinement and set it up as shown:

setting up an inflate boundary layer refinement
Figure 32: Settings for the inflate boundary layer refinement.

3.3 Region Refinement

As fluid flows around a body, a turbulent region is developed downstream. This region is called wake. Since gradients in the wake are often high, we will create region refinements for it.

First, create a new region refinement. Specify ‘0.8’ meters as Maximum edge length and click on the ‘+ button’ to create a geometry primitive:

region refinement to capture wake region
Figure 33: Region refinement to allow good resolution of the developing wake.

Select a ‘Cartesian box’ primitive and give it the following coordinates:

wake cartesian box for region refinement
Figure 34: Dimensions for the cartesian box.

After saving the first cartesian box, head back to the region refinement. Assign the cartesian box to it.

assigning a geometry primitive to a region refinement
Figure 35: Finishing the setup for the first region refinement.

Following the same steps, create another region refinement. This time, set the Maximum edge length to ‘0.5’ meters. Click on the ‘+ button’ next to Geometry primitives and create another ‘Cartesian box’ with the following dimensions:

region refinement to capture the wake region
Figure 36: Cartesian box dimensions used for the second region refinement.

After saving the box, assign it to the second region refinement.

assigning a cartesian box to a region refinement
Figure 37: Assign the smaller cartesian box to the second region refinement.

3.4 Generating the Mesh

At last, head back to the main mesh settings and hit Generate.

starting the standard mesh generation process
Figure 38: Starting the operation with the standard meshing tool.

The resulting mesh takes about 10 minutes to complete. After it is the operation finishes, this is how the mesh looks around the wing:

aircraft wing mesh using standard meshing tool
Figure 39: Resulting mesh for the wing geometry using the standard meshing tool.

3.5 Mesh Quality Inspection

Within SimScale, it’s possible to visually inspect mesh quality parameters. Amongst the available quality parameters, we have non-orthogonality, aspect ratio, and volume ratio.

To access this feature, click on ‘Mesh quality’, which is located under Mesh. The post-processing environment then opens up.

Under Results you can find a list of available quality parameters:

mesh quality control visualization environment in simscale
Figure 40: Mesh quality parameters available. Filters can be used for further analysis.

A particularly helpful filter is isovolumes. By playing with the minimum and maximum isovalues, it’s easy to identify bad cells. For example, Figure 41 shows the worst cells in the mesh, when it comes to the ‘Aspect ratio’. Please note that the maximum aspect ratio value in your mesh may be different since the meshing algorithm is constantly being updated.

isovolumes filter to spot bad quality cells
Figure 41: Using an isovolume filter to assess mesh quality. The highlighted cells are close to the cowling.

A visual representation of mesh quality is extremely helpful when trying to improve the mesh. For our mesh, the maximum observed value for the aspect ratio is 57, which is acceptable. Therefore, we can proceed to run the simulation.

4. Start the Simulation

Click on the ‘+ button’ next to Simulation Runs and ‘Start’ the process.

setting a simulation to run
Figure 42: Simulation tree completely set up and ready to run.

While it’s running, you can access the intermediate results by clicking on ‘Solution Fields’. They’re updated as the iterations go by!

The entire simulation takes between 1 to 2 hours to finish, depending on the number of processors. In the reference project, which is linked below, we calculated a few more iterations, to assure complete convergence.

5. Post-Processing

After the simulation is finished, you can expand Run 1 to check the results.

5.1 Result Controls

Once the run is finished, open the area average at the inlet result control. By inspecting Uz and Uy, the velocity ramp is very clear:

velocity ramp in simscale
Figure 43: Velocity ramp in the Z direction. The velocity steadily increases between iterations 0 and 600.

For any wing simulation, force plots are commonly used to assess convergence. By inspecting the force plot from this simulation, we can see that all parameters converge nicely:

assessing convergence by inspecting force plots
Figure 44: Force plots on the wing walls. After roughly 2000 iterations, all parameters display a nice convergence pattern.

For compressible external aerodynamics simulations, other parameters useful to assess convergence are:

  • Inlet: pressure;
  • Outlet: temperature, velocities, and density.

5.2 Surface Visualization

For further post-processing click on the ‘Post-process results’ or the ‘Solution Fields’ button.

accessing the post processing environment
Figure 45: You can access the post-processing environment by clicking on either of these two buttons.
  • Make sure the post-processor shows the results for the final timestep -3000 seconds;
  • Go to the Parts Color and choose the ‘Pressure‘ from the Coloring drop-down menu. Feel free to change the parameter if you wish;
  • Click on the faces of the enclosure, then right-click on the workbench, and choose the ‘Hide selection’ option:
select walls and hide them to show pressure distribution on the wing
Figure 46: Hiding the selected faces in the post-processor to inspect the pressure distribution on the wing

Make sure to right-click on the color scale at the bottom of the screen and select the ‘Use continuous scale option’, for a smoother transition between color blocks:

continuous legend pressure distribution results post processor wing
Figure 47: Applying the continuous legend feature on the pressure results for high-quality resolution

The tip of the plane exposed to the freestream velocity has the highest pressure values. On the contrary, the upper side of the wing has a low-pressure distribution, as expected for a lift-generating device.

This is how the results will appear if you set visible only the symmetry plane, and apply a value of ‘1.02e5 \(Pa\)’ as the upper limit of the legend at the bottom:

pressure distribution around a wing after compressible simulation
Figure 48: Applying the pressure visualization on the symmetry plane reveals the difference in the distribution that generates the lift

5.3 Streamlines

For streamline visualization:

  • Click on the ‘Add Filter’ button;
  • Select the ‘Particle Trace.
adding a new filter particle trace
Figure 49: Selecting ‘Particle Trace’ from the Filters panel
  • Click on the circle icon next to the Pick Position;
  • Apply the seed point on the inlet face, as close to the symmetry face and the center of the y-axis as possible. Use a translucent render mode if needed.
choosing the seed face of the streamlines
Figure 50: The seed face indicates the source of the streamlines.

Only the streamlines and the wing will be visible. Close the Particle Trace 1 tab, right-click on the workbench, and choose the ‘Show all’ option:

making the domain visible again
Figure 51: Bring back to visibility all of the faces.

Proceed to select all six faces of the domain and hide them, like in Figure 46, so only the model is visible apart from the streamlines. Go back to the Particle Trace tab, and modify the settings as follows:

  • The # Seeds horizontally represents the number of streamline rows along the z-axis. Set it to ‘4’. The # Seeds vertically represents the number of rows along the y-axis. Make sure it is big enough that it covers the whole y dimension of the domain. An input of ‘100’ should be fine for this case;
  • Set the Spacing distance between streamlines to ‘0.4’;
  • Select ‘Velocity Magnitude’ as Coloring;
  • You can control the diameter of the cylinders with the Size option. Set it to ‘5e-2’;
  • For this case, you can have the Trace both directions option disabled, as the flow here travels from the inlet only towards the positive x-direction.

With these settings, this is how the streamlines will finally appear:

streamlines particle trace with cylinders colored with the velocity magnitude over the upper side of a wing
Figure 52: The acceleration of the flow on the upper side where the low pressure is located is visualized on the streamlines.

5.4 Animation

Animations can be started by choosing ‘Animation’ from the Filters panel:

adding a new animation as filter
Figure 53: Selecting ‘Animation’ from the Filters panel

Switch the Animation type to ‘Particle Trace’.

animation type is set to streamlines for visualization of the particle trace around the wing
Figure 54: This type focuses on the streamlines of a particular timestep.

Click the play button to start the animation. Below is an example of animating the streamlines, colored with the velocity magnitude, during the final timestep. The thrust engine was also hidden for better visualization of the wing’s bottom side:

animation of velocity around the wing
Animation 1: The streamlines of Figure 52, animated for the final timestep.

As a result of lift generating airfoils used in airplane wings, it can be seen that the top surface has higher velocity due to curvature.

Analyze your results with the SimScale post-processor. Have a look at our post-processing guide to learn how to use the post-processor.

Congratulations! You finished the tutorial!


If you have questions or suggestions, please reach out either via the forum or contact us directly.

Last updated: April 28th, 2021

Data Privacy