Comments (6)
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.
from s4.
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!
from s4.
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.
from s4.
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!
from s4.
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).
from s4.
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!
from s4.
Related Issues (20)
- About the S4 installation HOT 4
- Aperiodic Structure With PML HOT 4
- How to use real dielectric constant of the material?
- Is there a way to implement a layer with pixelized refractive index distribution in S4?
- Which function can be used to set the incident plane wave to be circularly polarized? HOT 2
- Could S4 do interference simulation?
- Cannot produce simple Talbot carpet HOT 2
- Cannot execute S4 after installation HOT 2
- Layers with different lattice vectors HOT 2
- A problem of "SetLayerPatternPolygon" HOT 1
- Scattering Matrix
- Installation Problem in M2 Max
- Python API: Error while setting excitation wave
- Creating a model with different refractive index along the wavelength HOT 1
- Multi-threading/Muti-processing HOT 2
- Angle orientation
- Adaptive fequency sampling HOT 1
- Installation for Windows HOT 2
- Cannot implement "make S4lua " HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s4.