## Transform velocity field into wall coordinates

Version 1.0.0.0 (6,93 ko) par
Interpolate velocity field on a wall-based grid. Useful to plot boundary layer
312 téléchargements
Mise à jour 9 fév. 2016

Afficher la licence

[xw,yw,uw,vw,xgr,ygr,ugr,vgr] = VELOCITYPROFILE(xwall,ywall,x,y,u,v,height,varargin)
Interpolates the velocity field provided by [x,y,u,v] on a grid generated
as an offset of a 2D curve [xwall,ywall] and transforms the interpolated
field into wall coordinates, rotating each vector according to the wall
angle.
Typical example: plot of the boundary layer of an airfoil, provided the
velocity field and the airfoil points.

[xwall,ywall] are the coordinates of the wall

[x,y,u,v] are the points and the components of the velocity field (can be
both structured or unstructured)

[height] is the extent of the profile in the direction normal to the
wall

VELOCITYPROFILE(xwall,ywall,x,y,u,v,height,Nh,Nw,interp_type,graphic_mode)

[Nh] is number of points in which the grid is discretised vertically.
Default value is 20

[Nw] is number of points in which the grid is discretised horizontally.
By default, the points provided for the wall are used to generate the
grid. If Nw is specified, wall points are interpolated in Nw new
locations

[interp_type]: type of interpolant ('nearest', 'linear' or 'natural'), see
scatteredInterpolant for additional info on the interpolation method.
Values outside the velocity field will always be linarly extrapolated

[graphic_mode]: true or false, create two figures with the velocity data
to show the result of the conversion

Output arguments
[xw,yw,uw,vw]: are the points and the components of the velocity data
rotated into wall coordinates. The first elements of uw and vw are the
velocities for the first point of the provided wall. Elements for the
successive columns are the velocities on the successive elements of the
wall.

[xgr,ygr,ugr,vgr]: are the points and the components of the velocity data
interpolated on the wall generated grid, before the coordinate
transformation

The direction in which the mesh is extended can be changed flipping the
wall points direction. See fliplr

The interpolation is performed using the scatteredInterpolant function,
which uses a Delaunay triangulation. If no vectors are provided on the
wall, those values will be interpolated (or extrapolated) using a
Delaunay triangulation of the entire flow field. See help

Run the code without any input argument to see an example

Author: Alessandro Masullo 2016

### Citation pour cette source

Alessandro Masullo (2024). Transform velocity field into wall coordinates (https://www.mathworks.com/matlabcentral/fileexchange/55311-transform-velocity-field-into-wall-coordinates), MATLAB Central File Exchange. Récupéré le .

##### Compatibilité avec les versions de MATLAB
Créé avec R2015a
Compatible avec toutes les versions
##### Plateformes compatibles
Windows macOS Linux
##### Remerciements

Inspiré par : inpaint_nans, interparc

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0