Simulation of nanopowder compaction in terms of granular dynamics