I want to find magnetic field generated by infinitly long wire using ampere's law but ampere's law is gives us scaler how can i get vectorial solutions
ampere's law : u0*i/(2*pi*d)

 Respuesta aceptada

Star Strider
Star Strider el 23 de Abr. de 2017

2 votos

You may not have the definition of it that you need.
Try this:
mu0 = pi*4E-7; % Ref: https://en.wikipedia.org/wiki/Vacuum_permeability
AmpereB = @(m0u,I,r) (mu0.*I)./(2*pi*r); % µₒ = Magnetic Constant, I = Current (A), r = radius (m), Ref: https://en.wikipedia.org/wiki/Amp%C3%A8re%27s_circuital_law
radius = linspace(1E-3, 1);
I = 1;
figure(1)
semilogy(radius, AmpereB(mu0,I,radius))
grid
xlabel('r (m)')
ylabel('B')

4 comentarios

Sogogo
Sogogo el 23 de Abr. de 2017
thanks for your answer
but how can i get magnetic field vectors (arrows) arround the wire, how can i get directional arrows
Star Strider
Star Strider el 23 de Abr. de 2017
These appear to have the correct directions (using conventional calculus to generate directional components for the quiver arrows):
mu0 = pi*4E-7; % Ref: https://en.wikipedia.org/wiki/Vacuum_permeability
AmpereB = @(m0u,I,r) (mu0.*I)./(2*pi*r); % µₒ = Magnetic Constant, I = Current (A), r = radius (m), Ref: https://en.wikipedia.org/wiki/Amp%C3%A8re%27s_circuital_law
radius = linspace(1E-3, 1);
I = 1;
figure(1)
semilogy(radius, AmpereB(mu0,I,radius))
grid
xlabel('r (m)')
ylabel('B')
thp = linspace(0, 2*pi);
thq = linspace(0, 2*pi, 10);
r5f = @(th) AmpereB(mu0,I,0.5)*[cos(th); sin(th)]; % Circle For Quiver Origins
uv = AmpereB(mu0,I,0.5)*[-sin(thq); cos(thq)]; % Quiver Directions
r5q = r5f(thq); % Quiver Origins
r5c = r5f(thp); % Continuous Circle
figure(2)
quiver(r5q(1,:), r5q(2,:), uv(1,:), uv(2,:)) % Plot Arrows
hold on
plot(r5c(1,:), r5c(2,:), '-r') % Plot Radius=0.5 Circle
hold off
grid
axis equal
title('B(r=0.5m, I=1A)')
This is the best I can do. I’ve not done anything with Ampere’s law since shortly before Pangaea split apart.
Sogogo
Sogogo el 23 de Abr. de 2017
thank you very much i should keep working from this one
Star Strider
Star Strider el 23 de Abr. de 2017
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Vector Fields en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 23 de Abr. de 2017

Comentada:

el 23 de Abr. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by