I am currently working on my bachelor thesis, where I am calculating trajectory of electrons and ions in Hall Effect Ion Thruster. However, to be sure what I am calculating, I need to know how does the electromagnetic field look like.
I already have working code for visualization of electromagnetic field using streamslice, however I would like to take it to the next level.
I have created coordinates $x,$ $y$ and $z$ through meshgrid and computated magnetic field, which is set of not really pretty equations. Electric field points only towards the $z$ direction.
Here is the snappet of code that is generating picture below:
% Magnetic field
plot_field = streamslice(x,y,z,Bx,By,Bz,0.02,0.02,0);
set(plot_field,'Color','black','LineWidth',2);
% Electric field
hold on;
quiver3(x_el,y_el,z_el,Ex,Ey,Ez,1,'r');
hold off;
% Plot of discharge chamber
[x_ch, y_ch, z_ch] = cylinder(0.4,40);
z_ch(1,:) = -0.2;
z_ch(2,:) = 0.2;
hold on;
plot_ch = surf(x_ch,y_ch,z_ch);
hold off;
set(plot_ch,...
'LineWidth',1,...
'FaceAlpha',0.5,...
'EdgeColor','black',...
'EdgeAlpha',0.6,...
'DiffuseStrength',1,...
'AmbientStrength',1);
This code generates the following,
Question
I would like to create streamslice of the magnetic field in various degrees slope (let's say $45$), so I could see how does the field looks like not only when intersecting magnetic dipoles, but also in other locations. That would be great for study of particle motion.