using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter30 { /// /// Example03: Magnetic Field on the Axis of a Circular Current Loop /// Consider a circular wire loop of radius R located in the /// yz plane and carrying a steady current I, as in Figure /// 30.6. Calculate the magnetic field at an axial point P /// a distance x from the center of the loop. /// public class Example03 { public Example03() { } private string result; public string Result { get{return result;} } public void Compute() { L.MagneticField B = new L.MagneticField(); L.Line.Parameterization fa = new L.Line.Parameterization(Line); L.Line l = new L.Line(fa); l.ParameterStartValue = 0.0; l.ParameterEndValue = 2.0*Math.PI; L.ElectricCurrent I = new L.ElectricCurrent(); I.A = 10.0; L.Position x = new L.Position(); x.X = 1.0; x.Y = 0.0; x.Z = 0.0; B.BiotSavartLaw(I,l,x); result+=B.ToString()+"\r\n"; result+=Convert.ToString(L.Constant. PermeabilityOfFreeSpace*I.A*1.0*1.0/2.0 /Math.Pow(x.X*x.X+1.0*1.0,1.5))+"\r\n"; } private L.Position Line(double t) { L.Position xyz = new L.Position(); xyz.X = 0.0; xyz.Y = Math.Cos(t); xyz.Z = Math.Sin(t); return xyz; } } } //2.22144146908748E-06 +/- 0 i +7.6426571419499E-18 +/- 0 j +3.80837741294973E-18 +/- 0 k (T) //2.22144146907918E-06