  Magnetic flux emergence from the solar interior to the atmosphere is believed
to be a key process of formation of solar active regions and driving solar
eruptions. Due to the limited capability of observation, the flux emergence
process is commonly studied using numerical simulations. In this paper, we
developed a numerical model to simulate the emergence of a twisted magnetic
flux tube from the convection zone to the corona using the AMR--CESE--MHD code,
which is based on the conservation-element solution-element method with
adaptive mesh refinement. The result of our simulation agrees with that of many
previous ones with similar initial conditions but using different numerical
codes. In the early stage, the flux tube rises from the convection zone as
driven by the magnetic buoyancy until it reaches close to the photosphere. The
emergence is decelerated there and with piling-up of the magnetic flux, the
magnetic buoyancy instability is triggered, which allows the magnetic field to
partially enter into the atmosphere. Meanwhile, two gradually separated
polarity concentration zones appear in the photospheric layer, transporting the
magnetic field and energy into the atmosphere through their vortical and
shearing motions. Correspondingly, the coronal magnetic field has also been
reshaped to a sigmoid configuration containing a thin current layer, which
resembles the typical pre-eruptive magnetic configuration of an active region.
Such a numerical framework of magnetic flux emergence as established will be
applied in future investigations of how solar eruptions are initiated in flux
emergence active regions.
