MHD simulation of emerging flux tube in the sun