Model nuclear energy density functionals derived from ab initio calculations