This tutorial shows how an incompressible turbulent airflow around a Formula Student car moving in a straight line can be simulated. Figure 1 shows an example of the resulting flow behavior:
This tutorial teaches how to:
We are following the typical SimScale workflow:
Note, if you are not using the tutorial CAD model
Prepare the geometry for the simulation (only if you are not using the tutorial’s CAD model):
With this approach, you can reduce the computation effort necessary throughout the entire simulation process, while still obtaining meaningful results. Find more information about CAD preparation on this documentation page.
The first step is to click on the button below. It will copy the tutorial project containing the geometry into the Workbench.
The following picture demonstrates what should be visible after importing the tutorial project:
At the right of the Workbench, the parts of the model can be seen. This is a watertight assembly of the P19 model, provided by the Prom Racing FSAE Team, with an aerodynamic package of a rear wing, a front wing, a configuration of elements at the sides of the car, an undertray, and finally sidepods that enclose radiators. The suspension system can be included, as long as it is simplified.
For an incompressible analysis, only one part is allowed, which is the flow region. In case we want to add a cell zone too, we will have to include this part too. For the specific case, the car also includes a radiator, that will be modeled as a porous medium, so it is important that both the flow region and radiator remain as the only, and separate, parts. This is possible with the CAD mode features that allow performing a variety of operations, such as flow volume extractions, parts deletion, etc.
In case that the model does not include parts to be modeled as cell zones, you can create an Enclosure, as described in this documentation page.
To enter the CAD mode, click on the CAD model and choose the option as shown below:
Create an External flow volume extraction first.
The size of the domain is chosen according to the reference length (L) of the model. Here, the reference length is the horizontal distance from the tip of the nose, to the back of the rear wing. As a rule of thumb, the following values can be used:
We will use the Delete body feature afterward, to make sure only the flow region and the cell zone remain in the final version.
As a result, only the Radiator and the Flow region will be left in the model. Press ‘Save as copy’ to bring the new version of the CAD model to the Workbench.
The final version will appear as ‘Copy of Formula Student car’. Before the setup, feel free to rename the new geometry as ‘Formula Student car’, and delete the one that is no longer necessary.
Did you know?
It is possible to rename a CAD model by clicking on it’s name and adding the name title:
Also, a geometry can be deleted by clicking on the trash icon, as you can see below:
To get started, click on ‘Create a Simulation’:
Doing so, the analysis type choice widget opens. Choose ‘Incompressible’ as the analysis type. It can be used for cases where the Mach number remains lower than 0.3 in the entire domain, which will be the case for this tutorial. Proceed by clicking on the ‘Create Simulation’ button:
The simulation tree will be visible on the left-hand side panel. We have to set up all entries, to be able to run the simulation. In this tutorial, we want to calculate the steady-state solution, which is independent of time. SimScale also supports transient analysis, which allows the calculation of time-dependent results.
The global settings of the simulation remain as default:
Did you know?
The k-omega SST turbulence model is recommended for external aerodynamics cases.
It works as a blend between the k-omega and k-epsilon models. The k-omega model is predominant in the near-wall, switching to the k-epsilon model in the free-stream.
Find more information about the k-omega SST model in this documentation page.
Saved selections are groups of faces or volumes. They’re particularly helpful when the same group of faces is used several times during the simulation setup. The user can quickly select a given group of entities at once whenever they need to be assigned to a condition.
For this tutorial, three saved selections will be used, one including all the faces of the Formula Student car, and one for each wheel. First, hide the walls of the domain by selecting all of them (the face color must turn red), then right-clicking in the Workbench, and choosing the ‘Hide selection‘ option:
Activate the box selection and drag the cursor across the screen until all the remaining faces turn red. Then click on the ‘+’ icon next to Saved selections. Name it as ‘Full car’.
Proceed to create a set for the front and rear wheels too. Each wheel consists of 11 faces, and we will need to rotate and adjust the model in order to click on all of them before the set creation. The following photo shows how the saved selection of the front wheel should appear afterward, when everything else is hidden. See how the faces on the inside were included too:
Now we are ready to set up the physics of the simulation.
In the simulation tree, click on the ‘+’ icon next to Materials:
Choose ‘Air‘ in the panel that pops up and click ‘Apply’:
To assign the flow region as air, click on ‘Flow region’ under the scene tree as shown below. Leave the properties as default:
The physical situation simulated is a straight line movement with 15 \(m \over s\). An overview of the boundary conditions for the domain can be seen below:
Similarly, for the car walls, the following boundary conditions are applied:
Except for the wheels, all other faces of the car will receive a no-slip wall boundary condition.
To create a boundary condition, click on the ‘+’ icon next to Boundary conditions, and select the desired type from the drop-down menu.
a. Velocity Inlet
The straight-line simulation of a breeze-less environment can be achieved by setting a velocity inlet boundary condition at the frontal face of the domain. First, add a ‘Velocity inlet’ boundary condition from the menu:
The velocity value is 15 \(m \over s\), and it represents the speed of the vehicle. It must be set according to the orientation cube, that is placed at the bottom right of the Workbench. Here, the air travels towards the negative x-direction, so \(U_x\) should be set to -15 \(m \over s\), and the remaining components are set to 0 \(m \over s\):
b. Pressure Outlet
As seen in the rest of the incompressible fluid dynamics tutorials, the most common boundary condition for the outlet of an external aerodynamics case is a zero Dirichlet condition for the gauge pressure. Proceed by selecting the ‘Pressure outlet‘ on the menu.
Rotate the CAD model and assign the condition on the outlet:
c. Walls: Slip Condition
There are many types of wall conditions to use and all of them can be checked here. The top and right faces of the domain represent the open-air environment, and by setting the wall velocity to ‘Slip‘, its normal component is erased, and the tangential components remain untouched. Select the ‘Wall‘ category from the menu first:
Change the type of the wall by setting the (U) Velocity option, to ‘Slip‘.
d. Wall: Moving Wall
Another use of the wall category is to model a moving surface, like the ground.
We are using half the Formula Student car model to save resources. Set the plane that is coincident with the cut surface as symmetry to indicate that the domain is mirrored. Select ‘Symmetry‘ from the Boundary conditions menu:
Then click on the respective side of the domain to set it as the mirroring plane:
f. Wall: Rotating Wall – Front Wheel
For each one of the two wheels, we will create a new wall set, but this time, it will be modeled as a rotating wall.
For the setting of the rotation axis, we will be using the right-hand rule. Use the following figure as reference:
g. Wall: Rotating Wall – Rear Wheel
The same procedure as before is followed for the rear wheel set. This time, the center of rotation coordinates are:
Select the ‘Rear wheel’ saved selection at the end:
If you are using your own model, that does not include a radiator, you can skip this section.
A radiator can be modeled as a porous media. There are different types, and each approach is described in this knowledge base article.
We will set four sections of settings for the porous medium, based on the Radiator’s placement and experimental data. The advanced concept can be either assigned to a volume, as in this project, or to user-created geometry primitive, like a cartesian box.
Have a look at this guide to learn more on how to set up unit vectors for the porous media.
After the setup is complete, click on the ‘Radiator’ in the scene tree to assign the concept to it.
The Numerics settings can be left as default, except from the absolute tolerance of \(omega\), as it was observed to reach values smaller than 1e-6.
In the simulation tree, click on ‘Simulation control’ and configure it like this:
Did you know?
In a steady-state simulation, the End time and Delta t parameters control the number of iterations to be performed. With the default settings, a simulation consists of a total of 1000 iterations, which is enough for most simulations to converge.
For more notes on the simulation control settings, please visit the following page: Simulation Control for Fluid Analysis.
This section is important for the post-processing of the simulation run. There are many different features under the Result Control that we can use to evaluate the vehicle’s performance.
With the Forces and moments, we can extract the pressure, viscous and porous forces, and moments of various parts of the model.
Lift and drag coefficients are some of the most important parameters when evaluating the performance of a vehicle. The center of rotation can be calculated externally using the CAD software, and for this specific geometry it has the following coordinates:
We can also create a Force and moment coefficients set, to monitor the drag and lift coefficients, \(C_d\) and \(C_l\) respectively.
The Reference area value is a projection of the frontal vehicle area onto a plane. When using half the Formula Student car geometry, the area projection must account only for half of the model. One way to do it is to create a sketch and project the faces on the plane. Then check the designed area.
The final Forces and moment coefficients panel should appear like this:
Assign the result control to all of the car faces except the Radiator, like we did for the previous Result control set.
Include more parameters in the results by clicking on the ‘+‘ icon and selecting each one of the entries. With the turbulence, for example, we will be able to check the \(y^+\) value and make sure it is below 1.
Be careful when setting up the result control parameters, as they are used by the algorithm to calculate the drag and lift coefficients.
For the drag and lift formulas, and more examples on how to set up the forces and moment coefficients result control, please refer to the following articles:
How to analyze the pitch, lift, and drag coefficients?
Why are my lift and drag coefficients too big/small?
When the simulation is created with the standard mesher, the mesh set up is placed right before the end, as the boundary conditions were previously set on the faces of the enclosure. This means that even if the mesh is changed and re-generated, we will not have to re-assign the boundary conditions. Click on ‘Mesh‘ so we it starts.
Initially, we will create two cartesian boxes and region refinements will be assigned to each one of them later.
Click on the ‘+‘ button next to Geometry primitives, and choose the ‘Cartesian Box‘ option like below:
The first cartesian box is the biggest of the two and has the following dimensions, that are set in the same way as the background mesh box, which is by having a maximum and minimum value for each direction:
Then create the small box, with the following dimensions:
Go back to the Mesh panel, and make the following changes:
Resolving the boundary layer
If you are using your own model, you can use this page to manually calculate the first layer thickness according to your case, or even try this online calculator. Keep in mind that if you choose the latter, you should double the result of the calculator, as your input should concern the whole thickness, not just the distance from the wall to the cell center that the calculator provides.
For the standard mesher, several refinement options can be selected by the user to get the required mesh. These are all specified under the Refinements mesh sub-tree.
The region refinement is used to refine the volume mesh for one or more user-specified volume regions under Geometry primitives. Add a Region Refinement by clicking on the ‘+’ icon next to Refinements, and then choosing the ‘Region Refinement’ option.
The first region refinement that we will create is matched to the big cartesian box. The Refinement mode will be automatically set to Inside. This refines all volume mesh cells inside the surface up to specified maximum edge length. The surface needs to be closed for this to be possible.
Then add a second region refinement for the small cartesian box. This time:
Add this type of surface refinement by clicking on the ‘+’ icon next to the Refinements, and then choosing the ‘Local Element Size’ option.
We will set a maximum edge length for the cells on the assigned surfaces.
During the mesh setup, all the parts used for advanced concepts should be added as cell zones.
Go back to the main mesh tab. An estimation of the duration of the meshing procedure, the core hours that will be spent, as well as the size of the mesh, will appear. Click on the ‘Generate‘ option to get started.
After approximately 30 minutes, the mesh is ready, and the icon next to the Mesh section on the simulation tree will have a green checkmark.
It is possible to zoom in to check the generated boundary layer or even create a mesh clip to inspect the interior of the mesh.
The simulation setup is now ready. We can proceed to create a new simulation run. To do so, click on the ‘+’ icon next to Simulation Runs.
This way, the mesh will be generated, and, afterward, the simulation run will start automatically. While the simulation results are being calculated, we can already have a look at the intermediate results in the post-processor. They are being updated in real-time!
There is also a link to the finished project at the end of the tutorial.
A red warning message may appear, stating that the duration of the simulation exceeds the maximum runtime. The defined maximum runtime of 30000 seconds will be enough for this simulation, therefore, please proceed by clicking on ‘Start’:
The simulation run takes a few hours to finish, depending on the model that is used, and its complexity. This case finished after 218 minutes. During the simulation, we can access the post-processing environment by clicking on ‘Solution Fields’ after expanding ‘Run 1‘:
After the simulation is finished, we can extend Run 1 to check the results.
Make sure to check whether the simulation converged or not, by expanding the Convergence plots section, and then clicking on ‘Residuals‘.
The drag and lift are available in the ‘Forces and moments’ graph that appears after expanding Force plot:
The plot shows us how the values are changing throughout the simulation process, as the iterations go on. In a converged simulation, the coefficients will stabilize around a value. Therefore, in a steady-state simulation, the intermediate results are important to assess convergence. The final converged solution is the one that should be analyzed to obtain the flow parameters.
It is also possible to download the results in .csv format and analyze them with an external program, and get the average value from the final iterations. This can be done for all the plots by clicking on the icon at the top right of the plot, and selecting the format you want to export:
The same steps can be applied to the Force coefficients plots section too.
In order to enter the post-processor, click on the ‘Post-process results’ option:
The first thing we might see is the whole domain, colored with pressure values. We can change the coloring, as shown in the next section, or use other features, in the Filters toolbar, and select one of the available choices.
Initially, click on the walls of the flow domain, right-click on the screen, and choose ‘Hide selection’, so only the Formula Student car is visible:
When the walls are hidden, we will see the pressure distribution on the car:
The warm-colored contours showcase the areas with the highest pressure values. As expected, these are the upper sides of the downforce-generating airfoils, as well as surfaces that are the first to come in contact with the freestream air, such as the nosecone, the driver’s body, etc.
Pressure is not the only parameter that can be visualized on the model’s faces. We can switch to another parameter by changing the Coloring option.
We can check different slices of the flow region, by creating cutting planes. For example, we can visualize the velocity on a plane that cuts across the front wing.
Hide the ‘Parts Color‘ and activate the ‘Clip model‘ option, so the only feature that appears is the slice we created:
Suction regions with very low velocities can be analyzed with blue contours, as well as the acceleration of the flow below the front wing, which is a clear indication of downforce generation.
One more useful feature is the streamlines. To create this, select ‘Particle Trace’ from the Filters toolbar. The whole domain will appear at first, and we will choose the position of the seed face, by clicking on the inlet, in front of the car. This will be the starting point of the streamlines:
Only the streamlines and the radiator will be visible. Close 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 65. Go back to the Particle Trace tab, and modify the number of particles under # Seeds horizontally and # Seeds vertically. For this tutorial, we can use ‘5’ points horizontally and ‘100’ points vertically. Change the Spacing of the streamlines to ‘5e-2’ and the size to ‘4e-3’.
With streamlines, the flow around the complex structures can be better analyzed. Other than the velocity magnitude, the visualization of the vorticity on the streamlines can help with the recognition of the areas that need smarter design and optimization.
We can customize the streamlines and other features as we wish, by changing the inputs on each tab. Have a look at our post-processing guide to learn how to use it.
Congratulations! You finished the aerodynamic flow behavior of an FSAE car tutorial!
Last updated: October 9th, 2023
We appreciate and value your feedback.
Sign up for SimScale
and start simulating now