Open michelgaglioni opened 2 years ago
Yes, you would need to add multiple layers and staircase approximate your pyramid. This can actually have substantial affects on your results if you don’t add enough layers, but simulation time scales linearly with the number of layers. The trade off between accuracy and speed is a decision you must make.
Alright then. One more question, if it's not to bother: is there a way to use a for loop to create various tappered layers, or would I have to add each layer manually by the function S:AddLayer? If possible, could you give me an example of that?
Thanks again!
I haven't used this library in years. Sounds like you are using the Lua API, in which case just call S:AddLayer inside your for loop. However, I would highly recommend the Python API.
Also, this version of the library has a few nasty bugs. For example, the Z components of the returned electric fields are computed incorrectly in this base version. I highly recommend looking into some of the forks of this library that are out there.
I haven't used this library in years. Sounds like you are using the Lua API, in which case just call S:AddLayer inside your for loop. However, I would highly recommend the Python API.
Also, this version of the library has a few nasty bugs. For example, the Z components of the returned electric fields are computed incorrectly in this base version. I highly recommend looking into some of the forks of this library that are out there.
Yes, I'm using the LUA version since I have zero experience in Python language. So far the only function I've been using is S:GetPowerFlux, since I work with absorption in solar cells. I haven't plotted any fields yet, but it's good to know about this problem. Gonna be using COMSOL instead to work with the fields, just to make sure, then.
Thanks a lot, Robert!
Hi @michelgaglioni, this response is a bit late and I don't know how much progress you've made yourself by now but you might be interested in checking out my fork of S4 which implements @kwrobert 's fixes as well as some other changes, and which makes S4 compatible with Python3. Since you said you are working on solar cells, I also developed a Python package called RayFlare which (among other things) provides a 'wrapper' for S4 to calculate things like absorption per layer and absorption profiles (it was developed specifically to study the optics of solar cells).
Hi @michelgaglioni, this response is a bit late and I don't know how much progress you've made yourself by now but you might be interested in checking out my fork of S4 which implements @kwrobert 's fixes as well as some other changes, and which makes S4 compatible with Python3. Since you said you are working on solar cells, I also developed a Python package called RayFlare which (among other things) provides a 'wrapper' for S4 to calculate things like absorption per layer and absorption profiles (it was developed specifically to study the optics of solar cells).
Hello Phoebe,
Thanks for the suggestions! Your Rayflare package seems to be very useful for what I intend to reseach. Right know I'm a little busy, but I'm gonna dig deeper into it as soon as I manage to. I'll be implementing your corrections in the fork that you mentioned, too. Thanks for now!
Hello guys,
I'd like to know if is there any way to draw a pyramid-like structure in S4. Since in the function SetLayerPatternPolygon I can declare only the x and y coordinates of the polygon, I'm not being able to realize a way to do so. Would it be the case of adding multiple layers and tapering them? Does anyone have any suggestion?
Thanks in advance,
Michel