GithubHelp home page GithubHelp logo

marvinmoyco / fdtd-code Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 436.78 MB

Codes for FDTD implementation for EEE 190/ECE 198

Python 51.68% C++ 37.80% MATLAB 0.54% Makefile 0.45% Shell 0.68% JavaScript 6.77% CSS 0.02% HTML 2.06%
simulation fdtd fdtd-simulator schwarz parallel-fdtd

fdtd-code's Introduction

FDTD Codes for ECE 198

1-D FDTD

  • FEATURES
    1. Multiple Boundary Conditions - Dirichlet Boundary Condition or Perfectly Absorbing Boundary Condition.
    2. Multiple Sources - Gaussian Pulse, Sine Wave, Square Wave, Modulated Sine Wave.
    3. Multiple Source Excitation Method - Hard Source, Soft Source, and Total Field/Scatter Field
    4. Basic FDTD Algorithm - Conventional algorithm (leap-frog method)
    5. FDTD-Schwarz Method - Combined algorithm of FDTD-Schwarz in serial and parallel mode (using OpenMP).
Notes:
  • Libraries used are header-only type so no need to compile them. Just include the directories of the necessary libraries in the makefile before compiling.
  • Main code uses C++ for generating simulation data but data visualization uses Python 3 (matplotlib/plotly)
Current Issues:
FDTD
  1. Sinusoidal source propagate backwards (towards the left) when using TF/SF.
FDTD-Schwarz Method
  1. Sinusoidal source propagate backwards when using TF/SF.
  2. Algorithm limited up to 8 subdomains per simulation only because it causes CPU bottleneck if increased to more than 8 subdomains.
  3. Reflections generated in the internal boundary of each subdomain. This causes errors in the simulation where some energy is generated out of nowhere.

Libraries Used:

C++ Libraries:

  • xtensor - Main scientific computation library in C++ (very similar to Numpy).

  • xtl - Dependencies of all xtensor libraries.

  • xtensor-io - For I/O operations like saving simulation data into HDF5 files.

    • HgihFive - C++ library for manipulating HDF5 files (header-only library)

      • libhdf5 - can be installed using sudo apt install libhdf5-dev
  • xtensor-fftw - Used in a FFT operation in the simulation.

    • FFTW 3 Library - can be installed using sudo apt install libfftw3-dev
  • xtensor-blas - Used in computing L2 norm (using linalg module)

    • OpenBlas - can be installed using sudo apt install libopenblas-dev

    • LAPACK - can be installed using sudo apt install liblapack-dev

Python Libraries:

  • numpy - Main numerical library for linear algebra and scientific computing in Python.
  • matplotlib - Basic plotting library based on MATLAB.
    • ffmpeg - Required library when using matplotlib for creating animation (video) of simulation
  • plotly - Interactive graphics library for Python.

fdtd-code's People

Contributors

chulala avatar marvinmoyco avatar

Watchers

 avatar  avatar

Forkers

chulala

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.