NOVELTY - Producing biodiesel from a triglyceride feedstock (12), comprises: pretreating the triglyceride feedstock by thermal cracking or rapid pyrolysis to remove contaminants and convert triglycerides to form a middle distillate fraction (22); conducting vapor phase esterification of the middle distillate fraction to produce a biodiesel stream; treating the biodiesel stream with a basic solution to convert residual free fatty acids to non-foaming metallic soaps; and separating the non-foaming metallic soaps by vacuum distillation, centrifugation, and/or filtering.    USE - The method is useful for producing biodiesel and biodiesel/naphtha mixture (claimed), which are useful as fuel.    ADVANTAGE - The method converts triglycerides, particularly low quality and waste triglyceride feedstocks, to biodiesel that is both efficient and economical. Thermal cracking removes contaminants found in waste triglycerides, which can cause problems downstream. The esterification at higher temperatures circumvents the catalysis quenching by water. The rapid pyrolysis of triglycerides produces larger proportion of middle distillates than thermal cracking. The catalyst enhances the selective cracking of triglyceride molecules to largely free fatty acid molecules. The rapid pyrolysis of triglycerides reduces the nitrogen and sulfur content. The nitrogen content in the middle distillate obtained by mild thermal cracking was 5200 ppm whereas the middle distillate obtained by rapid pyrolysis was 0.3 ppm, which was more advantageous since the presence of nitrogen diminishes the quality of the final biodiesel product. The acid esterification is operated under vacuum and high temperature to achieve free fatty acids conversion of higher than 97% in less than 10 minutes. The base treatment step results in a mixed biodiesel/diesel product that has excellent fuel properties. The sewage sludge provides a preferred balance between higher middle distillate yield and lower coke formation.    DETAILED DESCRIPTION - Producing biodiesel from a triglyceride feedstock (12), comprises: pretreating the triglyceride feedstock by thermal cracking or rapid pyrolysis to remove contaminants and convert triglycerides to form a middle distillate fraction (22) rich in free fatty acids; conducting vapor phase esterification of the middle distillate fraction under vacuum and in the presence of an alcohol and a solid acid catalyst to produce a biodiesel stream; treating the biodiesel stream with a basic solution to convert residual free fatty acids to non-foaming metallic soaps; and separating the non-foaming metallic soaps by vacuum distillation, centrifugation, and/or filtering. An INDEPENDENT CLAIM is included for a method of producing a biodiesel/naphtha mixture from a triglyceride feedstock, comprising: pretreating the triglyceride feedstock by thermal cracking or rapid pyrolysis to remove contaminants and convert triglycerides to produce a middle distillate fraction rich in free fatty acids, a naphtha stream and a gas stream; conducting vapor phase esterification of the middle distillate fraction under vacuum and in the presence of an alcohol and a solid acid catalyst to produce a mixed biodiesel/naphtha stream; treating the mixed biodiesel/naphtha stream with a basic solution to convert residual free fatty acids to non-foaming metallic soaps; and separating the non-foaming metallic soaps by vacuum distillation, centrifugation, and/or filtering.    DESCRIPTION OF DRAWING(S) - The figure shows a method of producing biodiesel from a triglyceride feedstock.    Thermal cracking unit (10)    Triglyceride feedstock (12)    Esterification unit (20)    Middle distillate fraction (22)    Alcohol stream. (24)