  The detected population of "spiders" has significantly grown in the past
decade thanks to multiwavelength follow-up investigations of unidentified Fermi
sources. These systems consist of low-mass stellar companions orbiting
rotation-powered millisecond pulsars in short periods of a few hours up to day.
Among them, a subset of intriguing objects called transitional millisecond
pulsars (tMSPs) has been shown to exhibit a remarkable behavior, transitioning
between pulsar-binary and faint low-mass X-ray binary states over a span of a
few years. Our objective is to study the interaction of stellar winds in tMSPs
in order to understand their observational properties. To this end we focus on
the parameter range that places the system near Roche-lobe overflow. Employing
the adaptative mesh refinement (AMR) AMRVAC 2.0 code, we performed 2D
hydrodynamical (HD) simulations of the interaction between the flows from both
stars, accounting for the effects of gravity and orbital motion. By studying
the mass loss and launch speed of the winds, we successfully recreated two
phenomenologically distinct regimes: the accretion stream and the radio pulsar
state. We also identified the tipping point that marks the sharp transition
between these two states. In the pulsar state, we reconstructed the
corresponding X-ray light curves of the system that produces the characteristic
double-peak pattern of these systems. The position of the peaks is shifted due
to orbital motion and the leading peak is weaker due to eclipsing by the
companion. We suggest that a smaller leading peak in X-rays is indicative of a
nearly edge-on system. This study highlights the importance of gravity and
orbital motion in the interaction between the companion and pulsar winds. Our
setup allows the study of the complex interaction between the pulsar wind and
an accretion stream during mass transfer.
