A micromechanical numerical analysis for a triaxial compression of granular materials