Wednesday, December 28, 2011

High-Order CFD Workshop


Merry Christmas and Happy New Year!

Hello again after a long silence. The last few months were quite hectic. In addition to our daily activities, we had several prominent visitors to aerospace engineering, including a three-star general, a NASA astronaut, a top Boeing executive. In fact, the general was interested in seeing some CFD. I therefore got to shake his hand. I also had the pleasure of visiting South America for the first time, as a matter of fact, the largest country there - Brazil. I really enjoyed Brazil and will definitely visit again. Here is a photo of Sao Paulo.


Oh yes, another big event in town was the the biggest upset in ISU's football history - we beat Oklahoma State!

Now back to CFD...

The 1st International Workshop on High Order CFD Methods will be held in Nashville on Jan. 7 and 8, 2012. Many types of high-order methods will be covered by researchers from all over the world. We will have two full days of actions. See the following agenda for details:

Here is a bit of history regarding the Workshop. I became a member of the Fluid Dynamics Technical Committee of AIAA in 2006-2007, and then started to chair the CFD Algorithm Discussion Group (DG) until 2010, when Dr. H.T. Huynh of NASA Glenn took over.  The charter of the DG has been:

To coordinate research and promote discussion for the improvement of CFD algorithms with a particular focus on:
       i.     High-order spatial discretization
       ii.     Error estimate, grid adaptation and methods capable of handling bad grids
       iii.     Efficient time marching/iterative solution methods for unsteady flow
       iv. Benchmark and challenge problems for above methods

Many leading CFD pioneers and experts including Jameson, Roe and van Leer participated in various discussions. The workshop idea came from one of the many discussions, and was also shared by the ADIGMA project in Europe. A strong support has been provided by AFOSR and DLR of Germany. Through several years of hard work, the DG has achieved two major milestones:

1. Identified three pacing items based on a survey and numerous discussions - discontinuity capturing, hp-adaptations and low storage efficient solver. Details are given in the following presentation.

2. The planning of the high-order workshop.

Let's hope we will have a very successful Workshop in Nashville!

Tuesday, October 18, 2011

Why is the order of accuracy important?

Most of the commercial CFD codes are 1st or 2nd order accurate. This is largely due to the robustness offered by these low order methods.  First order methods can be used to compute a steady-state solution reliably and quickly on almost any mesh. For many industrial applications, getting a solution with the correct order of magnitude may be good enough to provide some guidance for product designs. In such cases, low order CFD codes obviously serve a useful purpose.

If the accuracy of a solution is important (e.g. the lift coefficient of a Boeing airliner), first order methods are usually too crude. In theory, one can always refine the mesh enough times to obtain the desired solution accuracy. But mesh refinement is a very inefficient means for low order methods to reach an accuracy threshold. High order (OOA > 2) methods are much more efficient with mesh refinement. Here is why.

Assume that doubling the number of cells in each direction in space (3D) and time increases the computational cost by a factor of 16, i.e., 2^4. For a 1st order scheme, however, the solution error is only reduced by a factor of 2. For a 2nd order scheme, the error is reduced by a factor of 4, while for a 4th order scheme the error is reduced by a factor of 16. Now you see why mesh refinement is much more efficient in reducing the error for a high order method. In fact, a 4th order method on a mesh of 1 million cells may produce a more accurate solution than a 1st order method on a mesh of a billion cells! In computational aeroacoustics (CAA), high-order methods have been used almost exclusively for wave propagation problems because of the stringent accuracy requirement.

Why, then, aren't all the commercial codes 4th order accurate? The quick answer is that it is very difficult to develop robust and efficient high-order methods for unstructured meshes!


How about structured meshes? It is relatively straightforward to develop high-order methods on structured meshes. However, the structured meshes must be smooth enough to achieve the high-order accuracy. Otherwise, the actual OOA may be only 2nd order or even 1st order.

Given that almost all commercial codes use unstructured meshes, the ultimate solution appears to be adaptive high-order methods capable of handling unstructured meshes.See the following Workshop for the latest development:
https://cfd.ku.edu/hiocfd.html

Thursday, September 22, 2011

Mystery surrounding order of accuracy in CFD...

Just came back from a trip to Beijing, where I gave two lectures in a Workshop, one on high-order CFD methods, and the other on the quadrature method of moment for multiphase flows. On the last day, I got to see the beautiful Great Wall at Mu Tian Yu. See the top picture for a magnificent view! Personally I believe this is a better tourist attraction than the more famous Great Wall at Ba Da Lin because it is less crowded. I am now paying a price for the trip: I am still recovering from the jet lag.

In the Workshop at Beijing as well as in many other technical conferences, I often heard people talking about and making mistakes on order of accuracy (OOA) in CFD. As often as it is mentioned, there appears to be as much confusion about it too. There are two major mistakes regarding OOA:
  1. If a flow solver produces a more accurate solution than another, it must posses  higher order accuracy. 
  2. The OOA is the same as the order of the polynomial approximating the (unknown) solution.

I still remember an incident in an AIAA conference (maybe at Reno). A guy believed like a religion that the OOA is the same as the order of the reconstructed solution polynomial in a finite volume scheme. In fact, he accused the finite volume community of lying about the accuracy of their favorite schemes. You cannot help feeling bad for the guy with such a strong (but wrong) conviction. The truth is that the OOA of a finite volume scheme with a degree p solution polynomial is (p+1).

Let's define OOA. A scheme is pth order if the solution error is proportional to (dx)^p, where dx is the mesh size, i.e.,

Error = C(dx)^p,

where C is a constant depending on the particular scheme. Or equivalently,

log(Error) = p*log(dx) + log(C).

In other words, p is the slope of the dx-Error plot in a log-log scale. Strictly speaking, OOA has nothing to do with the magnitude of the solution error, but only related to the rate of error reduction with mesh refinement, i.e., the slope.

How do you actually measure the OOA? If you know the exact solution, you need only perform two simulations: one on a coarse mesh, and the other on a fine mesh with half the mesh size of the coarse mesh. With a simple derivation, you can obtain the order p from

Error_(dx)/Error_(dx/2) = 2^p, or p = log_2[Error_(dx)/Error_(dx/2)]

where Error_(dx) is the error on the coarse mesh, and  Error_(dx/2) the error on the fine mesh.

More later on high-order methods...





Sunday, August 28, 2011

Undergraduate CFD Education

CFD has become an indispensable design tool in many industries, especially in aerospace, automobile, micro-electronics, mechanical and chemical industries. The yearly worldwide revenue in CFD software is estimated to be in the hundreds of millions of dollars. In many industries, undergraduate students with CFD skills are highly sought after.

Iowa State University has been a pioneer in CFD research and education for over 4 decades. One of the most popular CFD text books was written by ISU faculty (Tannehill, Anderson and Pletcher). ISU's aerospace engineering education has always a strong emphasis on CFD fundamentals and computer programming. A basic CFD course has been taught as a senior elective for many decades, and has been a very popular one.

There is another paradigm in CFD education, maybe to reduce the cost at the undergraduate level. In this paradigm, students are taught how to use a particular commercial CFD software. The course is then centered around one CFD tool. The students learn "push button" CFD without having to learn how to program any computer languages. This paradigm has even been adopted by some PhD programs. In fact, I was told by a friend in the industry that he interviewed a PhD in CFD, who does not know what the Navier-Stokes equations are!   

I would like to know whether our way of teaching CFD is out of dated. Do leave a comment if you have an opinion. In addition, do you have a preference on which language should be taught, Fortran, c, C++, ...?

Saturday, August 20, 2011

Teaching CFD online, for the first time

This would be an interesting experience as I cannot write on the white-board. In addition, I cannot move much from the location where the camera is focused to. One big advantage of the online course is that I could record a lecture or two when I travel.

The Fall class of graduate and undergraduate students plus online students will be the largest ever, which will start next week. We will see...

BTW, the course outline is here: http://www.public.iastate.edu/~zjw/cfd1.pdf







Friday, August 12, 2011

Welcome to my blog on CFD and others...

Hello CFDers/visitors,

Greetings and welcome!

This is my first ever blogging experience. Obviously the primary topic will be CFD (i.e., computational fluid dynamics), which happens to be what I do in my job (sometimes as a hobby too). But I will also share thoughts on any other topics of personal interest. I am not a very organized person, and therefore I do not expect any "structures" in whatever I post here. Hopefully they are still useful in some way. Please feel free to let me know your comments or suggestions, and I will try my best to respond.

My primary research interest  is on adaptive high-order CFD methods, which are 3rd order accurate or higher, and capable of handling unstructured grids. As a matter of fact, any structured grids can be treated as unstructured grids, and in a very efficient manner. I am working to make these high-order methods more efficient, robust and user friendly. For a snapshot on what these methods can do,  here is a movie on the simulation of vortex breakdown and transition:

http://www.public.iastate.edu/~zjw/Wing_transition_4th0.avi

More later...