Curl, Divergence calculation from velocity data
Mostra commenti meno recenti
Hi,
I have calculate the Curl, Divergence from the velocity data file available in 4650 x 4 array. Here 1, 2, 3, and 4 columns reprsents x, y, u, v. I have tried with below script, but I am getting some error. Please help..
X = data (:,1);
Y = data (:,2);
UU = data (:,3);
VV = data (:,4);
[X,Y] = meshgrid(X,Y);
[UU, VV] = meshgrid(UU,VV);
f = curl(UU,VV);
2 Commenti
Sudheer Bhimireddy
il 6 Ago 2020
"some error" doesn't help much. Post your error so that we can help.
Turbulence Analysis
il 7 Ago 2020
Risposte (3)
Bruno Luong
il 7 Ago 2020
Modificato: Bruno Luong
il 7 Ago 2020
Your data is already gridded, no need to gridded on top of it
load('matlab.mat')
UU=reshape(data(:,3),[75 62]);
VV=reshape(data(:,4),[75 62]);
X=reshape(data(:,1),[75 62]);
Y=reshape(data(:,2),[75 62]);
close all
figure
quiver(X,Y,UU,VV);
f = curl(UU,VV);
figure
imagesc(f');

1 Commento
Turbulence Analysis
il 7 Ago 2020
Turbulence Analysis
il 7 Ago 2020
0 voti
5 Commenti
Bruno Luong
il 7 Ago 2020
Modificato: Bruno Luong
il 7 Ago 2020
load('matlab.mat')
sz = [75 62];
UU=reshape(data(:,3),sz);
VV=reshape(data(:,4),sz);
X=reshape(data(:,1),sz);
Y=reshape(data(:,2),sz);
x=X(:,1);
y=Y(1,:);
f = curl(x,y,UU',VV');
close all
figure
imagesc(x,y,f);
hold on
V = sqrt(UU.^2+VV.^2);
quiver(X,Y,UU./V,VV./V,'k');
colormap(jet)
set(gca,'ydir','normal')

Turbulence Analysis
il 7 Ago 2020
Bruno Luong
il 7 Ago 2020
yes
Turbulence Analysis
il 7 Ago 2020
Bruno Luong
il 7 Ago 2020
doc gradient
Turbulence Analysis
il 7 Ago 2020
0 voti
Categorie
Scopri di più su Animation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

