CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   Possible Bug in double dot product ampamp operator (

david_h September 13, 2007 14:23

The double dot product operato
The double dot product operator seems to calculate the incorrect result for when one argument is of class "symmTensor" and the other class "tensor"

I have attached two examples:

checkTensor - calculates several operation with symmTensor and tensor's

dnsFoamCheckTensor - modification of dnsFoam which calculates S:S, S:D using S of class symmTensor and S of class tensor.

Below is some output of dnsFoamCheckTensor

D = grad(U)
S = symm(D)
S2 = 0.5 (D + D^T) checkTensors.tgz dnsFoamCheckTensor.tgz


henry September 14, 2007 15:58

Yes you are quite right there
Yes you are quite right there is a bug in the && operators between symmetric and non-symmetric tensors, here is the fix TensorI.H to replace the TensorI.H in OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/primitives/Tensor

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