  Numerical simulations of radiative processes in magnetized compact sources
such as hot accretion disks around black holes, relativistic jets in active
galaxies and gamma-ray bursts are complicated because the particle and photon
distributions span many orders of magnitude in energy, they also strongly
depend on each other, the radiative processes behave significantly differently
depending on the energy regime, and finally due to the enormous difference in
the time-scales of the processes. We have developed a novel computer code for
the time-dependent simulations that overcomes these problems. The processes
taken into account are Compton scattering, electron-positron pair production
and annihilation, Coulomb scattering as well as synchrotron emission and
absorption. No approximation has been made on the corresponding rates. For the
first time, we solve coupled integro-differential kinetic equations for photons
and electrons/positrons without any limitations on the photon and lepton
energies. A numerical scheme is proposed to guarantee energy conservation when
dealing with synchrotron processes in electron and photon equations. We apply
the code to model non-thermal pair cascades in the blackbody radiation field,
to study the synchrotron self-absorption as particle thermalization mechanism,
and to simulate time evolution of stochastically heated pairs and corresponding
synchrotron self-Compton photon spectra which might be responsible for the
prompt emission of gamma-ray bursts. Good agreement with previous works is
found in the parameter regimes where comparison is feasible, with the
differences attributable to our improved treatment of the microphysics.
