Giter VIP home page Giter VIP logo

Comments (1)

wsshin avatar wsshin commented on September 3, 2024

I guess you have calculated a wave emanating from some source. To calculate the overlap integral, you need to calculate the waveguide mode separately. This can be done by setting up a waveguide geometry and calculate its mode using ModalSrc as a source.

Now that you have a wave and mode profile, you can calculate the overlap integral between them in principle. Unfortunately, there is no function implemented for this purpose, so you will need to write your own script for this.

First thing you need to do is to retrieve the fields and their locations. Each of the Cartesian components of the solution E and H fields are a Scalar3d object, and Scalar3d has data_expanded() function that returns the field array and locations.

Then, you will need to implement the overlap integral. The tricky part is that the solution E and H fields are not defined at the same location due to the interlaced E and H grids in the finite-difference scheme. Therefore, you need to interpolate the E and H fields such that they are at the same locations. (Otherwise you cannot multiply them.) You can use MATLAB's interpn() function.

from maxwellfdfd.

Related Issues (15)

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.