Documentation
MATLAB Implementation
The detailed MATLAB implementation can be found in the GitHub. Here we explain the functions of each file and their relationships.
MATLAB Files
- main.m: Main function, including reading inputs, building structs, and performing simulation.
- defSimParams.m: Define the numerical parameters for the simulation.
- defSystemParams.m: Build a struct for the simulated system, e.g., beam, rod, or plate.
- InitialElement.m: The initialization of each type of element, e.g., stretching elements.
- defConsParams.m: Define boundary conditions for the simulation.
- objfun.m: Update the time step by Euler method and optimize the solution by Newton’s method.
- getForce.m: Loop over all elements to build the global force vector and global Hession matrix.
- elasticForce.m: Detailed formulation for the local force vector and local Hessian matrix.
- plotSystem.m: Plot dynamic rendering for the numerical results.