The investigation of dynamics of the small scale magnetic field on the Sun photosphere is necessary to understand the physical processes occurring in the higher layers of solar atmosphere due to the magnetic coupling between the photosphere and the corona. We present a simulation able to address these phenomena investigating the statistics of magnetic loops reconnections. The simulation is based on N-body model approach and is divided in two computational layers. We simplify the convection problem, interpreting the larger convective scale, mesogranulation, as the result of the collective interaction of convective downflow of granular scale. The N-body advection model is the base to generate a synthetic time series of nanoflares produced by interacting magnetic loops. The reconnection of magnetic field lines is the result of the advection of the magnetic footpoints following the velocity field generated by the interacting downflows. The model gives a quantitative idea of how much energy is expected to be released by the reconfiguration of magnetic loops in the quiet Sun.