qpv-research-group / rayflare

Open-source, integrated optical modelling of complex stacks
Other
31 stars 11 forks source link

How to calculate R_per_layer and T_per_layer? #59

Closed loongmxbt closed 11 months ago

loongmxbt commented 1 year ago

Please, confirm the following:

What’s the question? Hi, I'm trying this package for solar study. I can model multiple layers and successfully run .calculate, the outcome contains R,T,A_per_layer.

Eva_layer = [Layer(material=Eva_cell, width=si('1620nm'), geometry=[{'type': 'rectangle', 'mat': Eva_cell, 'center': (0, 0),
                                                                     'halfwidths': (900,900), 'angle':0}])]
Si_layer = [Layer(material=Si_cell, width=si('1000nm'), geometry=[{'type': 'rectangle', 'mat': Si_cell, 'center': (0, 0),
                                                                     'halfwidths': (900,900), 'angle':0}])]
solar_cell = SolarCell(Eva_layer + list_Si3N4_layer + list_si_layer + Si_layer)

S4_setup = rcwa_structure(solar_cell, size=size, options=options, incidence=Air, transmission=Air)
RAT = S4_setup.calculate(options)

I can get "A_per_layer" and "R" and "T", but how can I get R_per_layer and T_per_layer? I assume A_per_layer+T_per_layer+R_per_layer=1. And I have a second question, how to calculate light intensity per layer based on R,T,A_per_layer? Wish to get some help!

Additional information Add any other relevant information that could help us answering your question, E.g.:

phoebe-p commented 1 year ago

Hi @loongmxbt, R_per_layer and T_per_layer are not returned, since they do not have a very clear meaning; light will interfere within the layers, so depending on the height within each layer they will change! Basically, R is ill-defined in absorbing layers (see the appendices here: https://arxiv.org/abs/1603.02720). S4 (which is used to run the RCWA calculations) can return power fluxes at a specified depth, which are currently used to calculate absorption profiles, so if you need those I can see about passing them as results from the "calculate" method, but these values are generally not very useful for simulating solar cells.. You can get the overall reflectance (into Air)/transmission (in this case, also into Air) of the structure from RAT["R"] or RAT["T"]. R + T + A = 1 for the whole structure.

I am not sure what you mean by "light intensity per layer"; do you mean E/H field profiles? Absorption profile? Something else?

loongmxbt commented 1 year ago

Hi @phoebe-p, thank you very much for your kind answer! After days of studying, we finally corrected our previous understanding.

"light intensity per layer" we originally meant in every depth x(nm), there is a I(wavelength, x) curve (something like AM1.5 curve).