Machine-learning accelerated design of electric vehicle aerodynamics

Venkat Viswanathan
5 min readDec 10, 2020

--

Mobility is central to human life and endeavor. The modern era of automobiles and planes have enabled unprecedented levels of mobility and has brought unparalleled prosperity to our species. As we continue to understand and fight the scourge of climate change, there is a pressing need for the future of mobility to be sustainable.

Electric powered mobility offers a path towards sustainable transport but many hurdles need to be overcome. In regards to terrestrial mobility, justifiably enough attention is given to batteries and electric motors, an overlooked aspect is the aerodynamics of the car itself. Alongside electrification, there is a second revolution in transportation: automation. Earlier this year, we analyzed the question of what is the energy penalty of autonomy on electric vehicles. This study found that the answer critically depends on how the sensors are positioned and how that affects the external aerodynamics of the vehicle. So the big question becomes, how do you decide the external shape of a car?

The force on an object that resists its motion through a fluid is called drag. When the fluid is a gas like air, it is called aerodynamic drag or air resistance. The aerodynamic drag typically has two parts, pressure drag and skin-friction drag. The more dominant pressure drag is caused by the air particles being more compressed (pushed together) on the front-facing surfaces and more spaced out on the back surfaces.

Schematic of a pressure drag on a cylinder showing regions of attached flow upstream, and flow separation due to loss in pressure followed by the turbulent wake region in the downstream. Figure adapted from this source.

The advancements in scientific computing have provided means to model the external aerodynamics in the form of computational fluid dynamics (CFD), a field where the hydrodynamic equations are reduced with physical models in order to solve geophysical or engineering problems. A central challenge in CFD is accounting for fluid turbulence!

Fluid turbulence is a multi-scale, non-linear problem that makes it difficult to directly solve the governing equation, Navier-Stokes fluid momentum equation for all ranges of scales, in the form of a Direct Numerical Simulation. This is especially true for flows of engineering interest such as external aerodynamics. One possible way to alleviate this is to limit the range of scales as is done by reduced order models such as Large Eddy Simulation (LES) or Reynolds Averaged Navier Stokes (RANS). These approaches resolve/model different ranges of all available scales of turbulence. However, these reduced-order methods are still computationally expensive, especially with respect to design space explorations. The question therein remains, can we fundamentally alter our approach by using physics-informed data-driven/machine learning-based inverse problem setup to tackle this challenge.

My Ph.D. student Varun started exploring this idea and we connected with Gavin, Arvind and Peetak (who were all at Los Alamos National Laboratory at the time). Their team had recently explored an exciting avenue in ML called Neural ODEs to model dynamical physical processes such as fluid turbulence. This set off a collaboration opportunity to explore this idea.

The goal was to explore if a purely data-driven method with embedded physics can be used to model the flow dynamics for a Direct Numerical Simulation of Homogeneous Isotropic Turbulence. While DNS simulations are computationally expensive, many physical processes of relevance to scientific interests can be reproduced in simplified simulations such as the Homogeneous Isotropic Turbulence (HIT). The close coupling of scales makes HIT a suitable candidate for this study.

Schematic of the energy cascade shows regions of operability of different modeling strategies including RANS, LES or DNS.
Model architecture of the developed model

We provide the model with an initial snapshot of the flow, and the continuous dynamics are forecasted within a finite time horizon. The schematic of the model is shown above. The forecasting is done on the learned, reduced latent space z, by integrating the ODE dz/dt. The differential equation itself is described using a trainable convolutional network. The encoder and decoder handle the bulk of this latent space transformation, while the spectral projection layer enforces a key physical condition of incompressible fluid flow: divergence-free velocity fields. Thus, we maintain physical solutions without solving coupled equations.

Unlike standard error metrics, two-point correlations, such as power spectra, are critical in turbulence diagnostics and analysis. These plots show the energy density contained in the flow as a function of wavenumber. Low wavenumbers, or large eddies, contain the most energy, which decreases with increasing wavenumber. In 1941, Kolmogorov postulated an analytical relationship between these two metrics, known as his “5/3 power law”.

We can compare the spectra from our predictions to the true data from DNS solutions to understand our model’s strengths and weaknesses.

The figure depicts snapshots of the spectra at the initial and final time steps. A crucial aspect of these results is that the model maintains a good agreement with the true solution at the low wavenumbers. Somewhat simplified, the model is able to capture the large eddies in the flow well, with a worse performance at the smallest scales. Most importantly, this aligns well with the needs of many practical engineering applications. The largest scales of the flow determine many of the macroscopic properties we are interested in, such as forces on an object, so being able to forecast these well cheaply is the first step to reducing the computational cost of fluid dynamics simulations.

In summary, we have demonstrated an important first step that it is indeed possible to build a physics-consistent data-driven model to describe fluid turbulence. This first step encourages us to expand our work in building a Reinforcement Learning (RL) framework for aerodynamic optimization. RL techniques often require large amounts of on-line simulation data, so generating reasonably accurate predictions rapidly is crucial for optimal efficiency and performance.

[This article was written with input from Peetak Mitra and Varun Shankar]

--

--

Venkat Viswanathan

Associate Professor @CarnegieMellon University, Advanced Batteries, Electrochemical Devices