Questions? Contact Us: Main: (510) 845-0029 Sales: (510) 301-9860 [email protected]

AI and CFD

The application of AI (Artificial Intelligence) to CFD (Computational Fluid Dynamics) is the latest in a long history of advancements that have decreased the time it takes to go from design to a prediction of performance. As the cost and time to calculate performance from a design gets smaller and smaller, we get closer and closer to the vision of being able to automatically optimize product design.

We can trace the advancement in the speed of CFD starting in the 1960's when the first CFD codes ran on early scientific computers such as the CDC 6600. Advancements came from more advanced computer architectures, smaller and faster electronics and impovements to software algorithms. AI based CFD, like other advancements, is enabled by a new hardware architecture, the GPU, and a new software approach, Machine Learning, specifically Neural Networks.

Vector Processors

The first advancements in computer architecture came with Vector Processors. The key observation that makes vector processors a signficant improvement over a scalar processor, is that ten's or hundred's or thousand's of operations that a computer must perform are so similar to each other that much of the control logic is not needed and more of the hardware can be devoted to the actual work of the computer: multiplying floating point numbers. On a general purpose computer, on a generic piece of software, each executed instruction might be completely different than then next, with different data types, coming from unrelated parts of memory and being executed based on conditions specific to that instruction. In that case, a large portion of the computer hardware must be dedicated to decoding instructions, branching on conditionals and managing the reading and writing of data. This would be single instruction, single data (SISD).

For CFD and other scientific calculations, it was noticed that ten's or hundreds of executed instructions were just the same operation repeated on consecutive locations in memory. Running on a scalar computer, the CPU would decode the same instruction hundreds of times, evaluate conditionals hundreds of times, issue fetch operations hundreds of times, and also issue store operations hundreds of times. The idea was to decode the vector instruction once, tell the memory system of load a whole series of data locations once, pipeline the actual operation through the functional unit and then store the data back to memory in regular pattern. This is called single instruction, multiple data (SIMD).

Simultaneous to this, programmers were improving the software that was running on this improved hardware, by using Successive Over-Relations, Multi-grid and other methods.

Parallel Processing

The next hardware leap came from parallel processing, where a single computer comprised more than a single independent CPU. Early supercomputers featured several astronomically priced vector CPU's linked into a single system that could divide a large CFD problem into first 4 then 8 and then 16 separate problems that could be mostly independently solved with separate pieces updating each other from time to time.

Clusters

By the early 90's, inexpensive comodity chips used in personal computers started to have processing power that approached that of the CPU's of specialty supercomputers. By linking together hundreds of inexpensive systems, researchers could build a virtual supercomputer for the fraction of the price.

Multi-core CPU's

By the early 2000's, commondity chips were being produced with multiple CPU's. All of these advancements were layered on top of each other and the performance gains were multiplied. A linux cluster could be built from hundreds or thousands of "nodes". A node is essentially a standalone computer about the size of a pizza box, that has it's own power suppply, several CPU's, its own memory and networking hardware. Each CPU was really a chip containing several "cores", each "core" was really what used to called a CPU, a piece of hardware with its own program counter and instruction decode logic and functional units such as floating point adders and multipliers.

Inside of each "core" the functional units were pipelined, meaning at each clock cycle a different operand worked its way partially through the functional unit. So at any given time the floating point multiplier was processing portions of several instructions. In this way more and more of the electronics were being used all of the time.

GPU's

The next revolution in computation, came from "left field" so to speak. While one group of users was concerned with solving systems of millions of equations for scientific and industrial reasaons (grown adults with paying jobs), a completely different group of users (mostly teenage boys) were playing video games with more and more realistic graphics. The compuational power required to render a screen for a computer game is actually on the same scale as needed for a cutting edge CFD calculation. But in the early days, the graphics cards were custom built to do only computer graphics and could be optimized to do just that task. They were not programmable in the traditional sense.

A GPU worked by having an large array of identical relatively slow processors , each of which was only responsible for rendering a small portion of the screen.

As more and more sophisticated graphics effects were being implemented, it became harder and harder to implement that in "burned in" graphics chips. An new kind of graphics chip was invented: the general purpose graphics processing unit (GPGPU). There is still the array of many relatively lower speed processors, but importantly they were all working in lockstep and didn't need their own control logic. It was more like an array of functional units than an array of CPU's or cores. But now this array of functional units was programmable. Now the GPU controller could say to its array of processors "each of you hundreds of units: read a data location, perform this operation and then store". Suddenly and single GPU behaved like a CPU but with hundreds of times the power as long as it had hundreds of identical tasks to perform. It cannot do what a regular CPU core can do hundreds of times faster, unless the tasks is repetive in a very restrictive way. But for computer graphics it worked. And people doing matrix operations quickly realized that it would also work for them as well.

CFD on GPU's

Because GPU's are programmed in a completely different paradigm that either parallel computers or serial computers, A CFD code typically needs to be completely re-written in order to take advantage of GPU's. When this is done, the speedups can be dramatic. Perhaps 100x faster.

AI

At the same time that CFD solver programmers we taking advantage of GPU's another completely independent group of people were taking advantage of them as well. Researchers in AI had long struggle with making their Neural Networks do anything meaningful. A Neural Network works as follows. Suppose you want to create a program that can tell the difference between pictures of dogs and cats. If the pictures were black and white with a grey scale value at each pixel, the set of pixels would be a set of N input floating point values: 0 for black, 1 for white. Each pixel would be connected to a Neural Network where the


A Comprehensive Tool Box

  • Topology Based Meshing

    Body fitted anisotropic Surface Mesh

  • Octree Mesher

    Cartesian background Volume Mesh

  • Shrinkwrapper

    Cartesian Cut Mesh with optional isotropic remapped Surface Mesh

  • Prism Mesher

    Boundary Layer Mesh for both Shrinkwrapped or Topology based Meshing

  • Tetrahedral Mesher

    Isotropic Volume Mesh

  • Dualizer

    HoneyComb Volume Mesh

  • Volume Mesher Smoother

    Variational based Smoothing