In this study a computational model to simulate the operation of a diesel engine fuelled by blends of 95% diesel oil + 5 % biodiesel (B5) and anhydrous ethanol was developed. The model was developed using the Engineering Equation Solver (EES) software and calculates fuel and air properties and the thermodynamic processes of the engine cycle. Ethanol injection was investigated by two different techniques: direct injection in the combustion chamber, together with B5, and indirect injection in the intake air system, with B5 being directly injected in the combustion chamber. Fuel/air mixture equivalence ratio, compression ratio, and the injected amount of ethanol were varied to obtain the cycle temperature and pressure diagrams, fuel consumption, indicated power, and exhaust gas composition. Fuel/air mixture equivalence ratio was varied from 0.7 to 0.9, compression ratio was varied from 15:1 to 19:1, directly injected ethanol concentration was varied up to 20 % of the total fuel amount injected, and intake system injected ethanol concentration was varied up to 50 % of the total fuel amount injected. The results demonstrate that the use of ethanol can reduce carbon monoxide (CO) and oxides of nitrogen (NOX) emissions, slightly penalizing the net cycle work and increasing fuel consumption. Direct ethanol injection in the combustion chamber was shown to be more advantageous technique than indirect ethanol injection in the intake system.