Giter Site home page Giter Site logo

Pyramidal Structure about s4 HOT 6 OPEN

michelgaglioni avatar michelgaglioni commented on July 28, 2024
Pyramidal Structure

from s4.

Comments (6)

kwrobert avatar kwrobert commented on July 28, 2024

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.

michelgaglioni avatar michelgaglioni commented on July 28, 2024

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.

kwrobert avatar kwrobert commented on July 28, 2024

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.

michelgaglioni avatar michelgaglioni commented on July 28, 2024

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.

phoebe-p avatar phoebe-p commented on July 28, 2024

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.

michelgaglioni avatar michelgaglioni commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.