When to Use
- Level 1 screening (conservative equations, minimal inspection data)
- Level 2 detailed assessment (refined analysis using thickness profiles)
- RSF and MAWP calculation from UT thickness data
- Remaining life projection with linear and power-law corrosion models
- Processing UT grid CSV data to CTP (Critical Thickness Profile) maps
- Run-repair-replace decision framework
Assessment Levels (API 579-1/ASME FFS-1)
| Level |
Approach |
Input Required |
| Level 1 |
Screening — conservative, tabulated equations |
Nominal thickness, design pressure, corrosion rate |
| Level 2 |
Detailed — refined with actual thickness profiles |
UT grid measurements, material properties |
| Level 3 |
Advanced — FEA/fracture mechanics |
Full material data, specialist analysis |
Core Calculations
Remaining Strength Factor (RSF)
from digitalmodel.asset_integrity.rsf_calculations import calculate_rsf, check_ffs_level1
# Level 1 screening — General Metal Loss
result = calculate_rsf(
t_measured=0.280, # measured wall thickness (inches)
t_required=0.150, # required minimum wall thickness (inches)
t_nominal=0.375, # original design wall thickness (inches)
)
print(f"RSF: {result['rsf']:.4f}") # e.g. 0.7467
print(f"FFS: {result['ffs_acceptable']}") # True if RSF >= RSF_allowable (0.90)
print(f"MAWP ratio: {result['mawp_ratio']:.4f}")
# Level 1 acceptability check
check = check_ffs_level1(
t_measured=0.280,
t_required=0.150,
t_nominal=0.375,
design_pressure_psi=1200.0,
smys_psi=65000,
outer_diameter_in=12.75,
)
print(f"Level 1 acceptable: {check['acceptable']}")
print(f"MAWP remaining: {check['mawp_psi']:.1f} psi")
Remaining Life Projection
from digitalmodel.asset_integrity.rsf_calculations import remaining_life
# Linear corrosion model (most common)
life = remaining_life(
t_current=0.280, # measured wall (inches)
t_minimum=0.150, # required wall (code minimum)
corrosion_rate_in_per_yr=0.008, # measured corrosion rate
model="linear",
)
print(f"Remaining life: {life['remaining_years']:.1f} years")
print(f"Next inspection by: {life['inspection_date']}")
# Power-law model for accelerating corrosion
life_pw = remaining_life(
t_current=0.280,
t_minimum=0.150,
corrosion_rate_in_per_yr=0.008,
model="power_law",
power_law_exponent=1.3,
)
UT Grid — CTP Processing
from digitalmodel.asset_integrity.rsf_calculations import process_ut_grid
# Read UT measurement grid from CSV
# CSV format: rows=axial positions, cols=circumferential positions, values=thickness (inches)
ctp = process_ut_grid(
csv_path="inspection_data/UT_grid_node_123.csv",
t_nominal=0.375,
t_required=0.150,
)
print(f"Minimum measured thickness: {ctp['t_min']:.4f} in")
print(f"Average thickness: {ctp['t_avg']:.4f} in")
print(f"Metal loss fraction: {ctp['metal_loss_pct']:.1f}%")
print(f"CTP grid shape: {ctp['grid_shape']}")
print(f"Points below t_required: {ctp['critical_points']}")
Run-Repair-Replace Decision Framework
| Decision |
Condition |
Action |
| Run |
RSF >= 0.90 and t_min > t_required |
Continue with monitoring plan |
| Run (reduced MAWP) |
RSF < 0.90 but MAWP_remaining > 0 |
Reduce operating pressure, re-inspect in <= remaining_life/2 |
| Repair |
t_min < t_required, repair practical |
Weld overlay, clamp, composite wrap |
| Replace |
RSF -> 0 or repair impractical |
Spool replacement, re-pipe |
Standards Reference
| Standard |
Scope |
| API 579-1 / ASME FFS-1 |
Fitness-for-service (primary) |
| API 510 |
Pressure vessel inspection |
| API 570 |
Piping inspection codes |
| DNV-RP-G101 |
Risk-based inspection, offshore topside |
| NACE SP0502 |
Pipeline ECDA |
Related Skills
1---2name: fitness-for-service3description: When to Use4---56## When to Use78- Level 1 screening (conservative equations, minimal inspection data)9- Level 2 detailed assessment (refined analysis using thickness profiles)10- RSF and MAWP calculation from UT thickness data11- Remaining life projection with linear and power-law corrosion models12- Processing UT grid CSV data to CTP (Critical Thickness Profile) maps13- Run-repair-replace decision framework1415## Assessment Levels (API 579-1/ASME FFS-1)1617| Level | Approach | Input Required |18|-------|----------|----------------|19| Level 1 | Screening — conservative, tabulated equations | Nominal thickness, design pressure, corrosion rate |20| Level 2 | Detailed — refined with actual thickness profiles | UT grid measurements, material properties |21| Level 3 | Advanced — FEA/fracture mechanics | Full material data, specialist analysis |2223## Core Calculations2425### Remaining Strength Factor (RSF)2627```python28from digitalmodel.asset_integrity.rsf_calculations import calculate_rsf, check_ffs_level12930# Level 1 screening — General Metal Loss31result = calculate_rsf(32 t_measured=0.280, # measured wall thickness (inches)33 t_required=0.150, # required minimum wall thickness (inches)34 t_nominal=0.375, # original design wall thickness (inches)35)36print(f"RSF: {result['rsf']:.4f}") # e.g. 0.746737print(f"FFS: {result['ffs_acceptable']}") # True if RSF >= RSF_allowable (0.90)38print(f"MAWP ratio: {result['mawp_ratio']:.4f}")3940# Level 1 acceptability check41check = check_ffs_level1(42 t_measured=0.280,43 t_required=0.150,44 t_nominal=0.375,45 design_pressure_psi=1200.0,46 smys_psi=65000,47 outer_diameter_in=12.75,48)49print(f"Level 1 acceptable: {check['acceptable']}")50print(f"MAWP remaining: {check['mawp_psi']:.1f} psi")51```5253### Remaining Life Projection5455```python56from digitalmodel.asset_integrity.rsf_calculations import remaining_life5758# Linear corrosion model (most common)59life = remaining_life(60 t_current=0.280, # measured wall (inches)61 t_minimum=0.150, # required wall (code minimum)62 corrosion_rate_in_per_yr=0.008, # measured corrosion rate63 model="linear",64)65print(f"Remaining life: {life['remaining_years']:.1f} years")66print(f"Next inspection by: {life['inspection_date']}")6768# Power-law model for accelerating corrosion69life_pw = remaining_life(70 t_current=0.280,71 t_minimum=0.150,72 corrosion_rate_in_per_yr=0.008,73 model="power_law",74 power_law_exponent=1.3,75)76```7778### UT Grid — CTP Processing7980```python81from digitalmodel.asset_integrity.rsf_calculations import process_ut_grid8283# Read UT measurement grid from CSV84# CSV format: rows=axial positions, cols=circumferential positions, values=thickness (inches)85ctp = process_ut_grid(86 csv_path="inspection_data/UT_grid_node_123.csv",87 t_nominal=0.375,88 t_required=0.150,89)90print(f"Minimum measured thickness: {ctp['t_min']:.4f} in")91print(f"Average thickness: {ctp['t_avg']:.4f} in")92print(f"Metal loss fraction: {ctp['metal_loss_pct']:.1f}%")93print(f"CTP grid shape: {ctp['grid_shape']}")94print(f"Points below t_required: {ctp['critical_points']}")95```9697## Run-Repair-Replace Decision Framework9899| Decision | Condition | Action |100|----------|-----------|--------|101| **Run** | RSF >= 0.90 and t_min > t_required | Continue with monitoring plan |102| **Run (reduced MAWP)** | RSF < 0.90 but MAWP_remaining > 0 | Reduce operating pressure, re-inspect in <= remaining_life/2 |103| **Repair** | t_min < t_required, repair practical | Weld overlay, clamp, composite wrap |104| **Replace** | RSF -> 0 or repair impractical | Spool replacement, re-pipe |105106## Standards Reference107108| Standard | Scope |109|----------|-------|110| API 579-1 / ASME FFS-1 | Fitness-for-service (primary) |111| API 510 | Pressure vessel inspection |112| API 570 | Piping inspection codes |113| DNV-RP-G101 | Risk-based inspection, offshore topside |114| NACE SP0502 | Pipeline ECDA |115116## Related Skills117118- [cathodic-protection](../cathodic-protection/SKILL.md) — prevents corrosion; FFS assesses once it occurs119- [risk-assessment](../risk-assessment/SKILL.md) — probabilistic framework for inspection planning120- [structural-analysis](../structural-analysis/SKILL.md) — structural integrity checks