Recent observations of solar flares at high frequencies have provided evidence of a new spectral component with flux increasing with frequency in the THz range. Its origin remains unclear. Here, we present preliminary results of simulations of synchrotron emission due to secondary positrons and electrons produced in nuclear reactions during a solar flare. We use the general purpose Monte-Carlo code FLUKA to obtain distributions of secondary particles resulting from accelerated protons interacting in the solar atmosphere. We calculate the synchrotron radiation spectrum and compare our results to observations of the November 4th, 2003 burst event.