Topology Optimization for Fluid Flows using Machine Learning
I began this project last year, aiming to develop an algorithm that generates optimal topologies under specified constraints in fluid flows (for example, aircraft geometry or propeller design). This problem is significantly harder to solve than traditional structural topology optimization because fluid simulations are not differentiable, unlike FEM simulations. My solution was to train a neural network to predict the results of a fluid simulation for a given topology and then optimize using topological gradients. This involved constructing a large dataset of fluid simulations for various shapes using C++, which took several days to complete on my computer. I trained a convolutional network (CNN) to predict fluid forces using Python and Tensorflow, and later converted it to PyTorch. (Right is an example of the algorithm optimizing a 2d solid to generate maximum torque in a fluid flow.)

Path Generation for Autonomous Aircraft in Time-Dependent Flow Fields
An Algorithm that incorporates global hourly wind data to generate the fastest routes between any points on Earth using a field-based LSF approach. The algorithm creates a field of reachable points across the Earth that is advected at every iteration with the time-dependent field and expanded using the aircraft's thrust parameters. The optimal path is traced using the gradient of the reachable time field. This algorithm solves a variation of the famous problem in control and optimization originally posed by Ernst Zermelo in 1931 for airship navigation. Like Zermelo, I designed this algorithm to find optimal paths for novel solar-powered, hydrogen airships. Pictured are the optimized routes between major global shipping hubs at various altitudes. Also pictured is the 3D plot of one route from LA to Shenzhen in 16.08 Hours for a simulated hydrogen airship. All simulations were conducted using real hourly weather data from June 2025, when the jet stream is weakest for a lower bound on travel time estimates.


Hartree-Fock multi-electron quantum simulation in 1d using custom Gaussian basis set
Simple quantum simulation algorithms struggle to capture the complex interactions between electrons that give rise to complex molecular orbitals. The Hartree-Fock method first solves electron wave functions independently and, over successive iterations, incorporates electron-electron repulsion between probabilistic “electron clouds”. This method allows all orbital wavefunctions to be decomposed into a linear combination of basis functions. My implementation uses a uniform fixed Gaussian basis set that spans the entire 1D space. This approach allows the electron repulsion integrals (computationally intensive calculations of electron repulsion) to be calculated only one time for the basis set. This allows electrons to move freely across the space without being constrained to the pre-defined electron orbital shapes that other algorithms use. This approach does not scale well as the number of basis functions increases. This project was a learning exercise that helped me understand Hartree-Fock Theory.


Layer Optimization for Anisotropic 3D Printing
Traditional planar fused filament 3d printing produces parts that are weaker in certain directions (anisotropic), which often leads to failure under mechanical loads. This algorithm analyzes the structure of a part to generate an optimal layer pattern that is significantly stronger. It first analyzes the parts deformation using a custom differentiable anisotropic Finite Element Method simulation implemented in JAX. The direction of the filament at every element is parameterized to a layer angle field, which is then optimized for minimum compliance using Stochastic Gradient Descent (SGD) on the FEM gradients. The optimal layer angle field is then passed into the slicing algorithm, which produces layer lines that follow the specified angles and smoothly interpolate between elements. A major goal of this project is to design stronger parts that can be printed on any traditional comercial 3d printer, rather than experimental non-planar printers which can print at any angle. This algorithm can constrain the optimized angles to accommodate micro non-planar printing, taking advantage of the z-axis to create tilted layer lines.

Parafoil Parametric Design Optimization & Automatic Laser Cutting Template Generation
A Python program that parametrically generates parafoil geometries based on thousands of airfoil simulations and wind tunnel tests. Parafoils are constructed from lightweight fabric, so internal pressure must maintain their shape. In this case, it uses an inlet at the leading edge to inflate airfoil sections along the wing. Since fabric is not rigid, it also inflates and curves on the top and bottom of the wing, which must also be accounted for in parametric design. More traditional aerodynamic moment balancing equations are used to determine the lengths of chords attached to the parafoil to achieve passive stability. The chord lengths are calculated to maintain an elliptical lift distribution (bending moments are negligible for this design) along with the catenary arching structure, which reduces induced drag. The second part of this program calculates the 2d projections of each fabric panel and internal rib and generates sewing patterns with bounding boxes for each. These bounding boxes are then fed into a standard rectangle packing algorithm, which minimizes fabric scrap losses. The packed templates are then labeled and automatically rendered in SVG format for laser cutting.


Aircraft Design for Payload Optimization using Genetic Evolutionary Algorithm
This algorithm uses publicly available wind-tunnel data on thousands of airfoil geometries to evolve optimally efficient flying-wing aircraft. Originally designed for the SAE aero competition, in which aircraft are scored by the number of cylindrical water bottles they can carry. This algorithm simulates thousands of initially random aircraft designs and selects those with the best flight performance and payload capacity. The selected aircraft designs are then mutated and mixed to form future generations, and the process continues until convergence on an optimal solution. The simulation can accommodate many different airfoils along the wingspan and characterizes important features like passive stability and bending moments along the wing in addition to lift, drag, payload, and more.
Custom Graphics Engine using Ray Marching on the GPU
The goal of this project was to create a fully functional graphics engine based on ray marching that runs in real time in the browser using GPU compute shaders. As opposed to traditional algorithms, which use triangles (rasterization or raytracing), this engine uses signed distance functions to describe 3d shapes. This allows shapes with high levels of detail to be rendered without excessive memory usage or performance costs. To accomplish this, the engine uses a buffer that stores distance functions in a binary format and sends them to the GPU to be computed on a per-pixel basis. In environments where memory is limited or loading times must be short, like webpages, this technique is advantageous.
All the shapes on screen were defined using mathematical functions rather than triangles. The reflections and diffuse lighting are computed using the same methods as traditional raytracers.
Bird Song Generator using a Convolutional Self-Attention-based Variational Autoencoder
A Machine Learning model capable of generating hybrid bird songs that combine the traits of multiple species. The model was trained on the British bird song dataset, which is relatively small, making it difficult for traditional models to generate realistic bird songs. A Variational Autoencoder uses a probabilistic approach to create a smooth latent space that is useful for generating bird songs that lie between data points. More information can be found in the GitHub README linked below. The Interactive Web UI allows users to explore the VAE's latent space visually and generate their own hybrid bird songs. Click on the link below to access the website and try it for yourself. Pan and zoom to explore the UMAP projections of each data point; labels for each species will appear if you zoom in. Click on a data point to add it to your selection; click the “X” icon on the left of each selected data point to remove it from your selection. Click “Generate Hybrid” to run the model on the latent vectors you selected. Note if only one data point was selected the model will reconstruct only that data point. The decoder was compiled for the web and runs locally using JavaScript, so it may take a few seconds for a spectrogram to generate. Once generated, a spectrogram will appear in the menu; press the play button to hear the audio. If the audio is too quiet, use the volume slider to increase its volume. Finally, the download button allows you to save the generated audio as a .wav file (the file's volume is also determined by the slider).

Quantum Schrodinger Equation simulation on the GPU
After experimenting with the relatively new WebGPU compute shaders, I created a quantum simulation that runs entirely in the browser from scratch. This served as a useful learning tool that helped me gain an intuition for the complex math of partial differential equations. Right is a screenshot of the simulation; the interesting visual checkerboarding pattern is due to numerical instabilities caused by large time steps and the simple Euler's method approximation. I was able to avoid these instabilities with smaller time steps, but I find these error patterns fascinating.


Interactive WebGPU Neuron Simulation
A real-time procedural demo showcasing an excitable media that replicates the behavior of neurons by learning via the Hebbian Learning principle. This project was built using WebGPU and GLSL to simulate thousands of neurons in the browser, all in real time. Unlike a traditional neural network, this model continuously models activation potential over time, allowing neurons to fire at different times. Initially, the randomly connected network exhibits chaotic activation patterns as each neuron's activation potential spikes and triggers surrounding neurons. For a short period after each neuron fires, it learns by strengthening connections with other neurons that have recently fired, similar to the behavior of real human neurons. Eventually, the network becomes fully connected, and clear activation waves begin to form, similar to waves observed in human brains. While this model is extremely oversimplified with much lower connectivity than the human brain, models like this may help us create more complex machine learning algorithms. Similar models with higher connectivity and more complex learning principles could learn continuously as they operate, as opposed to traditional one-time training.
Armor Optimization
Traditional structural topology optimization can only optimize for strength and material consumption, but struggles when it comes to optimizing shapes designed to fracture. To optimize the internal geometry of armor so that it could absorb the impact of projectiles, I created a unique spring-based fracture model using PyTorch. The model turns the discontinuous fracture problem into a differentiable problem that allows stiffness gradients to be computed. Gradient descent using the stiffness derivatives with respect to a specified loss function (in this case, energy dissipation) yields optimized topologies.
