CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   simulation of irrotational vortex fails (http://www.cfd-online.com/Forums/openfoam/125067-simulation-irrotational-vortex-fails.html)

matthias October 18, 2013 05:10

simulation of irrotational vortex fails
 
Hello folks,

I would like to address the following OF problem to the board since I got no satisfactory solution for it.

The computational domain is quadratic and consists of 257x257x1 cells. The boundary conditions for U are fixed at all four sides of the domain (bc. type fixedValues). These predefined values have been calculated using the analytical solution of the irrotational vortex equation. The internal velocity field is initialized using also the analytical solution. For pressure p, zero gradient boundary condition has been applied. Since all four "inlets/outlets" are fixed, the viscosity nu is set to zero (inviscid fluid). All numerical and interpolation schemes are second order (linear). The solver settings include PCG for p and PBiCG for U. Turbulence models are deactivated.

After some iterations of icoFoam or pimpleFoam or pisoFoam the solution of U shows unphysically oscillations. Especially the components of the gradient of U (i.e. to see in paraview) oscillate strongly after multiple iterations and therefore blow up the solution. Naturally, the initial analytical solution should not change in time since all sides are fixed (possibly there could be some very small numerical inaccuracies).

Higher order schemes, decreasing of time step, better interpolation schemes, decreasing of solver tolerances up to 10^-16 and application of analytical pressure gradient for p as fixed gradient bc didn't help to solve the problem.

Interestingly, the same case and setup works fine using a simple 2d finite differencing code (http://math.mit.edu/cse/codes/mit18086_navierstokes.pdf). Actually this OF case has no practical background but is an interesting test case for the numerics in OF.


Maybe someone has an idea how to handle this case using i.e. icoFoam?

The case is located at http://www.lemos.uni-rostock.de/uplo...lVortex.tar.gz

Best regards

Matthias

jhoepken October 21, 2013 02:19

Hi Matthias,

I've tried your case, but it didn't run out of the box. I had to change the solver name for pFinal in system/fvSolution from PCG1 to PCG. An other thing is that I changed pRefValue in the PIMPLE subdict from 1e15 to 0 and now it is running with pimpleFoam, without any problems.

Hope this helps,
Jens

matthias October 21, 2013 03:05

Hi Jens,

how long did you run the case? I tried your settings and still after few iterations using pimpleFoam the derivatives of velocity (grad(U)) show strange oscillations.


Best regards

Matthias

jhoepken October 21, 2013 04:49

I think I ran it for 20-40 iterations, without having any oscillations and I am using 2.2.x, but not the latest snapshot of the git repo.


All times are GMT -4. The time now is 16:37.