Simulation code for an inductive can crusher