Study of flapping filaments using the immersed boundary-lattice Boltzmann method