Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Motion in a Force Field Electric fields, gravitational fields, magnetic fields, even a hurricane, are all examples of force fields. They exert a certain amount of force to all mass objects that occupy their field of force. We will look at two examples of force fields and how Dynamics Lab can be used to solve for the motion of a particle within a given force field. Example 1 A particle of mass ½ kg located initially at the origin moves in a force field (i + ¼ initial velocity of -2 i + j, what is the trajectory of the particle? y j) per unit mass. If it starts with an Let us use Maple’s fieldplot command to draw the force field first. This will allow us to see the orientation of the force vectors in the field. When we find the trajectory, we will superimpose it to the drawing of the field. > ForceField:=fieldplot([1,1/4*y],x=-3..3,y=-7..7,color=red): display(Forcefield); Now, let’s model the particle’s motion. First we have to break the force field into its rectangular components. The horizontal component is 1 and the vertical component is ¼ y. Since the particle has x1 (t ) and y1 (t ) for its motion in Maple’s memory, the corresponding x-y forces are now 1 and 1 y1 (t ) . Now, we are ready to build the Maple model: 4 > Initialize(): > Mass:= matrix([[1,[0,0],1/2]]): > InitialVelocity:= matrix([[1,[-2,1]]]): > AddForce:= matrix([[1, 1, horizontally],[1, 1/4*y[1](t), vertically]]): > Gravity:=0: AirResistance:=0: Here is what the system looks like initially within x= -3 . . 3 and y=-3 . . 3: > DrawSystem(x={-3,3},y={-3,3}); Looks good so far. Finally, we create the equations of motion and solve them: > CreateEquations(): > SolveEquations(): Graph of the particle’s motion from t=1 to t=3 with dt=0.01 > g:= Graph(x[1](t),y[1](t),[0,3],dt=.01): display(g); Graph (1) The preceding is the parametric plot of the particle’s horizontal vs. vertical motion plotted against the parameter t (time) as given by Dynamics Lab. Let’s verify the solution with our own analytic solution. By Newton’s Second Law: Fx 1 = m m 1 y = 4 1 . 2 Fy ax 1 d 2x . 2 dt 2 ay d2y dt 2 the solutions can be found by integrating both equations (linear second order) and the general solutions are: x(t ) t C1t C 2 2 and y (t ) C1e 2 2 t C2 e 2 2 t With the initial conditions x(0) =0, y(0)=0, x’(0)= - 2 , y’(0)=1 the specific solutions can be found: 2 t 2 2 x(t ) t 2 2t and y(t ) e 2 2 e 2 2 t 2 Plotting these functions as parametric functions of time gives us the exact same graph as graph (1), so our solution with Dynamics Lab is verified. > plot([t^2-2*t,1/2*sqrt(2)*exp(1/2*sqrt(2)*t)-1/2*sqrt(2)*exp(-1/2*sqrt(2)*t),t=0..3],color=red); And finally, let’s superimpose the plot the force field (we saved it under the name Forcefield) with the trajectory of the particle (named g): > display(g,Forcefield); Example 2 Let’s go through the same steps as the last example, only choosing a more complicated force field. A particle of mass 1 kg located initially at the origin moves in a force field ( y i + x j) per unit mass. If it starts with an initial velocity of 2 i, what is the trajectory of the particle? Let’s first get a look at what the force field looks like with x=-7..7 and y=-7..7 > ForceField:= fieldplot([y,x],x=-7..7,y=-7..7): display(Forcefield); Since the particle has x1 (t ) and y1 (t ) for its motion in Maple’s memory, the corresponding x-y forces are now y1 (t ) and x1 (t ) . Now, we are ready to build the model in Maple: > Initialize(): > Mass:= matrix([[1,[0,0],1]]): > InitialVelocity:= matrix([[1,[2,0]]]): > AddForce:= matrix([[1, y[1](t), horizontally],[1, x[1](t), vertically]]): > Gravity:=0: AirResistance:=0: Here is what the system looks like initially within x= -3 . . 3 and y=-3 . . 3: > DrawSystem(x={-3,3},y={-3,3}); This is the picture we wanted so we are now ready to create the equations of motion and solve them: > CreateEquations(): > SolveEquations(): Graph of the particle’s motion from t=1 to t=3 with dt=0.01 and save the graph under the name g > g:= Graph(x[1](t),y[1](t),[0,3],dt=.01): display(g); Graph (2) So, that is what the trajectory of the particle looks like if it is acted on by that force field and given its initial conditions. We will now check to see if it is correct. Integrating to find the equations of motion in this case is a bit more difficult than last example because we have a system of second order linear differential equations, and systems of DE’s are usually more difficult to solve for. Fx 1 4 y = m Fy ax 1 d 2x . 2 dt 2 1 4 x = m ay 1 . 2 d2y dt 2 We cannot solve the two individual equations separately but if we eliminate y , we find that x satisfies d 4x x0 dt 4 if we let k 1 then the equation becomes d 4x k 4 x 0 which has the characteristic equation: 4 dt (m 2 1)( m 1)( m 1) and the solution of an equation of this form is: x Ae kt Be kt C cos( kt) D sin( kt) y 1 d 2x Ae kt Be kt C cos( kt) D sin( kt) 2 2 k dt Initial conditions of this system are x(0) y (0) 0 and x' (0) 2, y ' (0) 0 The initial conditions give the following four equations for A, B, C and D if A B C 0 A B D v0 / k A B C 0 A B D 0 therefore A v0 / 4k and B v0 / 4k v0 2 Thus, the parametric equations for the path of the particle are: x v0 e kt e kt 2 sin(kt ) and 4k y v0 e kt e kt 2 sin(kt ) 4k Both x and y are functions of time. We will save the parametric plot of these equations under the name ac (stands for ‘actual’). Instead of the solid curve plot, we will use a dotted black curve to plot the equations and superimpose the calculated and the actual plots to see their discrepancies: > ac:= plot([2*(exp(t)-exp(t)+2*sin(1*t))/(4*1),2*(exp(1*t)-exp(-t) 2*sin(1*t))/(4*1),t=0..3], color=black,style=point): > display(g,ac); # recall that g was used to label the calculated path (graph 2) # It can be seen that there are no noticeable differences between the graphs. The only error that might have occurred is in Maple’s dsolve routine that uses numerical algorithms to find solutions to DE’s.