Constitutive model of rock based on microstructures simulation