CFD Online Discussion Forums

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

latvietis November 19, 2012 18: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 02:16

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


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