How to calculate flux through a plane parallel to the XZ plane? Given a 3d vector field.

3 次查看(过去 30 天)
Say we have a 3D vector field, let's say the field and grid are already defined
n = 100;
rmax = 10000;
x = linspace(-rmax,rmax,n)
y = linspace(-rmax,rmax,n)
z = linspace(-rmax,rmax,n)
% Say FX,FY, and FZ are the components of the vector field and we want to calculate the flux through the plane y = 9800
Fy9800 = (FY(Y==y(n-2)))'; %Picks out the Y- component of the vector field in the y = 9800 plane
Fy9800R = reshape(Fy9800,[n,n]);
[X2,Z2] = meshgrid(x,z)
surf(X2,Z2,Fy9800R) %Graphs the flux through the y=9800 plane
xlabel('X-Axis')
ylabel('Z-Axis')
zlabel('Flux')
Would this work? Thanks in advanced for the help.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by