A non centered method to compute velocity derivative
이전 댓글 표시
I have three vector vx, vy and vz, these vectors contain the values of velocity in every point of my 3d domain and in every time frame. I have a 3d domain and I'm computing derivatives of the velocity in every direction with the Sobel Operators in this way:
s1(:,:,1) = [1 2 1; 0 0 0; -1 -2 -1];
s1(:,:,2) = [2 4 2; 0 0 0; -2 -4 -2];
s1(:,:,3) = [1 2 1; 0 0 0; -1 -2 -1];
s2(:,:,1) = [1 0 -1; 2 0 -2; 1 0 -1];
s2(:,:,2) = [2 0 -2; 4 0 -4; 2 0 -2];
s2(:,:,3) = [1 0 -1; 2 0 -2; 1 0 -1];
s3(:,:,1) = [1 2 1; 2 4 2; 1 2 1];
s3(:,:,3) = -[1 2 1; 2 4 2; 1 2 1];
s1 = s1./32;
s2 = s2./32;
s3 = s3./32;
sx = s2;
sy = s1;
sz = s3;
dvxdx = imfilter(vx,sx,'conv'); Derivative of the x-component of the velocity along direction x
dvxdy = imfilter(vx,sy,'conv'); Derivative of the x-component of the velocity along direction y
dvxdz = imfilter(vx,sz,'conv'); Derivative of the x-component of the velocity along direction z
Since this method is a centered method, it doesn't work very well when I want to compute the derivatives on the boundary of my domain. Does anyone know a not centered method to compute derivatives of the velocity along all the directions given the three vectors vx, vy, vz?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


