This paper reports the effects of engine design and operating parameters such as stroke length, ratio of bore to stroke length, compression ratio, equivalence ratio, engine load, biodiesel percentage, friction coefficient, engine speed and mean piston speed on engine performance and energy losses by experiments and a theoretical model based on the finite-time thermodynamics. In this study, the performance of a single cylinder, four-stroke, direct injection diesel engine fueled with diesel-biodiesel mixtures has been experimentally and theoretically investigated. The simulation results agree with the experimental data. After model verification, parametrical studies have been conducted for various conditions. The results showed that the biodiesel percentage and the cycle pressure ratio affect positively the engine performance. The friction coefficient has negative influence on the engine performance. The effective efficiency decreases with the increasing of the engine load, stroke length, and engine speed but effective power increases with increasing them. The effective power always increases with the increasing mean piston speed. However, the effective efficiency decreases at the constant stroke length condition, as it increases at the constant engine speed condition. The effective power and the effective efficiency increase with increasing equivalence ratio to a specified value and then begin to decrease for constant bore/stroke length conditions. The effective efficiency increases with decreasing equivalence ratio as effective power has an optimum value for constant compression ratio condition. The effects of bore/stroke length change at different conditions. At the constant compression ratio condition, the engine performance increases with increasing ratio of bore to stroke length. They are the optimum values which provide the maximum effective efficiency and maximum effective power at the other conditions. This study also reports the energy losses as the ratio of fuel energy and they are classified as friction losses, incomplete combustion losses, heat transfer losses, and exhaust losses. They are defined with respect to compression ratio. With the increasing compression ratio, the friction losses are constant for constant cycle temperature ratio and equivalence ratio, whereas the incomplete combustion losses increase at a constant cycle temperature ratio condition and are constant at constant equivalence ratio condition. The heat transfer losses increase and the exhaust losses decrease for both the conditions. The presented model could be used to optimize the performance of diesel engines fueled with biodiesel and it can be developed for all kinds of engines running at different conditions with various fuels. (C) 2016 AIP Publishing LLC.