High current digital potentiometer?

If you got that schematic off the net the diode you are using is not what is called for. Here is a link to a Schottky diode.
You can move your 1n4007 across the load as Mike recommended (the correct location for a flywheel diode is across the load) and add a schottky diode in the location shown on your schematic. The flywheel diode across the load is the most important so move your diode before using the circuit again. Did you measure the coil resistance of that hand-wound solenoid ? Do you have any information on that (number of turns, core material ?coil resistance?)