The 3D Mesh Resolution Threshold - 5k Points is All You Need!

Luís Sarmento
Luís Sarmento Main Author
Ivan Pombo
Ivan Pombo Technical Author
Maya Hershey
Maya Hershey Technical Writer

What’s a minimum threshold resolution for 3D models that still allows accurate prediction of physical properties in simulations? This is especially crucial in fields like aerodynamics or structural design, where the minimal level of detail required for a 3D model should still deliver reliable estimations.

To answer this, we sought to determine the resolution threshold at which 3D models remain effective. By using our API to analyze the impact of 3D model resolution on computational fluid dynamics (CFD) simulation outcomes, we performed experiments assessing aerodynamic properties using OpenFOAM. Our goal is to figure out the least detailed resolution that still provides reliable drag coefficient estimates, comparable to those obtained from high-resolution models.

Let’s find out!

Setting the Stage: Simulating Drag Coefficients with Varied 3D Mesh Resolution

To kick things off, we’re using the Inductiva API to create a virtual wind tunnel using OpenFOAM, and then run a wind tunnel simulation to estimate the drag coefficient for five different 3D objects of a similar size. Starting with detailed meshes, we’ll gradually reduce these objects’ detail to more coarse representations while observing the impact on their aerodynamic properties.

The 3D objects under study include a cube, a sphere, an ellipsoid, a canonical sports motorbike with a rider (a standard object in OpenFOAM tutorials that has become one of academia’s standard object for benchmarking new results), and a typical automobile. For the automobile, we’ve selected the DrivAer model which was developed by the Technical University of Munich as a standard for testing new aerodynamic methods in production vehicles, with our simulations focusing on the fastback version featuring a closed floor.

Figure 1. Visualisation of the original 3D objects under study.

All objects have similar dimensions. For example, the sphere’s diameter is 1 meter, and the car spans 2.03 meters in width. In table 1 below, we detail the dimensions of each object along their axes and their corresponding projected area values. This projected area which is essentially the shadow cast by an object on a plane perpendicular to airflow, assuming a light source infinitely distant, plays a crucial role in calculating the drag coefficient.

Object Length / \(m\) Width / \(m\) Height / \(m\) Projected Area / \(m^2\)
Cube 1 1 1 1.0
Sphere 1 1 1 0.79
Ellipsoid 2 1 1 0.79
MotorBike 2.04 0.68 1.35 0.56
DrivAer 4.61 2.03 1.42 1.99

Table 1. This table outlines the dimensions and projected areas of five objects analyzed in our wind tunnel simulations.

First off, we begin by initiating wind tunnel simulations using the highest resolution meshes for each of the five objects listed above to obtain their drag coefficients. These coefficients will be considered as the “ground truth” values which we will reference for comparison in subsequent steps, and they represent the expected outcomes in the project’s final version. The high-resolution meshes for these objects have roughly the following number of points:

  • Cube: 22,000 pts
  • Sphere: 18,000 pts
  • Ellipsoid: 22,000 pts
  • Motorbike: 133,000 pts
  • Car: 82,000 pts

Next, through mesh decimation — a process of reducing a mesh’s resolution by decreasing its number of points — we create lower-resolution versions of the five original objects. Following each decimation step, we run another wind tunnel simulation to obtain an estimate of the corresponding drag coefficient for the newly reduced-resolution object. Initially, after only a single decimation step, the drag coefficient obtained should not deviate too much from the “ground truth value.”. We continue this process, progressively lowering the mesh resolution to just a few hundred or even dozens of points, to determine how significantly the drag coefficient can deviate. Below, we show the five objects at the lowest mesh resolutions tested.

Figure 2. Visualisation of the lowest resolution 3D objects under study.

Now, here’s our core inquiry: How does the drag coefficient value – computed through our wind tunnel simulations – change as we progressively decimate the mesh?

Before initiating any simulations, there’s one observation we can make with certainty: decimation impacts each object differently. For example, the cube’s shape remains largely unchanged by decimation, suggesting minimal variation in its drag coefficient. This hypothesis positions the cube as the control object in our study to help identify any anomalies in the simulation process. However, it’s important to remember that the simulation’s outcome is not influenced just by the 3D object’s mesh but also by the surrounding “outer mesh” generated by OpenFOAM that occupies the empty space inside the tunnel, which also changes with decimation. Therefore, minor fluctuations in the drag coefficient’s value are anticipated.

Simulating a Virtual Wind Tunnel with Inductiva API

We begin by setting up a virtual parallelepiped wind tunnel measuring 30 meters in length, 12 meters in width, and 10 meters in height, significantly larger than any of the 3D objects we’re testing. We positioned the objects in the first quarter of the tunnel (see image below). For insights on our choice of dimensions and object placement, see references [6,7].

Figure 3. Wind Tunnel domain with the DrivAer model placed in the first quarter of the tunnel.

To determine the drag coefficients, we ran steady-state simulations using OpenFOAM, which automatically calculates the drag coefficient during runtime. Each object was exposed to an incompressible airflow at a speed of \(16 m/s\) (roughly \(58 km/h\)), with a kinematic viscosity of \(1.5\times 10^{-5} m^2/s\). Under these simulation conditions, the five objects tested have comparable Reynolds Numbers that illustrate the flow conditions under which the simulations were conducted, as detailed in table 2 below. Additionally we also provided the drag coefficients as reported in existing literature to form a baseline for comparing our simulation results.

Object Reynolds Number Literature Drag Coefficient
Cube \(1.6\times10^6\) 1.05 [1,4]
Sphere \(1.6\times10^6\) 0.2 [1,4]
Ellipsoid \(1.6\times10^6\) 0.1 [4]
MotorBike \(1.08\times10^6\) 0.42 [2,3]
DrivAer \(3.2\times10^6\) 0.28 [5]

Table 2. This table presents a comparison of drag coefficients sourced from referenced studies, and Reynolds Numbers for a variety of objects analyzed in our wind tunnel simulations.

To ensure stable simulations, we set the outer mesh to have a sufficiently high resolution by adjusting few parameters defined in the OpenFOAM configuration file system/snappyHexMeshDict. Specifically, we set the features edge refinement level to 6, the refinementSurfaces levels for the object within the wind tunnel to minimum of 5 and maximum of 6, and the refinementRegions of the general domain to level 4.

Implementing these numerous simulations for multiple objects at different levels of resolution was quite simple using the Inductiva API. With Inductiva’s templating mechanism, we could easily generalize an initial set of OpenFOAM configuration files for a wind tunnel “base case”. This templating feature then allows us to programmatically iterate over each object, progressively decimating their meshes as we go along. For an in-depth walkthrough, check out this step from our Physical-ML Synthetic Data tutorial series.

We ran 20 simulations for each object at different levels of model resolutions, totaling 100 simulations. Each simulation ran for 400 iterations, which is more than enough to allow the simulation to converge (in fact, we observed convergence typically occurs within 200 to 300 iterations across all objects).

The simulations were carried out on c3d-highcpu-60 machines from Google Cloud Platform and made available through our API, with completion times ranging from 10 to 20 minutes per object.

Understanding the Drag: Mesh Resolution’s Impact on our Aerodynamic Simulations

The simulation outcomes are illustrated in figure 4 below. The x-axis plots the mesh point count of each 3D object within the wind tunnel simulation in a logarithmic scale, transitioning from “high-resolution meshes” on the right to “increasingly decimated, coarser meshes” on the left. This setup visualizes the experiment’s flow from detailed to simplified mesh resolutions. The drag coefficient values are plotted on the y-axis, with each of the five objects represented by two lines: a solid line for the calculated drag coefficients and a dashed line for the average values, highlighting the trend. From highest to lowest drag coefficient, the order is: cube, motorbike, DrivAer car, sphere, and ellipsoid.

Near the right end of each line, a cross marks the literature drag coefficient value for each object, as previously detailed in Table 2. In the region of high-resolution meshes, the experimental drag coefficients align closely with literature values, except for the DrivAer car, which is slightly higher but remains close, indicating that our simulations reliably converge to expected values.

Figure 4. Drag Coefficient plotted in terms of the number of points of the 3D meshes for each object. The \(C_d\) values presented on the right are the state-of-art drag coefficients for each object and the dashed horizontal lines represent the average of the drag coefficient over all resolutions. The vertical line at the center represents the 5k point resolution.

Observations

The drag coefficient value across each curve largely remains consistent, with minor fluctuations likely stemming from changes in both the 3D object’s mesh and the surrounding wind tunnel “outer mesh” during decimation. These variations become more pronounced in complex objects like the motorbike and the car, especially after considerable mesh reduction. Still, in the higher-resolution region of the plot, any fluctuations stay within a modest 5% range.

In the curve’s lower-resolution region, we observe a noticeable uptick in drag coefficient for some objects, particularly the motorbike and sphere, and to a lesser extent in the car, compared to the horizontal average line. This increase correlates with the objects’ shapes changing significantly during mesh decimation, notably the emergence of larger flat frontal surfaces, as shown in figure 5 below.

Figure 5. Low resolution meshes of sphere and motorbike to highlight the emergence of flat surfaces.

Conclusion: 5K Points to Precision

To conclude, our results seem consistent and align with what we expect: simulations estimating the drag coefficients of common objects tend to overestimate the “true” drag coefficient when using low resolution representations of those objects. However, even for relatively complex objects like motorbikes or cars, we might not need highly detailed meshes to ensure that the values computed via simulation are close enough to the “ground truth” value.

Remarkably, meshes with as few as 5k points appear sufficient for simulations to yield stable and theoretically consistent estimates. This insight is particularly promising, as generating 3D meshes with 5k points is well within the capabilities of current Generative AI techniques.

Ultimately, it seems that 5k point 3D meshes may indeed be, all you need!

Further Exploration

  • Discover the capabilities of OpenFOAM available through the Inductiva API here.
  • Learn how Inductiva’s Templating engine allows running hundreds of variations of a simulation in parallel.
  • Explore the range of hardware options available for running your simulations via Inductiva here.

References

[1] Aziz, E. S., Chassapis, C., Esche, S., Dai, S., Xu, S., & Jia, R. (2008, June). Online wind tunnel laboratory. In 2008 Annual Conference & Exposition (pp. 13-949). [2]https://www.cfdsupport.com/OpenFOAM-Training-by-CFD-Support/node147.html [3] Dubey, P., Pramod, M. Y., Kumar, A. S., & Kannan, B. T. (2020, November). Numerical simulation of flow over a racing motorbike using OpenFOAM®. In AIP Conference Proceedings (Vol. 2277, No. 1). AIP Publishing. [4] https://www.me.psu.edu/cimbala/me320/Lesson_Notes/Fluid_Mechanics_Lesson_14B.pdf [5] Varney, M., Passmore, M., Wittmeier, F., & Kuthada, T. (2020). Experimental data for the validation of numerical methods: DrivAer model. Fluids, 5(4), 236. [6] https://www.idealsimulations.com/resources/cfd-computational-domain/ [7] Lanfrit, M. (2005). Best practice guidelines for handling Automotive External Aerodynamics with FLUENT

Recent posts from our blog

Hugo Penedones

Hugo Penedones

Luís Sarmento

Luís Sarmento

The Inductiva API v0.6 brings large files support, optimized logs management, smarter scalling of Elastic Machine Groups, support for CaNS, Inductiva Benchmarks, Tutorials and more.

Hugo Penedones

Hugo Penedones

Luís Sarmento

Luís Sarmento

The Inductiva API v0.5 release brings two New Simulators, Up-to-date GCP pricing information, additional features on Command Line Interface, more Metrics and Benchmarks, a Template Manager and more revamped Documentation. Additionally we are open sourcing all the scientific software containers we are using in our backend - Project KUTU.