A multiscale approach to nanocomposite electrical generators