Application of RCWA method to optoelectronic numerical simulations of 2D nanostructures