using System; using GP = Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// MagneticFieldTest /// public class MagneticFieldTest { private string result; public string Result { get{return result;} } public MagneticFieldTest() { } public void Compute() { GP.MagneticField B = new GP.MagneticField(); GP.Line.Parameterization fa = new GP.Line.Parameterization(line); GP.Line l = new GP.Line(fa); l.ParameterStartValue = 0.0; l.ParameterEndValue = 2.0*Math.PI; GP.ElectricCurrent I = new GP.ElectricCurrent(); I.A = 10.0; GP.Position x = new GP.Position(); x.X = 0.0000001; x.Y = 0.0000001; x.Z = 0.0000001; B.BiotSavartLaw(I,l,x); result+=B.ToString()+"\r\n"; result+=Convert.ToString(GP.Constant.PermeabilityOfFreeSpace*I.A/2.0/1.0)+"\r\n"; } private GP.Position line(double t) { GP.Position xyz = new GP.Position(); xyz.X = Math.Cos(t); xyz.Y = Math.Sin(t); xyz.Z = 0; return xyz; } } } /* 9.42499386627554E-20 +/- 0 i +9.42488553270451E-20 +/- 0 j +6.28318530718103E-06 +/- 0 k (T) 6.28318530717959E-06 */