Problem 2.6

By Nasser Abbasi

 

Part (a)

SOURCE CODE

 

% nma_balle_HW_2_6 - Program to analyse Galilo 2 inches claim

 

%by Nasser Abbasi, HW 2.6 (a)

%PHYS 240, San Jose State Univ.

%

% Algorithm:

%

% Drop the heavy ball, from rest, from a height of Y

% meters, vertically downwards. record the time it takes

% to reach the ground using Cd=0.5.

%

% Then at this time, according to Galilo, the small ball was

% 2 inches above the ground.

%

% So, use this time and run the simulatiom again using the small ball

% and find what Cd is needed to cause the small ball to be 2 inches above

% the ground when the time, found in the first simulation, has elapsed.

%

% i.e. drop the small ball, and keep adjusting the Cd, such that

% after the above amount of time, the small ball would have travled

% all the way to the ground less 2 inches.

%

% determine if such a Cd is realistic.

%

 

clear;  help nma_balle_HW_2_6;  % Clear memory and print header

 

DELTA = 0.0508;  % 2 inches expressed in meter units.

 

tau   = input('Enter timestep, tau (sec): ');  % (sec)

 

%*Set initial position and velocity of the baseball

initialY         = input('Height to drop the balls from (Meter):');

initialPos       = [0, initialY];     % Initial vector position

initialVelosity  = [0 0];             % drop from rest

 

% Get the mass of the two balls, and find A for each.

%use SI units everywhere

mass_1  = input('first  ball mass (lb):');

mass_2  = input('second ball mass (lb):');

 

% keep mass_1 as the larger one

if(mass_1 < mass_2)

   temp   = mass_1;

   mass_1 = mass_2;

   mass_2 = temp;

end

 

mass_1  = 0.4536 * mass_1 %convert from lb to KG

mass_2  = 0.4536 * mass_2 %convert from lb to KG

 

densityOfMetal = 7.8*1000;               % in KG/M^3

volume_1       = mass_1/densityOfMetal;  % in M^3

volume_2       = mass_2/densityOfMetal;  % in M^3


 

%find r from Volume= 4/3 PI  r^3

%

%                 V

%   r^3=       --------

%              (4/3  PI)

 

radius_1= ( volume_1 / ((4/3)*pi) )^(1/3);    % in M

radius_2= ( volume_2 / ((4/3)*pi) )^(1/3);    % in M

 

% find drag area, which is the cross sectional area of the sphere

area_1 = pi*(radius_1^2)   % in m^2

area_2 = pi*(radius_2^2)   % in m^2

 

% Set physical parameters (mass, Cd, etc.)

Cd  = 0.5;      % Drag coefficient (dimensionless)

g   = 9.81;     % Gravitational acceleration (m/s^2) near surface of earth

rho = 1.2;      % density of air

 

 

airConst        = -0.5*Cd*rho*area_1;  % Air resistance constant

istep           = 0;

currentPos      = initialPos; 

currentVelosity = initialVelosity;  % Set initial position and velocity

 

while( currentPos(2) > 0 )

  istep       = istep+1;

  currentTime = (istep-1)*tau;      

 

  % Calculate the acceleration of the ball

  accel    = (1/mass_1)*airConst*norm(currentVelosity)*currentVelosity;  % Air resistance

  accel(2) = accel(2)-g;      % Gravity

 

  % Calculate the new position and velocity using Euler method

  currentPos      = currentPos + (tau* currentVelosity);  % Euler step

  currentVelosity = currentVelosity + tau*accel;      

end

 

% this is the time it took the heavy ball to reach the ground.

recordedTime = currentTime;

 

fprintf('Time for heavy ball to reach the ground is %g (sec)\n', recordedTime);

 

%Now drop the small ball, force it to reach 2 inchess above the ground

%at the same time the large ball above reached the ground. change Cd to

%force this to happen.

 

isFoundCd = 0;

currentCd = 0.51;


 

while( ~isFoundCd )

   

   % we keep reducing air resistance, untill the small ball

   % reaches 2 inches above the graound at the same time as the

   % the large ball

   currentCd       = currentCd-0.01;

  

   airConst        = -0.5*currentCd*rho*area_2;  % Air resistance constant

   istep           = 0;

   currentTime     = 0;

   currentVelosity = initialVelosity;

   currentPos      = initialPos;

   accel           = [0 0];

  

   while( currentTime <= recordedTime )

      

      istep       = istep+1;

      currentTime = (istep-1)*tau;     % Current time

 

      %* Calculate the acceleration of the ball

      accel    = (1/mass_2)*airConst*norm(currentVelosity)*currentVelosity;   % Air resis

      accel(2) = accel(2)-g;      % Gravity

 

      %* Calculate the new position and velocity using Euler method

      currentPos      = currentPos + (tau* currentVelosity);  % Euler step

      currentVelosity = currentVelosity + tau*accel;      

   end

  

   if( currentPos(2) <= DELTA )

       isFoundCd=1;

   end

  

end

 

fprintf('Cd that will cause the small ball to reach the ground 2 inches behind the largers one is=%g\n',currentCd);

fprintf('Speed the small ball was at when it reached 2 inches before the ground =%g (M/S)\n',currentVelosity(2));

fprintf('diameter of small ball=%g Meter\n', radius_1*2);

 

 

 


 

RUN OUTPUT

 

» nma_balle_HW_2_6

 

  nma_balle_HW_2_6 - Program to analyse Galilo 2 inches claim

 

Enter timestep, tau (sec): 0.001

Height to drop the balls from (Meter):50

first  ball mass (lb):100

second ball mass (lb):1

 

mass_1 =

 

   45.3600

 

 

mass_2 =

 

    0.4536

 

 

area_1 =

 

    0.0391

 

 

area_2 =

 

    0.0018

 

Time for heavy ball to reach the ground is 3.2 (sec)

Cd that will cause the small ball to reach the ground 2 inches behind the largers one is=0.16

Speed the small ball was at when it reached 2 inches before the ground =-31.0135 (M/S)

diameter of small ball=0.223114 Meter

»


 

Analysis

 

Cd, the drag coefficient, for a smooth sphere, had to be reduced all the way to 0.16 to cause the small ball to reach the ground 2 inches behind the heavy ball.

 

Looking at the chart, for Cd=0.16, Reynold number is about 300,000

 

But

 

Reynold number = V*diameter/Viscosity.

 

The small ball had a speed of 31 M/S when it reached 2 inches above the ground, and diameter of the ball is  0.223114 Meter. So Viscosity of air had to be

 

Viscosity = V*diameter/300,000= 31*0.223114/300,000= 2.3055 x 10^-5  M^2 per second.

 

Which is about  65% higher than the expected value of 1.5x10^-5 M^2 per second. So, this means the small ball being 2 inches behind the large ball when the large ball reached the ground does not agree with the given number for viscosity of air.

 

 

 

 


Part ( C )

Cd is 0.16, which is derived in part (a). Please see part(a) for how Cd was found.