I like to measure the mean velocity (magnitude and x,y and z direction) with a python annotation.
What is the right variable for it ? I tried mean(U(inputs[0])) for the magnitude mean(Velocity(inputs[0])) for the magnitude mean(Ux(inputs[0])) in x direction mean(U_x(inputs[0])) in x direction mean(Velocityx(inputs[0])) in x direction mean(Velocity_x(inputs[0])) in x direction
nothing works out.
What is the right variable for the velocity magnitude and in the directions ?
In example i got an array U = [ 7, 3, -4; 5, -2, 9; 1, 6 , 4]
The Ux component is [7, 5, 1], the Uy component [3, -2, 6] and Uz [ -4, 9, 4]
So i tried to isolate the Ux components with mean((U) * (1,0,0) this will change the U array to
U = [ 7, 0, 0; 5, 0, 0; 1, 0 , 0]
The mean U value is (7+0+0+5+0+0+1+0+0) / 9 and this is not what i want.
Is has to be (7+5+1) / 3.
So i search for a way to extract the Ux, y and z components into a vector and get the mean value out of it.