Simulations and Computational Science
Computational Method Tutorials
Scaffolding Simulations in a Rate Processes of Materials Course
This learning resource describes a set of programming assignments that are used in a Rate Processes of Materials course. The assignments are designed around the pedagogical principle of scaffolding, in which students are given initial support structures that are gradually removed. The incremental skill-building helps students become independent learners.
Skill Module 1: The introductory activity provides a review of MATLAB syntax and programming skills.
Skill Module 2: In this module, students are introduced to the Finite Difference Method (FDM), which is a computational method used to estimate the solutions to partial differential equations.
Scenario 1: This assignment requires the FDM (from Skill 2) to be used to solve a materials science problem. In this scenario, students take on the role of engineers at a chemical company. They are provided with the concentration of a chemical over time and need to use this information to calculate the reaction order and reaction constant. Finally, students simulate the reaction kinetics assuming a different starting reaction concentration.
- Scenario 2A: In this assignment, students extend their knowledge of the FDM to simulate one-dimensional diffusion based on Fick's laws of diffusion. Students must compare their results from data provided in a paper.
- Scenario 2B: This task is based on analyzing a three-dimensional microstructure. Students are provided with the data, but must develop a MATLAB script to analyze the large data set. Similar to Scenario 2A, students must read and summarize the key points of a paper.
One-Dimensional Finite Element Method Example
This tool is intended for use in understanding and practicing the basics of the finite element method (FEM) in one dimension (1D).
The tool consists of a pair of Jupyter notebooks. The scripts in these notebooks solve the one-dimensional problem described below. The notebooks allow these scripts to be modified, run, and downloaded.
One of the notebooks is written in Octave, which is similar to Matlab. The remaining script is written in Python 3.0. The scripts are functionally identical otherwise.
The scripts solve for the displacement u of the bar loaded as shown in Figure 1. Both the analytical and numerical solutions are presented in this resource.
Figure 1: A bar of cross-sectional area A, Young's modulus E, and length L, fixed at the left end and loaded with a force F at the right end. The displacement u at the right-hand side is to be determined.
Figure 2: Division of the rod into N elements and N+1 nodes, with each element represented by an equivalent spring of stiffness ki.