<< Chapter < Page Chapter >> Page >

The output

The output for the script shown in Listing 4 is provided in Figure 5 .

Figure 5 . Output for a perfectly inelastic collision between objects with odd angles.
Start Script b1 = 58.2 degreesv1 = 2456 m/s v1x = 1293 m/sv1y = 2088 m/s Px = 2586 Kg*m/sPy = 4176 Kg*m/s Pmag = 4912 Kg*m/s=============================== moux = 2586 Kg*m/smovx = 2586 Kg*m/s mouy = 4176 Kg*m/smovy = 4176 Kg*m/s mou = 4912 Kg*m/smov = 4912 Kg*m/s ===============================End Script

As before, I will allow the comments in Listing 4 serve as the explanation for the solution of this scenario.

Rotating the axes for simplification

The scenario shown in Listing 5 illustrates how, in some cases, you can simplify the algebra/trigonometry by rotating the axes. This situation occurswhen none of the directions involving the two objects lies along either the x or y axis. In those cases, you may be able to simplify the three equations that youdevelop by rotating the axes such that one of the directions lies along either the x or the y axis. That will often cause some of the terms in the equations togo to zero and drop out of the equations.

A crash at an intersection

If you examine the scenario shown in Listing 5 carefully, you will see that it is the classic collision at the intersection of two streets that areperpendicular to one another. However, the streets don't run in north-south, east-west directions.

Rotating the axes simplified the problem

In this particular case, rotating the axes so that one street runs east and west while the other street runs north and south simplifiesthe equations considerably.

Don't forget the rotate the axes back at the end

Of course, if you rotate the axes to simplify the solution, you must remember to rotate it back again, and correct the solution accordingly, once you have asolution. The procedure for doing that is illustrated in the scenario shown in Listing 5 .

Listing 5 . Rotation of the axes for simplification.
<!---------------- File JavaScript04.html ---------------------><html><body><script language="JavaScript1.3">/* Two objects collide in a perfectly inelastic collision. Obj1has a mass of 10000 kg and is traveling 30 degrees north of east at 15 m/s. Obj2 has a mass of 1500 kg and is traveling30 degrees west of north, or 120 degrees at 25 m/s. Find the direction that the two object move and the speed of thatmovement following the collision. Note that this script illustrates rotating the axis to simplifythe problem. Using conservation of momentum alone, we have twoequations, allowing us to solve for two unknowns. m1*u1x + m2*u2x = m1*v1x + m2*v2xm1*u1y + m2*u2y = m1*v1y + m2*v2y Variables:m1, m2, u1, u2, v1, v2, a1, a2, b1, b2 */document.write("Start Script</br>"); var m1 = 10000;//kgvar m2 = 1500;//kg var u1 = 15;//meters per secondvar u2 = 25;//meters per second var v1;//unknown -- to be foundvar v2;//unknown -- to be found var a1 = 30;//degreesvar a2 = 120;//degrees var b1;//unknown -- to be foundvar b2;//unknown -- to be found //For a perfectly inelastic collision, v2=v1 and b2=b1//Convert angles to radians A1 = a1*Math.PI/180;A2 = a2*Math.PI/180; //B1 = b1*Math.PI/180;//unknown//B2 = b2*Math.PI/180;//unknown //Compute the x and y components of velocity u1x = u1*Math.cos(A1)u1y = u1*Math.sin(A1) u2x = u2*Math.cos(A2)u2y = u2*Math.sin(A2) //v1x = v1*Math.cos(B1)//unknown//v1y = v1*Math.sin(B1)//unknown //v2x = v2*Math.cos(B2)//unknown//v2y = v2*Math.sin(B2)//unknown //Display the x and y components of initial velocitydocument.write("x and y components of initial velocity</br>"); document.write("u1x = " + u1x.toFixed(2) + " m/s</br>"); document.write("u1y = " + u1y.toFixed(2) + " m/s</br>"); document.write("u2x = " + u2x.toFixed(2) + " m/s</br>"); document.write("u2y = " + u2y.toFixed(2) + " m/s</br>"); document.write("==============================="+ "</br>"); /*Given the following two equations m1*u1x + m2*u2x = m1*v1x + m2*v2xm1*u1y + m2*u2y = m1*v1y + m2*v2y For the special case of v2=v1 (perfectly inelasticcollision), the equations can be simplified to the following: m1*u1x + m2*u2x = (m1 + m2)*v1xm1*u1y + m2*u2y = (m1 + m2)*v1y Replace the terms with known x and y velocity component values.m1*13 + m2*(-12.5) = (m1 + m2)*v1x m1*7.5 + m2*21.6 = (m1 + m2)*v1yA judicious examination of the problem reveals that if we were to rotate the axis by 30 degrees clockwise, we could causesome of the terms in these two equations to go to zero. We will subtract 30 degrees from the given angles at this point andadd that 30 degrees back into the results at the end. */a1 = a1 - 30; a2 = a2 - 30;//Convert the new angles to radians A1 = a1*Math.PI/180;A2 = a2*Math.PI/180; //Recompute the x and y components of velocityu1x = u1*Math.cos(A1) u1y = u1*Math.sin(A1)u2x = u2*Math.cos(A2) u2y = u2*Math.sin(A2)//Display the new x and y components of initial velocity document.write(" New x and y components of velocity</br>"); document.write("u1x = " + u1x.toFixed(2) + " m/s</br>"); document.write("u1y = " + u1y.toFixed(2) + " m/s</br>"); document.write("u2x = " + u2x.toFixed(2) + " m/s</br>"); document.write("u2y = " + u2y.toFixed(2) + " m/s</br>"); document.write("==============================="+ "</br>"); /*Returning now to the special case of v2=v1 (perfectly inelastic collision):m1*u1x + m2*u2x = (m1 + m2)*v1x m1*u1y + m2*u2y = (m1 + m2)*v1yReplace the x and y components of velocity with the modified values, two of which are now 0. This results in a simplificationof the equations. m1*15 + m2*0 = (m1 + m2)*v1xm1*0 + m2*25 = (m1 + m2)*v1y Plugging in the values for mass and eliminating terms witha zero value yields 10000*15 = (10000 + 1500)*v1x1500*25 = (10000 + 1500)*v1y *///Rearranging terms yields v1x = (10000*15)/(10000 + 1500)v1y = (1500*25)/(10000 + 1500) //Compute the magnitude and the angle of the velocity of the// two objects following the collision. v1 = Math.sqrt(v1x*v1x + v1y*v1y);b1 = getAngle(v1x,v1y); //Because this is a perfectly inelastic collision, v2=v1// and b2=b1 v2 = v1;b2 = b1; //Display results for the modified anglesdocument.write("Results for modified angles</br>"); document.write("v1x = " + v1x.toFixed(1) + " m/s</br>"); document.write("v1y = " + v1y.toFixed(1) + " m/s</br>"); document.write("v1 = " + v1.toFixed(1) + " m/s</br>"); document.write("v2 = " + v2.toFixed(1) + " m/s</br>"); document.write("b1 = " + b1.toFixed(1) + " degrees</br>"); document.write("b2 = " + b2.toFixed(1) + " degrees</br>"); document.write("==============================="+ "</br>"); /*Now we need to rotate the axis by 30 degrees counter-clockwise to correct for the original rotation by 30 degrees clockwise.The magnitude of the final velocity is the same regardless of the orientation of the axes. Therefore, we will add 30 degreesto the values of b1 and b2, and use the new angles along with the magnitude of the final velocity to recompute the x and ycomponents of the final velocity. */b1 = b1 + 30; b2 = b1;v1x = v1*Math.cos(b1*Math.PI/180); v1y = v1*Math.sin(b1*Math.PI/180);//Display results for the corrected angle document.write("Results for corrected angle</br>"); document.write("v1x = " + v1x.toFixed(1) + " m/s</br>"); document.write("v1y = " + v1y.toFixed(1) + " m/s</br>"); document.write("v1 = " + v1.toFixed(1) + " m/s</br>"); document.write("v2 = " + v2.toFixed(1) + " m/s</br>"); document.write("b1 = " + b1.toFixed(1) + " degrees</br>"); document.write("b2 = " + b2.toFixed(1) + " degrees</br>"); document.write("==============================="+ "</br>"); //Check the answer for a perfect inelastic collision. Must// recognize that v2=v1 and correct the angles for a1 and a2. v2x = v1x;v2y = v1y; u1x = u1*Math.cos((a1+30)*Math.PI/180);u1y = u1*Math.sin((a1+30)*Math.PI/180); u2x = u2*Math.cos((a2+30)*Math.PI/180);u2y = u2*Math.sin((a2+30)*Math.PI/180); var moux = m1*u1x + m2*u2x;var movx = m1*v1x + m2*v2x; var mouy = m1*u1y + m2*u2y;var movy = m1*v1y + m2*v2y; var mou = Math.sqrt(moux * moux + mouy * mouy);var mov = Math.sqrt(movx * movx + movy * movy); document.write("Check the answers.</br>"); document.write("moux = " + moux.toFixed(0) + " Kg*m/s</br>"); document.write("movx = " + movx.toFixed(0) + " Kg*m/s</br>"); document.write("mouy = " + mouy.toFixed(0) + " Kg*m/s</br>"); document.write("movy = " + movy.toFixed(0) + " Kg*m/s</br>"); document.write("mou = " + mou.toFixed(0) + " Kg*m/s</br>"); document.write("mov = " + mov.toFixed(0) + " Kg*m/s</br>"); document.write("==============================="+ "</br>"); //The purpose of this function is to receive the adjacent// and opposite side values for a right triangle and to // return the angle in degrees in the correct quadrant.function getAngle(x,y){ if((x == 0)&&(y == 0)){ //Angle is indeterminate. Just return zero.return 0; }else if((x == 0)&&(y>0)){ //Avoid divide by zero denominator.return 90; }else if((x == 0)&&(y<0)){ //Avoid divide by zero denominator.return -90; }else if((x<0)&&(y>= 0)){ //Correct to second quadrantreturn Math.atan(y/x)*180/Math.PI + 180; }else if((x<0)&&(y<= 0)){ //Correct to third quadrantreturn Math.atan(y/x)*180/Math.PI + 180; }else{//First and fourth quadrants. No correction required. return Math.atan(y/x)*180/Math.PI;}//end else }//end function getAngle//The purpose of the getRoots function is to compute and // return the roots of a quadratic equation expressed in// the format // a*x^2 + b*x + c = 0//The roots are returned in the elements of a two-element // array. If the roots are imaginary, the function// returns NaN for the value of each root. function getRoots(a,b,c){var roots = new Array(2); roots[0]= (-b+Math.sqrt(b*b-4*a*c))/(2*a); roots[1]= (-b-Math.sqrt(b*b-4*a*c))/(2*a); return roots;}//end getRoots document.write("End Script");</script></body></html>

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Accessible physics concepts for blind students. OpenStax CNX. Oct 02, 2015 Download for free at https://legacy.cnx.org/content/col11294/1.36
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?

Ask