Induction and direct resistance heating: Theory and numerical modeling