Implementation of a variational approach to approximate particle number projection with effective forces