You will find attached a simple example that will get you started on the absorption calculation of an array of Si nanowires. You only need to simulate one unit cell with periodic boundary conditions (PBCs) to get the correct result. The simulation calculates the transmission and reflection spectra from the array and then using some simple Matlab code you can transform it into an absorbance spectrum. We have a great application note on silicon nanowires used in photovoltaic applications at:
This simulation reproduces the results of .
 L. Hu and G. Chen, “Analysis of Optical Absorption in Silicon Nanowire Arrays
for Photovoltaic Applications,” Nano Letters, vol. 7, no. 11, pp. 3249-3252.