Abstract
We present a numerical code for fluid–structure interactions to solve the problem of waterhammer in pipes with thin walls. The pipe is modeled by planar beams theory of Bernoulli–Euler in longitudinal and transverse vibrations. This code is the coupling of the finite element method combined with the Newmark algorithm for movement of the pipe wall, and, for the fluid, the method of characteristics. Unlike the classical theory, this code illustrates the side effects of fluid–structure interaction affecting parameters of waterhammer in elastic and viscoelastic pipe