A general automatic optimization procedure coupled to a finite element induction heating process simulation has been developed. The mathematical model and the numerical methods are presented along with results validating the model. The first part of this paper presents the direct induction heating mathematical model, the related main numerical choices and especially the ultra-weak coupling procedure. The general optimization problem is then presented with the full detailed transposition of the ultra-weak coupling procedure to the adjoint problem. Numerical results provided at the end prove the efficiency and robustness of the adjoint model in optimizing induction heating processes.