using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter29 { /// /// Example03: The Magnetic Dipole Moment of a Coil /// A rectangular coil of dimensions 5.40 cm \times 8.50 cm /// consists of 25 turns of wire and /// carries a current of 15.0 mA. A 0.350-T /// magnetic field is applied parallel to the loop. /// (A) Calculate the magnitude of its magnetic dipole moment. /// (B) What is the magnitude of the torque acting on the loop? /// public class Example03 { public Example03() { } private string result; public string Result { get{return result;} } public void Compute() { L.AreaVector A = new L.AreaVector(); A.Z = 5.4E-2*8.5E-2*25.0; L.MagneticField B = new L.MagneticField(); B.X = 0.35; L.ElectricCurrent I = new L.ElectricCurrent(); I.A = 15.0E-3; //(A) L.MagneticDipoleMoment mu = new L.MagneticDipoleMoment(I,A); result+=mu.ToString()+"\r\n"; //(B) L.Torque tau = mu.TorqueInMagneticField(B); result+=tau.ToString(); } } } //0 +/- 0 i +0 +/- 0 j +0.00172125 +/- 0 k (Am^2) //0 +/- 0 i +0.0006024375 +/- 0 j +0 +/- 0 k (Nm)