Automatic (Meshing) for the People – From the “Toward Predictive Combustion” Blog Series
Posted by Kelly Senecal on September 30, 2013
Automation is a hot topic these days. With the recent popularity of such books as The 4-Hour Workweek and The 80/20 Principle, the idea of achieving more with less is something we all dream about. The key to this of course is to work smarter, not harder. In CFD, the hard work often revolves around constructing and fine tuning the computational mesh. So how do we work smarter? In this business, working smarter means saving time and achieving a better result. This is accomplished by not only automatically creating a mesh of high-quality cells but also having the mesh dynamically respond to the flow field. I’ll describe in a minute how this is done, but first a little background.
For those of you not familiar with the origin of this blog’s title, “Automatic for the People” is the name of the eighth album from the rock band R.E.M. A fitting title for a post about automated meshing, but even though I consider myself somewhat of a music aficionado, I had no clue where this name came from. After doing a little googling I learned that it was inspired by the slogan of Weaver D’s Delicious Fine Food, a restaurant located in the band’s hometown of Athens, Georgia. According to this reference, the slogan means that restaurant patrons automatically get what they want. As in “Do I get fries with that?” “Automatic!” “Can I get my check?” “Automatic!” If only Weaver D specialized in CFD…
My first experience making a complicated mesh was in graduate school. I remember spending hours, days, even weeks structuring cells such that the overall mesh conformed to the strict rules of the CFD solver. When I finally finished I felt an enormous sense of accomplishment, but also a huge sense of relief. However with this relief came big uncertainty. Did I have resolution in the correct places? I didn’t know. Was I anywhere near the point of grid convergence? Your guess was as good as mine. For better or for worse, I was done with the mesh and was going to run the heck out of it, no questions asked.
There is a school of thought that believes that making a mesh by hand is essential to achieving an accurate solution. Think about that for a moment. If you know where all of the mesh resolution should go ahead of time then you must already know what the flow solution looks like. But if you already know what the flow solution looks like, why do you need to run the simulation? The truth is that guessing where the mesh resolution should go ahead of time is quite challenging, even impossible for most cases. My graduate school meshes took a long time to generate and had no guarantee that they would correctly resolve the flow for the cases that I threw at them. Unfortunately, similar meshes still show up today, particularly in the combustion community.
So what’s the secret sauce to creating an optimum mesh? (Hint: it’s not the hot sauce at Weaver D’s!) In a 2004 Stanford workshop, Professor Wagdi Habashi of McGill University stated that in order to achieve mesh independence, we “cannot let the user decide where to generate and concentrate points.” He also indicated that “a mesh that is good for a flow condition can be shown not to be as good for a different condition, for the same geometry” (for more details on his presentation, google the phrase “meshing by guessing”).
So the secret sauce is in fact the fluid flow itself. Only when the flow solution is brought into the mesh generation process will the guess work be removed and an optimal mesh achieved. This is accomplished by automatically creating the mesh every time-step by adapting to the flow field. It’s the CFD-equivalent to Weaver D’s. “Is my mesh adequately resolved?” “Automatic!” “Is it sufficient for other flow conditions?” “Automatic!” Automated meshing isn’t going to guarantee you a 4-hour workweek, but it will give you more time and more confidence to stand behind your simulations.
Missed the beginning of this blog series? Head on over to Toward Predictive Combustion: A Blog Series to catch up.