To help you solve the issue, I used the lumerical example:
Please, try “usr_absorption.fsp” file with the script I attached to the post.
In the script, I’ve got rid of the routines that had been used for purposes not relevant to your problem.
The script integrates the absorbed power other the entire z span accesible stored by Pabs.z array.
usr_absorption_INTEGRAL_OVER_Z.lsf (908 Bytes)
I wonder why are you using the TFSF source ?
For your structure simulation can be performed following this way, but don’t forget to change the source type to plain wave if neccessary.
Does this help?