We propose a versatile THz source named FLUTE (Ferninfrarot Linac- Und Test-Experiment) based on a 30 - 50 MeV S-band linac with bunch compressor, that aimsat not only producing high field THz pulses but also at serving as a test facility to study accelerator physics issues. This source is an important step towards the planned ultra-broadband THz to mid infrared user facility TBONE. Special emphasis is put on studies of bunch compression as a function of bunch charge (0.1-5 nC) and of different generation mechanisms of coherent radiation (CSR, CER, CTR). This paper describes the design and layout of the proposed FLUTE machine and presents results of beam dynamic calculations with the tracking programs ASTRA and CSRtrack. In addition, calculations for the achievable peak electrical field and spectral characteristics for one version of the FLUTE layout are shown