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 residual always zero, why? sonicFoam, OF 5.x (https://www.cfd-online.com/Forums/openfoam-solving/200095-rho-residual-always-zero-why-sonicfoam-5-x.html)

deepbandivadekar March 23, 2018 12:08

rho residual always zero, why? sonicFoam, OF 5.x
 
Hello,

As the title clearly says, when I run my case, I noticed that the density residual is always zero irrespective of the iterations, from start till end. That clearly means density is not changing. I find that weird, especially when this is compressible flow and am expecting shock(supersonic) which is seen in paraview.

Code:

PIMPLE: iteration 10
DILUPBiCG:  Solving for Ux, Initial residual = 1.87677e-14, Final residual = 1.87677e-14, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 5.61674e-14, Final residual = 5.61674e-14, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 2.02128e-06, Final residual = 1.9697e-10, No Iterations 1
DILUPBiCG:  Solving for e, Initial residual = 5.28336e-10, Final residual = 5.28336e-10, No Iterations 0
DILUPBiCG:  Solving for p, Initial residual = 6.99711e-15, Final residual = 6.99711e-15, No Iterations 0
DILUPBiCG:  Solving for p, Initial residual = 6.99711e-15, Final residual = 6.99711e-15, No Iterations 0
DILUPBiCG:  Solving for p, Initial residual = 6.99711e-15, Final residual = 6.99711e-15, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.3329e-13, global = 9.97659e-14, cumulative = 0.00178268
DILUPBiCG:  Solving for p, Initial residual = 6.99712e-15, Final residual = 6.99712e-15, No Iterations 0
DILUPBiCG:  Solving for p, Initial residual = 6.99712e-15, Final residual = 6.99712e-15, No Iterations 0
DILUPBiCG:  Solving for p, Initial residual = 6.99712e-15, Final residual = 6.99712e-15, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.3329e-13, global = 9.97659e-14, cumulative = 0.00178268
DILUPBiCG:  Solving for p, Initial residual = 6.99712e-15, Final residual = 6.99712e-15, No Iterations 0
DILUPBiCG:  Solving for p, Initial residual = 6.99712e-15, Final residual = 6.99712e-15, No Iterations 0
DILUPBiCG:  Solving for p, Initial residual = 6.99712e-15, Final residual = 6.99712e-15, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.3329e-13, global = 9.97659e-14, cumulative = 0.00178268
DILUPBiCG:  Solving for epsilon, Initial residual = 9.92238e-05, Final residual = 1.60427e-11, No Iterations 2
DILUPBiCG:  Solving for k, Initial residual = 7.98564e-05, Final residual = 3.05053e-11, No Iterations 2
ExecutionTime = 87132.1 s  ClockTime = 91714 s

What am I missing? Why is the residual always zero? Can anyone give me any pointers?

tomf March 26, 2018 02:35

Hi,

Did you check your results to actually see if the density is changing? As you are using the diagonal solver, the residual will be zero, since you have only terms on the diagonal of the matrix that you are solving for. So all cells are uncoupled which means you just solve the equation of state within each cell. Therefore there you just solve the simple ax=b within each cell.

Hope this helps,
Tom

deepbandivadekar March 26, 2018 10:01

Quote:

Originally Posted by tomf (Post 686517)
Hi,

As you are using the diagonal solver, the residual will be zero, since you have only terms on the diagonal of the matrix that you are solving for. So all cells are uncoupled which means you just solve the equation of state within each cell. Therefore there you just solve the simple ax=b within each cell.

Hope this helps,
Tom

Okay, that makes sense. That would definitely make residual zero.

Quote:

Did you check your results to actually see if the density is changing?
How do I check that? That is, say plot the density field in post-processing
I came across this thread here: https://www.cfd-online.com/Forums/op...ible-flow.html
But it seems to be tool old. I am using OF 5.x

tomf March 26, 2018 10:40

Hi,

Not tested, but this may work:

Code:

    writeObjects1
    {
        type        writeObjects;
        libs        ("libutilityFunctionObjects.so");
        objects    (rho);
        writeOption autoWrite;
    }

source:
Source code guide

Regards,
Tom

deepbandivadekar March 26, 2018 10:55

Quote:

Originally Posted by tomf (Post 686590)
Hi,

Not tested, but this may work:

Code:

    writeObjects1
    {
        type        writeObjects;
        libs        ("libutilityFunctionObjects.so");
        objects    (rho);
        writeOption autoWrite;
    }

source:
Source code guide

Regards,
Tom

Alright. Let me try this. Since this is useful for runtime only I'll know only after I finish this run.
I was actually looking up any post-processing utility but didn't find any so far.

Thanks a lot.


All times are GMT -4. The time now is 05:51.