The bitter undertones of coffee are no longer a matter of taste, but of science.

Using the popular drink as a teaching tool, Jacob Schmidt, a bioengineering professor, will be teaching Engineering 96A: “Design of Coffee,” which primarily focuses on using core concepts in chemical engineering to create the ideal cup of coffee. A part of the introductory Engineering 96 series, the class was originally proposed by chemical engineering undergraduate students and taught during the summer. Though many of the Engineering 96 classes aim to build a tangible object, Schmidt said his class instead designs a process of chemical extraction, finding the perfect flavor profile for an early morning buzz of caffeine.

“Let’s say I have a chemical, put it in a bunch of different pH solutions and then measure the output – it’s a normal, boring lab where there’s no connection or relevance,” Schmidt said. “But in this class, you can literally taste the difference in the outcome, and that taste you can back up with science.”

In the class, students start out with green coffee beans, roasting them to compare the flavor profile produced by varying levels of light, medium and dark roast. Using the grounds of the beans, students then begin to extract different flavors and molecules using filtration.

[RELATED: Art to Heart: Artistry in plating techniques creates a feast for the eyes and the stomach]

After the extraction, the students measure the pH of the solution as well as the total dissolved solids, or the concentration of the coffee, said Alan Huang, one of the coteachers of the class. They would then repeat this process with different types of coffee beans, roasts, times and temperatures to compare the different flavors produced.

“I personally don’t drink coffee at all, so when I found out I got the job I had to learn a lot about the different coffee terminology and technique in order to prepare for this class,” Huang said. “When designing the curriculum, it was interesting to learn about coffee and about the different tastes and nuances that can come from tweaking these small factors.”

The flavor of the coffee, Schmidt said, is dependent upon a variety of intermingling factors – such as temperature, the extent of the roast and the fineness of the roast, as an increased surface area leads to a rapid chemical extraction. The students connect a thermometer to tools like the program Arduino, a software which allows them to monitor the temperature at which they extract the coffee grounds, said Justine Reblando, another coteacher of the class. She said the course allows students to see how the most minute factors can affect the coffee’s flavor in ways that coffee drinkers typically don’t consider.

“Chemical engineering has a diverse application to people’s everyday lives,” Reblando said. “Students were able to understand how something like coffee has a lot of thought put into it and a whole process that goes into making something so simple.”

[RELATED: Professor’s podcast unmasks science behind superheroes and sci-fi]

Another coffee type, cold brew, requires a lengthy extraction time of 24-48 hours because at cold temperatures the extraction is less rapid, Schmidt said. The different flavor profile of the compound produced leads to its signature smooth taste resulting in its current popularity. When experimenting with different coffee processes like cold brew, the students rely on their foundational knowledges of chemistry to draw conclusions about the factors that impact the coffee’s taste, Schmidt said. With an understanding of pH and acidity, the students can conclude that the lower the pH, the more sour the taste of the coffee is.

In the past, the class also had unexpected revelations about what impacts the flavor of the coffee. Sipping from a student’s coffee after class one day, Schmidt said he remarked it was surprisingly sour. The student responded that the coffee had been made thirty minutes ago, leading to the discovery that the pH of the coffee changes as a function of time. The class ultimately allowed not only the students, but also the professor and coteachers to discover new aspects about the science of coffee.

“If you liked more sour coffee than what I would like, then your pH target would be lower than mine,” Schmidt said. “But one thing we can both agree is that this one cup of coffee is more sour than the other cup of coffee, which is something that’s objective and separate from whatever our personal taste happens to be.”