CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   p == p_rgh + rho*gh or p = p_rgh+rho*gh (https://www.cfd-online.com/Forums/openfoam/85359-p-p_rgh-rho-gh-p-p_rgh-rho-gh.html)

wouter February 23, 2011 18:55

p == p_rgh + rho*gh or p = p_rgh+rho*gh
 
Dear All,

My c++ is rusty so here the question:
in pEqn.H there is a statement:
p== p_rgh + rho*gh;
To my knowledge this gives true or false, but it is not assigned to anything.
It is an empty statement unless == is redefined somewhere (where?).
But why is a few lines down p_rgh = p - rho*gh; and not p_rgh == p-rho*gh;:confused:
OF170 and OF171

nimasam February 24, 2011 04:52

i guess!
== isnot equality here, it assigns all domains include boundary condition from left side to right side!!!!
but = just copy internalField values!

Bernhard February 24, 2011 05:11

Maybe this thread is helpfull
http://www.cfd-online.com/Forums/ope...-operator.html

wouter February 24, 2011 08:27

thanks
 
Sorry I did not find this thread, but thanks.

Best
Wouter


All times are GMT -4. The time now is 08:32.