In this paper, an optimal control problem for a concrete dam system is considered. First, a mathematical model on the optimal osmotic control for basis of concrete dams is built up, and an optimal line-wise control of the system governed by the hybrid problem for elliptic partial differential equations is investigated. Then, the regularity of the generalized solution to the adjoint state equations, and the existence and uniqueness of the L 2 -solution for state equations are discussed and examined. Subsequently, the existence and uniqueness of the optimal control for the system, and a necessary and sufficient conditions for a control to be optimal and the optimality system are claimed and derived. Finally, the applications of the penalty shifting method with calculation of the optimal control of the system are studied, and the convergence of the method on an appropriate Hilbert space is claimed and proved.