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/)
-   -   inversion of volTensorField doesn't work (http://www.cfd-online.com/Forums/openfoam-programming-development/96292-inversion-voltensorfield-doesnt-work.html)

Cyp January 18, 2012 12:17

inversion of volTensorField doesn't work
 
Hi!

I am facing an issue when I a try to inverse a volTensorField. For example :

Code:

volTensorField TM1 = blah blah blah;
volTensorField invTM1 = inv(TM1);

compile but leads to an error while it runs..

Do you have any idea to overcome this problem ?

Best regards,
Cyp

kathrin_kissling January 19, 2012 03:24

Hi Cyp,

can you try the following:

Code:

tensorField TM1internal = TM1.internalField();
tensorField invTM1internal = inv(TM1internal);

Than you can copy it back to the internalField of a volTensorField.
Be aware: A lot of the methods are not available for complete GeometricFields (like your volTensorField) since they could mess with the boundary conditions.

Best

Kathrin

Cyp January 19, 2012 03:42

Thank for your answer !

In fact the main problem came from a division by zero. Nevertheless, the results are not the one I expected :( (my other topic..)

@+
Cyp


All times are GMT -4. The time now is 00:27.