  Our aim is to study the photospheric flux distribution of a twisted flux tube
that emerges from the solar interior. We also report on the eruption of a new
flux rope when the emerging tube rises into a pre-existing magnetic field in
the corona. To study the evolution, we use 3D numerical simulations by solving
the time-dependent and resistive MHD equations. We qualitatively compare our
numerical results with MDI magnetograms of emerging flux at the solar surface.
We find that the photospheric magnetic flux distribution consists of two
regions of opposite polarities and elongated magnetic tails on the two sides of
the polarity inversion line (PIL), depending on the azimuthal nature of the
emerging field lines and the initial field strength of the rising tube. Their
shape is progressively deformed due to plasma motions towards the PIL. Our
results are in qualitative agreement with observational studies of magnetic
flux emergence in active regions (ARs). Moreover, if the initial twist of the
emerging tube is small, the photospheric magnetic field develops an undulating
shape and does not possess tails. In all cases, we find that a new flux rope is
formed above the original axis of the emerging tube that may erupt into the
corona, depending on the strength of the ambient field.
