Code Monkey home page Code Monkey logo

macromax's Introduction

Macroscopic Maxwell Solver

Introduction

Efficient solving the macroscopic Maxwell equations in complex dielectric materials - in Python and Matlab.

The material properties are defined on a rectangular grid (1D, 2D, or 3D) for which each voxel defines an isotropic or anisotropic permittivity. Optionally, a heterogeneous (anisotropic) permeability as well as bi-anisotropic coupling factors may be specified (e.g. for chiral media). The source, such as an incident laser field, is specified as an oscillating current-density distribution.

The method iteratively corrects an estimated solution for the electric field (default: all zero). Its memory requirements are on the order of the storage requirements for the material properties and the electric field within the calculation volume. Full details can be found in the open-access manuscript "Calculating coherent light-wave propagation in large heterogeneous media". Automatic leveraging of detected GPU/Cloud is implemented using PyTorch in the Python version of MacroMax (for further details follow this link).

The source code is available on GitHub under the MIT License: https://opensource.org/licenses/MIT

When to use this method?

The algorithm is particularly efficient for solving complex scattering:

  • wave problems such as those encountered in electromagnetism and acoustics,
  • subject to temporal coherent (monochromatic) irradiation,
  • and a limited variation of a gain-free potential (permittivity),
  • in complex, heterogeneous, materials.

Although incoherent and aperiodic problems can be solved by solving multiple coherent problems, alternative methods might be more appropriate for this type of problems.

When not to use this method?

With the exception of gain materials, MacroMax works for a wide variety of problems. However, more appropriate solutions may exist when:

  • an approximate solution is sufficient, → e.g. the beam propagation method
  • the material has a simple structure, → e.g. Mie scattering from a perfect sphere
  • coherence is not important, → e.g. ray tracing
  • the variation in the complex potential (permittivity) is very large, e.g. due to the presence of conductors → e.g. finite element methods
  • the material has gain, e.g. an active laser cavity → e.g. finite element method
  • aperiodic time-dependence is important, → e.g. finite difference method The convergence rate of MacroMax is approximately inversely proportional to the variation in the potential. Materials with a refractive index or extinction coefficients larger than 5 will generally lead to slow convergence. By consequence, the presence of a superconductor would lead to infinitely slow convergence (a.k.a. divergence).

Pure Python and Matlab implementations

Please follow the links for further information, source code, and examples:

PyPI - Python Version PyPI - License PyPI PyPI - Status PyPI - Wheel PyPI - Downloads GitHub code size in bytes GitHub last commit Libraries.io dependency status for latest release Documentation Status

macromax's People

Contributors

tttom avatar l-valantinas avatar

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.