Calculating the natural frequency of dams is an essential part of its seismic behavior analysis. Therefore, it is important to calculate the natural frequency. This paper aims simulation and analysis the finite element (FE) model of the Koyna concrete gravity as a case study. For the investigation of the suitable mesh size to achievement the grid independence, the element size considered as a variable parameter and calculated its optimized value by using the Response Surface Optimization (RSO) method. In the independent grid, the Error Contour utilized for controlling mesh quality, which indicates fast variations of the energy in the adjacent elements and can recognize parts of the model that has a high error in calculating responses. The modal response of the dam with a rigid and flexible foundation with and without mass were appraised. The results indicated that modal frequencies in the condition of with and without Pre-stress were different value in all cases. Moreover, the frequency of first four modes by increasing mass and decreasing the stiffness of foundation, frequencies in the case without initial condition (without Pre-stress) has a slightly increased and in the case with initial condition (Pre-stress) had considerable decrease.