Labels

Monday, September 21, 2020

The derivation of sound speed

Consider the sound wave propagating through a pipe with cross-section area $A$. In time interval $dt$ it moves through a tube of length $dz=vdt$. In the steady state, the mass flow rate $dm/dt=\rho v A$ must be the same at the ends of the tube, therefore the mass flux $j=\rho v = const. \to v d\rho=-\rho dv$. The pressure-gradient force provides the acceleration and apply the Newton's second law,

\[ \rho \frac{dv}{dt} =-\frac{dP}{dz} \]

\[\to dP= -\rho\frac{dv}{dt}dz = -\rho \frac{dz}{dt}dv =(-\rho \frac{dv}{dt})v = v^2d\rho .\]

And therefore,

\[ v^2=\frac{dP}{d\rho} ,\]

where, $P$ is the gas pressure, $\rho$ is the density.

Reference:

https://en.wikipedia.org/wiki/Speed_of_sound#:~:text=The%20speed%20of%20sound%20is,a%20mile%20in%204.7%20s.

Thursday, September 17, 2020

Play open red alert on chromebook

 

Command & Conquer: Red Alert is a real-time strategy game of the Command & Conquer franchise.

It is easy to play the classic open red alert game on Chromebook once you get the Linux beta.

method 1

  sudo apt update
  sudo apt install snapd
  sudo snapd install openra
  
method 2
wget https://github.com/OpenRA/OpenRA/releases/download/release-20200503/OpenRA-Red-Alert
-x86_64.AppImage
sudo chmod +x OpenRA-Red-Alert-x86_64.AppImage
./OpenRA-Red-Alert-x86_64.AppImage
enjoying your game!