CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   dot product of volvectorfield (

latvietis November 19, 2012 19:44

dot product of volvectorfield

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.


niklas November 20, 2012 03:16

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

All times are GMT -4. The time now is 16:51.