Inlet & Outlet Velocity BC issue
Hi all,
I'm new to this forum and i'm trying to solve some problem with a simpleFoam case (k-epsilon on). I need to fix, in a quite complex volume, inlet velocity and outlet velocity. Currently I set the same magnitude for the velocity (inlet&outlet BC). U: inlet { type fixedValue; value uniform ( 0 -0.12608 -1.19953 ); } outlet { type fixedValue; value uniform ( 0 0.6030 1.0445); } And the following setup for k and epsilon k: inlet { type fixedValue; value uniform 0.0058; } outlet { type zeroGradient; } epsilon: inlet { type fixedValue; value uniform 0.0004464; } outlet { type zeroGradient; } I've tried different relaxation factors and a non-orthogonal corrector (up to 3), but the solution diverges in any case, here follows one of the last time step of the last try: Time = 118 DILUPBiCG: Solving for Ux, Initial residual = 0.249643, Final residual = 0.0101623, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.51045, Final residual = 0.0151908, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.358048, Final residual = 0.0100483, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.096591, Final residual = 0.000935744, No Iterations 95 DICPCG: Solving for p, Initial residual = 0.0110689, Final residual = 0.00322944, No Iterations 1001 DICPCG: Solving for p, Initial residual = 0.00880522, Final residual = 0.000360479, No Iterations 1001 DICPCG: Solving for p, Initial residual = 0.00457367, Final residual = 0.000729296, No Iterations 1001 time step continuity errors : sum local = 9201.84, global = 165.064, cumulative = 1181.92 DILUPBiCG: Solving for epsilon, Initial residual = 0.46882, Final residual = 0.016255, No Iterations 1 bounding epsilon, min: -1.24386e+11 max: 3.21053e+29 average: 2.27437e+23 DILUPBiCG: Solving for k, Initial residual = 0.306587, Final residual = 0.0120154, No Iterations 1 ExecutionTime = 82751.3 s ClockTime = 85751 s Are the BCs right? or to fix inlet and outlet velocity in this way can produce this kind of error? Any suggestion is welcome or address me to an existing thread if I miss it. Thanks to all |
What are the boundary conditions for pressure? If you look at the log file, you see that you need a lot of iterations on p, this is not a good sign, it doesn't look like it is converging at all. Try foamLog and check some of the initial residuals, e.g p_0, and you will probably see that it is not really decreasing, which is should. At some point it diverges on epsilon, but that is not the big issue.
Can you try to set outlet velocity bc to zeroGradient, outlet pressure to fixedValue (0 if you like) and inlet pressure to zeroGradient? |
Why are you fixing velocity at both inlet and outlet?
Since you're running an incompressible solver the mass flow rate through inlet and outlet must match exactly or you'll get continuity problems (i.e. problems with the pressure equation). And "matching exactly" is practically impossible. So if I were you I would set a Neumann boundary condition at the outlet (unless you have somewhere a second outlet). Regards, L |
Thank a lot Bernhard and Lieven
Now my runs work properly with Neumann conditions. Also the foamLog was a very useful suggestion for the analysis of the residuals. One day I'll try pyFoam to add functionalities :) |
All times are GMT -4. The time now is 10:18. |