A 2D vortex panel model with a viscous boundary layer formulation has been developed for the numerical simulation of a vertical axis wind turbine (VAWT), including the operation in dynamic stall. The model uses the ‘double wake’ concept to reproduce the main features of the unsteady separated flow, including the formation and shedding of strong vortical structures and the wake–blade interaction. The potential flow equations are solved together with the integral boundary layer equations by using a semi-inverse iterative algorithm. A new criterion for the reattachment of the boundary layer during the downstroke of a dynamically stalled aerofoil is implemented. The model has been validated against experimental data of steady aerofoils and pitching aerofoils in dynamic stall at high and low Reynolds numbers (Re = 1.5 × 106 and Re = 5 × 104). For the low Reynolds number case, time-resolved 2D particle image velocimetry (PIV) measurements have been performed on a pitching NACA 0012 aerofoil in dynamic stall. The PIV vorticity fields past the oscillating aerofoil are used to test the model capability of capturing the formation, growth and release of the strong leading edge vortex that characterizes the dynamic stall. Furthermore, the forces extracted from the PIV velocity fields are compared with the predicted ones for a quantitative validation of the model. Finally, the model is applied to the computation of the wake flow past a VAWT in dynamic stall; the predicted vorticity fields and forces are in good agreement with phase-locked PIV data and CFD-DES available in the literature. Copyright © 2012 John Wiley & Sons, Ltd.