Hi all,
I've a small questi
Hi all,
I've a small question about tensor components. I'm playing with a volSymmTensorField, because it's symetric tensor, it has only 6 components. to get the component of the tensor, I'm using this command: myTensor.component(vector::XX). I wanted to get (with Info) the value of myTensor.component(vector::ZZ) and I had an error. (FOAM FATAL ERROR : index out of range#0 ...) To find the mistake, I ploted 9 components of myTensor in this order: XX, XY, XZ, YX, YY, ... to ZZ And, I get different value the first sixth one (XX, XY, XZ, YX, YY, YZ) which is not normal. And because of that, ZZ doesn't seems to exist. My questions are in which order are the component in a symmTensorField ? and ... is it normal to get values for (vector::XY) and (vector::YX) in a symmetric tensor? Thanks for helping, Cedric |
I found a part of my questions
I found a part of my questions, if someone is interrested.
in a volSymmTensorField, there is only the upper triangle which means XX, XY, XZ, YY, YZ, ZZ. and for the other part of my question, ... I just imagine that my command to get the components of the tensor is not the right one for a symmetric tensor. Cedric |
How to plot components of Symmetric tensor?
Hey Cedric,
I just saw your post and you mention, that you use the command: myTensor.component(vector::XX) to get e.g the first component of a volSymmTensorField named myTensor. I tried the same and wanted to give out this component by Code:
Info<< myTensor.component(vector::XX) Code:
XX is not a member of 'Foam::vector' |
Dear Sven,
try tensor::XX. Henrik |
I have faced the same problems with the symmTensor, in the post processing tool stressComponents.C (http://www.cfd-online.com/Forums/ope...ponents-c.html)
Where is myTensor.component(tensor::@@) should be myTensor.component(symmTensor::@@). Then the nummering of the elements is right. |
Hi!
I have a similar problem and it would be great if someone could help me! volSymmTensorField S = symm(fvc::grad(U_)); // this line is fine volScalarField x2=S.component(symmTensor::xx); // this line is not! i tried (Tensor::xx) as well and that dosent work either Please let me know how to access and use one of the components! |
lol got it
volScalarField x2(S.component(symmTensor::XX)); Quote:
|
All times are GMT -4. The time now is 19:43. |