CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   inversion of volTensorField doesn't work (

Cyp January 18, 2012 12:17

inversion of volTensorField doesn't work

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


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,

kathrin_kissling January 19, 2012 03:24

Hi Cyp,

can you try the following:


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.



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..)


All times are GMT -4. The time now is 15:24.