  We performed magnetohydrodynamic simulation of a formation process of coronal
mass ejections (CMEs), focusing on interaction (reconnection) between an
ejecting flux rope and its ambient field. We examined three cases with
different ambient fields: no ambient field, and cases with dipole field of two
opposite directions which are parallel and anti-parallel to that of the flux
rope surface. As a result, while the flux rope disappears in the anti-parallel
case, in other cases the flux ropes can evolve to CMEs and show different
amounts of rotation of the flux rope. The results imply that the interaction
between an ejecting flux rope and its ambient field is an important process for
determining CME formation and CME orientation, and also show that the amount
and direction of magnetic flux within the flux rope and the ambient field are
key parameters for CME formation. Especially, the interaction (reconnection)
plays a significant role to the rotation of the flux rope, with a process
similar to "tilting instability" in a spheromak-type experiment of laboratory
plasma.
