PIVMat Function Reference<< Prev | Next >> 
Compute scalar fields from vector fields

S = vec2scal(V,MODE) returns scalar field(s) S computed from the vector 
field(s) V according to the specified MODE. The resulting scalar 
field(s) S can be displayed using showf. Available scalar modes are: 
   norm2d          2D norm (ux^2+uy^2)^(1/2) 
   norm3d          3D norm (ux^2+uy^2+uz^2)^(1/2) 
   norm            applies norm2d or norm3d, depending on the field 
   ux, uy, uz      x, y or z component of the vector field 
   en, ken         kinetic energy, norm^2 / 2  (where norm is 2D or 3D) 
   curl (or rot)   curl (z-component of vorticity field) 
   absrot          absolute value of the curl 
   div             2D divergence (dux/dx + duy/dy) 
   ens             enstrophy (=square of z-vorticity / 2) 
   rad, deg        velocity angle (tan(angle)=vy/vx), in rad or deg 
   strain          norm of the strain rate, sqrt(s1^2 + s2^2), 
                   where s1 and s2 are the 2D strain eigenvalues. 
   q               Q-criterion, Q = (enstrophy - strain^2)/2 
   eps2D           2D squared strain rate  (epsilon/nu) 
   eps3D           3D squared strain rate (only 6 components) 
   epsaxi          axisymmetric (w.r.t. y-axis) squared strain rate 
   duidxj          spatial derivatives  (du_i / dx_j), with i=x,y,z 
                   and j=x,y (for instance, duzdy) 
   uiuj (or tij)   Components of the Reynolds stress tensor u_i*u_j, 
                   with i,j=x,y,z  (for instance, uxuy, uyuz, 
                   or txy, tyz, etc.) 
                   (Careful: the average is NOT subtracted) 
   smin            minimum eigenvalue 
   real, imag      extracts the real part or the imaginary part 
If input argument MODE is ommitted, 'norm' (for a 2D field) or 'uz' 
(for a 3D field) is taken by default. 
Adding '-' (minus sign) before MODE (e.g., '-rot') inverts the result. 
The resulting scalar field S contains the following fields: 
   x,y:                 vectors containing the X and Y coordinates 
   w:                   matrix containing the scalar field 
   namex, unitx, namey, unity: strings for the name and unit of coord 
   namew, unitw:        strings for the name and unit of the matrix w 
   name:                name of the VEC file from which originates V 
   setname:             name of the current directory 
   history:             Remind from which command S has been obtained 
The scalar fields built from derivatives (e.g., rot, div, ens etc.) 
are computed from 2nd-order centered differences. 
S = vec2scal(FILE) is a shortcut for S = vec2scal(loadvec(FILE)). 
By default, vectors with a zero component are considered as erroneous, 
and are not used for the computation of the derivative fields (rot, 
div, eps, duxdx, ...). If however you want to keep them in the 
computation, specify  vec2scal(V,MODE,'keepzero'). 
vec2scal(...), without output argument, shows the result with showf. 
  stat_rot = statf(vec2scal(v,'rot')); 
  vec2scal *.vc7 ken 
See Also
showf, gradientf, operf, convert3dto2df. 
Published output in the Help browser 
   showdemo vec2scal 

 Previous: vec2matNext: vortex 

2005-2021 PIVMat Toolbox 4.20