Riding the “Wave” of Affordable 3D Printing

Applications to PDEs in teaching and research

By Nate Barlow, Colin Huber, and Olivier Montmayeur
Print

If you walk down any given hallway in a place where STEM (Science, Technology, Engineering, Math) happens, it is becoming increasingly likely that you will see colorful 3D printed props adorning offices and cubicles. Affordable 3D printing and 3D printers are taking the world by storm, enabling home workshops, public schools, and, yes, even math departments to enjoy this new and exciting technology. If you have ever wanted to be surrounded by your math (in a literal sense), this can easily happen. Mathematical constructs are leaving the dimension of the mind and preparing for a full-scale invasion of the dimension of the desks! Here we provide some highlights from our experience with 3D printing in research and teaching over the past year, specifically in regards to partial differential equations (PDEs) with time-dependent solutions. The article is separated into 3 sections: (1) Printing for teaching PDEs, (2) How to make 3D prints of PDEs, and (3) Printing PDEs for research.


1. 3D Printing for PDE Pedagogy

In math, multivariable calculus is the course that typically comes to mind for incorporating 3D printing into the classroom. Another good fit is Boundary Value Problems, an undergraduate course full of beautiful solutions, both mathematically and physically. The course can be taught from several perspectives, but it is safe to say that all approaches incorporate the study of solutions to PDEs describing diffusion (heat) and/or convection (waves).   

Although we seek time-varying solutions for heat and wave-like PDEs, we unfortunately have not yet figured out a way to make 3D printed objects that animate in your hand (which would be awesome, by the way), although N. Gulley's 3D Zoetrope comes close [1]. Instead, we have mostly been printing solutions to 1D PDEs (i.e., 1 independent variable in space) by setting the space variable to be one dimension of the base, time to be the other dimension of the base, and the dependent variable (e.g., heat, wave displacement, etc.) to be the height of the printed object. An example is given in Figure 1 for the solutions to two hyperbolic 1D PDEs.

Figure 1: Solutions to (a) a modified 1D wave equation [2] (Eq. 22) with homogeneous Neumann conditions on each side and (b) the standard 1D wave equation with a homogeneous Dirichlet condition on the left side and a homogeneous Neumann condition on the right side. These pieces are part of a set used in a workshop where students match up boundary conditions to 3D prints. The idea is that, early in the course, students see the effect of these boundary conditions on the solution.


Analytical solution methods for PDEs (if given in detail) can be rather lengthy, and the payoff of a beautiful solution can be a welcome sight. For time-varying PDEs, computer animations of a melted or propagated shape are useful for visualizing solutions. Taking this one step further, imagineas a studentholding an object in your hand that represents a time-history of the solution to a PDE. Consider the 3D print in Figure 1a with homogenous Neumann boundary conditions (i.e., reflective walls). Here, one can make horizontal scans with the index finger from the middle to the edges of the object and feel that the slope at the boundaries approaches zero for all time (shifting the horizontal scan up and down), even though the solution itself (height of the printed object) varies wildly with time. A comparison can then be made for prints of the same (or similar) PDE with different boundary conditions (see Figure 1b). This exercise is part of a 20-minute workshop that we run in class, in which we provide a set of 3D prints to each group of 3-4 students. This type of activity promotes discussion among students as they try to pair boundary conditions with the printed objects. 

An example of the 1D heat equation with non-homogeneous boundary conditions is given in Figure 2, where one may track with their fingers in the direction of time from the initial condition (bottom of figure) to steady state (top of figure) and feel the loss of time dependence but not space dependence on the solution.

Figure 2: The above pieces are used to illustrate the concept of steady-state solutions to the 1D heat equation, when the boundary conditions are non-homogeneous. These are useful for demonstrating that different initial conditions lead to the same steady-state solution in the limit of long time.


For certain topics in a PDE course, a bit of imagination may be needed to bring the problems to life. One workshop focuses on the type of functions that can be represented by a Fourier Series in a uniformly convergent way. The students are given eight 3D printed puzzle pieces that together form a solution to the 1D heat equation (Figure 3). They are asked to assemble the pieces such that the initial condition (the inner face of the objects) is continuous on its domain and on its periodic extension. This leads to eight different possibilities. They are then asked to calculate the Fourier series of the initial condition. If they arrange the pieces such that the initial condition is odd, computing the Fourier coefficient integrals becomes easier. While this exercise can be fun and contains some strategy, appropriate time and guidance is needed to allow students to solve the "puzzle" in their own  way.

Figure 3: Students assemble a solution to the 1D heat equation with an eight-piece piecewise initial condition (photo credit: Ginny Gross). The pieces fit together when the initial condition satisfies the requirements for its Fourier series to converge: continuous, piecewise continuous derivatives, and continuous on its periodic extension. The second picture demonstrates the latter requirement by connecting several sets in a loop (the inner face is the initial condition).

 

Currently, we are using 3D prints in lectures for demos, for workshops (as illustrated above), and also for homework problems. A gallery containing the 3D printed solutions of the homework problems is on display in a window corner of a locked room, allowing students to check their final answer after solving a PDE and plotting it in MATLAB (or equivalent). A snapshot of a problem in the current gallery is given in Figure 4.

Figure 4: A PDE gallery for students to verify their homework solutions.

 

Problems in a PDE course become arguably more interesting near the end of the year, as additional dimensions and coordinate systems become fair game. A modification of the 2D wave equation is shown in Figure 5, were individual time frames have been printed and placed in sequence. Here, plastic jewelry display stands (purchased cheaply online) are used to highlight the progression of a 2D wave in time. 

Figure 5: Solution to a modified 2D wave equation shown in increments of 0.5 time units. Top: homogeneous Neumann boundary conditions on all 4 sides (reflective walls). Bottom: homogeneous Dirichlet conditions on all 4 sides (drum).

 

The examples given thus far illustrate how 3D printing can augment the presentation of PDE solutions. Switching roles, PDEs can assist with 3D printing itself. For example, fractals can be difficult to print in 3D, due to sharp gradients (see Figure 6b). The problem is that these "spikes" may be smaller than the resolution attainable from a modest 3D printer. Fortunately for those of us who use modest 3D printers, the heat equation can be used to diffuse a fractal until it is smooth enough to be printed, as shown in Figures 6b and 6c. This type of example may be useful as a hands-on supplement to a lesson on image noise reduction using the 2D heat equation.

Figure 6: The Julia fractal (a) as it typically appears (bird's-eye view) (b) viewed from an angle (c) diffused by the 2D heat equation and (d) 3D printed.


2. How the 3D Prints Are Made: Getting Started

All of our 3D prints begin as matrices. For each problem, two independent variables are chosen for the dimensions of the matrix and the dependent variable is represented by the values in the matrix. We then use Sven Holcombe's MATLAB functions that transform a matrix into an .stl file [3, 4], making it ready for the 3D printer. The process is illustrated in Figure 7.


Figure 7: Process for making 3D prints of PDEs using MATLAB. (a) Solve the problem and plot the solution. Here, a familiar silhouette is used as an initial condition to the 1D wave equation. (b) Use the "mesh" (or equivalent) command to view the solution as a surface using time as a coordinate. Make sure that the axes have equal spacing, as this is how it will appear when printed. (c) Use the above commands (after downloading functions [3] and [4]) to generate the .stl file. (d) Open the .stl file in a freeware program such as CURA and follow the appropriate steps (associated with your printer) to print the object. The above print took 45 minutes.

If you feel a barrier to getting started, you are not alone. The following is what worked for us:

  • If you are thinking of buying a 3D printer, it may be helpful to find a student or colleague who has already purchased a particular brand of printer and knows how to set it up and operate it. For the 3D prints shown and described here, the printed objects are made using various colors of Hatchbox PLA plastic ($20-$35, 1 kg spool) in a Maker Select 3D v2 printer ($300).
  • Spread good will in your department and organization by printing objects for your colleagues. If your 3D printer requires ventilation, perhaps a colleague in engineering or chemistry will let you store and operate the printer in a ventilated area when labs are not being run.
  • Print, print, print,  for every occasion! This will give you the trial and error you may need before printing objects for class. Print 3D business cards for conferences. If you are giving a talk in a dark room, use glow-in-the-dark material. Make mini-museum exhibits and ask for space to show them off (great for open houses!). Can you think of other ideas?

3. 3D Printing PDEs for Research

In the March SIAM news article, "Telling a Good Story at Conference" [5], an eye-opening suggestion was given to pass around 3D prints to the audience during a research presentation. The author (N. Higham) also points out that "Finding something suitable to print, however, may not be easy!" We couldn't agree more, but if 3D printing is at least on one's radar, ideas will likely come later.

When introducing our research to new group members or talking at conferences, 3D prints have become the perfect tool for showing the difference between a linearly stable, convectively unstable, and absolutely unstable response to a localized initial disturbance. A comparison is given in Figure 8, where wave propagation differences may be characterized by the spreading character of the packet in space and time.

Figure 8: A comparison between (a) stable waves (time-decaying), (b) convectively unstable waves (growth in time along a peak moving with a nonzero velocity), and (c) absolutely unstable waves (growth in time at all locations, for large time). The PDEs and conditions associated with these responses are given in [2] (Eq. 22, fFg. 12), [6] (Eq. 1, Fig. 1), and [6] (Eq. 2, Fig. 7b), respectively.

 

Now, if one wishes to examine the growth rate in time, one simply needs to rotate the base of the 3D print 90 degrees, as shown in Figure 9. One of the lesser understood phenomena in linear stability theory is the existence of long-time algebraic growth [6, 7] shown in Figure 9b. It is useful to compare this type of growth with a classical exponentially growing wave packet (Figure 9a) to highlight morphological differences. For instance, it is known that an exponentially growing wave packet is bounded by rays of constant x/t [8], as seen in the figure. For algebraic growth (Figure 9b), it can be seen that growth instead lives within bounding parabolas [6].

Figure 9: Turning a print on its side reveals the growth character in time. (a) Wave packet with a peak that grows exponentially in time. (b) Wave packet with a peak that grows algebraically in time. The PDEs and conditions associated with these responses are given in [2] (Eq. 22, Fig. 10) and [6] (Eq. 2, Fig.7b), respectively.

 

We conclude this article with some anecdotal evidence of how 3D printing can enable further mathematical analysis in the solution of PDEs. In wave responses such as those shown in Figures 8 and 9, the long-time algebraic growth rate is extracted via an asymptotic analysis of the Fourier integral solution of the governing PDE [6]. This involves deforming the integration path to pass through saddle points in the complex wave-number plane, such that the "growth component'"of the integral can be approximated as an expansion around a given saddle point [9]. Recently, during this process, we encountered a fourth-order saddle point that is also a branch point, leading to two Riemann surfaces. For presentation purposes, and also because we had difficulty visualizing a fourth-order saddle point, we printed both Riemann surfaces of the "growth component" in the complex wave-number plane, as shown in Figure 10. It wasn't until a few days later, while fidgeting with the surfaces during a group meeting, that we realized that the pieces perfectly fit together! We then returned to pencil and paper to figure out what makes this possible, as this was a topological feature of the analysis that we hadn't appreciated before.

Figure 10: Two Riemann sheets of a complex function that arises in the integral solution of a dispersive wave PDE. The branch point at the origin is also a fourth-order saddle point. The saddles on each sheet are surrounded by perfectly opposite valleys and hills such that they snap together when printed!

 

We will leave you with the following nonsensical thought. If a picture is worth a 1000 words, then surely a 3D print is worth 1000  x 1000 x 1000 words! For those that are interested, .stl files from this article will be posted on Nate's website, along with the associated PDE workshops.

Nate and Colin wish to acknowledge Nicole Hill, Meaghan Hoitt, and Kenneth Schultes for their development of 3D prints for the research group this year. Nate and Olivier wish to acknowledge the RIT Learning Assistant program and the students from Sections 01 and 02 of the Fall 2017 RIT Boundary Value Problems course for piloting the workshops discussed in Section 1.  The authors wish to thank Steve Weinstein and Paul Gregorius for providing ventilated space for the 3D printer.

 

References

[1] N. Gulley. A Galloping Logo Zoetrope [MATLAB Community blog post]. Retrieved from https://blogs.mathworks.com/community/2017/09/13/a-galloping-logo-zoetrope/ (September 13, 2017).

[2] N. S. Barlow, B. T. Helenbrook, S. P. Lin, and S. J. Weinstein. An interpretation of absolutely and convectively unstable waves using series solutions. Wave Motion, 47: 564-582 (2010). 

[3] S. Holcombe. surf2solid - make a solid volume from a surface for 3D printing (https://www.mathworks.com/matlabcentral/fileexchange/42876-surf2solid-make-a-solid-volume-from-a-surface-for-3d-printing), MATLAB File Exchange. Retrieved January 30, 2017.

[4] S. Holcombe. stlwrite(filename, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-filename--varargin-), MATLAB File Exchange. Retrieved January 30, 2017.

[5] N. Higham. Telling a Good Story at Conferences. SIAM News, 50(2): 2 (March 1, 2017).

[6] K. R. King, S. J. Weinstein, P. M. Zaretzky, M. Cromer, and N. S. Barlow. Stability of algebraically unstable dispersive flows. Phys. Rev. Fluids, 1 (7) 073604:1-19 (2016).

[7] N. S. Barlow, B. T. Helenbrook, and S. P. Lin. Transience to instability in a liquid sheet. J. Fluid Mech., 666: 358-390 (2011).

[8] M. Gaster. Growth of disturbances in both space and time. Phys. Fluids, 11(4): 723-727 (1968).

[9] C. M. Bender and S. A. Orszag. Advanced Mathematical Methods for Scientists and Engineers I: Asymptotic Methods and Perturbation Theory. (Springer-Verlag New York, 1999).


Categories: Articles
Tags:

Please login or register to post comments.

Name:
Email:
Subject:
Message:
x