# Simulation of Compressed Air Driven Piston

 P: 2 I suppose this is a lot to ask in one post, but I have made a start on this. I will run through the sequence of events and describe the formulas I have, or have identified so far. The process begins with a hammer striking a valve to open the seal. This can be modeled as a collision over time and a series of forces (force of hammer, force of spring sealing valve and force of air pressure inside valve): Force (change with time) = mass * acceleration (change with time) Then simply conserve momentum over time: Valve --- Kg m/s (change with time) ---> <--- Kg m/s (change with time)--- Hammer Net force <--- Kg m/s (change with time) ---> Determining how long the valve will stay open is basic speed = distance /time. We can calculate the velocity using the conservation of momentum: Force (Valve - change with time) + Force (Hammer - change with time) = Mass (Valve) + Mass (Hammer) Mass / Force (change with time) = velocity (change with time) We can then calculate the distance the valve seal will move and compare that with size/volume of the valve opening. This then leads to air rushing into the valve and where the equation begin to become complex. I think I can model this as a flow through an orifice. As such, I have identified the following formulas (MATLAB comments): % Density of air % % Assumed to be: % 1. Sea level % 2. 15 °C % % d = p /Rs T % where: % d = air density (kg/m3) % p = absolute pressure (nm-2) - 101325 % T = absolute temperature (K) - 288.15 % Rs = specific gas constant for dry air is 287.058 J/(kg·K) % % d = 101325 / (287.058 * 288.15) % d = 1.2249781262066510570904764201612 kg/m3 % % Air Velocity % % v = 278.27 * (Math.sqrt(static pressure / Atmospheric density) % v = 278.27261838130327370844581361742 * (Math.sqrt(13999999 / 1.225) % v = 940,724.26425592028024204853937945 m/s % %v = 278.27 * (Math.sqrt(13999999 / 1.225) % % % Flow through Orifice % % Q = Cd A [2 #p /Ad] ^ 0.5 % where: % q = Flow rate (m3/s) % Cd = Discharge coefficient % A = surface area of opening (m2) % #p = Pressure difference (change with time) % Ad = air density My question at this point is, can I model this as a flow through an orifice? If so, how do I determine the 'Discharge Coefficient' without experimental data? Then how do I deal with the geometry of the transfer pipe between the valve and cylinder? What if it had a 90 degree turn, rather than being just a straight tube? Finally, I notice that effects can be back-propagated in this system. Does this change any of the formula in any way?