History of MolFlow
Source
Based loosely on the CERN Courier article Tracing molecules at the vacuum frontier, published in September 2022
MolFlow emerged in 1988 during a visit to CERN from its original author, Roberto Kersevan, who was working at the Elettra light source in Trieste at the time. CERN vacuum expert Alberto Pace showed him a computer code written in Fortran that enabled the trajectories of particles to be calculated, via a technique called ray tracing.
At that time, the standard techniques were back-of the envelope calculations of vacuum, to which analytic formulae had to be used to estimate the conductance of various shapes.
State of the art in the 1980s
Analytic vacuum profile calculation
Excerpt from an old textbook for conductances and view factors of different geometric shapes
On returning to Trieste, and realising that the CERN code couldn’t be run there due to hardware and software incompatibilities, Roberto decided to rewrite it from scratch. Three years later the code was formally released.
MolFlow was originally written in Turbo Pascal, had (black and white) graphics, and visualised geometries in 3D – even allowing basic geometry editing and pressure plots. While today such features are found in every simulator, at the time the code stood out and was used in the design of several accelerator facilities, including the Diamond Light Source, Spallation Neutron Source, Elettra, Alba and others – as well as for the analysis of a gas-jet experiment for the PANDA experiment at GSI Darmstadt. That said, the early code had its limitations. For example, the upper limit of user memory (640 kB for MS-DOS) significantly limited the number of polygons used to describe the geometry, and it was single-processor.
Original MolFlow
Interface of the original MolFlow
MolFlow's first user guide, that you can still read
In 2007 the original code was given a new lease of life at the European Synchrotron Radiation Facility in Grenoble, where Roberto had moved as head of the vacuum group. Ported to C++ by Jean-Luc Pons, multi-processor capability was added, which is particularly suitable for Monte Carlo calculations: if you have eight CPU cores, for example, you can trace eight molecules at the same time. OpenGL (Open Graphics Library) acceleration made the visualisation very fast even for large structures, allowing the usual camera controls of CAD editors to be added. Between 2009 and 2011 MolFlow was used at ITER, again following its original author, for the design and analysis of vacuum components for the international tokamak project.
MolFlow 2.0
MolFLow 2.0, with the graphics framework and ray-tracing that's base to the versions today.
It still works today on Windows 11, you can try it out!
In 2012 the project was resumed at CERN, where Roberto had arrived the previous year. From here, the focus was on expanding the physics and applications: ray-tracing terms like “hit density” and “capture probability” were replaced with real-world quantities such as pressure and pumping speed. To publish the code within the group, a website was created with downloads, tutorial videos and a user forum. Later that year, a sister code “Synrad” for synchrotron-radiation calculations, also written in Trieste in the 1990s, was ported to the modern environment. The two codes could, for the first time, be used as a package: first, a synchrotron-radiation simulation could determine where light hits a vacuum chamber, then the results could be imported to a subsequent vacuum simulation to trace the gas desorbed from the chamber walls. This is the so-called photon-stimulated desorption effect, which is a major hindrance to many accelerators, including the LHC.
MolFlow and Synrad have been downloaded more than 1000 times in the past year alone, and anonymous user metrics hint at around 500 users who launch it at least once per month. The code is used by far the most in China, followed by the US, Germany and Japan. Switzerland, including users at CERN, places only fifth. Since 2018, the roughly 35,000-line code has been available open-source and, although originally written for Windows, it is now available for other operating systems, including the new ARM-based Macs and several versions of Linux.