  In this paper, we study the dynamics of a trapped atom interferometer with
internal state labelling in the presence of interactions. We consider two
situations: an atomic clock in which the internal states remain superposed, and
an inertial sensor configuration in which they are separated. From the average
spin evolution, we deduce the fringe contrast and the phase-shift. In the clock
configuration, we recover the well-known identical spin rotation effect (ISRE)
which can significantly increase the spin coherence time. We also find that the
magnitude of the effect depends on the trap geometry in a way that is
consistent with our recent experimental results in a clock configuration [M.
Dupont-Nivet, and al., New J. Phys., 20, 043051 (2018)], where ISRE was not
observed. In the case of an inertial sensor, we show that despite the spatial
separation it is still possible to increase the coherence time by using mean
field interactions to counteract asymmetries of the trapping potential.
