Contour Plot Flow Direction
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ali Alkoraishi
am 15 Apr. 2020
Bearbeitet: Adam Danz
am 17 Apr. 2020
How can i plot a quiver plot on top of this to indicate the flow direction. The blue circles are wells and flow is supposed to go downstream.

2 Kommentare
Akzeptierte Antwort
Adam Danz
am 15 Apr. 2020
Follow this demo. If you get stuck, show us what you've got and we can help you get un-stuck.
4 Kommentare
Adam Danz
am 16 Apr. 2020
Bearbeitet: Adam Danz
am 17 Apr. 2020
To create a grid of quiver arrows that flow down hill rather than up hill,
% Grid interp
Xs = linspace(min(scaledwellsx), max(scaledwellsx),20);
Ys = linspace(min(scaledwellsy), max(scaledwellsy),20);
[Xq, Yq] = meshgrid(Xs,Ys);
Vq = F(Xq,Yq);
% Plot quiver grid
% Negate Vq to reverse polarity of vectors
[U,V] = gradient(-Vq);
hold on
h = quiver(Xq,Yq,U,V,2, 'k') % The 2 is a scaling factor
Notice that gradient(-Vq) reverses the direction of the arrows. You could also try gradient(1./Vq) or use quiverRotate() from the file exchange.

Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Vector Fields finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
