Based on the open source OpenFOAM software package, a computational fluid dynamic model for two-phase incompressible flow (air and water) is developed to study the correlation of the optimal chamber width with the relative front wall draught of the onshore Oscillating Water Column (OWC) device. The numerical model is firstly validated by comprising the predicted results with the corresponding experimental data for wave interaction with the fixed offshore and onshore OWC devices with different opening ratios. The validated model is applied to study the influence of the front wall draught and the chamber width on the wave energy conversion efficiency of the onshore OWC device. Phase differences of the water surface fluctuations inside and outside the chamber are discussed. Based on the numerical results, an exponential fitting formula is proposed to describe the correlation between the optimal relative chamber width and the relative front wall draught, and wavelength is also included in the fitting formula to consider the effect of wave conditions. Good agreements are found between the predicted results by the proposed fitted formula and the existing data in the literatures related to the onshore OWC device with different opening rates and wave conditions.