Received (Day Month Year) Revised (Day Month Year) Communicated by (xxxxxxxxxx) We formulate and analyze a model for the study of finite clusters of atoms or localized defects in infinite crystals based on orbital-free density functional theory. We show that the resulting constrained optimization problem has a minimizer and we provide a careful analysis of the solubility of the Euler–Lagrange equations. Based on these results, and using tools from saddle-point theory and nonlinear analysis, we then show that a Galerkin discretization has a solution that converges to the correct limit.