CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Wrong operator in transonic pressure equation? (http://www.cfd-online.com/Forums/openfoam-programming-development/89144-wrong-operator-transonic-pressure-equation.html)

dohnie June 6, 2011 08:45

Wrong operator in transonic pressure equation?
 
Hello,
in my transonic simulations with reactingFoam my local continuity errors are far too high (~0.01).
I've stumbled upon the pressure equation: After the pEqn is solved, the flux is corrected. In the subsonic case:
Code:

        if (nonOrth == nNonOrthCorr)
        {
            phi += pEqn.flux();
        }

In the transonic case:
Code:

        if (nonOrth == nNonOrthCorr)
        {
            phi == pEqn.flux();
        }

Shouldn't the latter "==" operator be replaced by a "+=", too?

If not, who can explain it?


All times are GMT -4. The time now is 07:24.