Abstract : The industrial aluminium production involves several aspects as chemistry, thermodynamics and magnetohydrodynamics (MHD). One of its particularities is the coexistence in a ceil of two immiscible fluids, which leads to the presence of a free interface. This process consumes 2% of the world-wide electricity, the half being due to thermal losses by Joule effect. The challenge is to reduce this cost without destabilizing the process; this is typically an optimal control problem, that we treat by considering an MHD modelling of the ceil. Two ways are used to perform this optimization, namely considering a nonlinear state constraint based on a coupling between the Maxwell and multifluid Navier-Stokes equations, and a linear one resulting from a shallow water approximation of the previous one. After a short introduction to the modelling and to the Pon tryagin (adjoint-based) optimal control techniques, we flrst describe the control of the evolution of the interface modelled by the shallow water approximation. Then we present the parallelization of the nonlinear solver and the numerical research of a control. Finally, an optimization algorithm for the interface shape is proposed in a simplified nonlinear two-fluid framework (2-d Navier-Stokes equations).