ECalPro Instrumentation

Validation & Methodology

Every engine is checked against the published worked examples of its governing standard. A case passes only when its worst output deviates less than the 0.5% gate — the same hard gate that blocks every release in CI.

63/63 cases passinggate ≤ 0.5%9 modulessource: db
control-valve
CaseReferenceDeviationStatus
Bulk velocity 0.1 m³/s through DN100 bore (FR-2.11)Definition: v = Q / (π/4·d²)<0.0001%pass
Gas Ex.3 — rotary eccentric plug, reducers (non-choked)IEC 60534-2-1 / ISA-75.01.01-2007, Annex Example 30.000488%pass
Liquid Ex.1 — globe, parabolic plug (sub-critical)IEC 60534-2-1 / ISA-75.01.01-2007, Annex Example 10.00274%pass
Liquid Ex.2 — segmented ball (choked)IEC 60534-2-1 / ISA-75.01.01-2007, Annex Example 20.00497%pass
Reynolds factor Fr — Ex.4 reduced trim, laminar (FR-2.7)IEC 60534-2-1 Fr (reduced trim), Annex Example 4 (FL=0.98, C=0.015483, d=15 mm, Re_v=1202)<0.0001%pass
Sonic velocity of dry air at 15 °C (FR-2.11)Published: speed of sound in dry air at 15 °C ≈ 340.3 m/s (γ=1.4, M=28.9647 g/mol)0.00139%pass
Steam — superheated 10 bar/400 °C (mass-flow + IF97 ρ₁)IEC 60534-2-1 Eq.6 (mass flow) + IAPWS-IF97 R7-97 density; closed-form hand calc0.000579%pass
Valve Reynolds number Re_v — Ex.1 conditions (FR-2.7)IEC 60534-2-1 Re_v, Annex Example 1 (ν=3.26e-7, Q=360 m³/h, D1=150 mm, C=165)<0.0001%pass
Σξ piping loss — Ex.3 reducers d=50,D1=80,D2=100 mm (FR-2.6)IEC 60534-2-3 / ISA Annex Example 3 piping geometry<0.0001%pass
iapws-if97
CaseReferenceDeviationStatus
Region 1 liquid · p=3 MPa, T=300 KIAPWS R7-97, Table 5<0.0001%pass
Region 1 liquid · p=3 MPa, T=500 KIAPWS R7-97, Table 5<0.0001%pass
Region 1 liquid · p=80 MPa, T=300 KIAPWS R7-97, Table 5<0.0001%pass
Region 2 steam · p=0.0035 MPa, T=300 KIAPWS R7-97, Table 15<0.0001%pass
Region 2 steam · p=0.0035 MPa, T=700 KIAPWS R7-97, Table 15<0.0001%pass
Region 2 steam · p=30 MPa, T=700 KIAPWS R7-97, Table 15<0.0001%pass
Saturation Psat(T)IAPWS R7-97, Table 35<0.0001%pass
Saturation Tsat(p)IAPWS R7-97, Table 36<0.0001%pass
multi-stage-ro
CaseReferenceDeviationStatus
Choke N_min — gas P2/P1=0.1, κ=1.4 → 4 stagesN_min=ceil(ln(P2/P1)/ln(rc)) with boundary guard; rc(1.4)=0.5283<0.0001%pass
Geometric staging — N=2 mid pressure = √(P1·P2)Equal pressure-ratio staging Pᵢ=P1·(P2/P1)^(i/N); P1=10 bar, P2=2.5 bar → 5 bar<0.0001%pass
N=1 reduces exactly to single-stage RO bore (liquid)Identity: multiStageRO(N=1) ≡ restrictionOrifice(P1,P2); CONSTANTS §8 thin RO<0.0001%pass
nozzle
CaseReferenceDeviationStatus
ISA-1932 nozzle — gas · solve-bore (d)ISO 5167-3:2003 §5.1.6.1; fluids 1.3.0 (CONSTANTS §7)<0.0001%pass
ISA-1932 nozzle — gas · solve-flow (qm)ISO 5167-3:2003 §5.1.6.1 C + §5.1.5 ε; fluids 1.3.0 (CONSTANTS §7)0.000333%pass
Long-radius nozzle — gas · solve-flow (qm)ISO 5167-3:2003 §5.2.4.1 C + §5.1.5 ε; fluids 1.3.0 (CONSTANTS §7)<0.0001%pass
orifice
CaseReferenceDeviationStatus
Concentric Ex.G — gas, flange taps · solve-bore (d)ISO 5167-2:2003 §5.1/§5.3.2.1; fluids 1.3.0 cross-check (CONSTANTS §5 Scenario G)<0.0001%pass
Concentric Ex.G — gas, flange taps · solve-flow (qm)ISO 5167-2:2003 §5.1/§5.3.2.1; fluids 1.3.0 cross-check (CONSTANTS §5 Scenario G)0.000133%pass
Concentric Ex.G — gas, flange taps · solve-ΔPISO 5167-2:2003 §5.1/§5.3.2.1; fluids 1.3.0 cross-check (CONSTANTS §5 Scenario G)<0.0001%pass
Concentric Ex.L — liquid, corner taps · solve-bore (d)ISO 5167-2:2003 §5.1/§5.3.2.1; fluids 1.3.0 cross-check, ε=1 (CONSTANTS §5 Scenario L)<0.0001%pass
Concentric Ex.L — liquid, corner taps · solve-flow (qm)ISO 5167-2:2003 §5.1/§5.3.2.1; fluids 1.3.0 cross-check, ε=1 (CONSTANTS §5 Scenario L)0.000256%pass
Concentric Ex.L — liquid, corner taps · solve-ΔPISO 5167-2:2003 §5.1/§5.3.2.1; fluids 1.3.0 cross-check, ε=1 (CONSTANTS §5 Scenario L)<0.0001%pass
Eccentric Ex.E1 — ISO/TR 15377, corner, liquid · solve-boreISO/TR 15377:1998 eccentric C(β); fluids 1.3.0 cross-check, ε=1 (CONSTANTS §6)<0.0001%pass
Eccentric Ex.E1 — ISO/TR 15377, corner, liquid · solve-flowISO/TR 15377:1998 eccentric C(β); fluids 1.3.0 cross-check, ε=1 (CONSTANTS §6)<0.0001%pass
Eccentric Ex.E2 — Miller 1996, flange/180°, gas · solve-flowMiller, Flow Measurement Engineering Handbook 3rd ed. 1996, eccentric C∞+b/Re^0.75; fluids 1.3.0 (CONSTANTS §6)<0.0001%pass
Segmental Ex.S1 — Miller 1996, flange, liquid · solve-boreMiller, Flow Measurement Engineering Handbook 3rd ed. 1996, segmental C∞; fluids 1.3.0 (CONSTANTS §6)<0.0001%pass
Segmental Ex.S1 — Miller 1996, flange, liquid · solve-flowMiller, Flow Measurement Engineering Handbook 3rd ed. 1996, segmental C∞; fluids 1.3.0 (CONSTANTS §6)<0.0001%pass
relief-valve
CaseReferenceDeviationStatus
API 526 selection — steam area → J, next K (FR-5.2)API 526 (6E) Table 1 · cross-check fluids 1.3.0 API520_round_size (req=0.00070833 m²)0.00364%pass
API 526 selection — vapour area → M, next N (FR-5.2)API 526 (6E) Table 1 · cross-check fluids 1.3.0 API520_round_size (req=0.00196145 m²)0.000146%pass
Fire heat input Q=C·F·Aws^0.82, adequate drainage (FR-5.4)API 521 (7E) §4.4.13.2.4 (hand calc: C=43200, F=1.0, Aws=50 m²)0.000282%pass
Fire relief vapour rate W=Q/λ (FR-5.4)API 521 (7E) §4.4.13.2.4 + W=Q/λ (hand calc: Aws=50 m², F=1.0, λ=2×10⁵ J/kg)<0.0001%pass
Gas coefficient C(k=1.0) — L’Hôpital limit (FR-5.1)API 520 Pt I (10E, 2020), C = 0.03948·√(1/e) · cross-check fluids API520_C(1.0)<0.0001%pass
Gas coefficient C(k=1.35) — critical flow (FR-5.1)API 520 Pt I (10E, 2020) Table 8 · cross-check fluids 1.3.0 API520_C(1.35)<0.0001%pass
Inlet 3% rule + built-up 10% rule percentages (FR-5.3)API 520 Pt II §7.3.2 / §5 (hand calc: Pset=1 MPag, inlet 40 kPa, built-up 130 kPa)<0.0001%pass
Liquid area — viscous oil μ=0.2 Pa·s, Kv from Re (FR-5.1)API 520 Pt I (10E) Eq. 27 + Kv(Re) · cross-check fluids 1.3.0 API520_A_l (m=10, ρ=900, μ=0.2)0.000483%pass
Liquid area — water, no viscosity correction (FR-5.1)API 520 Pt I (10E) Eq. 27 · cross-check fluids 1.3.0 API520_A_l (m=10, ρ=1000, Pset=2 MPag, process, P2=atm)0.000460%pass
Reaction force, open discharge (FR-5.3)API 520 Pt II §4.4 momentum form, SI base units (hand calc: m=5, T=400, MW=44.01, k=1.13, A=0.002322576 m²)<0.0001%pass
Relieving pressure P1 = Pset·(1+acc)+Patm, process 10 % (FR-5.1)API 520 Pt I (10E, 2020) §3.x relieving-pressure definition (hand calc)<0.0001%pass
Steam KSH — interpolated off-node (FR-5.1)API 520 Pt I (10E) Table 9 · cross-check fluids 1.3.0 API520_SH(760 K, 2100 kPa)<0.0001%pass
Steam area — saturated (KSH=1, KN=1) (FR-5.1)API 520 Pt I (10E) Eq. 9 · cross-check fluids 1.3.0 API520_A_steam (m=10, T=450 K, Pset=2 MPag)0.000105%pass
Steam area — superheated 400 °C, 11.1 MPa (FR-5.1)API 520 Pt I (10E) Eq. 9 · cross-check fluids 1.3.0 API520_A_steam (m=10, T=673.15 K, Pset=10 MPag)<0.0001%pass
Subcritical coefficient F2 (k=1.8, P1=1 MPa, P2=0.7 MPa) (FR-5.1)API 520 Pt I (10E, 2020) example 2 · cross-check fluids 1.3.0 API520_F2<0.0001%pass
Vapour area — critical flow to atmosphere (FR-5.1)API 520 Pt I (10E) Eq. 3 · cross-check fluids 1.3.0 API520_A_g (m=5, T=500, Z=0.9, MW=44.01, k=1.13, Pset=1 MPag, process)0.000171%pass
Vapour area — sub-critical flow r=0.75 (FR-5.1)API 520 Pt I (10E) Eq. 4 · cross-check fluids 1.3.0 API520_A_g (air, k=1.4, r=0.75)0.000191%pass
restriction-orifice
CaseReferenceDeviationStatus
RO choked gas (thick) · solve-bore (d)Critical-flow inverse; Miller thick Cd=0.839 (CONSTANTS §8)<0.0001%pass
RO choked gas (thick, Cd=0.839) · solve-flow (qm)Critical-flow ṁ=Cd·A·√[κρ1P1(2/(κ+1))^((κ+1)/(κ−1))], Miller thick Cd=0.839 (CONSTANTS §8)<0.0001%pass
RO liquid (thin, RHG, cavitation) · solve-flow (qm)ISO 5167 RHG (vena-contracta thin RO), ε=1; fluids 1.3.0 (CONSTANTS §8)<0.0001%pass
RO subsonic gas (thin, RHG) · solve-flow (qm)ISO 5167 RHG (vena-contracta thin RO) + orifice ε; fluids 1.3.0 (CONSTANTS §8)0.000222%pass
units
CaseReferenceDeviationStatus
Gauge→absolute pressure (4 barg → bara @ 101.325 kPa)Definition: p_abs = p_gauge + p_atm<0.0001%pass
Length (1 in → mm)Definition: 1 in = 25.4 mm<0.0001%pass
Temperature (100 °C → °F)Definition: °F = °C·9/5 + 32<0.0001%pass
Volumetric flow (100 m³/h → L/s)Definition: 1 m³/h = 1000/3600 L/s<0.0001%pass
venturi
CaseReferenceDeviationStatus
Venturi as-cast (C=0.984) — liquid · solve-flow (qm)ISO 5167-4:2003 §5.5.2 rough-cast C=0.984; fluids 1.3.0 (CONSTANTS §7)0.000333%pass
Venturi machined (C=0.995) — liquid · solve-flow (qm)ISO 5167-4:2003 §5.5.2 machined C=0.995; fluids 1.3.0 (CONSTANTS §7)<0.0001%pass
Venturi machined — liquid · solve-bore (d)ISO 5167-4:2003 §5.5.2 machined C=0.995; fluids 1.3.0 (CONSTANTS §7)<0.0001%pass
Venturi rough-welded (C=0.985) — liquid · solve-flow (qm)ISO 5167-4:2003 §5.5.2 rough-welded C=0.985; fluids 1.3.0 (CONSTANTS §7)0.000144%pass

Reference datasets

Standards-as-data, versioned and cited. Engine math is gated above; these tabulated constants are sourced and revision-controlled.

DatasetEditionSource
api526 api526:2017 · v1.0.0API Std 526, 6th ed. (2017) — effective orifice areas (D–T).
api520-ksh api520-ksh:2020 · v1.0.0API Std 520 Pt I (10th ed, 2020) Table 9 — steam superheat correction KSH (T × P grid).
pipe-schedule asme-b36.10m:2018 · v1.0.0ASME B36.10M-2018 — wrought steel pipe OD & wall thickness.
fluids (68 fluids)instrucalpro-fluids:2026.1 · v1.0.0Poling, Prausnitz & O’Connell, Properties of Gases and Liquids, 5th ed. (2001), App. A; cross-checked vs NIST WebBook.