using System; using GP = Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// MagneticFluxTest /// public class MagneticFluxTest { private string result; public string Result { get{return result;} } public MagneticFluxTest() { } public void Compute() { GP.MagneticField B = new GP.MagneticField(); B.VectorField = new GP.Vector.Field(MF); GP.Surface S = new GP.Surface(); S.ParameterToPosition = new GP.Surface.Parameterization(Sur); S.Parameter1StartValue = 0.0; S.Parameter1EndValue = 1.0; S.Parameter2StartValue = 0.0; S.Parameter2EndValue = 2.0 * Math.PI; GP.Time t = new GP.Time(); t.s = 0.0; GP.MagneticFlux Phi = new GP.MagneticFlux(B, S, t); result+=Phi.ToString()+"\r\n"; } private GP.Vector MF(GP.Position x, GP.Time t) { GP.Vector xyz = new GP.Vector(); xyz.X = 0.0; xyz.Y = 0.0; xyz.Z = 10.0; return xyz; } private GP.Position Sur(double r, double theta) { GP.Position x = new GP.Position(); x.X = r * Math.Cos(theta); x.Y = r * Math.Sin(theta); x.Z = 0.0; return x; } } } // 31.4161859408301 +/- 0.000118499646352312 (Wb)