This page gives some hints and ideas for what to do when you experience trouble running CFL3D. This page is far from all-inclusive; it is only a modest attempt to capture some of the experience from running the code.
CFL3D is designed to recognize when obvious mistakes in input are made: these errors will be reported to you either in the file cfl3d.error, precfl3d.out, or in the standard output file (usually called cfl3d.out, but set by the user). Even when the code runs successfully, the user should always check the standard output file for WARNING messages, geometric mismatches, and other messages and/or error reports.
The ideas given below are mostly for when the code blows up, and the code's output "advice" is not very helpful (floating point exception, NaN detected, etc.). Additional troubleshooting ideas are also given in the Version 5.0 manual in Chapter 10, which can be reached by clicking on the "Version 5.0 Manual" button in the Index list at left.
Most of the time, problems running the code can be traced to the use of a poor grid. The grid should look "nice." There should be "gentle" stretching factors, the grid should be as orthogonal looking as possible, and dramatic changes in distance or orientation from one grid line to the next should be avoided. Furthermore, the grid minimum spacing (at walls) should be appropriate to the problem you are running. For turbulent computations, this means having a minimum y+ level less than or roughly 1. Wall functions can also be employed for grids coarser than this, but wall functions are not recommended in general. The grid far-field extent (for freestream type calculations) should be far enough from the body of interest. Depending on the case, this can be at least 50 chords or body-lengths away.
The first thing to try after a case blows up is to lower the magnitude of the CFL number or time step (dt in the input file). Typically you want CFL number to be somewhere between 2-5, but sometimes you need to lower it to get a solution going. If you have to lower CFL number to less than 0.2, then something else is probably wrong and you might want to try a different strategy. If you are running time-accurately, then lowering the time step can help, but if it has to be lowered so far that the solution hardly progresses in a reasonable time, then you might want to try a different strategy, like using a different number of subiterations (set by ncyc for time-accurate runs) or using a different time-stepping scheme (set by ita).
Running on a coarser level of the grid sometimes helps get the solution going (i.e., using mseq as described in the Manual).
For turbulent computations, try running a more robust turbulence model first (such as SA (ivisc=5)), then restarting from that.
For turbulent computations that blow up, there are many Keyword inputs that can be employed (see "New Features" page for more information). Changing some of these may help when a turbulent computation fails. The default parameters in CFL3D have been set to work for a wide variety of typical cases, but there are no guarantees, of course. Playing with some of the turbulence model parameters may help for particular problems. For example, setting the Keyword input tur1cut and/or tur2cut to -1.0 may help by keeping the particular 2-equation turbulent quantity at a reasonable level, rather than allowing it to take on a very low limited level in regions of troublesome convergence. The Keyword input nfreeze can sometimes help by freezing the turbulence levels for a while. The Keyword input nsubturb can be used to perform additional turbulence model inner iterations during each time step (or subiteration).
For very high Mach number hypersonic flows that blow up, try setting the Keyword input epsa_r to 0.3 or so (entropy fix). Other strategies include running with flux-vector splitting (ifds=0), creeping up on the Mach number, and/or using mesh sequencing.
For very low Mach number flows (M < 0.05 or so) that blow up, or for flows that have large regions of very low Mach number flow, try preconditioning (described on the "New Features" web page).
Finally, be sure you have the latest version of CFL3D, and keep up with the important Updates posted on the "Updates" web page.
Page Curator and NASA Responsible Official: Christopher L. Rumsey
Last Updated: January 16, 2007