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/)
-   -   tr() of a volSymmTensorField ?? (http://www.cfd-online.com/Forums/openfoam-solving/111609-tr-volsymmtensorfield.html)

JackW January 10, 2013 19:19

tr() of a volSymmTensorField ??
 
Hi foamers,

I have modified the vorticity.C file to create an application to calculate the strain rate tensor:


volSymmTensorField strainRate
(
IOobject
(
"strainRate",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
symm(fvc::grad(U))
);

This compiled fine and ran. However as a sanity check I calculated:
max(tr(strainRate)).value()
min(tr(strainRate)).value()

...hoping it would be close to zero, (i am running an incompressible case)
and it wasn't, for the pisoFoam cavity case ~11, ~-39 were recorded.

So I ran,
max(fvc::div(U)).value()
min(fvc::div(U)).value()

To expect exactly the same value, however this gave ~7 and ~7.

I think I have misinterpreted some behaviour somewhere.

Any help would be greatly appreciated!

Thanks

Jack


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