Discrete modeling of a transformer with ALEGRA.