Transform velocity field into wall coordinates

버전 1.0.0.0 (6.93 KB) 작성자: Alessandro Masullo
Interpolate velocity field on a wall-based grid. Useful to plot boundary layer
다운로드 수: 312
업데이트 날짜: 2016/2/9

라이선스 보기

[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

Additional input arguments are:
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

Additional info
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
scatteredInterpolant for more information.

Run the code without any input argument to see an example

Author: Alessandro Masullo 2016

인용 양식

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. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
도움

받음: inpaint_nans, interparc

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0