CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Computing local flow value difference reference value (http://www.cfd-online.com/Forums/openfoam-solving/59954-computing-local-flow-value-difference-reference-value.html)

vatant October 31, 2006 20:33

I would like to compute the pr
 
I would like to compute the pressure difference between the local pressure value (say pd) and a reference value (dimensionedScalar pr) and need to check if its less than a tolerance?

How can i access the local pressure value ?

Can I do

dimensionedScalar diff = (pd-pref);

and some how get the magnitude of this scalar.

I would like to check

if ( diff < tolerance )
{
...
etc
}

How do i get the magnitude of difference of volScalarFields like pressure ?

Vatant

PS: Also, what is the function to get absolute value of the difference say ...absolute(pd-pr) ?


All times are GMT -4. The time now is 14:49.