Verification & Validation Report

Each case calls the same /api/calculate/* endpoints that normal users use, with corrosion_allowance = 0 and fabrication_tolerance = 0 to isolate the pure formula. Results are compared against independent hand calculations.

v0.9.28 98 Validation Cases 9 Standards + PTB-4 2026-05-09

Table of Contents

Calls the same /api/calculate/* endpoints that normal users use.

Ready 0 / 98

1. Methodology

Verification Approach -- Same API, Same Code Path

Each validation case calls the exact same /api/calculate/* endpoint that every normal user uses. There are no special V&V-only endpoints. This demonstrates that the production calculation path produces correct results.

  • Inputs: corrosion_allowance_mm: 0, fabrication_tolerance_mm: 0 to isolate the pure formula.
  • Material lookup: The API performs the same material lookup (e.g., SA-516 Gr.70 → S=138 MPa from ASME II-D Tab. 1A; P265GH → fd=min(Rp02/1.5, Rm/2.4)).
  • Expected values come from independent hand calculations using the published standard formulas.
  • Formula variants:
    • ASME VIII-1: R-based (R = Do/2 − t)
    • EN 13445-3: ID-based (Di = Do − 2t)
    • AD 2000: OD-based (uses Da directly)
    • EN 13480-3: ID-based (same formula family as EN 13445)

Acceptance Criteria

A case passes if PressureCode's required_thickness_mm matches the hand calculation within 0.5% relative deviation.

2. ASME VIII Div.98 Validation Cases

Case 1 ASME VIII-1
UG-27 Cylindrical Shell, E = 1.0
ASME VIII-1 UG-27(c)(1) | SA-516 Gr.70 | Do = 1000 mm, P = 20 bar
PENDING

Required wall thickness for circumferential stress in a cylindrical shell under internal pressure. ASME uses the R-based formula where R = Do/2 − t (inside radius).

UG-27(c)(1) t = P × R / (S × E − 0.6 × P)
POST /api/calculate/cylinder { "outer_diameter_mm": 1000, "wall_thickness_mm": 20, "material": "SA-516 Gr.70", "joint_efficiency": 1.0, "standard": "ASME VIII Div.1", "conditions": [{"name": "Op", "pressure_bar": 20, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
SA-516 Gr.70 @ 20 °C: S = 138 MPa (ASME II-D Table 1A)
Hand Calculation
R = Do/2 − t = 1000/2 − 20 = 480 mm
t = P × R / (S × E − 0.6 × P)
t = 2.0 × 480 / 98(138 × 1.0 − 0.6 × 2.0)
t = 960 / 98(138 − 1.2)
t = 960 / 98.8
t = 7.02 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 7.02 mm -- -- --
Case 2 ASME VIII-1
UG-32(d) Ellipsoidal 2:1 Head, E = 1.0
ASME VIII-1 UG-32(d) | SA-516 Gr.70 | Do = 1000 mm, P = 20 bar
PENDING

Required wall thickness for a standard 2:1 ellipsoidal head under internal pressure.

UG-32(d) t = P × D / (2 × S × E − 0.2 × P)
POST /api/calculate/head { "head_type": "ellipsoidal", "outer_diameter_mm": 1000, "wall_thickness_mm": 15, "material": "SA-516 Gr.70", "joint_efficiency": 1.0, "standard": "ASME VIII Div.1", "conditions": [{"name": "Op", "pressure_bar": 20, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
SA-516 Gr.70 @ 20 °C: S = 138 MPa (ASME II-D Table 1A)
Hand Calculation
t = P × D / (2 × S × E − 0.2 × P)
t = 2.0 × 1000 / 98(2 × 138 × 1.0 − 0.2 × 2.0)
t = 2000 / 98(276 − 0.4)
t = 2000 / 98.6
t = 7.26 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 7.26 mm -- -- --
Case 3 ASME VIII-1
UG-27 Cylindrical Shell, E = 0.85
ASME VIII-1 UG-27(c)(1) | SA-516 Gr.70 | Do = 1200 mm, P = 25 bar
PENDING

Same UG-27 formula with reduced joint efficiency E = 0.85 (Spot-examined, Type B joint per UW-12).

UG-27(c)(1) t = P × R / (S × E − 0.6 × P)
POST /api/calculate/cylinder { "outer_diameter_mm": 1200, "wall_thickness_mm": 25, "material": "SA-516 Gr.70", "joint_efficiency": 0.85, "standard": "ASME VIII Div.1", "conditions": [{"name": "Op", "pressure_bar": 25, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
SA-516 Gr.70 @ 20 °C: S = 138 MPa (ASME II-D Table 1A)
Hand Calculation
R = Do/2 − t = 1200/2 − 25 = 575 mm
t = P × R / (S × E − 0.6 × P)
t = 2.5 × 575 / (138 × 0.85 − 0.6 × 2.5)
t = 1437.5 / (117.3 − 1.5)
t = 1437.5 / 115.8
t = 12.41 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 12.41 mm -- -- --
Case 4 ASME VIII-1
UG-32(d) Ellipsoidal 2:1 Head, Higher Pressure
ASME VIII-1 UG-32(d) | SA-516 Gr.70 | Do = 800 mm, P = 30 bar
PENDING

Same UG-32(d) formula at higher pressure (30 bar) and smaller diameter.

UG-32(d) t = P × D / (2 × S × E − 0.2 × P)
POST /api/calculate/head { "head_type": "ellipsoidal", "outer_diameter_mm": 800, "wall_thickness_mm": 12, "material": "SA-516 Gr.70", "joint_efficiency": 1.0, "standard": "ASME VIII Div.1", "conditions": [{"name": "Op", "pressure_bar": 30, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
SA-516 Gr.70 @ 20 °C: S = 138 MPa (ASME II-D Table 1A)
Hand Calculation
t = P × D / (2 × S × E − 0.2 × P)
t = 3.0 × 800 / 98(2 × 138 × 1.0 − 0.2 × 3.0)
t = 2400 / 98(276 − 0.6)
t = 2400 / 98.4
t = 8.71 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 8.71 mm -- -- --

3. EN 13445-98 Validation Cases

Case 5 EN 13445-3
Cylindrical Shell, z = 1.0
EN 13445-3:2021 Eq. 7.4-1 | P265GH | Do = 1000 mm, P = 25 bar
PENDING

Required wall thickness using the inside-diameter-based EN 13445 formula. Note: EN 13445 uses Di = Do − 2t, unlike AD 2000 which uses Do directly.

Eq. 7.4-1 (ID-based) e = P × Di / (2 × fd × z − P)
POST /api/calculate/cylinder { "outer_diameter_mm": 1000, "wall_thickness_mm": 20, "material": "P265GH", "joint_efficiency": 1.0, "standard": "EN 13445", "conditions": [{"name": "Op", "pressure_bar": 25, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
Di = Do − 2t = 1000 − 40 = 960 mm
e = P × Di / (2 × fd × z − P)
e = 2.5 × 960 / 98(2 × 170 × 1.0 − 2.5)
e = 2400 / 98(340 − 2.5)
e = 2400 / 98.5
e = 7.11 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 7.11 mm -- -- --
Case 6 EN 13445-3
Cylindrical Shell, z = 0.85
EN 13445-3:2021 Eq. 7.4-1 | P265GH | Do = 800 mm, P = 20 bar
PENDING

Same EN 13445 Eq. 7.4-1 with reduced joint coefficient z = 0.85 (partial NDE).

Eq. 7.4-1 (ID-based) e = P × Di / (2 × fd × z − P)
POST /api/calculate/cylinder { "outer_diameter_mm": 800, "wall_thickness_mm": 15, "material": "P265GH", "joint_efficiency": 0.85, "standard": "EN 13445", "conditions": [{"name": "Op", "pressure_bar": 20, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
Di = Do − 2t = 800 − 30 = 770 mm
e = P × Di / (2 × fd × z − P)
e = 2.0 × 770 / 98(2 × 170 × 0.85 − 2.0)
e = 1540 / 98(289 − 2.0)
e = 1540 / 98
e = 5.37 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 5.37 mm -- -- --
Case 7 EN 13445-3
Cylindrical Shell, z = 1.0, Higher Pressure
EN 13445-3:2021 Eq. 7.4-1 | P265GH | Do = 600 mm, P = 30 bar
PENDING

Same EN 13445 Eq. 7.4-1 with full joint efficiency at higher pressure and smaller diameter.

Eq. 7.4-1 (ID-based) e = P × Di / (2 × fd × z − P)
POST /api/calculate/cylinder { "outer_diameter_mm": 600, "wall_thickness_mm": 10, "material": "P265GH", "joint_efficiency": 1.0, "standard": "EN 13445", "conditions": [{"name": "Op", "pressure_bar": 30, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
Di = Do − 2t = 600 − 20 = 580 mm
e = P × Di / (2 × fd × z − P)
e = 3.0 × 580 / 98(2 × 170 × 1.0 − 3.0)
e = 1740 / 98(340 − 3.0)
e = 1740 / 98
e = 5.16 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 5.16 mm -- -- --

4. AD 98 Validation Cases

Case 8 AD 2000
B1 Cylinder, v = 0.85
AD 2000 B1 Gl.(1) | P265GH | Da = 800 mm, P = 25 bar
PENDING

Required wall thickness using the outside-diameter-based AD 2000 formula. Note: AD 2000 uses Da (outer diameter) directly, unlike EN 13445 which uses Di.

B1 Gl.(1) (OD-based) se = Da × P / (2 × K/S × v + P)
POST /api/calculate/cylinder { "outer_diameter_mm": 800, "wall_thickness_mm": 15, "material": "P265GH", "joint_efficiency": 0.85, "standard": "AD 2000", "conditions": [{"name": "Op", "pressure_bar": 25, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
K/S = fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
se = Da × P / (2 × K/S × v + P)
se = 800 × 2.5 / (2 × 170 × 0.85 + 2.5)
se = 2000 / 98(289 + 2.5)
se = 2000 / 98.5
se = 6.86 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 6.86 mm -- -- --
Case 9 AD 2000
B1 Cylinder, v = 1.0
AD 2000 B1 Gl.(1) | P265GH | Da = 600 mm, P = 16 bar
PENDING

Same B1 formula with full joint efficiency v = 1.0 and smaller diameter, lower pressure.

B1 Gl.(1) (OD-based) se = Da × P / (2 × K/S × v + P)
POST /api/calculate/cylinder { "outer_diameter_mm": 600, "wall_thickness_mm": 10, "material": "P265GH", "joint_efficiency": 1.0, "standard": "AD 2000", "conditions": [{"name": "Op", "pressure_bar": 16, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
K/S = fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
se = Da × P / (2 × K/S × v + P)
se = 600 × 1.6 / (2 × 170 × 1.0 + 1.6)
se = 960 / 98(340 + 1.6)
se = 960 / 98.6
se = 2.81 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 2.81 mm -- -- --
Case 10 AD 2000
B1 Cylinder, v = 1.0, Higher Pressure
AD 2000 B1 Gl.(1) | P265GH | Da = 1000 mm, P = 30 bar
PENDING

Larger vessel at higher pressure to verify the OD-based formula across a wider parameter range.

B1 Gl.(1) (OD-based) se = Da × P / (2 × K/S × v + P)
POST /api/calculate/cylinder { "outer_diameter_mm": 1000, "wall_thickness_mm": 20, "material": "P265GH", "joint_efficiency": 1.0, "standard": "AD 2000", "conditions": [{"name": "Op", "pressure_bar": 30, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
K/S = fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
se = Da × P / (2 × K/S × v + P)
se = 1000 × 3.0 / 98(2 × 170 × 1.0 + 3.0)
se = 3000 / 98(340 + 3.0)
se = 3000 / 98
se = 8.75 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 8.75 mm -- -- --

5. EN 13480-3 Piping

Case 11 EN 13480-3
Straight Pipe DN200
EN 13480-3 Eq. 6.1-1 | P265GH | Do = 219.1 mm, P = 40 bar
PENDING

Required wall thickness for a straight pipe. EN 13480 uses the EN 13445-3 formula family (ID-based).

Eq. 6.1-1 (ID-based) e = P × Di / (2 × fd × z − P)
POST /api/calculate/cylinder { "outer_diameter_mm": 219.1, "wall_thickness_mm": 8, "material": "P265GH", "joint_efficiency": 1.0, "standard": "EN 13480", "conditions": [{"name": "Op", "pressure_bar": 40, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
Di = Do − 2t = 219.1 − 16 = 203.1 mm
e = P × Di / (2 × fd × z − P)
e = 4.0 × 203.1 / (2 × 170 × 1.0 − 4.0)
e = 812.4 / (340 − 4.0)
e = 812.4 / 336
e = 2.42 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 2.42 mm -- -- --
Case 12 EN 13480-3
Straight Pipe DN100
EN 13480-3 Eq. 6.1-1 | P265GH | Do = 114.3 mm, P = 50 bar
PENDING

Smaller pipe at higher pressure to verify the formula across different size ranges.

Eq. 6.1-1 (ID-based) e = P × Di / (2 × fd × z − P)
POST /api/calculate/cylinder { "outer_diameter_mm": 114.3, "wall_thickness_mm": 6, "material": "P265GH", "joint_efficiency": 1.0, "standard": "EN 13480", "conditions": [{"name": "Op", "pressure_bar": 50, "temperature_c": 20}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Material Lookup
P265GH @ 20 °C: Rp02 = 255 MPa, Rm = 410 MPa
fd = min(255/1.5, 410/2.4) = min(170.00, 170.83) = 170.00 MPa
Hand Calculation
Di = Do − 2t = 114.3 − 12 = 102.3 mm
e = P × Di / (2 × fd × z − P)
e = 5.0 × 102.3 / (2 × 170 × 1.0 − 5.0)
e = 511.5 / (340 − 5.0)
e = 511.5 / 335
e = 1.53 mm
ResultExpected (hand calc)PressureCodeDeltaVerdict
required_thickness_mm 1.53 mm -- -- --

6. ASME PTB-4-2021 Published Examples

These cases reproduce worked examples from ASME PTB-4-2021 (Section VIII, Division 1 Example Problem Manual). All imperial values have been converted to metric. The calculations use corroded geometry (corrosion_allowance = 0, dimensions already include corrosion) to match the PTB-4 approach. Tolerance is 2% to account for the small difference between PTB-4's S = 137.9 MPa (20 000 psi) and PressureCode's interpolated S = 138.0 MPa for SA-516 Gr.70.

PTB-1 PTB-4
E4.3.1 -- Cylindrical Shell (UG-27)
PTB-4-2021 p.46 | SA-516 Gr.70 | ID = 90.25 in (corroded), P = 356 psi @ 300 °F
PENDING

Required wall thickness for circumferential stress in a cylindrical shell. PTB-4 published result: t = 0.8119 in (corroded condition). Original data: ID = 90.0 in, CA = 0.125 in, S = 20 000 psi, E = 1.0.

UG-27(c)(1) t = P × R / (S × E − 0.6 × P)
t = 356 × 45.125 / (20000 × 1.0 − 0.6 × 356) = 0.8119 in = 20.62 mm
POST /api/calculate/cylinder { "outer_diameter_mm": 2343.15, "wall_thickness_mm": 25.4, "material": "SA-516 Gr.70", "joint_efficiency": 1.0, "standard": "ASME VIII Div.1", "conditions": [{"name": "Op", "pressure_bar": 24.546, "temperature_c": 149}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Unit Conversion (Imperial → Metric)
IDcorroded = 90.25 in = 2292.35 mm → OD = 2292.35 + 2 × 25.4 = 2343.15 mm
P = 356 psi = 2.455 MPa = 24.546 bar
T = 300 °F = 149 °C
S = 20 000 psi = 137.9 MPa (PressureCode uses 138.0 MPa from ASME II-D)
ResultExpected (PTB-4)PressureCodeDeltaVerdict
required_thickness_mm 20.62 mm -- -- --
PTB-2 PTB-4
E4.3.2 -- Conical Shell (UG-32(g))
PTB-4-2021 p.48 | SA-516 Gr.70 | IDL = 150.25 in, α = 21.04 °, P = 356 psi @ 300 °F
PENDING

Required wall thickness for a conical shell using the large-end diameter. PTB-4 published result: t = 1.4482 in (corroded condition). Original data: IDL = 150.0 in, IDS = 90.0 in, L = 78.0 in, CA = 0.125 in, S = 20 000 psi, E = 1.0.

UG-32(g) t = P × D / (2 × cos(α) × (S × E − 0.6 × P))
α = arctan((0.5 × (150.25 − 90.25)) / 78) = 21.0375 °
t = 356 × 150.25 / (2 × cos(21.04°) × 19786.4) = 1.4482 in = 36.78 mm
POST /api/calculate/cone { "large_end_outer_diameter_mm": 3896.35, "small_end_outer_diameter_mm": 2372.35, "wall_thickness_mm": 40.0, "half_apex_angle_deg": 21.0375, "material": "SA-516 Gr.70", "joint_efficiency": 1.0, "standard": "ASME VIII Div.1", "conditions": [{"name": "Op", "pressure_bar": 24.546, "temperature_c": 149}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Unit Conversion (Imperial → Metric)
IDL,corroded = 150.25 in = 3816.35 mm → ODL = 3816.35 + 2 × 40 = 3896.35 mm
IDS,corroded = 90.25 in = 2292.35 mm → ODS = 2292.35 + 2 × 40 = 2372.35 mm
P = 356 psi = 24.546 bar, T = 300 °F = 149 °C
ResultExpected (PTB-4)PressureCodeDeltaVerdict
required_thickness_mm 36.78 mm -- -- --
PTB-3 PTB-4
E4.3.5 -- Ellipsoidal 2:1 Head (UG-32(c), reversed MAWP)
PTB-4-2021 p.56 | SA-516 Gr.70 | ID = 90.25 in (corroded), MAWP = 442.2 psi @ 300 °F
PENDING

PTB-4 computes MAWP = 442.2 psi for a 2:1 ellipsoidal head with t = 1.0 in (corroded). We reverse this: given P = 442.2 psi, the required thickness must match 1.0 in = 25.40 mm. Original data: ID = 90.0 in, t = 1.125 in, CA = 0.125 in, S = 20 000 psi, E = 1.0.

UG-32(c) MAWP = 2 × S × E × t / (D + 0.2 × t) = 2 × 20000 × 1.0 / 98(90.25 + 0.2) = 442.2 psi
Reverse: t = P × D / (2 × S × E − 0.2 × P) = 442.2 × 90.25 / 39911 = 1.000 in = 25.40 mm
POST /api/calculate/head { "head_type": "ellipsoidal", "outer_diameter_mm": 2352.35, "wall_thickness_mm": 30.0, "material": "SA-516 Gr.70", "joint_efficiency": 1.0, "standard": "ASME VIII Div.1", "conditions": [{"name": "Op", "pressure_bar": 30.492, "temperature_c": 149}], "corrosion_allowance_mm": 0, "fabrication_tolerance_mm": 0 }
Unit Conversion (Imperial → Metric)
Dcorroded = 90.25 in = 2292.35 mm → OD = 2292.35 + 2 × 30 = 2352.35 mm
MAWP = 442.2 psi = 3.049 MPa = 30.492 bar
T = 300 °F = 149 °C
ResultExpected (PTB-4)PressureCodeDeltaVerdict
required_thickness_mm 25.40 mm -- -- --

7. Summary & Results

Case Standard Description Expected Computed Delta Verdict
1ASME VIIIUG-27 cylinder E=1.07.02------
2ASME VIIIUG-32(d) ellipsoidal E=1.07.26------
3ASME VIIIUG-27 cylinder E=0.8512.41------
4ASME VIIIUG-32(d) ellipsoidal P=30 bar8.71------
5EN 13445Cylinder z=1.0 Eq.7.4-17.11------
6EN 13445Cylinder z=0.85 Eq.7.4-15.37------
7EN 13445Cylinder z=1.0 P=30 bar5.16------
8AD 2000B1 cylinder v=0.856.86------
9AD 2000B1 cylinder v=1.02.81------
10AD 2000B1 cylinder v=1.0 P=30 bar8.75------
11EN 13480Pipe DN200 Eq.6.1-12.42------
12EN 13480Pipe DN100 Eq.6.1-11.53------
PTB-1PTB-4E4.3.1 Cylinder (SA-516-70, 356psi)20.62------
PTB-2PTB-4E4.3.2 Cone (SA-516-70, 356psi)36.78------
PTB-3PTB-4E4.3.5 Ellipsoidal (SA-516-70, MAWP 442psi)25.40------
0 / 98
Total Cases
0
Passed
0
Failed