  We perform a data-constrained simulation with the zero-$\beta$ assumption to
study the mechanisms of strong rotation and failed eruption of a filament in
active region 11474 on 2012 May 5 observed by Solar Dynamics Observatory and
Solar Terrestrial Relations Observatory. The initial magnetic field is provided
by nonlinear force-free field extrapolation, which is reconstructed by the
regularized Biot-Savart laws and magnetofrictional method. Our simulation
reproduces most observational features very well, e.g., the filament
large-angle rotation of about $130 ^{\circ}$, the confined eruption and the
flare ribbons, allowing us to analyze the underlying physical processes behind
observations. We discover two flux ropes in the sigmoid system, an upper flux
rope (MFR1) and a lower flux rope (MFR2), which correspond to the filament and
hot channel in observations, respectively. Both flux ropes undergo confined
eruptions. MFR2 grows by tether-cutting reconnection during the eruption. The
rotation of MFR1 is related to the shear-field component along the axis. The
toroidal field tension force and the non-axisymmetry forces confine the
eruption of MFR1. We also suggest that the mutual interaction between MFR1 and
MFR2 contributes to the large-angle rotation and the eruption failure. In
addition, we calculate the temporal evolution of the twist and writhe of MFR1,
which is a hint of probable reversal rotation.
