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/)
-   -   rho euation in rhoPisoFoam (https://www.cfd-online.com/Forums/openfoam-solving/80657-rho-euation-rhopisofoam.html)

nileshjrane October 2, 2010 11:48

rho euation in rhoPisoFoam
 
Hi,

In rhoPisoFoam, the .c code includes rhoEqn.H file but the file is not in that folder. Is is getting included from some other common directory?? I am asking this because when i solve my simulation the rho equation is not getting solved, it seems.

Can anyone tell me, what is the problem here?? Why the rho equation is not being solved??

Quote:

Starting time loop

Courant Number mean: 0.00160209 max: 0.237358
Time = 1e-06

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.11628e-11, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 1.98311e-11, No Iterations 3
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 1.87167e-09, No Iterations 2
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 3.93336e-13, No Iterations 2
DICPCG: Solving for p, Initial residual = 1, Final residual = 1.85699e-09, No Iterations 12
DICPCG: Solving for p, Initial residual = 8.61972e-05, Final residual = 2.87593e-10, No Iterations 2
DICPCG: Solving for p, Initial residual = 6.9308e-06, Final residual = 6.70903e-11, No Iterations 2
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.47432e-14, global = -1.96566e-15, cumulative = -1.96566e-15
DILUPBiCG: Solving for h, Initial residual = 0.464004, Final residual = 4.19598e-09, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.0986332, Final residual = 8.95905e-09, No Iterations 10
DICPCG: Solving for p, Initial residual = 2.74445e-05, Final residual = 9.04744e-10, No Iterations 2
DICPCG: Solving for p, Initial residual = 4.60957e-06, Final residual = 7.9637e-09, No Iterations 1
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 3.76913e-12, global = -3.46891e-13, cumulative = -3.48856e-13
DILUPBiCG: Solving for h, Initial residual = 0.105746, Final residual = 5.79122e-10, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.0235514, Final residual = 5.9246e-09, No Iterations 9
DICPCG: Solving for p, Initial residual = 1.34825e-05, Final residual = 4.20418e-10, No Iterations 2
DICPCG: Solving for p, Initial residual = 4.14208e-06, Final residual = 7.32319e-09, No Iterations 1
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 3.68586e-12, global = -2.74195e-13, cumulative = -6.23051e-13
DILUPBiCG: Solving for h, Initial residual = 0.0263855, Final residual = 1.16006e-10, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.00641807, Final residual = 4.27544e-09, No Iterations 8
DICPCG: Solving for p, Initial residual = 5.14856e-06, Final residual = 6.37387e-09, No Iterations 1
DICPCG: Solving for p, Initial residual = 2.17279e-06, Final residual = 4.27578e-09, No Iterations 1
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.18805e-12, global = -1.21706e-13, cumulative = -7.44757e-13

alberto October 3, 2010 21:06

Search your OpenFOAM-1.7.x/src directory for rhoEqn.H and you will find it. It is basically

solve(fvm::ddt(rho) + fvc::div(phi));

with explicit discretization of the divergence to avoid conservation errors.

The fact you see residuals equal to zero means that the solution is exact, not that the equation is not solved. You are using the diagonal solver, which is direct, and gives you the exact solution of the linear system.

Best,

nileshjrane October 4, 2010 06:07

But No of iterations is also 0.:confused:

alberto October 4, 2010 12:02

This is really basic :D

How many iterations do you need to obtain the exact solution of a linear system with a direct solver? The answer is zero, because the method is not iterative :D

You basically can easily do that with the Thomas algorithm for whatever tri-diagonal system (or block tri-diagonal). Check a book on the topic to have the details.

Best,

nileshjrane October 5, 2010 07:44

Ohh...OF takes it in that sense. I was thinking on different line. I thought if you solve an equation (or rather a system of equations in turn) 1 time then No of Iterations should be 1 and so on...

I do know about TDMA.. have used it in my UG assignments..

Thanks a lot..


All times are GMT -4. The time now is 01:00.