CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   bug in Rcomponents utility (http://www.cfd-online.com/Forums/openfoam-bugs/64301-bug-rcomponents-utility.html)

cedric_duprat May 6, 2009 13:35

bug in Rcomponents utility
 
Hi all,
I found a "small" bug in the utility : applications/utilities/postProcessing/stressField/Rcomponents
Using oodles solver with OpenFOAM-1.4.1, I've got the file R which is a volSymmTensorField (hense 6 components).
The first line looks like that, which seems to be ok
internalField nonuniform List<symmTensor>
840750
(
(0.000470271 -0.000136243 0.00178648 0.000853935 0.00247915 0.0438612)

then, Rcomponent is suppose to give 9 volScalarField Rij, where Rij = Rji (I think)
even if my Rxx is ok, I've got different value for Rxy and Ryx and for some points, Ryy and Rzz are negative which is not physical.
Rxx
internalField nonuniform List<scalar>
840750
(
0.000470271


Rxy
internalField nonuniform List<scalar>
840750
(
-0.000136243


Ryx
internalField nonuniform List<scalar>
840750
(
0.000853935


Ryy
internalField nonuniform List<scalar>
840750
(
0.00338278
0.00356701
-0.00253251


Thi bug shouldn't be the same for the last version 1.5 because this utility doesn't exist anymore :)

To correct the utility, line 78 of http://openfoam-extend.svn.sourcefor....C?view=markup
for (direction i=0; i<tensor::nComponents; i++) where i = 0 to 8
should be
for (direction i=0; i<symmTensor::nComponents; i++) where i = 0 to 5

The problem of the output name is still not corrected with the previous correction because Ryx should be Ryy ...

well, I just wanted to tell the comunity this small bug.
Sorry for not giving better solution.

Regards,

Cedric

henry May 7, 2009 02:56

The equivalent in 1.5/1.5.x is the "components" function in the "foamCalc" utility which does not suffer from the bug you reported.

H


All times are GMT -4. The time now is 06:30.