Software Engineering
PDFA Desktop — C# Rewrite
Complete rewrite of a pipe ductile fracture analysis desktop application. Moved from Visual Basic to C#, and replaced the gas decompression engine from Gas Decomp to NIST REFPROP.

Overview
This project is a complete ground-up rewrite of a desktop application used for pipe ductile fracture analysis (PDFA) — an engineering calculation that predicts how cracks travel through pressurized gas pipelines.
The original application had been around for years, written in Visual Basic. It worked, but it was increasingly hard to maintain, difficult to extend, and built on a foundation that was not going to carry it much further. The goal was to modernize it from the inside out — without disrupting the engineers who depend on it day to day.
What is Pipe Ductile Fracture Analysis?
PDFA is an engineering tool used primarily in the oil and gas industry. It models how a fast-running crack behaves in a high-pressure pipeline — specifically, whether the crack will keep traveling or stop on its own.
Engineers use it to:
- Predict how fast a fracture would propagate through a given pipe
- Determine whether the crack will self-arrest or continue running
- Evaluate what pipe material, wall thickness, and design parameters are needed to stop a fracture
- Validate pipeline designs against safety standards before construction or during integrity assessments
It is a critical calculation for pipeline safety. The software handles the heavy math so engineers can focus on making good design decisions.
What Changed
Language: Visual Basic → C#
The entire codebase was rewritten in C#. This was not a line-by-line conversion — it was a clean rebuild from scratch using modern development practices. The result is code that is structured, readable, and ready to grow.
Moving to C# also opens the door to better tooling, better testing, and better integration with modern libraries. Things that were painful or impossible in the original VB codebase become straightforward.
Gas Engine: Gas Decomp → NIST REFPROP
The original application used Gas Decomp as its decompression model — the component responsible for calculating how gas pressure and properties change as a crack opens and gas escapes. We replaced it with NIST REFPROP (Reference Fluid Thermodynamic and Transport Properties Database).
REFPROP is maintained by the National Institute of Standards and Technology and is widely used across the energy industry. The switch brings:
- More accurate thermodynamic property data for a wide range of gases
- Better coverage of complex and non-standard gas mixtures
- A well-documented, actively maintained API that is not going away
This matters most for pipelines carrying gas compositions that fall outside what Gas Decomp handles well. The results are more accurate, and the underlying data is more trustworthy.
What Stayed the Same
The user interface and the analysis workflow were kept as familiar as possible. Engineers already know how to use the tool — the rewrite should feel like an upgrade, not a replacement. Same inputs, same outputs, same reports. The analysis itself works the same way; it just runs on better code with better data underneath.
Why This Mattered
Legacy engineering software tends to stick around long past its expiration date because it works. But “it works” is not the same as “it is safe to depend on.” When the person who wrote it leaves, when the language or libraries go unsupported, or when a new requirement comes in that the old code cannot handle — that is when the real cost shows up.
This rewrite gives the tool a proper future. It is maintainable, extensible, and ready to take further — which is exactly what the next two phases of this project build on.
- Visual Basic to C#. Rewrote the entire application from scratch in C#, cleaning up years of accumulated technical debt and giving the codebase a foundation that is easy to maintain and grow.
- Gas Decomp to REFPROP. Replaced the Gas Decomp decompression engine with NIST REFPROP for more accurate thermodynamic property calculations, especially for complex and non-standard gas mixtures.
- Same workflow, better internals. Kept the familiar interface and analysis process that engineers already know, while rebuilding everything underneath for reliability and long-term maintainability.