Skip to content

Instantly share code, notes, and snippets.

@flare9x
Last active January 31, 2019 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flare9x/315b80c767fb7c853c1fb4e96d3912ea to your computer and use it in GitHub Desktop.
Save flare9x/315b80c767fb7c853c1fb4e96d3912ea to your computer and use it in GitHub Desktop.
ABS Piping Tmin + Tnominal Calculation
# ABS Tmin
# 5.1.1 Pipes Subject to Internal Pressure (2002)
ID = 4.0
OD = 4.5
ratio = OD / ID
ratio = 1.125
# Check tmin applies:
if (ratio < 1.7)
print("Proceed with tmin")
end
# The following requirements apply for pipes where the outside to inside diameter ratio does not exceed a value of 1.7.
# Calculation for pressure design thickness
oT = 60000# specified minimum tensile strength at room temperature
oY = 35000# specified minimum yield strength at the design temperature.
oR = # average stress to produce rupture in 100,000 hours at the design temperature. ??
S = minimum([(oT/2.7),(oY/1.8)])
S = 17.1 * 1000 # B31.1 A106B, use that as dont know what oR is
P = 232.06 # 16 barg
D = 4.5
K = 2
e = 1.0
To = ((P * D) / ((K * S * e) + P)) # thickness needed for pressure containment
# Nominal Wall Thickness
R = 1.5 * 4.5 # mean radius of a bend # In a long radius elbow the radius of curvature is 1.5 times the nominal diameter.
b = (0.4* (D / R)) * To
c = 0.079 # Table 3 cargo oil
a = 12.5 # 12.5% negatrive manufacturing tolerance
m = 100 / (100 - a)
# Nominal Wall Thickness
t = (To + b + c)*m
t = .134
# 5.1.2 Pipes Subject to Internal Pressure – Alternative Equation
P = 232.06 # 16 barg
D = 4.5
K = 2
S = 17.1 * 1000 # B31.1 A106B
M = 0.8
c = 0.065
t = (P * D) / ((K * S) + (M * P)) + c
t = 0.0953
# Greater
if (To > t)
print("To is thicker than t and shall be used as pressure tmin. use greater of per 5.1.2")
elseif (t > To)
print("t is thicker than To and shall be used as pressure tmin. use greater of per 5.1.2")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment