using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter02 { /// /// Example07: Carrier Landing /// A jet lands on an aircraft carrier at 140 mi/h (\sim 63 m/s). /// (A) What is its acceleration (assumed constant) if /// it stops in 2.0 s due to an arresting cable that snags /// the airplane and brings it to a stop? /// (B) If the plane touches down at position x_i = 0, /// what is the final position of the plane? /// public class Example07 { public Example07() { } private string result; public string Result { get{return result;} } public void Compute() { L.Time t1 = new L.Time(); L.Time t2 = new L.Time(); t1.s = 0.0; t2.s = 2.0; L.Vector.FunctionOfTime AccelerationTime = new L.Vector.FunctionOfTime(Func); L.Vector.FunctionOfTime VelocityTime = new L.Vector.FunctionOfTime(Func2); L.Velocity vi = new L.Velocity(); L.Position xi = new L.Position(); //(A) vi.X = 63.0; double[] coe = {vi.X, t2.s}; L.Complex[] sol = L.Calculus.SolutionOfPolynomialEquation(coe); for(int i=0; i< sol.Length; i++) result += sol[i].Real.ToString()+"\r\n"; L.Acceleration a = new L.Acceleration(); a.VectorFunctionOfTime = AccelerationTime; L.Velocity v = new L.Velocity(t1,vi,a,t2); result += v.ToString()+"\r\n"; //(B) xi.X = 0.0; L.Velocity vv = new L.Velocity(); vv.VectorFunctionOfTime = VelocityTime; L.Position x = new L.Position(t1,xi,vv,t2); result += x.ToString()+"\r\n"; } private L.Vector Func(L.Time t) { L.Vector a = new L.Vector(); a.X = -63.0/2.0; a.Y = 0.0; a.Z = 0.0; return a; } private L.Vector Func2(L.Time t) { L.Vector v = new L.Vector(); v.X = 63.0 - 63.0/2.0*t.s; v.Y = 0.0; v.Z = 0.0; return v; } } } /* -31.5 0 +/- 0 i +0 +/- 0 j +0 +/- 0 k (m/s) 63 +/- 0 i +0 +/- 0 j +0 +/- 0 k (m) */