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.
Calls the same /api/calculate/* endpoints that normal users use.
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.
corrosion_allowance_mm: 0, fabrication_tolerance_mm: 0 to isolate the pure formula.
A case passes if PressureCode's required_thickness_mm matches
the hand calculation within 0.5% relative deviation.
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).
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 7.02 mm | -- | -- | -- |
Required wall thickness for a standard 2:1 ellipsoidal head under internal pressure.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 7.26 mm | -- | -- | -- |
Same UG-27 formula with reduced joint efficiency E = 0.85 (Spot-examined, Type B joint per UW-12).
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 12.41 mm | -- | -- | -- |
Same UG-32(d) formula at higher pressure (30 bar) and smaller diameter.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 8.71 mm | -- | -- | -- |
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.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 7.11 mm | -- | -- | -- |
Same EN 13445 Eq. 7.4-1 with reduced joint coefficient z = 0.85 (partial NDE).
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 5.37 mm | -- | -- | -- |
Same EN 13445 Eq. 7.4-1 with full joint efficiency at higher pressure and smaller diameter.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 5.16 mm | -- | -- | -- |
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.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 6.86 mm | -- | -- | -- |
Same B1 formula with full joint efficiency v = 1.0 and smaller diameter, lower pressure.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 2.81 mm | -- | -- | -- |
Larger vessel at higher pressure to verify the OD-based formula across a wider parameter range.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 8.75 mm | -- | -- | -- |
Required wall thickness for a straight pipe. EN 13480 uses the EN 13445-3 formula family (ID-based).
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 2.42 mm | -- | -- | -- |
Smaller pipe at higher pressure to verify the formula across different size ranges.
| Result | Expected (hand calc) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 1.53 mm | -- | -- | -- |
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.
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.
| Result | Expected (PTB-4) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 20.62 mm | -- | -- | -- |
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.
| Result | Expected (PTB-4) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 36.78 mm | -- | -- | -- |
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.
| Result | Expected (PTB-4) | PressureCode | Delta | Verdict |
|---|---|---|---|---|
| required_thickness_mm | 25.40 mm | -- | -- | -- |
| Case | Standard | Description | Expected | Computed | Delta | Verdict |
|---|---|---|---|---|---|---|
| 1 | ASME VIII | UG-27 cylinder E=1.0 | 7.02 | -- | -- | -- |
| 2 | ASME VIII | UG-32(d) ellipsoidal E=1.0 | 7.26 | -- | -- | -- |
| 3 | ASME VIII | UG-27 cylinder E=0.85 | 12.41 | -- | -- | -- |
| 4 | ASME VIII | UG-32(d) ellipsoidal P=30 bar | 8.71 | -- | -- | -- |
| 5 | EN 13445 | Cylinder z=1.0 Eq.7.4-1 | 7.11 | -- | -- | -- |
| 6 | EN 13445 | Cylinder z=0.85 Eq.7.4-1 | 5.37 | -- | -- | -- |
| 7 | EN 13445 | Cylinder z=1.0 P=30 bar | 5.16 | -- | -- | -- |
| 8 | AD 2000 | B1 cylinder v=0.85 | 6.86 | -- | -- | -- |
| 9 | AD 2000 | B1 cylinder v=1.0 | 2.81 | -- | -- | -- |
| 10 | AD 2000 | B1 cylinder v=1.0 P=30 bar | 8.75 | -- | -- | -- |
| 11 | EN 13480 | Pipe DN200 Eq.6.1-1 | 2.42 | -- | -- | -- |
| 12 | EN 13480 | Pipe DN100 Eq.6.1-1 | 1.53 | -- | -- | -- |
| PTB-1 | PTB-4 | E4.3.1 Cylinder (SA-516-70, 356psi) | 20.62 | -- | -- | -- |
| PTB-2 | PTB-4 | E4.3.2 Cone (SA-516-70, 356psi) | 36.78 | -- | -- | -- |
| PTB-3 | PTB-4 | E4.3.5 Ellipsoidal (SA-516-70, MAWP 442psi) | 25.40 | -- | -- | -- |