A study concerning the influence of flow on the Herschel–Quincke duct is presented here, which includes the numerical model, the acoustic source and the absorption condition called the Perfectly Matched Layer. For the excitation of a sound field, a normal mode wave is placed at the inlet of the tube. The function of PML is to simulate the infinite tube and avoid the reflection of acoustic wave. To investigate the influence of flow field on sound field, a coupled calculation method combining the finite element method and computational fluid dynamics is used to solve the linearized Euler equation, named the Galbrun equation. Firstly, the influence of the cross-section of the tube on the acoustic field is considered. Secondly, the effects of flow on the acoustic field is also investigated. Lastly, a comparative analysis of the simulation results reveals the influence of flow and other parameters of the tube on sound propagation. Both the Mach number and the cross-section ratio have an influence on the acoustic resonance, and the resonance frequency decreases with the increase in the cross-section ratio.