Formed through magnetic field shearing and reconnection in the solar corona , magnetic flux ropes are structures of twisted magnetic field , threaded along an axis . Their evolution and potential eruption are of great importance for space weather . Here we describe a new methodology for the automated detection of flux ropes in simulated magnetic fields , based on fieldline helicity . More robust than previous methods , it also allows the full volume extent of each flux rope structure to be determined . Our Flux Rope Detection and Organization ( FRoDO ) code is publicly available , and measures the magnetic flux and helicity content of pre-erupting flux ropes over time , as well as detecting eruptions . As a first demonstration the code is applied to the output from a time-dependent magnetofrictional model , spanning 1996 June 15 - 2014 February 10 . Over this period , 1561 erupting and 2099 non-erupting magnetic flux ropes are detected , tracked , and characterized . For this particular model data , erupting flux ropes have a mean net helicity magnitude of ( 2.66 \pm 6.82 ) \times 10 ^ { 43 } Mx ^ { 2 } , while non-erupting flux ropes have a significantly lower mean of ( 4.04 \pm 9.25 ) \times 10 ^ { 42 } Mx ^ { 2 } , although there is overlap between the two distributions . Similarly , the mean unsigned magnetic flux for erupting flux ropes is ( 4.04 \pm 6.17 ) \times 10 ^ { 21 } Mx , significantly higher than the mean value of ( 7.05 \pm 16.8 ) \times 10 ^ { 20 } Mx for non-erupting ropes . These values for erupting flux ropes are within the broad range expected from observational and theoretical estimates , although the eruption rate in this particular model is lower than that of observed coronal mass ejections . In future the FRoDO code will prove a valuable tool for assessing the performance of different non-potential coronal simulations and comparing them with observations .