Curl Function for 3D data using meshgrid and interpolation function

4 次查看(过去 30 天)
Hi all.
I have extracted a data set from COMSOL software which consists of coordinates, x y z,in mm and velocity u v w, in m/s. The value is extracted at XY Plane, keeping Z-cordinates fixed at a point which so that the matrix [x y z u v w] dimension is 124*6. The excel file is attached here with. However, when i try to calculate Curl for the same, the below error is appeared. Warning: The underlying triangulation is empty - the points may be coplanar or collinear. > In Curl3D at 10 Error using curl (line 54) U,V must all be size 2x2 or greater. > In Curl3D at 8 I have written the following code. clc; clear all; Matrix = xlsread('3dvelfield.xlsx'); [x,y,z] = meshgrid(0:0.05:3,0:0.05:3,0.05); Fu = scatteredInterpolant(Matrix(:,1),Matrix(:,2),Matrix(:,3),Matrix(:,4)); Fv = scatteredInterpolant(Matrix(:,1),Matrix(:,2),Matrix(:,3),Matrix(:,5)); Fw = scatteredInterpolant(Matrix(:,1),Matrix(:,2),Matrix(:,3),Matrix(:,6)); u = Fu(x,y,z); v = Fv(x,y,z); w = Fw(x,y,z); curl(x,y,z,u,v,w)
P.S.: When, i deal with only 2D case for the same problem discussed above. The simulation runs successfully
Can anyone please help me with this problem. I will be very grateful. Thanks in advance

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by