Ask the diesel engine manufacturer for % of heat input (around 26%) that goes out the stack, normal stack tempeature without heat recovery & minimum allowable stack temperature with heat recovery. Do not operate lower than the allowable temperature or you will get condensation & rust out your engine. Also make sure you provide means of blowing out soot or your heat exchanger will live for only about 2 years. If only gas fired then soot should not be a problem.