preloader

Numerical Electromagnetics

bg-shape
Numerical Electromagnetics

Date

May 01, 2024

Categories

Programming, physics

The Project

For my capstone at Purdue, I worked on creating a Finite Element Method for Electromagnetics tool for the Computational Quantum Electromagnetics lab. The goal was to make an easily accesible tool that could calculate all the possible modes that may propagate in specific geometries.


How I made it

To build up to the final 3D Potential Based tool, I began working my way up to understand the FEM for electromagnetics starting with the 1D case.

A lot of the project’s math was based off of Jin’s textbook Theory and Computation of Electromagnetic Fields.


1D Simulation

This is a plot made with the 1D-FEM numerical solver of a wave propagating into a different media at the center of the image. Although the colors could use some imporvement, the accuracy was surprisingly good for something I put together in a few hours.

The goal for this was just to learn more or less how the process would work for higher dimensions, however, I did not include any sort of object oriented concepts for this one as it seemed like overkill.


2D Simulation

Here’s a couple of pictures of what my 2D-FEM code does

These are essentially plots of two modes that propagate through a slice of a rectangular waveguide with perfectly conducting walls.

To calculate the modes with the finite element method, a mesh of each waveguide with triangular elements is created in Cubit, and then fed into the program. In the repo, the “ReadAbaqusMesh.py” file deals with this part of the process.

I thought this next one was cool, and proved to me that the code should (at least in theory) work for any arbitrary shape.


3D Simulation

Finally, the goal of this project was to reach the stage where the modes for a 3-dimensional cavity could be calculated with 3D-FEM. This simulation was done in two ways, first with scalar basis functions for scalar, then with vector ones for a potential-based formulation.

The meshing process was similar as in the 2D case, where tetrahedral elements are used to discretize the cavities.

For the potential-based formulation, my code calculates the contribution of each element with the help of an eigensolver. Each contribution has the form of a vector field, and in the end a plot can be made with the magnitudes of each vector.

This plot is made from two slices of the cavity on perpendicular axes.


Outcomes

With the help of a few of the other people working on parallel projects, we presented at Purdue’s Research Expo. This is an opportunity where undergraduate students participating in research can share their projects through a poster presentation.

Here’s a picture of me at the poster presentation.

And here’s the poster I made for it.