  We introduce a new solar energetic particle (SEP) transport code that aims at
studying the effects of different solar wind configurations on SEP events. We
focus on the influence of varying solar wind velocities on the energy changes
of SEPs, and study how a non-Parker background solar wind can trap particles
temporarily at small heliocentric radial distances (r<1.5 AU). Our model
computes particle distributions by solving the focused transport equation (FTE)
in a stochastic manner by propagating particles in a solar wind generated by
the heliospheric MHD model EUHFORIA. We solve the FTE, including all solar wind
effects and cross-field diffusion. As initial conditions, we inject 4 MeV
protons impulsively, and spread uniformly over a selected region at the inner
boundary of the model. To verify the model, we first assume nominal undisturbed
fast and slow solar winds. Thereafter, we analyse the propagation of particles
in a solar wind containing a corotating interaction region (CIR). The
intensity-time profiles obtained in the simulations using the nominal solar
winds illustrate the considerable adiabatic deceleration undergone by SEPs when
propagating in a fast solar wind. For the solar wind containing a CIR, we
observe particles accelerating when propagating in the compression and shock
waves bounding the CIR. These waves and the magnetic configuration near the
stream interface also act as a magnetic mirror, producing long-lasting high
intensities at small radial distances. We also illustrate how the efficiency of
the cross-field diffusion in the heliosphere is altered due to compressed
magnetic fields. Finally, cross-field diffusion enables some particles to reach
the forward shock wave, resulting in the formation of an accelerated particle
population centred on the forward shock, despite the lack of magnetic
connection between the particle injection region and this shock wave.
