|
[Sponsors] |
Lid driven cavity for pimple: solution oscillates |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2017, 15:53 |
Lid driven cavity for pimple: solution oscillates
|
#1 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Good evening,
I just started using OpenFoam. The first question which I want to calculate really is the flow around a sphere (starting with a cylinder) at very high Reynolds numbers. Bevore diving in that I try to understand how Openfoam works. I use the lid driven cavity for that. I found very accurate solutions for the cavity. I got very similar results from pisoFoam/LES even for quite high Re. As I understand pimple may be better suited for my task. I tried calculating the cavity for a moderate Re=1000, mesh 100x100 and a grades mesh (finer to the boundaries. The mesh is the one from the tutorial incompressible-iso-cavityGrade. I give the main parameters I chosed: - mesh from the tutorial but I use finer mesh: hex (0 1 4 3 9 10 13 12) (50 50 1) simpleGrading (2 2 1) - boundary conditions ... ... fixed value for U at all walls (except the empty front/back) ... zeroGradient for p at all walls (except...) ... kqRWallFunction for k, value uniform 0.00325 at all walls ... epsilonWallFunction for eps value uniform 0.000765 at all walls ... nutkWallFunction for nut, value 0. I don't understand wall functions full and grabed it from the piso cavity. The fvSchemes and fvSolutions I understand even lesser and took them form the piso tutorial too (may be with slight variations; pimple needs a reference pressure so I included it) fvSchemes: Code:
dtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian(rAUf,p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } Code:
solvers { p { solver GAMG; tolerance 1e-7; relTol 0.01; smoother DICGaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } pFinal { $p; relTol 0; } "(U|k|epsilon)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-05; relTol 0.1; } "(U|k|epsilon)Final" { $U; relTol 0; } } PIMPLE { nNonOrthogonalCorrectors 0; nCorrectors 2; pRefPoint (0 0 0); pRefValue 0; } Code:
pplication pimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 5; deltaT 0.0002; writeControl adjustableRunTime; writeInterval 0.1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 5; With piso/LES the solution gets stable after some seconds computed time. I compared the results with the example for, Yiannis, and it fits very good. I used the centre coordinates of the vortexes and the given velocities across both midlines of the computed area: All is fine. With pimple the solution gets nearly stable at a computed time of around 2.6 seconds, and starts oscillating then. It doesn't stop oscillation, even if I simulate really long times (100 seconds). The Courant number is around 4 which woud be much to high for piso. I had bad feelings with it and changed adjustTimeStep in controlDict to no and selected a tiny time step ( 0.0002 ) which leads to a Courant no of 0.25. This is the maximum value I accepted in piso. The solutions remains oscillating. Any ideas? If you are interested you may download the whole case: http://fg-kometen.vdsastro.de/_tmp/cavitypimple.zip Thank you very much, Uwe Pilz, Leipzig, Germany. |
|
February 11, 2017, 19:29 |
|
#2 |
Senior Member
|
Hi,
Maybe I am not quite get meaning of "oscillating", yet, your case with modified settings has more-or-less stable flow field after ~2.8 s (see figure). The most significant modification is a use of residualContol for PIMPLE (see system/fvSolution). I have changed GAMG to PCG, since GAMG does all there interpolations and can cause oscillations (at least in case of van Karman vortex street it does). Guess, you can check spatial discretisation schemes dependence yourself (I've put vanLeer since in general it just works ). |
|
February 12, 2017, 11:13 |
|
#3 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Dear Alex,
thank you for your help. I experimented a little with your and my old parameters. The reason for the oscillation was the solver. In my younger days, 25 years ago, I calculated electrical fields with non linear boundary condition (electroplating). My friend Ulli said those days: Use conjugated gradients as solver. I did and was always happy with it. I am very happy that I am now at (bi)CG again, my beloved solver. I also learned that is quite easy to ensure a maximum Courant number with automatic time control. If anybody wants to see what I mean with oscillation: I prepared a film The first one has 12 Megabytes http://fg-kometen.vdsastro.de/_tmp/osc2.avi The smaller but coarser one has 5 Megabytes http://fg-kometen.vdsastro.de/_tmp/osc2.avi
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lid driven Cavity | suman91 | SU2 | 3 | May 24, 2022 06:23 |
Methods to optimize the performance of simpleFoam solver for lid driven cavity case | Sumeet Patil | OpenFOAM | 0 | October 15, 2016 06:06 |
Boundary Conditions at Corners, lid driven cavity | t.teschner | Main CFD Forum | 8 | August 17, 2016 09:20 |
2-D Lid Driven Cavity (Matlab) | DaBears13 | Main CFD Forum | 0 | May 5, 2013 05:11 |
[OpenFOAM] Paraview - Lid Driven Cavity | kieranhood | ParaView | 0 | February 13, 2010 17:28 |