In the face of increasing emission restrictions and the parsimony of conventional fuels, dual fuel engine is presented as a promising solution that is satisfactory for environmental and economic aspects. However, this type of engine is limited by certain problems such as knocking, which negatively influences overall operation. For this reason and for optimal engine operation, prediction of this undesirable auto-ignition is essential. The approach developed in this work for this purpose, is based on dividing the combustion chamber into two zones to follow the thermodynamic properties of the unburnt gases where knock may occur. This thermodynamic modeling is coupled with a model based on Arrhenius equation for the auto-ignition delay as a function of crank angle. In addition, in order to make the model more predictive with the minimum of parameters to be calibrated experimentally, an analysis of variables is used for different engine conditions. The selected parameters undergo a correction before being modeled according to response surfaces methodology. After validation of the model using experimental results, it is coupled with a CFD calculation model to develop a global approach aimed at preventing knocking during dual fuel mode. The model makes it possible to predict knock onset with good precision. Consequently, preventing this phenomenon is possible. Water injection technique is therefore used for this objective. Accurate prediction was useful for knock avoidance via water injection strategy. Our results confirmed the effectiveness of this technique, justified mainly by water injection characteristics. The precision of the instant of knocking predicted by the developed model implied an optimal instant for water injection. Overall, this global model can be considered as a valuable means for knock prediction and prevention in dual fuel mode.