Lattice Boltzmann method simulation on the flow of two immiscible fluids in complex geometry