Re: IRF GETTING HOT.
Vd high peaks is as expected when no snubber in the primary circuit.
when Vg switches on, notice the Vd dropping towards 0V, then ramps up as current flows
through the inductor.
When Vg switches off, the circuit current must continue in the opposite direction, so it
rises until the Max Vds of the mosfet is reached, then it conducts across the mosfet. It continues to ring between that and the body diode allowing conduction also.
So, put a snubber circuit in.
You should also investigate Vgs not going fully to 0V, it needs to if you want any
decent efficiency.
search for "totem pole driver"