When the Flatiron Institute opened in 2016, one of its goals was to support basic science by funding researchers who develop software and computational tools that can be used by scientists outside the institute. Such software can be crucial for new research, but the emphasis on publication in the academic world sometimes hinders the development and maintenance of these programs. “You don’t get as much credit in academia for working on software packages right now,” says Manas Rachh, a research scientist in numerical analysis at the Flatiron Institute’s Center for Computational Mathematics (CCM).
Rachh grew up wanting to be an engineer like both his parents, but as an undergraduate he realized he was most interested in the mathematical side of the engineering courses he was taking and so he pivoted to applied mathematics instead. Rachh left India for the United States to begin graduate work at New York University. “And at the end of the first two weeks, I was seriously questioning my choices,” he says. “The mathematics I had learned as an undergraduate in engineering was nowhere close to the level of rigor and detail required in grad school.” With the help of friends in his program and a supportive adviser (Leslie Greengard, now the director of the CCM), he found his footing, earning a Ph.D. in 2015.
Rachh went to work at Yale University as a Gibbs assistant professor of applied mathematics before joining the Flatiron in 2018. Since graduate school, he has focused on developing fast algorithms to find numerical solutions to certain partial differential equations (PDEs), which are equations that describe relationships between partial derivatives of multivariable functions. PDEs are notoriously difficult to solve exactly — or even approximate efficiently — because the complexity of these relationships increases precipitously with the number of variables. PDEs arise in a range of application areas, including chip design, acoustics, plasma physics, fluid dynamics and computational biology.
Researchers can find very good numerical approximations to solutions of PDEs in some cases, but usually the more precise an answer is, the longer it takes to find. Rachh and his colleagues have to balance this trade-off between speed and precision in developing software, while also prioritizing usability for researchers. The fastest code in the world will not have any impact if it is too complicated to garner widespread use. “That’s a day-to-day concern,” he says, “deciding where we are willing to make sacrifices in speed and efficiency in exchange for usability and attracting a wide audience.”
Furthermore, Rachh and his colleagues need to be able to guarantee that their programs are reliable and can produce answers that are within certain accuracy specifications. All PDE models already have uncertainty baked in; researchers do not want to adopt new software that will introduce even more of it, or make their answers less accurate. “We want to make sure there is no error arising from doing a simulation by computer,” Rachh says. “All of the errors should be artifacts of the model that they’ve chosen, not how that model is being solved.”
Academic researchers who need specialized software are sometimes poorly served by commercially available software packages because academic clients are often less lucrative than business clients, and they may have very specific and unusual needs. Rachh believes he and other researchers at the Flatiron fill an important niche. “Often, commercial software can solve a much broader class of problems than we can, but the problems that we do solve, we can solve better,” he says. “One of our advantages is that we understand researchers’ problems better, having worked on similar problems ourselves, whereas a company might be excellent at software development, but they might not have someone who’s worked on both the software and the research applications.”
Rachh and his colleagues write code in several different programming languages widely used by researchers in the fields they are supporting. For example, his team is collaborating with the Electromagnetic/Radio Frequency team at MathWorks to incorporate one of its tools into MATLAB, a popular programming language for mathematicians and engineers. “We are currently not working on the application itself,” Rachh says, “but facilitating other engineers to be able to solve bigger problems faster using the same amount of resources.” Deciding what languages and platforms to use, and understanding how to best write for the interfaces their end users will be working with, are challenging parts of the job. “This is not something I was formally trained in,” he says of developing user-friendly software interfaces. “We want the things we’re building to last for a while, so we have to factor that in at an early stage.”
Rachh is especially proud of two programs his team has released recently, FMM3D and fmm3dbie, both of which use techniques called fast multipole methods to solve Laplace, Helmholtz and Maxwell equations. All three are PDEs that arise in several areas of physics, including gravitation, heat conduction, fluid dynamics and electromagnetism. “For me, this has been a project that’s been going on for seven to eight years, and for some of the other people in this group, this is something that they’ve been looking forward to for two or three decades,” Rachh says. “Finally having something that’s out there and getting a bunch of use has been very satisfying.”
Rachh is looking forward to building on these two programs, making them more user-friendly and faster so that researchers can incorporate them into their pipelines for the numerical simulation of their PDE models. “Ideally, four or five years from now we want to get close to computer-aided design.” That is, scientists and engineers should be able to design optimal systems or devices for a specified goal or task primarily through the numerical simulation of their corresponding PDE models. “But right now, we are just not there.”
Rachh feels great satisfaction in being able to contribute to science by creating and supporting software for a diverse range of application areas, even though such work usually takes place behind the scenes. “Personally, what attracted me to Flatiron is the ability to dedicate time and resources to building these tools so that other people who are better suited and are experts at the modeling side of things can use them and push the frontiers of science faster.”