A methodology to compute the critical current limit in Nb3Sn magnets. (22nd December 2020)