...
Mesh design is mostly about finding just enough mesh elements to accurately represent the geometry of interest. Minimizing the number of mesh elements reduces the time and computing power required for the simulation, but not having enough increases the error of the results. A simplified quick metric to use is the total number of elements. This number gives a rough idea of the mesh resolution and can help predict how long a simulation will take, or if SimScale can even complete the simulation. What I mean by this is that after about 12-14M elements, SimScale will run out of memory when using 16 cores. For reference, we mostly used 10-12M elements during the development of MSXIV.
First, the region that will be simulated must be determined. This is known as the Background Mesh Box (in SimScale, it is also Also commonly called the bounding box or domain). Typical guidelines are to use 2-8 times the car’s dimensions. Less space is needed on the sides, a moderate volume space is needed in front of the car, and the majority of space should be behind the car. So for MSXIV (Approximately 5 m long, 2 m wide, 1 m tall), the domain should extend about 15 -20 m (= 5 m * 3 or 4) were created in front of the car, 35 -40 m (= 5 m * 7 or 8) behind the car, and 4- 5 m above and on either side. This results in a domain that is 50 m long, 10 m wide, and 5 m tall. Now, it is important to note that there is a plane of symmetry running down the center of the car (I guess this isn’t necessarily true for all cars but for most cars it is). This means that we only need to simulate half of the car. The resulting drag (and other forces) can be doubled when post-processing, since each half of the car should have identical drags. This can drastically reduce the number of elements in your mesh, without sacrificing resolution, and is something we did that was not take taken advantage of for the design of MSXIV. For example, the 12M element meshes we used could have been recreated to the same resolution by using a 6M element “half-mesh”. Or, more importantly, the accuracy of the simulation could be improved by using a half-mesh with 7-9M elements (equivalent to 14-18M elements of a full mesh) and SimScale will still have enough memory even on 16 cores. The end result is a domain that is still 50 m long and 5 m tall, but only 5 m wide offset to one side of the car.
Note |
---|
Remember that a simulation might be asymmetric even if the geometry is symmetric. Crosswind simulations are one such example, which would require a full mesh. |
Once the size of the domain is determined, the resolution on the surface of the car must be decided upon. This is partially determined by how the boundary layer will be modelled. There are 2 strategies for this: using full resolution or using wall functions. Whichever strategy is chosen will determine the height of the boundary layer elements in the direction perpendicular to the surface. The lateral dimensions of the elements should be close similar in value to the height.
Then refinements should be are used to create appropriately sized elements between the car’s surface and the domain walls. Essentially, the area around the car should have the finest elements, then the edges of the domain should have the coarsest elements, and there should be a gradient of element sizes between them. There should also be moderately fine elements in the wake of the vehicle.
...
The last refinement we need is a boundary layer refinement. This allows the simulation to properly model the effects of the boundary layer on the airflow around the vehicle. Add the Inflate boundary layer refinement and set the layers, expansion ratio, min thickness, and inner layer thickness to the desired values, based on whether you want to use wall functions or full resolution. I would start with wall functions, as they are computationally cheaper and I’ve had slightly better convergence with them. I have been I’ve had success using 10 layers, at an expansion ratio of 1.2, a minimum thickness of 0 m, and an inner layer thickness of 6.6e-3 m. Select all the faces of the vehicle.
...
Those are all the refinements that I generally use, however the problem is that if this mesh is generated now the boundary layers will be missing. Maybe not all of them, but the vast majority in my experience. Proper boundary layer modelling is critical for predicting boundary layer separation, which can lead to massive increases in drag. This means we need to find out why the boundary layers are not being formed and then correct this if we want to accurately predict the drag of our vehicle. Why this happens is likely quite complicated and influenced by many factors. My understanding fluid behaviour around the vehicle so this must be corrected. My understanding of why this happens is that all of the layers are actually formed as requested during mesh generation but many of these layer elements do not meet quality standards and are removed. The solution is to either create higher quality layer elements or to relax the quality parameters, allowing lower quality elements to be used. Both of these require the advanced settings section I mentioned earlier (Return to Mesh in the navigation panel and scroll down to find the advanced settings).
...
Setting | Default Value | New Value |
---|---|---|
Relax iterations | 8 | 20 |
Surface normals max smoothing iterations | 2 | 20 |
Internal mesh max smoothing iterations | 5 | 10 |
Layer addition max iterations | 50 | 100 |
Max layer iterations with strict quality controls | 20 | 15 |
These settings changes are to allow more iterations to develop high generate higher quality layer elements, with the exception of the last one. Then scroll down to Mesh quality controls and make the changes indicated in Table 2.3:
...
Note |
---|
I am quite certain these settings are not optimal. From the tests limited testing that I did, these gave the best mesh results for MSXIV’s particular geometry. Future projects should allow some time for finding more optimal mesh settings, even before the mesh independence study. |
...
After the mesh has been generated, navigate to mesh and click the yellow button that appears to select the mesh as your domain. The icon besides Mesh in the navigation panel should change from yellow to green. Before proceeding, we should check to make sure it looks right and that no mistakes have been made. SimScale has several tools for this, some of which have been recently added after MSXIV’s aerobody design was locked. The first and most basic is the mesh element count, found in the general mesh settings under Mesh selection. If your mesh is way smaller or way larger than expected, something may be wrong and any issues should be addressed before moving onto the simulation. The next quick check is to scroll down to the bottom of the Mesh quality controls and expand the new section called Event log. This section has element counts for each type of element. I believe the Number of prisms refers to the number of layer cells and can be used in the same way as the total element count. Fewer prisms than usual can indicate that too many layers were removed, which should be inspected and addressed before continuing. I was able to get around 22k prisms for wall function meshesa mesh of this resolution. A more detailed inspection can be done by looking at the mesh in the 3-D display. The symmetry plane provides a convenient cross-section to look at the boundary layers running along the middle of the car, and the mesh clip tool can be used to create any other cross-sections. Finally, you can navigate to the Mesh quality section to conduct more detailed and quantifiable analysis of your mesh quality, although it does take a while to load.
Expand | ||
---|---|---|
| ||
Figure 2.1: Symmetry plane of the mesh generated by the discussed settings. Figure 2.2: Closer view of the boundary layer elements around the front of the vehicle. Figure 2.3: Closer view of the boundary layer elements around the pontoon, created with a mesh clip. |
...