Multiscale modeling of polymer nanocomposites