Problem
As a final project in my Mechanical Computation and Design class, I solved the following problem: determine the linear deformation of an eggshell microstructure (two-dimensional truss composed of hundreds of connected elements) given input forces and boundary displacement conditions.

Figure 1: Microstructure of the membrane of an eggshell. The white bar represents 10 um.

Method
I used this project to strengthen my Python skills. I employed the finite element method using matrices to calculate and display the deformation of the network. The two input files required to generate the mesh consisted of a list of cartesian coordinates per node and a list of node-to-node connections. I generated a connections matrix with a global material applied to all the members. The displacement of the leftmost nodes was constrained to zero, and the force (input by user) was applied to the rightmost nodes in the positive x direction (right). 

Figure 2: A mesh generated from the input files

Figure 3: (Above) Horizontally oriented and (below) vertically oriented anisotropic networks.

Result
Given the input file, the code outputs a visual depiction of the displacement, as shown in Figure 4 below, and states the numerical displacement in the desired units. The program also outputs a chart of deviations by element, and a strain distribution chart which are shown below.
An improvement on this project I would prioritize in future iterations is the flexibility of the visual output. I used the matplotlib library to produce the graphs, but this method has issues with window resizing, live updating, and render times. In the future I would use something like Plotly or Chaco.

Figure 4: Nondeformed (blue) and deformed (red) system of 2-D trusses representing microstructure of the eggshell material. Deformation is exaggerated for visibility.

Lessons Learned
>  File inputs and outputs in Python
>  Applying the finite element method in code
>  Matrix math in Python
>  Working independently on a larger coding project

Figure 5a: Member strains in the x direction along truss length

Figure 5b: Member strains in the y direction along truss length

Fig 6, left to right: x and y strain distributions for a) standard isotropic material, b) Horizontally oriented anisotropic, and c) Vertically oriented anisotropic.

Figure 7: Top row: Horizontally oriented anisotropic material and associated x strains and y strains along length; 

Bottom row: Vertically oriented anisotropic material with associated x strains and y strains along length.

Back to Top