How American Corruption Turned a Nuclear Physicist Into a Crude Coder

A nuclear physicist's memoir of working at the Kurchatov Institute, where American outsourcing of nuclear safety analysis turned Soviet scientists into software developers — featuring punch-card interfaces, cold-war era computing, and the perverse incentives of government-funded science.

Part One: The Beginning of a Scientist's Career

My first computer was an ISKRA 86 from the Smolensk factory, purchased for the price of a Zhiguli car in 1991. In the USSR, from age 15 I was a black-market speculator, then a sole proprietor, trading everything from vodka and cigarettes, but the biggest business was selling books. Even then I suspected that the future belonged to computers, and when my business partner bought himself a Zhiguli from Germany, I bought myself a technological marvel with an Intel 8086 processor and 256 KB of memory, which I later expanded to 512 KB for extra money. No hard drive — DOS booted from floppy disks.

Its main use was playing the game Pila and "Prince of Persia."

In 1994, I enrolled at Bauman Moscow State Technical University in the Department of Nuclear Reactors and Power Installations. And to my amazement, I discovered this marvel could be programmed. A wonderful world of Pascal opened up to me, and it hasn't closed since. Back then the process looked like this: first DOS loaded from one floppy, then Turbo Pascal, and you could write programs. Besides the bubble sort and spline interpolation required by the Bauman curriculum, I wrote a program that could play the card game Durak (Fool), using pseudographic characters as card images, and it even had two difficulty levels: on the first it played fairly, on the second it dealt itself the best cards. And on top of that, it used the computer's speaker for sound.

The game looked roughly like the picture below, except my monitor was black-and-white.

Card game interface

The game was a smashing success among its only user, who drove the entire dorm room crazy with the annoying beeping of the speaker every time cards were dealt.

I felt like a cool programmer. Considering there was no internet or Google back then, learning to program relied solely on books and the scientific trial-and-error method. I was already considering switching professions, abandoning nuclear reactor installations to become a programmer.

But fortunately for me, Windows and Delphi appeared, and it was a breakthrough. I realized that programming was a dead profession — if anyone could drag buttons and other components onto a form and then get a working application with one click, why bother learning it at all? So I continued studying nuclear reactors; it was more interesting.

In 1999, I ended up at the Kurchatov Institute. I got in through connections — not to earn money or, God forbid, actually work. By that time I already had a prestigious job as a janitor at Mosenergo. It was exclusively to complete the mandatory internship. Other options involved actually doing something or even traveling to God knows where.

To keep me out of the way, they assigned me a task. The boss ceremonially handed me a reference book — a Soviet manual for calculating critical flow at various pressures from RBMK reactor circuits, printed on yellow paper in a run of "100 copies" — and asked me to calculate flow at different pressures and temperatures for the RGK (distribution group header). Clearly hoping this would keep me busy for the entire three weeks of the internship, and he wouldn't see me again until signing off on my internship report. But he was unlucky — I was familiar with Mathcad. In one of my course projects, I had already entered water property formulas into it and even used iteration methods to calculate a heat exchanger with a Field tube.

As a result, over the weekend I converted the entire manual into Mathcad and could calculate critical flow from a pipe of any diameter. But my boss's bad luck didn't end there. The thing is, I'm from the glorious city of Desnogorsk, where a glorious RBMK-type reactor stands — the same type that exploded at Chernobyl. One of my first internships, also through connections, was at the training center, where, as my assignment, I wrote a training manual "The RBMK Reactor as a 'Teapot' for Dummies." To write this masterpiece, I had access to the NPP documentation archive. (Those were the times: a student could go and examine any NPP drawings, and then post it all on the internet. And it's still there, characteristically: https://reactors.narod.ru/rbmk/index.htm). I had a complete understanding of what pipelines make up the RBMK circuit. The rest was a matter of technique: for each pipe diameter found in the RBMK, compile a table of pressures and temperatures (also known parameters) that can occur in reality. Connect Excel, load into Mathcad, and write the results into a set of Excel tables.

So when I showed up on Monday with the calculation results, the boss was of course very surprised, but he didn't lose his composure and suggested I calculate critical flow from an individual water pipeline. The manual had about 10 more scenarios where ruptures and critical flow were possible, and in principle 2-3 days per scenario could easily fill the entire internship. But then I told him I had already calculated absolutely everything and converted the manual into a set of tables. The boss was dumbfounded and took me to the real scientists, of whom there were two in the department. One was a Master of Sport in mountaineering, the other in kettlebell lifting.

Those were fun times, right after the 1998 crisis — the time when the foundations of Russia's modern economy were laid. As the current Defense Minister classified Russian business: "There are three types of business: 'ratting,' 'pigging,' and 'hoofing'... 'Ratting' is swooping in, eating everything, running to the next pile. 'Pigging' is when there's a trough, everyone crowds around it pushing each other away. And 'hoofing' is like a reindeer, patiently scraping with its hoof searching for a piece of lichen."

In science at that time, the divisions were already clear. Those who had signing authority just "pigged out," those who could sell data abroad "ratted." I was unlucky — I ended up with the reindeer.

At the Kurchatov Institute the official salary then was $25. The two scientist fighters were responsible for the scientific support of RBMK reactors across the country and abroad. Back then the RBMK-1500 in Lithuania was still operating.

"Guys, I found you a smart student, he did my calculations over the weekend. Give him an assignment, let him work with you."

The scientists looked at me grimly and with great skepticism, but still gave me my first responsible assignment. They gave me money and sent me to buy vodka and snacks. I went to the nearest supermarket, bought vodka, sausage, bread, pickled cucumbers, pickled mushrooms, and a carton of orange juice. Back then you could freely carry these things in bags through the Kurchatov Institute checkpoint, past security. When I started laying out my purchases on the table, the scientists' faces clearly showed that I had failed the assignment.

"Why did you buy so much food? We sent you for vodka, not food!"

"No," the scientists told the boss, "we don't need students like this, let him go to Kramerov, let him calculate something for him."

I should mention that Alexander Yakovlevich Kramerov was a legendary figure, author of the brilliant book Kramerov A.Ya., Shevelev Ya.V. "Engineering Calculations of Nuclear Reactors." This was the pinnacle of my career as a nuclear physicist. As my scientific advisor, Alexander Yakovlevich assigned me to calculate graphite combustion in the RBMK reactor stack, and he himself did all the main derivations and literature research — I just had to enter everything into Mathcad and publish a paper, for which I received a young scientist award. And perhaps I would have become a scientist, but then the Americans showed up with suitcases full of cash dollars.

Part Two, Tragic: Money Instead of Science

At that time, the US government, besides supplying us with Bush legs (chicken quarters), was helping Russia assess NPP safety. Big money was allocated. The scheme of American aid was roughly the same as always.

The US government allocates money for conducting calculations for in-depth safety assessment of NPPs in Russia, the money goes to a national laboratory at standard rates.

The contract for assessing the Leningrad NPP reactor (RBMK type), which was undergoing modernization at the time, was won by the prestigious Pacific Northwest National Nuclear Laboratory (PNNL). Obviously the calculations had to be done using the American code RELAP5 MOD3 from another prestigious lab, Idaho National Laboratory. But the calculations require input data. In principle, they could get it from LNPP, but the people there had other things to deal with — they were conducting a modernization, dealing with steel, pipes, pumps, and construction. Understanding what these American scientists wanted was impossible. So the Kurchatov Institute was brought in, so the American scientists wouldn't get in the way at the construction site. Let the scientists sort it out in their own bird language — LNPP coordinates all modernization decisions with the scientific director at the Kurchatov Institute anyway, and all the data is there.

And that's when the cards fell right for the American efficiency managers — outsource! Obviously the cost per man-hour of an American nuclear physicist in 1999 was astronomical and counted in dollars, and compared to Russian scientists' salaries in that same 1999, it was also cosmic. Salaries at the lab were about $3,000-$4,000 per month, and that's exactly the rate at which the US Treasury allocated money for the safety assessment work. But here at the Kurchatov Institute sat professional Soviet physicists with an official salary of $25. That meant the potential margin was so huge that even drug dealers would cry with envy and nervously smoke — or maybe snort and inject — on the sidelines. Americans are real capitalists — there's no crime that capital won't commit for a 100,000% profit.

And here was government money for the safety of Russian NPPs — only a fool wouldn't make money here, and Americans were never fools. Since I was at the bottom of the food chain at the time, I can't say how much money was siphoned off this project.

I was told a story that when the American manager was too lazy to calculate and distribute money to the seconded Russians himself, he would give them his card and PIN code and send them to an ATM so they could withdraw money for themselves from his account.

Well, and the known facts of our Minister of Atomic Energy being arrested in Switzerland https://rg.ru/2005/05/05/adamov-arest.html — the amounts are there.

One version of this story goes that the main idea behind American funding of in-depth safety assessment of Soviet NPPs was that American physicists, using American calculation codes and Soviet NPP data, would perform this deep assessment and prove to the whole world that these Chernobyl-type RBMK reactors were mortally dangerous and needed to be shut down immediately. Moreover, an RBMK had already exploded. An excellent plan, reliable as a Swiss watch — what could possibly go wrong?

But money conquers evil. And the efficiency managers, having received American taxpayer money, made a brilliant decision — hand all the work to the Russians and pay them in cash dollars that they leave as tips in the PNNL lab cafeteria. Outsource — the foundation of effective management.

So the department with two scientist reindeer and one dim student who couldn't even buy vodka properly got dumped with the task of performing calculations on an American program for the Russian RBMK-1000 reactor. I wasn't planning to work at all, but they made me an offer I couldn't refuse. The boss said: $150 every month, cash. Plus a bonus at the end of the project in a year. $150 a month for a Bauman graduate in 2000 was like a mid-level Sberbank salary today. And I agreed.

The computers, of course, were provided by the Americans. They ran OS/2 — there was such an operating system. Now I realize that in 1999, these computers were probably destined for the scrap heap, but instead they were shipped to the Kurchatov Institute. They also provided the RELAP/MOD 3.3 program. An excellent calculation code that carries great weight and authority in the nuclear field — practically the gold standard of calculation programs.

But if Steve Jobs had seen its interface, he would have died from an attack of botulism, distemper, and ectopic pregnancy. Good thing young Jobs went to look at software at the Xerox labs. If he had gone to the physics lab at Idaho National Laboratory, there would have been no Macintoshes or iPhones.

You can still evaluate the program's interface today (by the way, if you visit this laboratory's website, here's news from 2023).

RELAP5 interface from 2023 news

On the presenter's screen in the 2023 news is this picture:

RELAP5 program interface

You might ask: if this is the interface from 2023 news, what did it look like 24 years before that, in 1999? Surely punch cards?

Punch cards? Yes, you'll laugh, but it was indeed punch cards in 2000. Look at the next picture — this is the actual data input in the form of punch cards that I personally used. Stars mark comments that don't matter, and the entire model description of the reactor is a sequence of numbers called cards. Yes, in 2000, while building a model in American software, we discussed cards, and in the user manual they were also cards.

RELAP5 punch card style data input

I can just picture the scene. American physicist-programmers developing the code: they've got lambdas, correlations, closure relations, Reynolds and Prandtl numbers, and Bernoulli and Navier-Stokes equations. Cutting holes in cards with knives. An intern like me runs in and announces:

"Comrade scientists, stop the knife fight! It's over! Progress has arrived. Glasnost, Perestroika, Reaganomics — no more punch cards! Now you can write to tape, to files without limits, no need to suffer with meaningless numbers, you can give variables human names in English. Hurrah, comrades! The interface revolution that the Bolsheviks and Turing spoke of for so long has come!"

"Right," the American nuclear physicists reply to the intern, "here's the procedure for reading input data in punch card format. Don't change anything! If the last digits of the card number are 101, that's where the diameter, length, and volume go, and if the last digits are 103, that's where roughness and hydraulic diameter go."

"Just enter the parameters like that?"

"Yes. Like on punch cards: first the card number, then the numbers. What the numbers mean and their order is already written in our code. Don't mix them up!"

"Can variables be in text form?"

"No, only numbers like on punch cards!"

"But it's completely impossible to understand!"

"Fine, don't cry. Where do they find such dimwits?! You can specify the card type in text for idiots like you, but no more letters — only numbers. We've got fluid and gas mechanics here, Navier-Stokes won't match with Reynolds and the closure relations aren't closing. Get out of here and stop bothering us!"

And until 1999, that's exactly how data entry worked. It probably still works the same way, judging by the screenshot from 2023.

Armed with cutting-edge American technology and the world's best reactor accident calculation program RELAP5 MOD 3.2, we got to work for the American laboratory.

The calculation process looked like this. One of the two scientists assembled the mathematical model as a set of punch cards in a text file. And ran the calculation, usually overnight, sometimes for 24 hours. The next day the hard drive with results was pulled from its bay (those were the times), and the second scientist went to the neighboring building where a Windows computer stood with a results viewer program. Processing the results calculated overnight took about two hours. The results in the form of printed graphs were laid on the boss's desk, as graphs roughly like the figure above. He looked carefully, asked for more graphs (another trip to the other building for about three hours). He gave instructions on what to change in the model (another night of calculations). If the results and set of graphs were satisfactory, the boss wrote a description of the scenario and why these graphs proved the safety of the Soviet Chernobyl-type reactor. For each graph, a specially trained woman created a description and a report was formed.

Since work had already begun and was paid in cash dollars, the two scientists, despite my vodka fiasco, agreed to put me to use. I think they figured that sending me for vodka was a no-go, but for running hard drives with NPP safety calculations and printed graphs between buildings, even a dim student like me could serve.

"Strong programmer?"

"Then grab the disk and run to the other building. Bring back the printout of the results."

But since I'm very lazy, I decided to figure out what kind of file this program spits out after 24 hours of calculation, which then needs to be dissected for an hour with special viewing tools to extract the needed graph.

It turned out the format was quite readable, though the program simply writes everything it calculates at each time step for every component, so the file is full of unnecessary data. In the end, instead of running between buildings with hard drives and printouts, I quickly threw together a Delphi program that takes a RELAP/MOD 3.2 result file and in a couple of minutes builds the needed graphs. Moreover, you could configure which graphs to display and how.

As a result, the boss no longer waited for printouts — he could view what his scientists had calculated on the American program right there in my tool.

Custom results viewer program

The next step was exporting everything to text files, which I opened in Excel, where graphs were built, and then assembled everything into a separate Word document, where neatly, with a table of contents, two graphs per page, all the graphs selected by the boss were laid out. One mouse click and 15 minutes. All that was left was to add the text description and the report was ready!

It was translated into English, the American outfit PNNL's details were inserted into the report headers, done! The man-hours of American scientists, paid for by the US Treasury, were no longer needed — and the money keeps spinning and the schemes keep scheming.

When our American masters in pith helmets from PNNL came to visit us, I showed them my creation. I thought the good master would see my genius — how I had sped up the report production process — and would wet his shoes in ecstasy and take me to faraway America, where he'd give me "a barrel of jam and a basket of cookies" and I'd be a bourgeois collaborator.

But to my surprise, my genius solution aroused no lively interest from the white masters. They smiled politely and nodded, though without much enthusiasm.

Out of curiosity, I decided to check what's going on with interfaces for these guys now. Everything's exactly the same. Photo evidence: in 2019, nuclear scientists in Russia were still using homemade tools to read results from the latest version of this awesome program RELAP5 - 3D!!!! In other words, in the USA everything is as stable as ever — they still couldn't produce a proper interface for viewing calculation results in 20 years. Our guys continue to view Soviet reactor calculation results from the American RELAP in homemade programs.

Homemade RELAP results viewer in 2019

Why is the interface so bad for nuclear physicists? I have two theories:

1) Professional: if the system being calculated by an engineering program is complex enough, then any interface that helps prepare calculation data or facilitates data processing is irrelevant — completely. Indeed, if data preparation takes 1% of the total work effort, then reducing it even to zero has no effect on usability, and spending precious time learning a new interface is like beer without vodka — money down the drain!

2) Economic: based on experience implementing engineering software. From the height of my experience, I understand why the Americans themselves won't build such a program. It's dead simple: scientists are paid by the man-hour, and the longer the program takes to build graphs, the more man-hours can be billed to the report produced with US Treasury money, and GDP grows. Bingo! That's why only dim Russian students make programs to speed up viewing results and producing reports from their American program. That way, brother, you'll never sell the elephant!

Which of these two theories do you prefer?

I just now thought — what if Matlab Simulink is slow for exactly the same reason? It's a tool for American scientists, and the Matlab developers know what scientists need. When a native Simulink model takes 7 minutes to open, while SimInTech opens the same model instantly — that's not an advantage but a disadvantage: you can't rack up man-hours with SimInTech.

But I'm digressing again.

The Inspector Is Coming, or "Boss, We're Screwed!"

Just as we had streamlined the process and were already imagining thick stacks of green dollars we'd soon receive, a server fox crept up unnoticed — trouble came from where we least expected.

It turned out the American scientists hadn't come just for a visit but for an inspection. During the visit of our American auditors, it became clear that despite having industrialized the production of reports for the American laboratory, we apparently had big problems with documentation. The Americans turned out to be real extremists.

The American friends asked a treacherous question, as cunning as American imperialism itself: where is your reactor model description?

Management presented a picture in Word something like this:

RBMK nodalization diagram in Word

But such a model description didn't satisfy the American masters at all. In reality, the picture had about as much to do with a proper description as nothing at all.

The real model description consisted of 5 battered sheets of accounting draft paper (the kind where, to save paper, you print on the other side), on which the author had hand-drawn and labeled in small, illegible handwriting all model elements, numbered. A couple of these sheets were unevenly torn — apparently they had started creating the model description back in 1998, during the deficit, when not only printer paper but even toilet paper was in short supply.

The chief model developer, showing these sheets, liked to repeat that they represented 3 years of work. If they were lost, the entire model would turn into a pumpkin and could be thrown away, because without these notes the sets of numbers in the model would become meaningless gibberish even to the author.

Showing such sheets to the Americans was somewhat embarrassing.

But the visiting white masters brought us the real technology for creating such reports. It turns out that for every model we create in punch-card style, a so-called WorkBook — a working notebook — must be created. This is a separate document describing how, by some magic, from the thousand pipelines that make up the RBMK reactor, a set of numbers in cards is derived. For example:

American workbook example with formulas

For a single resistance value on card 5.14, the Americans' documentation had a page of two-story formulas. And there had to be two people — one who created the calculation and one who verified it. And that's for one parameter of one component, and there are roughly 40,000 of them in the model. The same workbook included copies of drawings and equipment specifications from which the numbers were taken. Note, in parentheses it appears to list pages of diagrams where you can look up the number.

The number of man-hours paid for by American taxpayers grew exponentially before our eyes.

At this point, the two scientists — who had only just begun to celebrate that they no longer needed to run between buildings or send the dim student running, since reports were flying out like from a Kalashnikov — had a fit. It was clear that producing such documentation with the forces of two scientists and one dim student was physically impossible in any foreseeable timeframe.

Because our approach to creating the model was completely different. The model developer, a Soviet scientist and Master of Sport in mountaineering, would take a draft sheet from the scrap pile, grab a drawing from the library, a calculator, a handbook on hydraulic resistance calculation, light a cigarette, and on the draft paper draw a diagram, sequentially write down volume numbers using his own coding system. Calculated diameters, flow cross-sections, and other calculations went straight into the model file with punch-card numbers. No intermediate calculations, let alone formulas, were recorded anywhere. Why would they be? The second scientist was doing the same thing with other reactor systems.

And now all these actions needed to be repeated for every single number and recorded in a workbook.

The in-depth NPP safety project — and this was money already spent under the Gore-Chernomyrdin program, for which the Minister of Atomic Industry was already being prepared for imprisonment in Switzerland — hung by a thread. The scientists, when management proposed creating such a workbook for the American master, firmly said:

"Let them give back Alaska first, then we'll see."

"There's the student — he's got nothing to do anyway, he doesn't even run between buildings anymore. Let him deal with this crap."

I thought for a bit and proposed a solution. Look, if I made tables of critical flows for all NPP pipelines, then maybe by the same pattern we do the same thing with geometry. Instead of the manual, let's use Idelchik's handbook. I'll enter the formulas into Mathcad, we'll just make tables of diameters, bends, and pipeline lengths, and we'll have an almost real Workbook. For each number, we'll print out the Mathcad formula and the resistance table calculated in Mathcad, highlighting the needed value in the table. Result: 2 pages per number, and you get a thick document.

The Idelchik handbook was ordered from American Amazon, and I sat down to work.

The result was a document containing Idelchik formulas entered in Mathcad plus tables of geometry parameters and pipelines. To create the workbook, the Mathcad formula was printed along with a table where the calculation result used in the model was highlighted. Thus, the wolves were whole (the Americans got thick workbooks with model descriptions to justify the man-hours spent before the US Treasury), and the sheep were fed: the Russian scientists who did all the work for the American laboratory got their promised dollars.

After such a resounding success, I was invited to the neighboring department, since there were still plenty of scientists at the time but few people capable of creating IT that made scientists' lives easier. In the end, instead of doing nuclear physics, I started creating interfaces for calculation codes.

In principle, broadly speaking, I'm still doing that. And the American physicists, who didn't appreciate my genius, are still sitting without a good interface (but they have dollars, so they're probably fine). Sometimes they lose nuclear power plants due to data entry errors, but that's a mere trifle: A Code Error That Cost a Nuclear Power Plant. A short video investigation of how this error appeared and how Russian crude coders proposed saving the NPP:

And now, when people complain to me that the interface of our program is inconvenient, I'm as calm as a boa constrictor, because after the punch cards of American nuclear physicists, an inconvenient interface simply doesn't exist for me.