Documentation
This article provides a step-by-step tutorial for a compressible flow simulation around a wing.
This wing simulation tutorial teaches how to:
We are following the typical SimScale workflow:
Attention!
This tutorial performs simulation with the Compressible analysis type which is only accessible to users with a Professional plan and those who are already on the Community plan. New Community users or those recently downgraded to the Community plan will no longer be able to perform this tutorial. See our pricing page to request additional features.
Learn with the video!
The following tutorial is also available in a video format with all steps described in equal detail. Experience this interactive way of learning and let us know your thoughts in the comments section.
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:
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 workbench after a draft of the original model is created. Figure 3 shows how to create a draft of the original model:
This will allow you to create a draft of the chosen model, and you’ll be able to perform several CAD operations within the same user interface. Once the draft is created, you will find a large number of available operations, which are accessible from the top bar. Using Figure 4 as a reference, you can hover over the ‘Create – Flow Volume’ icon to reveal the drop-down menu, and select the ‘External’ option:
At this point, you are prompted to define the extent of the flow volume region. Please proceed as shown below:
Now the draft is almost ready to save as a new model. 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:
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.
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):
The new version of the CAD model is saved as a new model under the Geometries list 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:
Hitting the ‘Create Simulation’ button leads to the following options:
Choose ‘Compressible’ for analysis type and hit ‘Create Simulation’.
Now the global simulation setups pop up:
Set the turbulence model to ‘k-omega SST’.
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:
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.
To have an overview, the following picture shows the boundary conditions applied for this simulation:
Using figure 13 as a reference, the boundary conditions will be assigned.
Follow the instructions presented in the picture below to add a new boundary condition:
Change (U) Velocity to ‘Slip’ and Temperature type to ‘Adiabatic’. Assign the side enclosure boundary to it.
Create a new boundary condition, but this time choose ‘Symmetry’. Assign it to the enclosure face adjacent to the wing.
Create yet another boundary condition. Select ‘Pressure outlet’ and assign the following enclosure faces to it:
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:
\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}
All solid walls should receive a no-slip condition. With this configuration, the velocity on the assigned entities is set to zero.
Saved selections 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 saved selection.
To create saved selections for the wing walls, follow these steps:
Now, all the walls of the wing are selected. Follow the instructions in the figure below to create the set:
Now, create a wall boundary condition and assign it to the newly created set. Make sure to set ‘Adiabatic‘ for temperature.
Note
Check out this page, if you are interested in other boundary conditions available in SimScale.
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.
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.
In the Numerics tab, again seeking to improve stability, add ‘2’ non-orthogonal correctors. Furthermore, adjust the Relaxation type to ‘Automatic’:
Please set up the wing simulation control as shown below:
For more information about the simulation control parameters, check this article.
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’ saved selection:
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.
Similarly, for the main outlet:
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 geometries.
From the main settings, disable Automatic boundary layers. Boundary layer refinements will be added later.
Click on the ‘+ button’ next to Refinements. A ‘Local element size’ will be assigned to the ‘Walls’ saved selection. Limit the element size to ‘0.07’ meters:
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:
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 the Maximum edge length and click on the ‘+ button’ to create a geometry primitive:
Select a ‘Cartesian box’ primitive and give it the following coordinates:
After saving the first cartesian box, head back to the region refinement. Assign the cartesian box to it.
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:
After saving the box, assign it to the second region refinement.
At last, head back to the main mesh settings and hit Generate.
The resulting mesh takes about 10 minutes to complete. After it is the operation finishes, this is how the mesh looks around the wing:
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:
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.
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.
Click on the ‘+ button’ next to Simulation Runs and ‘Start’ the process.
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.
After the simulation is finished, you can expand Run 1 to check the results.
Once the run is finished, open the area average at the inlet result control. By inspecting Uz and Uy, the velocity ramping is clearly appreciated:
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:
For compressible external aerodynamics simulations, other parameters useful to assess convergence are:
For further post-processing click on the ‘Post-process results’ or the ‘Solution Fields’ button.
Make sure to right-click on the color scale at the bottom of the screen and select the ‘Use continuous scale’, for a smoother transition between color contours:
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:
For streamline visualization, select the ‘Particle Trace’ filter from the top bar:
Only the streamlines will be visible after applying the filter. Collapse the Particle Trace 1 tab, right-click on the workbench, and choose the ‘Show all’ option:
Proceed to select all six faces of the domain and hide them, like in Figure 46, so only the wing surface is visible apart from the streamlines. Go back to the Particle Trace tab, and modify the settings as follows:
With these settings, this is how the streamlines will finally appear:
Animations can be created by choosing ‘Animation’ from the top bar:
Switch the Animation type to ‘Particle Trace’:
Click the play button to start the animation. Below is an example of animating the streamlines, colored with the velocity magnitude, during the final time step:
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!
Last updated: October 30th, 2024
We appreciate and value your feedback.
Sign up for SimScale
and start simulating now