Engineering
Pneumatic cylinder
Drive a carriage with compressed air and watch the two chambers fill and empty through choked orifices: throttling the inlet leaves the piston on a soft cushion while throttling the exhaust holds it stiff between two high pressures. Shut both ports to make a gas spring whose frequency the trapped air sets, and compare a chamber that compresses adiabatically with one that stays at the wall’s temperature.

What happens
A 40 mm cylinder with a 16 mm rod pushes a 5 kg carriage along a 300 mm stroke from a 6 bar supply. Each chamber keeps its own mass and temperature: air enters and leaves through orifices with the St. Venant–Wantzel flow function, choked below the critical pressure ratio 0.528, and the energy balance d(m·c_v·T) = c_p·T_in·G_in − c_p·T·G_out − p·dV + h·A·(T_w − T) makes a chamber adiabatic without heat transfer and isothermal with much of it. The throttle sits on the inlet (meter-in) or the exhaust (meter-out); with both ports shut the trapped air is a spring of stiffness γ·p·A²/V. RK4 at 10 µs, with the air drawn, exhausted and breathed in booked so the mass balance closes.
Try this
Extend with the throttle on the inlet, then on the exhaust, and compare the chamber pressures; shut both ports mid-stroke and watch the carriage bounce on the gas spring; set the heat transfer to zero and read the compression heating.
The model and its limits
Ideal gas with constant heat capacities, orifices with a constant discharge coefficient, uniform chamber temperature, a constant wall temperature; friction smoothed over 1 mm/s. Not a sizing tool.
Equations used in the module
Equations G = C_d·A·p_u·√(γ/(R·T_u))·(2/(γ+1))^((γ+1)/(2(γ−1))), r ≤ 0.528 G = C_d·A·p_u·√(2γ/((γ−1)·R·T_u))·√(r^(2/γ) − r^((γ+1)/γ)) d(m·c_v·T)/dt = c_p·T_in·G_in − c_p·T·G_out − p·dV/dt + h·A·(T_w − T) ω² = γ·(p_A·A_p²/V_A + p_B·A_r²/V_B)/m


