In: Physics
Write a simple matlab program to model the position, velocity, and acceleration over time of Ruchardt's experiment as a harmonic oscillator.
I cannot provide the exact Matlab code here but I can try to explain the problem and the solution and can provide an algorithm that can be used to write a program in any computer language.
Ruchardt's experiment is a method to find out the Heat Capacity ratio . Schematically the experimental set-up is described in Fig. 1
Fig. 1 a piston of mass "M" inside a tube (with its mouth open in both ends) tightly inserted inside a gas vessel. In equilibrium the gas pressure and the volume inside the vessel and hence the tube (below the piston) are and .
The atmospheric pressure () plus the weight () of the piston are trying to push the piston down the tube but the gas pressure from below () is pushing it upwards as a result the piston is in equilibrium, therefore the gas pressure:
------------------------(1)
Where is the area of the tube (Pressure = Force per unit area).
If the piston moves a tiny distance "" away from the equilibrium point (in either direction) the pressure will change by a tiny amount from the equilibrium on the piston resulting in a force:
------------------------------(2)
Solution of this equation can tell us about the position and velocity , but in order to solve it we have to cast in terms of position, to do that we can right change in pressure in terms of volume change (area times distance moved), using the gas law:
---------------------------------(3)
Let's substitute this from Eq. (3) in Eq. (1), therefore:
---------------------------(4)
Equation (4) gives the acceleration of the piston and answers one third of the question. Eq. (4) is clearly the Stroke's law where in our case is given by
-----------------------(5)
And we know hat the solution of Stroke's equation is the Simple Harmonic Motion, Eq. (4) is like the equation of motion of a mass hanging at the bottom end of a spring with spring constant , the time period in terms of and is given by:
-------------------------(6)
Corresponding angular frequency is given by:
----------------------(7)
Now that we know the angular frequency, writing down the position as a function of time is simple, just the standard Simple Harmonic Oscillator solutions:
--------------------(8)
Where is just a constant phase that depends on the initial condition you choose, for example if you decide that at you released the piston from the equilibrium position, in other words, initially , in that case you can choose . is the maximum vertical distance the piston moves and clearly it is the distance that the piston travels in when starting at from the equilibrium position.
Velocity can be obtained by simply taking a time derivative of Eq. (9)
-------------(10)
Let us now right down all the results together:
Position:
---------------(11)
Velocity:
------------(12)
Acceleration:
------------------(13)
Where
When one measures the time period or the angular frequency in the experiment and inputs the known parameters , , and , one can calculate easily using Eq. (6) or (7).
Now about a computer algorithm:
Declare the input parameters, in this case:
, , , and (this last one of course can be set to 0). Define the functions , and of time using Eq. (11), (12) and (13) and plot these position, velocity and acceleration functions.