Project Summary
Through this project, we wish to explore how accurate engineering simulations are created, and broaden how they are interacted with. Using the Finite Element Method (FEM), our goal is to create a process to train a custom Graph Neural Network (GNN) that can identify how an object responds to any load case in real time, without the need for any additional simulation beyond the training set. The output is an interactive panel: the user can input their geometry, wait for the training process to take place, and then interact, in real time, with their geometry, applying load cases and seeing the linear elastic response.
Team members: Ninad Atale and Yuvraj Shiv
Problem Description
2.1 Overview
With current FEM solvers (eg: Ansys, Abaqus etc.), a user is able to define a load case on their geometry and solve for the corresponding stress/ displacement field. However, to test any other load case requires another - sometimes time consuming - solution loop.
Our goal is to create a program that simulates, using the FEM, multiple load cases on any given geometry. This creates a training dataset on which a GNN (following the natural mesh representation of the geometry) can be trained. Then, specifically for materials with linear-elastic properties, any load combination should be a predictable sum of other pre-tested load cases.
As a result, via the GNN, we wish to create an interactive viewer through which a user can add any number of load cases onto an object (we will likely restrict ourselves to direct forces and skip over torques), and view the deformation and stress field of their geometry live. Think of it like playing with playdoh - pressing some object from multiple angles to see how it reacts in a combined load condition.
2.2 FEM solver and problem restrictions (Goals + Deliverables)
For the FEM solver, we will restrict the class of problems to linear elastic deformation. Non-linear effects (such as in anisotropic materials) become challenging to model.
On the whole, the solver will comprise two parts - the mesher and the evaluator.
The mesher is likely to borrow from the half-edge mesh representation we learned about in class, or instead use a tabulated form of mesh information to better define connectivity for the evaluator. Since we aim to solve 3D problems, an initial reading led us to find the half-face data structure which might be more useful, but the exact mesh representation is something we are still yet to decide. To generate the mesh from an input CAD/ COLLADA file, we plan to use the Assimp library, ensure mesh validity, and then use TetGen to discretize the domain into tetrahedra which the user can visualize and condition.
The mesher then provides the mesh data to the evaluator. This is where boundary conditions such as fixed supports and point loads can be applied. Then, the evaluator solves the elastostatic PDE (Cauchy's equation), over the whole mesh. An output of the deformation and the stress concentrations can then be obtained.
At this point, we have a milestone for a basic commercial-level FEM solver.
To extend the work, we wish to create a rule that automatically assigns load cases on the input geometry and tests them. Should this not work, we might choose to manually impose these to create a training data set.
This is the data we will use to train a GNN. It takes in the node and edge features (such as position, length, loading etc.) and creates multiple message-passing layers to learn the displacement/ stress at each given point.
At this point, we have a milestone for an AI-based FEM solver. Should the rest of our project not work, we may choose to build off of this step instead.
Lastly, we will build an interactive viewer that allows a user to apply load conditions on the mesh and see the displacement and stress fields in real time. To evaluate our project, we will compare these predictions to the ideal solution as we would gain from our FEM solver itself. Another possibility is to also compare them to a commercial FEM solver, but this may lead to challenges in acquiring the same topology for a given geometry representation.
See Pivots & Extensions for possible alternative paths that we may take this project on.
Machine Learning Approach
The user gives us a CAD model and we cap its size, simplifying the geometry until the mesh sits around 5,000 elements so meshing, solving and training stay fast. Then we break it up: triangles on the surface, tetrahedra filling the volume. Over that mesh we run the finite element method, which is basically the hand-calculation method for elasticity done by computer over thousands of tiny elements: apply a force, solve, get the displacement at every node. Repeating this a few thousand times with different pushes gives us a map between force and deformation, and that map is our training data, generated by our own solver.
The mesh is already a graph: tet corners are nodes, tet edges connect them. Those edges are the physics, because material pushes on material through contact, so who is connected to who decides how a push travels through the part. Each node carries the force vector on it, its type (boundary, external or internal, which sets its degrees of freedom) and the material, E and Poisson's ratio. Each edge carries the arrow to its neighbour, so the network sees shape by chaining arrows rather than from absolute positions.
The network has three jobs: read, talk, answer. The papers call them encode, process, decode.
Read. Every node starts with a tiny list of numbers: the force on it, whether it's fixed to a boundary condition, its material etc. An encoder MLP (MLP stands for multilayer perceptron, and it's the plainest neural network there is) stretches that into a bigger scratch space, called the latent state.
Talk. This is message passing: each node combines its scratch space with its neighbours' and the edge between them, then rewrites its own. Each round the data travels one more step across the mesh, the same way a push spreads through real material.
Answer. A decoder MLP boils each node's scratch space down to 3 numbers: its displacement in x, y and z.
Same encode-process-decode shape as MeshGraphNets, built in PyTorch Geometric. We don't fix the exact sizes up front. The width of the scratch space and the number of epochs get chosen by testing, since everything trains and runs locally on our own machines and the model has to stay small and fast enough for that.
Schedule (tentative)
| Phase | Dates | Focus | Deliverable |
|---|---|---|---|
| Research and scoping | Jul 27–29 | Problem statement refinement, reading (MeshGraphNets, SOLO, surrogate papers), environment setup (Assimp, TetGen, PyTorch/PyG), mesh loading + validity check | Scope determined; mesh loads and passes manifold check |
| FEM solver | Jul 30 – Aug 1 | Work out math for tetrahedral elements, design solver and test on a few inputs. Also build a visualizer to see the deflection and stress fields | Build a complete solver that matches industry-level linear elastic elastostatic solvers |
| GNN creation | Aug 1 – Aug 3 | Design the graph neural network to work with the input data from the FEM solver. Test to see if it works as expected and trains correctly. If not, this is where we pivot to another idea mentioned below | Working GNN implementation that doesn't take more than 10mins to train and creates visually realistic results |
| Milestone | Aug 4 | Write milestone report | Milestone report |
| GNN testing buffer + interactive viewer development | Aug 4 – Aug 6 | Continue to refine the GNN implementation should there be any bugs or challenges. On the side, build the final interactive viewer | Working GNN that can predict the effect of loads that aren't in its training set. Working interactive viewer |
| Interactive viewer + polish + writeup | Aug 6 – Aug 8 | Test our project for various scenarios and make sure it is demo ready | Possibly finish the final writeup and website |
| Buffer time + testing | Aug 8 – Aug 12 | Extra time to debug and troubleshoot | Final project deliverable |
Resources
4.1 AI use
To accelerate our coding process, we plan on using AI models, still always checking their output to ensure that it makes sense to us.
4.2 Class notes
We plan on referencing any relevant CS184 lecture slides + the PDFs of Shawn Shadden's ME C180 class, taught in Spring 2026 for an in-depth overview of solving linear elastic problems using the FEM.
4.3 Research papers
Based on our preliminary reading, we have reference to the following papers which show the implementation of GNNs in FEM based solvers in various capacities. None of them talk about the development of an interactive viewer such as the one we have proposed:
Pivots and Extensions
Training a graph neural network and developing the architecture for it is likely to lead to some points of error and trouble. We are confident in our ability to build a good FEM solver for elastostatic problems. The only conditions we impose on our solver is that the number of mesh elements is not too large (in the order of 10,000 or greater) and that the materials we model are treated as linear elastic.
With the FEM solver being a concrete part of the project we can implement, here are some possible extensions (in no particular order of preference), should the GNN framework fail:
- Reducing the interactive viewer to only allow the user to specify a certain amount of loads/ boundary conditions at a time. It is possible that a problem may become ill-conditioned should a user impose too many restrictions. As a result, we may restrict the interactive viewer to only allow for a certain number of user-defined load cases and constraints.
- Developing the model on pre-determined geometry. Instead of allowing the user to add in their own geometry, we pre-train the model on many more load cases for a certain geometry and then allow the user full access to the interactive viewer.
- Adaptive shape optimization (elastostatics): iteratively remove/ add material around areas of low/ high stress respectively to create a more optimized part design. The output is the refined geometry.
- Adaptive shape optimization (fluid dynamics): upon changing the base PDE to the navier stokes equation, we can model fluid flow using the same FEM framework. Given this, we can optimize any input geometry and make it more aerodynamic by constructing a rule to change geometry around points of high pressure. The output is the refined geometry.
- Improving the solver UI and functionality - making our FEM solver as close to an industry-standard application as possible, allowing for a user to define multiple types of constraints, load cases and calculate many different output fields (strain, safety factor, Von Mises stress etc.)