Code covered by the BSD License  

Highlights from
The Magnetic Field Made By A Ring Of Current - Enter Value

image thumbnail

The Magnetic Field Made By A Ring Of Current - Enter Value



This code finds the magnetic field from coordinates entered by you.

%(c) 2013 The Polywell Guy -

Parmeters = struct('a', 0, 's', 0, 'Mu', 0, 'Current', 0, 'RingXSecRadius',0, 'Turns', 0);
Parmeters.a = 0.127;
Parmeters.s = 0.196342;
Parmeters.Mu = 0.00000125663706;
Parmeters.Current = 100;
Parmeters.Turns = 200;

disp(' ');
disp(' ');
disp('This program finds the Linear and Radial magnetic field coming from a single ring.');
disp('It works by you entering the distance from the center of the ring (Z)');
disp('and the distance away from the centerline (Rho).');
disp('If you enter zero you will get a N/A.');
disp(' ');

T1 = 'The ring has a radius of :';
T2 = num2str(Parmeters.a);
T3 = ' (Meters)';

disp('The ring is placed along the Y axis');

T1 = 'The ring has :';
T2 = num2str(Parmeters.Current*Parmeters.Turns);
T3 = ' (AmpTurns)';

disp(' ');

Xinput = input('Z Distance? (Meters)');
Yinput = input('Rho Distance? (Meters)');

Point = [Xinput,Yinput];

Vector = SingleRingEnter(Point, Parmeters);

disp(' ');
disp('Radial Magnetic Field (Gauss):');
disp('Linear Magnetic Field (Gauss):');

Contact us