OpenFOAM AirFoil2D example
Continuation of http://www.cfdonline.com/Forums/ope...nvergence.html
I tried to converge the simpleFoam airfoild2D example to machine zero, or at least the tolerance (which I set to 1.0e8 for all variables). I was successful until I got to zero degrees angle of attack. It failed for zero. Then I backed off a bit in regards to alpha (2.2036e6 degrees) and was successful!! Results Are: Case 1, After 1000 iterations U > internalField uniform (26.000000 0.000001 0); = approx zero degrees, smoothSolver: Solving for Ux, Initial residual = 1.00795e08, Final residual = 5.50998e11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 8.04807e09, Final residual = 8.04807e09, No Iterations 0 GAMG: Solving for p, Initial residual = 1.03209e07, Final residual = 1.00942e08, No Iterations 1 time step continuity errors : sum local = 1.54372e11, global = 7.48481e19, cumulative = 1.77796e14 smoothSolver: Solving for nuTilda, Initial residual = 9.11008e09, Final residual = 9.11008e09, No Iterations 0 ExecutionTime = 79.64 s ClockTime = 82 s Case 2, After 1000 iterations U > internalField uniform (26.000000 0.000000 0); = 0 degrees, outlet = free stream 1000 iterations smoothSolver: Solving for Ux, Initial residual = 5.60021e05, Final residual = 3.20606e06, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 3.15896e05, Final residual = 1.81395e06, No Iterations 4 GAMG: Solving for p, Initial residual = 0.000320099, Final residual = 3.03047e05, No Iterations 7 time step continuity errors : sum local = 4.62797e08, global = 1.18427e17, cumulative = 3.77372e15 smoothSolver: Solving for nuTilda, Initial residual = 2.10995e06, Final residual = 4.48997e08, No Iterations 2 ExecutionTime = 94.83 s ClockTime = 97 s Anyone know what the story is? I gather there is a good chance it is some sort of a switch or bug. I can't believe I'm the first to experience this, so I guess it is a switch. I'm using version 1.6 of OpenFOAM. 
checked the negative values,
v=0.001 converges, v=0.0001 does not. Unfortunately the airfoil is not symmetric, therefore I can't check symmetry for this case. I also searched inside the code but couldn't figure out how things work. The fact that the input deck seems to say that the inlet and outlet is set to the freestream seems to indicate that the boundary condition would be rather simple to implement. 
Upwind scheme or nonsmooth limiters could cause such behaviour.

Since the non convergence happens over such a narrow band, is non symmetric in regards to alpha, and occurs at a point where the freestream vector is parallel to the outer boundary, means that proper verification of OpenFOAM requires that the issue is investigated as is. Unfortunately, after looking at the insides of the code, I'm not the person to do it. For me personally, my understanding of C/C++ and the general workings of a CFD code are not enough to make my way around OpenFOAM.
In the near future I'll update to version 2.0 of OpenFOAM and if the problem still exists, and no one else addresses it or points out an input error on my part, I'll submit it to the bugs area. 
Apparently it is the use of the freestream boundary condition (it acts like an inletOutlet condition) on the inlet face (the front, top, and bottom of the box which surrounds airfoil) which prevents the case from converging to machine zero when the angle of attack is 0.
I was able to converge the problem by setting the inlet face to a wall boundary and then setting the values (fixedValues) to the freestream values. I kept the outlet as the original freestream boundary condition. I was also able to converge the problem to machine zero by setting the velocity for the inlet face to freestream fixed values and the pressure to zero gradient. 
All times are GMT 4. The time now is 14:28. 