Trajectory of a particle under a force; a computer demonstration

March 16, 2018 | Author: Abhijit Kar Gupta | Category: Trajectory, Force, Mechanics, Classical Mechanics, Orbit


Comments



Description

1Trajectory of particle under a force: a computer demonstration Abhijit Kar Gupta Department of Physics, Panskura Banamali College Panskura R.S., East Midnapore, West Bengal, India, Pin Code: 721152 e-mail: [email protected] Study of Classical Mechanics is a very important and elaborate part of physics curricula since school level. Simply by applying Newton’s laws, we arrive at various scenarios. We can enumerate the path of a particle when the nature of the force is known. The path of a projectile under the constant force of gravity acting downwards, the orbit of a planet under the central force of inverse square law nature are all know to us. The mathematical calculations are not difficult and the students can find them in any text book of mechanics or basic physics. It will be, however, interesting to obtain the trajectories by directly invoking the law of force and initial conditions. Here I would like to present the FORTRAN programs for two problems (projectile motion and nature of orbit of a particle under central force) with algorithmic steps followed by the figures obtained from the numerical data. Hope, this will be a good demonstration for graduate or advanced level school students who can write the programs on their personal desktops and play around with them! 2 Projectile Motion Algorithm: We consider acceleration due to gravity, ; mass, ; initial position of the particle: . Initial angle of projection and initial velocity are given. The choice of time interval can be any small value for good results. For example, we choose . All the quantities are in arbitrary units.       Components of forces: Components of initial velocity: Change in velocity components: New velocity components: Change in position coordinates: New position coordinates: , , , , , FORTRAN Program: C C Projectile Motion of a partile open(1,file='proj.dat') write(*,*)'Angle (in deg) and initial speed?' read(*,*)theta,v0 dt=0.00001 g=980 theta=3.14/180*theta fx=0 fy=-g vx=v0*cos(theta) vy=v0*sin(theta) x=0 y=0 dvx=fx*dt dvy=fy*dt vx=vx+dvx vy=vy+dvy dx=vx*dt dy=vy*dt x=x+dx y=y+dy write(1,*)x,y if(y.gt.0.0)go to 10 stop end 10 3 Path of a particle projected at an angle and with some velocity 4 Motion under Central Force Algorithm: Central Force, and consider Newton’s 2nd law of motion: . We take , . Initial values for the velocity components, and and the time interval, are given. The time interval is chosen very small in order to get good results. For example, we choose . All the quantities are in arbitrary units.      Components of Force: √ Change in velocity components: New velocity components: New position coordinates: , , , , FORTRAN Program: C C Motion under Central Force open(1,file='planet.dat') dt=0.00001 vx=0.0 vy=0.1 x=1.0 y=0.0 ncount=0 r2=x*x+y*y r=sqrt(r2) f=-1/r2 fx=x/r*f fy=y/r*f vx=vx+fx*dt vy=vy+fy*dt x=x+dt*vx y=y+dt*vy ncount=ncount+1 n=mod(ncount,1000) if(n.eq.0)write(1,*)x,y !To collect every 1000th data if(ncount.lt.1000000)go to 10 stop end 10 5 Path of a particle under Central Force 6 Harmonic Oscillator Algorithm: Equation of motion: value.      FORTRAN Program: . We choose mass and the force constant a large C C Harmonic Oscillator open(1,file='harmonic.dat') x=0.0 t=0 v=1.0 dt=0.000001 k=500000000 ncount=0 dv=-k*x*dt v=v+dv dx=v*dt x=x+dx t=t+dt write(1,*)t,x ncount=ncount+1 if(ncount.lt.1000)go to 10 stop end 10 7
Copyright © 2024 DOKUMEN.SITE Inc.