using System; using GP = Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// DisplacementCurrentTest /// public class DisplacementCurrentTest { public DisplacementCurrentTest() { } private string result; public string Result { get{return result;} } public void Compute() { GP.Scalar.FunctionOfTime functionOfTime = new GP.Scalar.FunctionOfTime(func); GP.ElectricFlux phi = new GP.ElectricFlux(functionOfTime); GP.Time t = new GP.Time(); t.s = 2.0; GP.DisplacementCurrent Id = new GP.DisplacementCurrent(phi,t); result += Id.A.ToString()+" "+ Convert.ToString(GP.Constant.PermittivityOfFreeSpace *10.0*2.0*2.0); } private GP.Scalar func(GP.Time t) { GP.Scalar s = new GP.Scalar(); s.Magnitude = 10.0 * t.s * t.s; return s; } } } // 3.54167512679917E-10 3.5416751268E-10