- **OpenFOAM**
(*http://www.cfd-online.com/Forums/openfoam/*)

- - **dnsFoam divergent solution**
(*http://www.cfd-online.com/Forums/openfoam/77445-dnsfoam-divergent-solution.html*)

dnsFoam divergent solutionHello everyone.
I have been working with dnsFoam, trying to simulate a flow between 2 walls. In a second time, I would like to focus on the boundary layer (laminar near the inlet, then transient and finally fully turbulent). My simulations are three-dimensional, as I read on this forum a 2-D simulation does not fit with the physics. My solution blows up after a few iterations. Here are some details about the case: I created the mesh with blockMesh. It is a 64*64*64 mesh with 2 walls (top and bottom). I will refine the mesh but at present I try to run successfully this case. I am using 4 patches : 1 inlet, 1 outlet and front and back faces. Inlet velocity is 2m/s and I set the same velocity for the outlet as a test, since the primitive type "calculated" is not accepted. Pressure is zeroGradient for every patches. When i run my case this is the problem i am having: Starting time loop Time = 0.025 Number of forced K = 12 k(0.025) = 0epsilon(0.025) = 0.03072U.f(0.025) = 0 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 3.6888e-10, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 3.23237e-06, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 3.04559e-06, No Iterations 1 DICPCG: Solving for p, Initial residual = 1, Final residual = 9.60124e-07, No Iterations 105 time step continuity errors : sum local = 3.05364e-07, global = 2.54977e-19, cumulative = 2.54977e-19 ExecutionTime = 35.17 s ClockTime = 37 s Time = 0.05 Number of forced K = 12 k(0.05) = 7.03496epsilon(0.05) = 0.10727U.f(0.05) = 0.00848164 DILUPBiCG: Solving for Ux, Initial residual = 0.942152, Final residual = 6.78512e-06, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.447296, Final residual = 5.41539e-06, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.48381, Final residual = 5.13443e-06, No Iterations 2 DICPCG: Solving for p, Initial residual = 0.512288, Final residual = 7.8354e-07, No Iterations 124 time step continuity errors : sum local = 5.0736e-07, global = 3.11369e-19, cumulative = 5.66345e-19 ExecutionTime = 67.12 s ClockTime = 70 s Time = 0.075 Number of forced K = 12 k(0.075) = 7.10567epsilon(0.075) = 0.0846326U.f(0.075) = 0.0171798 DILUPBiCG: Solving for Ux, Initial residual = 0.66248, Final residual = 1.28027e-07, No Iterations 4 DILUPBiCG: Solving for Uy, Initial residual = 0.478977, Final residual = 2.44826e-06, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.390294, Final residual = 2.05455e-06, No Iterations 3 DICPCG: Solving for p, Initial residual = 0.494019, Final residual = 9.00221e-07, No Iterations 89 time step continuity errors : sum local = 1.2928e-06, global = -4.11385e-20, cumulative = 5.25207e-19 ExecutionTime = 94.88 s ClockTime = 100 s Time = 0.1 Number of forced K = 12 k(0.1) = 29.9182epsilon(0.1) = 0.428527U.f(0.1) = 0.0275886 DILUPBiCG: Solving for Ux, Initial residual = 0.599916, Final residual = 4.98354e-06, No Iterations 29 DILUPBiCG: Solving for Uy, Initial residual = 0.674577, Final residual = 6.3118e-06, No Iterations 35 DILUPBiCG: Solving for Uz, Initial residual = 0.651333, Final residual = 8.71581e-06, No Iterations 32 DICPCG: Solving for p, Initial residual = 0.415806, Final residual = 5.96243e-07, No Iterations 101 time step continuity errors : sum local = 1.9221e-06, global = -5.15559e-19, cumulative = 9.64744e-21 ExecutionTime = 157.27 s ClockTime = 166 s Time = 0.125 Number of forced K = 12 k(0.125) = 282.499epsilon(0.125) = 4.69267U.f(0.125) = 0.0176418 DILUPBiCG: Solving for Ux, Initial residual = 0.733885, Final residual = 0.347319, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.907019, Final residual = 0.69476, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.905652, Final residual = 1.06002, No Iterations 1001 DICPCG: Solving for p, Initial residual = 0.892429, Final residual = 9.26503e-07, No Iterations 136 time step continuity errors : sum local = 2.51378e-05, global = 1.83659e-17, cumulative = 1.83755e-17 ExecutionTime = 1350.73 s ClockTime = 1571 s Time = 0.15 Number of forced K = 12 k(0.15) = 121341epsilon(0.15) = 14327.3U.f(0.15) = 0.497558 **** I stopped here, clearly diverging **** As you can see, global and cumulative errors remain acceptable but k and epsilon diverge in all my tests. I have looked through the forum for similar problems but still cannot fix my problem. I would be very greatful for any suggestions to improve my case. Also, is there any relevant boundary condition for the outlet ? |

"Pressure is zeroGradient for every patches."
if pressure is zero gradient then pressure equation is singular for incompressible case. It might be reason for your problems, try fixed pressure at outlet. (ideally solver should take care of such situation). |

Hi arjun,
Thank you very much for your reply, I checked it out but it seems dnsFoam does not care about that since a DNS does not make incompressible assumption. However, I realized that my deltaT was not small enough to keep a courant number below 1. So I changed it and now the solution converges. I should have know it ... Now I wonder which boundary conditions could fit better to my problem, especially for the inlet/outlet. If anybody has got an idea. |

All times are GMT -4. The time now is 04:13. |