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/)
-   -   Problems using 'det()'-function in dimensionedSymmTensor (http://www.cfd-online.com/Forums/openfoam-programming-development/85780-problems-using-det-function-dimensionedsymmtensor.html)

chilledkroete March 7, 2011 04:20

Problems using 'det()'-function in dimensionedSymmTensor
 
Hi,

I'm uncertain about the det()-function which can be found in src/OpenFOAM/dimensionedTypes/dimensionedTensor/dimensionedSymmTensor.C resp.here: http://foam.sourceforge.net/doc/Doxy...ce.html#l00064

In line 122 the file says 'pow(dt.dimensions(), symmTensor::dim)'. .dimensions() delivers a vector containing the exponents of the base units e.g. [0 0 -1 0 0 0 0] for grad(U).
symmTensor::dim raises to the power of the dimension of the tensor (3 in 3-D). In case of grad(U) the function will throw out [0 0 -1 0 0 0 0]=[0 0 -1 0 0 0 0] although the correct dimensionSet should be [0 0 -3 0 0 0 0] for the scalar.

Anybody knows where I'm wrong?


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