Numerical study on terahertz detection of MOS field-effect transistor