We present a new time-dependent leptonic code that we developed to model the varying multiwavelength (MWL) emission during blazar flares. In our modeling, we assume that the blazar emission originates from a plasma blob located in the jet, and that relativistic electrons are injected into the blob and may undergo stochastic (Fermi II) or shock (Fermi I) acceleration. We numerically solve the kinetic equation for electron evolution in the blob, taking into account particle injection, escape, acceleration and radiative cooling. In order to calculate the spectral energy distribution (SED) of the blob emission we assume a synchrotron self-Compton (SSC) scenario, including also synchrotron self absorption and gamma-gamma absorption processes. Our code computes the evolution of the electron spectrum and of the associated broad-band SED.
As a first application, we attempt to connect the continuous, steady-state emission from the blazar Mrk 421 with a flare observed in February 2010, using a minimal number of free parameters in a two-zone scenario in which a turbulent region is present around the emitting zone. Mrk 421 is a high-synchrotron-peaked (HSP) BL Lac, and one of the brightest extragalactic γ-ray sources in the Very High Energy (VHE) γ-ray band. It is also the closest TeV emitting blazar to the Earth (redshift z=0.031).