The Local Brewery: A Project for Use in Differential Equations Courses

Abstract We describe a modeling project designed for an ordinary differential equations (ODEs) course using first-order and systems of first-order differential equations to model the fermentation process in beer. The project aims to expose the students to the modeling process by creating and solving a mathematical model and effectively communicating their findings in a technical report. The students are required to produce a simple first-order differential equation and find the solution, given varying initial conditions. The students are also required to analyze a more complex, nonlinear ODE system model of the fermentation process. In dealing with the nonlinear system of equations, we provide the students a Mathematica file to reduce the time spent developing the model, but allow for more time to interpret the model. We also share some perspectives on the implementation of the project, provide alternative implementations, and possible extensions to the project.


INTRODUCTION
This project was offered to freshmen students at the United States Military Academy during the MA255 course, Mathematical Modeling and Introduction to Differential Equations. The course is the second of a two-semester Advanced Mathematics Program, taken by roughly one-quarter of the freshmen cohort class. The course covers such topics as first-order differential equations, second-order equations, the Laplace transform, series solutions to differential equations, systems of first-order differential equations, and numerical methods, such as Euler's method, improved Euler's method, and Runge-Kutta method. In addition to gaining a robust mathematical body of knowledge, three of the main outcomes of the course are for the students to go through the modeling process, to create and solve mathematical models, and to effectively communicate their findings in a technical report. The project was given during the last part of the course and students were given additional class days to complete the project. In total we expected that students should spend 12 hours on the project both in and out of class. The actual project is available upon request via email to the authors.
The scenario we set up for the students was that of a consultant for a new local craft brewery in the local township. The micro-brewery, or craft brewery, is a small commercial beer brewery, usually limited to an output of a certain number of barrels per year. These breweries usually only distribute their product to a small region as opposed to larger breweries, who may distribute nationally or internationally. The 2012 report from the Brewers Association showed that the total market of beer sold in the United States was 200,200,000 barrels, where as total craft beer sales were only 13,200,000 barrels [1]. As an important side note, we recognize that the subject of the project, brewing beer, although interesting to undergraduates, is also a source of contention on college campuses and it can be a sensitive issue talking about alcohol with underage students. However, rather than avoiding the problem, this project can provide an opportunity for teachers to discuss the negative aspects of consuming alcohol. As with many mathematical applications, the mathematics does not see the social implications surrounding the problem; a good problem solver must look at a problem through the lenses of many different disciplines. Discussing the societal impacts of alcohol could be added as part of the project write-up to help students reflect on this aspect of the problem they are solving.
The general format of the project consists in the students developing a simple model, gaining information from this model, and then using a more complex model to extract additional information. This is essentially the iterative mathematical modeling process that we espouse in the Department of Mathematical Sciences at the Academy. The project consisted of four tasks. The first and second tasks use a first-order differential equation in order to estimate the final alcohol by volume (ABV) of a particular beer, given the initial amounts of sugar and yeast. The third task uses a more complicated, nonlinear system of three differential equations, taken from the Gee-Ramirez model of beer fermentation [2]. The final task uses a flavor model for a particular "graduation beer," which relies upon the starting and ending values of the different sugars, taken from the results of the third task.

TASKS 1 AND 2: SUGAR, YEAST, AND ABV
The intent of these first two tasks is to have the students gain insight in to the physical process of fermentation. They must set up the first-order linear differential equation and experiment with varying initial conditions in order to 190 Starling, Povich, and Findlay find their final ABV. The students must also explore the effects of changing the temperature and the initial amounts of sugar on the fermentation process.
For the first task, the students must create a first-order differential equation model from the given word statement: We will assume that the rate of change of the sugar is proportional to the amount of sugar at time t multiplied by a growth constant, r. The growth constant is equal to the ambient temperature (in • F) multiplied by the initial amount of yeast divided by 70, 000.
The growth constant, r, is shown here: From the prompt above, the students should create the first-order differential equation where S(t) is the amount of sugar at time t. The units for the amount of sugar is in mol/m 3 . Units for r is in 1/h and t is in hr. Note that the amount of yeast and the temperature in this model are constants and the negative sign is necessary as the amount of sugar will be decreasing as the yeast molecules eat the sugar. The students have the option to use separation of variables, the integrating factor method, or use technology (Mathematica or another program of their choice) to solve this first-order differential equation. When they are finished, they should have a function that describes the amount of sugar at a given time, t. Once they find the solution to this differential equation, they must determine the estimated ABV of the beer, with given initial amounts of sugar and yeast using the following equation In order to verify their solution, we give the students specific initial conditions with the associated amount of sugar and ABV after a given amount of time has elapsed. We then have the students calculate the value of sugar and final ABV with different initial conditions as well as using a different yeast strain, which ferments at a lower temperature. The temperature initially used is for an ale yeast, which typically ferments at a higher temperature (70 • F), whereas the second yeast is a lager yeast, which typically ferments at a lower temperature (60 • F).
The second task uses the differential equation from task one in order to achieve a beer with 10% ABV; however, we limit the amount of time for fermentation of the beer to exactly seven days and no more than 60 units of sugar. The students must determine the starting amount of yeast and sugar in order to achieve the final ABV. The solution space is infinite, as they can achieve the required ABV with 60 units of sugar and approximately 5.7 units of yeast, but can also achieve this ABV with as little as 36 units of sugar, but must use increasing starting values of yeast. The students must also repeat the process to find feasible values using lager yeast. Finally, we ask the students to limit the values of sugar and lager yeast to 42 and 10, respectively, and determine how much longer they will need to wait past seven days to reach 10% ABV. It should be noted that although the model will allow for a 10% ABV, typical home-brewed beer will only achieve an ABV in the 5-7% range, especially when using lager yeast. Future use of this project can allow for a more reasonable ABV percentage instead of the 10% value.
An implied subtask is to discuss the implications of having large amounts of residual sugars or yeast in order to get the final ABV. For example, if they choose to have 60 units of sugar as their initial conditions, they can expect to have approximately 25 units of sugar when they stop the fermentation process, which will lead to a more sweeter tasting beer. The students should answer the questions: "Is this result acceptable?" and "Does it make sense?" This is one of the three outcomes we mentioned earlier; the ability to communicate their results.

TASKS 3 AND 4: THREE SUGARS AND TASTE FUNCTION
Now that the students have a basic idea of the fermentation process and the effects of changing the yeast and temperature, we expose them to a more complex model that accounts for three types of sugar in addition to the yeast. We also expose them to a fictitious taste model that uses the results from the complex model, where we restrict the total amount of initial sugars and time used to ferment the beer. These two tasks allow the students to explore a nonlinear system of equations as well as optimizing a nonlinear objective function.
Task 3 requires the students to solve a more complicated model that is beyond the scope of the course, but with the help of technology they are able to find a solution. Providing a Mathematica file that allows students to change the initial conditions of three types of sugars and yeast, and can be used to aid in the interpretation of the results without getting stuck in the Mathematica notation. Task 4 uses the results from the third task in order to determine an optimal value of a taste function for a particular beer style. The model used in task 3 is taken from Gee and Ramirez [2], a model that has been used and referred to multiple times in the field of the modeling beer fermentation. The fermentation model accounts for the amount of yeast present in the beer (X(t)), and three different types of fermentable sugars (glucose, G(t), maltose, M(t), and maltotriose, N(t)). All units are in mol/m 3 . Units for µ i are in [1/h] and t is in h. The system of equations is given as where µ i (for i = 1, 2, 3) are growth rates and are defined as Specific parameter values are given in Table 1. Solving the system of equations (1) is more than likely beyond the scope of an introductory differential equations course. Providing a Mathematica file allows the students to find the solution and gain insight to the interactions within the system of equations. In addition to solving the system of differential equations, the students describe the interaction of the three sugars and yeast, as well as explain the effects of the inhibition constants for glucose (K iG ) and maltose (K iM ) on the solution.
An example Mathematica result to provide to the students, having initial conditions of t max = 400, G 0 = 200, M 0 = 120, N 0 = 50, and X 0 = 50, yields the concentrations of yeast and sugars is shown in Figure 1.
Task 4 requires the students to optimize the flavor of the beer using a given "taste" function that uses the differences in the starting and ending values of the sugars. The fermentation time is limited to only 10 days and a total concentration of all three sugars to 200 mol/m 3 .  The students use their final values from task 3 to find the optimal taste value and are required to provide the optimal taste value with the associated initial values of sugar and yeast. Although students at this level may not have the tools to conduct nonlinear optimization on the taste function, we expect that they would experiment with the Mathematica file given to them. Taking a quick look at the taste function, one should see that the taste function value increases as the difference between the starting values and ending values of each of the sugars increases, with the coefficient associated with the concentration of maltose being the largest. The taste function is also penalized for having too high of a starting concentration of yeast or maltose. The intent was for the students to experiment with the results of this taste value by changing the initial values of sugar and yeast, in order to maximize the function. Although the idea of a taste function being derived from the initial amounts of three types of sugar is a bit fictitious, it provides a vehicle that allows the students to explore different solutions to their initial values. The actual varying tastes in beer stem from the use of different malts, hops, and yeast strains, in addition to the fermentation temperature and the amount of residual sugars.

PROJECT EXTENSIONS
For our purposes, this project fits well within the course curriculum. Due to student and course time constraints, the project was limited in some areas and there were things that we did not implement. A best-case scenario would allow for the time to describe the chemical interactions that occur within the fermentation of the beer and allow the students to create the models themselves. The models used in tasks 1, 2, and 4 were created by the authors to meet our desired student outcomes for the project; however, they can be adjusted as needed to achieve different learning outcomes. Modeling is an iterative process; simple models are modified based on initial results to capture additional physical realities. We use simplifying assumptions to make a problem more mathematically tractable, but in doing so, we remove aspects of the physical world that impact the information that we extract from our model. This is something that we sought to emphasize in our project. The following examples are a few ways to extend or modify the project to allow it to have a broader use.
1. A more accurate model for the growth of yeast during the process could be integrated in order to emphasize the biological application within the chemical process. A more detailed model for the amount of yeast at time t could be implemented, which brings into play more of the active biological processes. Given that yeast molecules need sugar to grow but also have limitations based on the alcohol in the wort, students could explore and incorporate this into the model. Extending the initial model by adding an interaction term between the yeast and the alcohol level in the wort could be an ideal way to capture this phenomenon. The temperature also plays a role in the process (which we reduced in our project with some simplifying assumptions) but a more detailed model could incorporate the impacts of temperature on the rate of growth for the yeast. 2. The underlying discipline for this project is chemistry. The interaction between the sugars that we are trying to model is a chemical process. Many chemistry departments have beer brewing clubs that utilize this process in a creative way. This project could be tied to or initiated by a chemist discussing the chemical aspects of brewing beer. The chemistry connection would help cast the topic in a more academic context to downplay the social side of the project (e.g., underage drinking). 3. In the last part of the project, we asked the students to use their model to optimize some quantity of interest, in our case, the taste of the beer. The primary goal of this part of the project is to utilize the model to make predictions and determine an "optimum" value for a given quantity of interest that depended on the solution information. There are alternate applications that could be implemented instead of the taste function to meet this goal. Given specific costs for the different ingredients, students could develop a cost function and try to determine the most economical mix to achieve the desire outcome. Also, instead of a taste function, this equation could be tied to the International Bittering Units scale, measuring the amount and types of acids found from applying hops to the beer. 4. One recommendation is to add an additional requirement that investigates the sensitivity of the models we had presented to them. That is measuring how making small changes to the initial values of the sugars and the yeast affects the outputs of the model. This could lead to discussions regarding the limitations of the models we create.

REFLECTIONS
We initially started the students out with the description of the physical phenomenon that they had to translate into a simple, linear, first-order differential equation. The creation of the first model (tasks 1 and 2) should lead the students into some fundamental discussions regarding basic modeling principles. Is the model accurate? How can I improve my model? If my model is only an abstraction of reality, can I still use it to draw some understanding of the real world? Asking these questions, leads to the development (or at least the interpretation and understanding) of the second model (tasks 3 and 4). We had intended for the nonlinear system of equations in task 3 to provide some shock value initially, but we also provided the students the tools to successfully interpret the physical properties of fermentation. Providing the Mathematica file that allowed the students to change the initial values assisted in minimizing the time that students needed to set-up the model, however, the trade-off was the ability to more quickly investigate the relationships between the sugars and yeast.
Ultimately, the students presented their findings in the form of a technical report, where we provided the format for them to use. The format consisted of an abstract, background, facts, assumptions, analysis, discussion, and their conclusion and recommendations.
Based on anecdotal feedback from students, the project was a hit. When asked the question on the course end survey: "The course project was helpful in developing my abilities to solve real world problems and effectively communicate the results," over 78% of students responded that they strongly agreed or agreed with the statement, whereas only 6% disagreed. The project was often mentioned in free-response survey questions as one aspect of the course the students believe should be continued. They found it engaging as it was a realworld problem that many of them may encounter in their futures (most were under 21 years of age) and showed them a use of the mathematics they were learning in class. Using the similar ideas found using the Modeling and Inquiry Problem, mentioned by Mike Huber [3], we wrapped the mathematics around a real-world problem. The student views the problem from a real-world perspective, make a decision and then communicates their rationale for making their decision. Much of the mathematics that the student has been exposed to up until this time in their lives, has been of the type where there is a definite answer; e.g., the square root of 16 is equal to four. When conducting the mathematics in the context of modeling, they must not just provide their answer, but also must identify the assumptions that are being made in the model, and be able to account for them in their solution. This project helped the students see both the utility of mathematical models to solve real-world problems as well as understand some of the complications and pitfalls associated with models.

SUPPLEMENTAL MATERIALS
Supplemental data for this article can be accessed on the publisher's website.