Optimization of electromagnetic energy in cold crucible used for directional solidification of TiAl alloy