2D Finite Element Method



Project Overview | 2D Finite Element Method


In this project, I implemented 2D finite element method(FEM) on an object.
The pseudo code I used is the pseudo code in Dr. Sueda's in-class PowerPoint "An Introduction to Continuum Mechanics and Finite Element Methods". It was originally for 3D Tetrahedral FEM, but I converted into 2D triangle FEM when implementing.

First, I took all files about cloth generating ( particles.h/.cpp, springs.h/.cpp, cloth.h/.cpp, and scene.h/.cpp ) and combined them with the basic environment and grids from Assignment 4. I tested this step by changing the cloth program a little bit so that it can run under this new setup. I also added phong_vert and phong_frag files from Assignment 5.

Secondly, I changed cloth simulation from Implicit Integration back to Explicit Integration, in order to implement 2D FEM in the future steps. Also, I had to discretize the cloth into small triangles first, since it was originally calculated by looping through strings. I arranged it the same way as shown before, 2 triangles for each 4 vertexes, which can be seen on the result part.

Thirdly, I implemented the 2D FEM part as shown in the pseudo code in powerpoints. I first calculated deformation gradient F. Then I skipped the strain and stress, and found the length and normals of each edge instead. Also, I wrote the part where force is added to each particles, and the calculation of the velocities and positions of particles. I then used Neo Hookean Model for the strain and stress, based on the in-class powerpoint "Material Models for Continuum Mechanics".

Eventually, I added the collision feature. First I brought in the collision force calculation from Assignment 5. Then I made some adjustment to the moving sphere, so that it stays still at the (0,0) point. Finally, I unbind the top left and top right points of the cloth(square), so that it make a freefall onto the sphere. Also, since the square is only 10x10, I adjusted the time stamp for each step so that it runs smoother.

I tested the 2D FEM object with different stiffness and poisson's ratio. Following are some of the best combinations I found while changing the range of stiffness and poisson's ratio as much as I could.


Testing Results

for the original .MP4 video, see Google Drive Link


Test 1

stiffness = 1e2, poisson's ratio = 0.3

collision
Cinque Terre
fixed points
Cinque Terre

Test 2

stiffness = 1e2, poisson's ratio = 0.2

collision
Cinque Terre
fixed points
Cinque Terre

Test 3

stiffness = 5e1, poisson's ratio = 0.3

collision
Cinque Terre
fixed points
Cinque Terre

Test 4

stiffness = 5e1, poisson's ratio = 0.2

collision
Cinque Terre
fixed points
Cinque Terre