Generation of THz radiation using bulk, periodically and aperiodically poled lithium niobate – Part 1: Theory