A numerical simulation of fluid-structure interaction in internal flows