CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   dot product of volvectorfield (http://www.cfd-online.com/Forums/openfoam/109518-dot-product-volvectorfield.html)

latvietis November 19, 2012 19:44

dot product of volvectorfield
 
Greetings!

How can one get a squared value from volvectorfield? Per say, I have volVectorField A and besides simple output of this in text file I also want to get (and later be able to use) squared value of A in each cell. My first absurd idea was to do pow(A,2), but sadly I don't know the correct answer.

Sincerely,
Martin

niklas November 20, 2012 03:16

inner product is '&'
so
volScalarField Usquared = U & U;


All times are GMT -4. The time now is 02:09.