Skip to content

AndrewTrepagnier/tmin

Repository files navigation

TMIN - Pipe Thickness Analysis Tool

TMIN Logo

Downloads PyPI version License Tests codecov Python Versions Blog Blog Blog

TMIN (an abbreviation for "minimum thickness") is an open source python package designed to help engineers determine if corroded process piping in refineries and pertrochemical plants are safe and API-compliant — in seconds.

Many oil and gas companies are faced with maintaining thousands of miles of 100+ year old piping networks supporting multi-million dollar/year processing operations. There is rarely a simple solution to immediately shutdown a process pipe - as these shutdowns more often than not impact other units and cost companies millions in time and resources.

TMIN can be used as a conservative and rapid engineering support tool for assessing piping inspection data and determine how close the pipe is to its end of service life.


How to install and get started

Installation:

pip install tmin

Basic Usage

from tmin import PIPE

# Create pipe instance
pipe = PIPE(
    pressure=50,           # Design pressure (psi)
    nps=2,                 # Nominal pipe size (inches)
    schedule=40,           # Pipe schedule
    pressure_class=150,    # Pressure class
    metallurgy="Intermediate/Low CS",
    yield_stress=23333     # Yield stress (psi)
)

# Analyze measured thickness
results = pipe.analyze(
    measured_thickness=0.060,  # Measured thickness (inches)
    year_inspected=2023        # Optional: inspection year
)

print(f"Flag: {results['flag']}")
print(f"Status: {results['status']}")
print(f"Governing thickness: {results['governing_thickness']:.4f} inches")

Docker Usage

Run TMIN in a container:

# Build and run
./docker.sh build
./docker.sh run

# Or test functionality
./docker.sh test

License

MIT License

About

A rapid, ASME/API-compliant tool for engineers to assess the integrity of process piping

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published