How to compute weighted PREN in Python using UliEngineering

You can easily compute the weighted Pitting Resistance Equivalent Number (PREN) using the UliEngineering Python library:

pren_w.py
from UliEngineering.Chemistry.PREN import pren_w

# Compute weighted PREN for 304 stainless steel (18% Cr, 8% Ni, 0% Mo)
pren_value = pren_w({"Cr": 18.0, "Ni": 8.0, "Mo": 0.0})
print(f"Weighted PREN (304 steel): {pren_value:.1f}")

# Compute weighted PREN for 316 stainless steel (17% Cr, 12% Ni, 2.5% Mo)
pren_value = pren_w({"Cr": 17.0, "Ni": 12.0, "Mo": 2.5})
print(f"Weighted PREN (316 steel): {pren_value:.1f}")

# Compute weighted PREN for duplex stainless steel (25% Cr, 7% Ni, 3% Mo)
pren_value = pren_w({"Cr": 25.0, "Ni": 7.0, "Mo": 3.0})
print(f"Weighted PREN (duplex): {pren_value:.1f}")

Example output

pren_w_output.txt
Weighted PREN (304 steel): 22.0
Weighted PREN (316 steel): 28.5
Weighted PREN (duplex): 34.0

The weighted Pitting Resistance Equivalent Number (PREN) is an alternative formulation for predicting pitting corrosion resistance that includes nickel with a weighting factor. This version provides a more comprehensive assessment for certain alloy families where nickel contributes significantly to corrosion resistance. Higher values indicate better resistance to pitting corrosion in chloride-containing environments.

The weighted PREN is computed using the formula: $\text{PREN}_w = %Cr + 3.3 \times %Mo + 16 \times %N + 0.5 \times %Ni$, where the coefficients reflect the relative importance of each alloying element for pitting resistance. This formulation is particularly useful for comparing duplex stainless steels and nickel-rich alloys where the standard PREN formula may underestimate corrosion resistance.


Check out similar posts by category: Chemistry, Python