An adaptive mesh refinement (AMR) method based on discretization matrix metric is described. The computational algorithm is implemented using OpenFOAM parallel library. This open C++ library provides data structures and routines to work with the finite volume method and adaptive mesh. The method was used for oil flow in final drive simulation. For more efficient use of computing resources, we d...