Sample codes
These are codes that demonstrate basic methods in computational mechanics.
Note to prospective students: These sample codes are simple implementations of basic methods. Any students interested in experimenting with these codes or expanding their capabilities are exactly the type of students that are a good fit for this research group.
2D finite element code in PythonThis code demonstrates a simple 2D plane strain finite element code in Python using both numpy and matplotlib. The global stiffness matrix is stored in full format (i.e. not sparse). Interested students can try to convert to a sparse format via scipy.sparse. download code | |
Matlab code for quadtree mesh with hanging nodesThis code demonstrates static condensation degrees of freedom to enforce compatibility in a mesh with hanging nodes. A simple patch test demonstrates that compatibility is enforced. download code | |
Matlab code for 1D bridging domain methodMAE 598 Student Project: David Chao, spring 2012This code demonstrates the bridging domain method in 1D with both consistent Lagrange multiplier constraints and diagonalized constraint equations. The diagonalized version damps some of the high frequency energy at the coupling interface. download code | |
Matlab xfem exampleThis code demonstrates a strong discontinuity within a total Lagrangian explicit extended finite element formulation. In the simulation, a velocity boundary condition is applied to a bimaterial strip, where there is no cohesive interaction between the two materials. download code |
Mesh generators for MATLAB
Simple codes for creating meshes in MATLAB.
2D uniform mesh generatorThis MATLAB function generates a 2D finite element mesh in MATLAB. You can
generate a plot with commands like | |
2D plate with hole mesh generatorThis MATLAB function generates a 2D finite element mesh in MATLAB. You can
generate a plot with the command:
|