http://weelookang.blogspot.sg/2015/07/ejss-standing-wave-in-pipe-model.html

http://weelookang.blogspot.sg/2012/01/ejs-open-source-standing-wave-in-fixed.html

Standing waves in a pipe

Let us consider a narrow pipe along the OX axis. Each end may be open or closed. The simulation will display the first 5 normal modes, which are
  1. u(t,x) = A sin(n π x) cos(ω t + δ) when both ends are closed.
  2. u(t,x) = A sin((n-1/2) π x) cos(ω t + δ) when the left end is closed and the right end open.
  3. u(t,x) = A cos((n-1/2) π x) cos(ω t + δ) when the left end is open and the right end closed.
  4. u(t,x) = A cos(n π x) cos(ω t + δ) when both ends are open.