CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Strange oscillating force result when nOuterCorrectors=1 (https://www.cfd-online.com/Forums/openfoam-solving/245609-strange-oscillating-force-result-when-noutercorrectors-1-a.html)

quarkz October 15, 2022 11:03

Strange oscillating force result when nOuterCorrectors=1
 
Hi,

I'm simulating a rather simple flow past airfoil naca0012 case.

The airfoil is pitched up to 20deg. Re = 100.

Although I think it is most likely a steady flow, I still use pimpleFoam instead of simpleFoam.

However, I got force drag results oscillating between +/- 100. This is clearly wrong. I changed some parameters in different files and found that increasing nOuterCorrectors to 10 solves the problem. Even at 3, the result is wrong.

Is this expected? Cos in other more complicated simulations which I do - 3D, unsteady, moving bodies, I use nOuterCorrectors = 1 and I didn't encounter this problem.

So I'm wondering why it happens to such a small simple problem?

In the wiki on pimpleFoam (https://openfoamwiki.net/index.php/O...hm_in_OpenFOAM)

it is mentioned that to use large time steps, nOuterCorrectors has to be increased to 50 or more. However, I'm only using CFL = 1 and my time step is small.

Can anyone explain this? Btw, I'm using OF2206.

Thanks

Bloerb October 15, 2022 12:57

As a rule of thumb...If your mesh is changing you likely need lots of outer loops for convergence. If you are using a fixed mesh, it still depends on your solver settings.

If you are running a steady state simulation simpleFoam should be stable. Now if you are near stall / unsteady flow conditions simpleFoam might not converge to a low residual since the flow is in reality wobbling around and your numerics can't smooth this down. Using a steady state assumption for something inherently unsteady yields this. So in other words there is a limit how much of an unsteady behavior you can smooth before it blows up and doesn't yield realistic values at all. That's typically the point where you need to switch to unsteady solvers.

Now for a piso solver, you need to make sure it fully converges for each time step. This depends on the nCorrectors....piso needs enough inner corrector loops to converge. Now again...it might not, because there are factors that make convergence difficult to achieve...like a poor mesh, high order schemes, or a Co number that is to high. All of these amplify numerical noise. But for Co<1 this should be possible if the numerical errors can be smoothed out. You need to make sure though that you are using enough nCorrectors and maybe nNonOrthoCorrectors as well...sometimes all it takes is going up from 2 to 3 or 5 loops.

Using pimple has the advantage that you are mixing simple and piso. piso shouldn't/can't use convergence aids in the form of relaxation factors, because you are loosing the temporal consistency if you do...simple can and must use them, because the algorithm isn't fully converging for each time step. Hence pimple allows you to use relaxation for 9 out of 10 loops (which would be simple loops) per time step and only solve the last one without. Hence you get a better initial guess, more smoothing because you get a really good initial guess by solving the time step 9 times with lots of smoothing from the relaxation factors. And only in the last loop do you solve it fully with temporal consistency / without the relaxation.

How many nOuterCorrectors do you need? Well it depends on how much relaxation you use...using none at all might even be worse than pure piso, because you solve each time step 10 times and hence would amplify errors 10 times. And it also depends on how many inner loops you do...



For moving meshes however you might need strong coupling. Hence you need to solve each time step several times to get the correct mesh movement etc. Hence here pimple and lots of outer correctors are typically a must.



Now this is additional work....it takes more effort to solve in contrast to pure piso, but you get a more robust solving experience in return. pimple can convergence for higher co numbers, shittier meshes etc. But for a price. Nevertheless for maxCo<1 piso should do it as well if you are using enough nCorrectors for most meshes and numerical settings.




so long story short...check your residuals durring the inner loops...look at the nCorrectors...compare mesh quality and the settings you are using for the convection term in particular.


All times are GMT -4. The time now is 09:23.