REST API और MCP एकीकरण
कैलकुलेटर REST API: अनुरोध, परिणाम और निदान
छह फिनयुक्त कॉइल इंजनों, आठ गणना रूट और दो सूची/स्वास्थ्य रूट के मौजूदा अनुबंध। पूर्ण कृत्रिम उदाहरण केवल स्थानीय मेमोरी में जाँचे गए हैं।
समीक्षा की तारीख
1. पहुँच और उपलब्ध रूट
तैनात ExCoil के मूल पते के साथ नीचे दिए सटीक पथ उपयोग करें। POST में Authorization: Bearer <REST_API_KEY> और Content-Type: application/json भेजें। REST कुंजी exk_ से शुरू होती है; इसे सर्वर पर रखें, लॉग, रिपॉज़िटरी या ब्राउज़र कोड में नहीं। Enterprise या Manufacturer की active अथवा trialing सदस्यता आवश्यक है। Free/Professional में ऐप के अंदर गणना करना REST पहुँच नहीं देता।
अनुमति सूची होने पर गणना और /refrigerants के लिए calc:read जाँचा जाता है। null सूची प्रतिबंध नहीं लगाती, खाली सूची अनुमति नहीं देती और * जाँच पूरी करता है। /health के लिए प्रमाणीकरण चाहिए, calc:read जाँच नहीं। सभी अनुरोध कुंजी की सीमा में गिने जाते हैं। इन रूट में Shell & Tube, साइक्रोमेट्रिक्स, प्रोजेक्ट लिखना, PDF/CAD या निर्माण निर्यात नहीं हैं। MCP अलग टोकन और /api/mcp उपयोग करता है तथा केवल Manufacturer के लिए है।
| विधि | पथ | JSON मूल फ़ील्ड |
|---|---|---|
| POST | /api/v1/calculate/dx-evaporator | air, coil, ref, calib |
| POST | /api/v1/calculate/dx-evaporator/balanced | inputs, options? |
| POST | /api/v1/calculate/dx-condenser | air, coil, ref, calib |
| POST | /api/v1/calculate/dx-condenser/balanced | air, coil, ref, calib |
| POST | /api/v1/calculate/chilled-water | air, water, coil, hydraulic, calib |
| POST | /api/v1/calculate/hot-water | air, water, coil, hydraulic, calib |
| POST | /api/v1/calculate/steam-coil | air, steam, coil, hydraulic, calib |
| POST | /api/v1/calculate/dry-cooler | air, fluid, coil, hydraulic, calib |
| GET | /api/v1/refrigerants | — |
| GET | /api/v1/health | — |
2. UI फ़ॉर्म नहीं, SI इनपुट बनाएँ
उदाहरण में request और response अलग हैं। केवल request की सामग्री भेजें, बाहरी उदाहरण या response नहीं। संख्याएँ कृत्रिम प्रदर्शन बिंदु हैं, अनुशंसित डिज़ाइन नहीं। हर उदाहरण वर्तमान schema और शुद्ध मेमोरी इंजन से जाँचा गया है। REST रूट tRPC/MCP वाले Zod schema नहीं चलाता; केवल सतही object/रेफ्रिजरेंट जाँच के बाद body इंजन को देता है। फ़ील्ड-वार त्रुटि, स्वतः इकाई परिवर्तन या schema के default भरने की अपेक्षा न करें।
ड्राई कूलर को छोड़कर air में Vdot_m3_s, T_in_C, RH_in, P_Pa होते हैं: m³/s, शुष्क-बल्ब °C, 0–1 सापेक्ष आर्द्रता और स्थानीय निरपेक्ष वायुदाब Pa। कंडेंसर RH_in वैकल्पिक है (इंजन default 0.5)। ज्यामिति coil है, geometry नहीं: height_m, width_m, Pt_m, Pl_m, Do_m, wall_m, fin_m मीटर में; rows धनात्मक पूर्णांक; fpi प्रति इंच फिन; tube_k/fin_k W/(m·K); freeAreaRatio अनुपात। आयाम और चालकता धनात्मक हों, Do_m > 2·wall_m और पिच Do_m से बड़ी हो। DX में tubesPerRow सक्रिय ऊँचाई को tubesPerRow × Pt_m तय करता है। पानी/भाप/ड्राई कूलर में hydraulic.tubeCountOverride प्रति पंक्ति ट्यूब संख्या है, कुल नहीं।
finType plain, wavy, louver या slit हो सकता है; कंडेंसर में केवल plain/wavy/louver। पानी/भाप/ड्राई कूलर coil में tubeMat और finMat भी होते हैं; चालकता स्पष्ट दें। calib मॉड्यूल के अनुसार भरें, options में न रखें। segments वैकल्पिक संख्यात्मक resolution है, वास्तविक ट्यूब संख्या नहीं। सामान्य schema में freeAreaRatio 0.1–0.9 है; कंडेंसर schema 0–1 स्वीकारता है लेकिन इंजन >0 और ≤1 माँगता है। DX में f_maldistribution >0 और ≤1 हो। भौतिक संबंध भी जाँचें; schema पास करना व्यवहार्यता का प्रमाण नहीं।
वैकल्पिक circuitryPD DX में ref के भीतर और अन्य मॉड्यूल में hydraulic के भीतर है। नीचे के अनिवार्य arrays समान क्रम में उन्हीं वास्तविक सर्किटों का वर्णन करें: पूर्णांक गिनती, मीटर लंबाई, आयामरहित localK और 0–1 प्रवाह अंश। लाइन का अंदरूनी व्यास धनात्मक तथा लंबाई, roughness और localK गैरऋणात्मक हों। वैकल्पिक system IDs और accessory paths दाब-पतन निदान देते हैं, पूर्ण प्रति-सिस्टम/सर्किट तापीय simulation नहीं। स्पष्ट paths न होने पर accessory loss अनुमानित है। मनमानी गिनती से यह संरचना न गढ़ें।
text
// Optional: ref.circuitryPD (DX) or hydraulic.circuitryPD (water/steam/dry cooler)
{
tubesPerCircuit: number[], returnBendsPerCircuit: number[],
crossoversPerCircuit: number[], circuitLengths_m: number[],
maxTubesPerCircuit: number, maxReturnBends: number, isUnbalanced: boolean,
systemCount?: number, circuitSystemIds?: string[], feederLengths_m?: number[],
localKPerCircuit?: number[], lengthImbalance_pct?: number,
hydraulicPaths?: Array<{
circuitId: number, systemId: string, systemFlowFraction: number,
circuitFlowFraction: number, tubeLength_m: number, connectorLength_m: number,
inletCommon: Line, inletBranch: Line, outletBranch: Line, outletCommon: Line
}>
}
// Line = { length_m: number, innerDiameter_m: number, roughness_m: number, localK: number }3. DX इवैपोरेटर: निश्चित प्रवाह पर रेटिंग
POST /api/v1/calculate/dx-evaporator सीधे इनपुट object लेता है। ref में fluid, Tevap_C, superheat_K, circuits, mode और RATING के लिए धनात्मक mdot_ref_kg_s दें। x_in प्रवेश वाष्प-अंश है (default 0.2); इंजन 0 ≤ x_in < 1 माँगता है, जबकि साझा schema 1 स्वीकारता है। Tevap_C सक्शन कनेक्शन का संतृप्ति तापमान है; दाब coupling से ट्यूब प्रवेश पर संतृप्ति अधिक गर्म हो सकती है। fluid समर्थित table key से हूबहू मिले।
RATING दिए mass flow को रखता है; निकास वाष्प-अंश और achievedSuperheat_K परिणाम हैं, superheat_K लक्ष्य है। SIZING में Q_target_W चाहिए; लक्ष्य क्षमता और डिज़ाइन enthalpy rise से mass flow निकालकर वही ज्यामिति रेट होती है, कॉइल स्वतः बड़ी नहीं होती। वैकल्पिक fouling.R_ext/R_int गैरऋणात्मक m²·K/W हैं जिन्हें इंजन पढ़ता है, भले साझा evaporator Zod schema में न हों। outlet, perf, zones, htc, geometry, flags तथा विशेष रूप से targetMet, hydraulicFeasible, pressureDropExcessive और notes देखें। केवल ऊर्जा संतुलन पर्याप्त नहीं; पाला और dryout के पास की भौतिकी हल नहीं की जाती।
json
{
"request": {
"air": {
"Vdot_m3_s": 1.5,
"T_in_C": 27,
"RH_in": 0.5,
"P_Pa": 101325
},
"coil": {
"height_m": 0.508,
"tubesPerRow": 20,
"width_m": 1,
"rows": 4,
"fpi": 12,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.00952,
"wall_m": 0.0003,
"fin_m": 0.0001,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.6,
"finType": "plain"
},
"ref": {
"fluid": "R410A",
"Tevap_C": 5,
"superheat_K": 5,
"circuits": 10,
"mode": "RATING",
"mdot_ref_kg_s": 0.04,
"x_in": 0.2
},
"calib": {
"C_air": 1,
"C_tp": 1,
"C_sh": 1,
"f_maldistribution": 1
},
"segments": 40
},
"response": {
"success": true,
"data": {
"outlet": {
"T_out_C": 23.49883696449892,
"RH_out": 0.5951224553222765,
"W_out": 0.01076357974635124,
"h_out": 51029.9957183522,
"Tdp_out_C": 15.165690704059124
},
"perf": {
"Q_total_W": 7909.303263873674,
"Q_sens_W": 6229.595529054708,
"Q_lat_W": 1679.7077348189664,
"SHR": 0.7876288620147928,
"mcond_kg_s": 0.0006600788155553462,
"v_face_m_s": 2.952755905511811,
"dP_air_Pa": 83.01172194416893,
"dP_ref_Pa": 1516.4350589804817,
"Q_ref_W": 7909.303263873688,
"balanceError_pct": 1.4948764421579912e-13,
"mdot_ref_kg_s": 0.04,
"x_out": 1,
"achievedSuperheat_K": 21.745191335740323,
"targetSuperheat_K": 5,
"refrigerantOutlet": {
"T_C": 26.745191335740323,
"h_in_J_kg": 250687.86399999997,
"h_out_J_kg": 448420.44559684215,
"phase": "superheated"
},
"refrigerantPressure": {
"P_in_Pa": 937723.0350589807,
"P_out_Pa": 936206.6000000002,
"T_sat_in_C": 5.0521987063866804,
"T_sat_out_C": 5,
"satDrop_K": 0.05219870638668045,
"x_in_local": 0.19968718691574538,
"dP_twoPhase_Pa": 520.582915294799,
"dP_vapor_Pa": 995.8955933460854,
"dP_accessoriesInlet_Pa": 0,
"dP_accessoriesOutlet_Pa": 0,
"massFlux_kg_m2s": 64.00890550459303,
"hydraulicFeasible": true
}
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 39.10246205044688,
"A_int_m2": 2.2418405176016765,
"n_tubes": 80,
"n_tubes_H": 20,
"L_circuit_m": 8,
"Di_m": 0.00892
},
"htc": {
"h_air_avg": 66.80366999738932,
"h_ref_avg": 507.4101139521869,
"U_overall": 15.758299149814324,
"eta_fin": 0.7703542918753953,
"eta_surface": 0.7837297035150003
},
"flags": {
"wetCoil": true,
"superheated": true,
"converged": true,
"oversized": true,
"targetMet": true,
"hydraulicFeasible": true,
"pressureDropExcessive": false,
"notes": [
"Refrigerant ΔP 1.5 kPa (G = 64 kg/m²s per circuit): saturation 5.05 °C at the tube inlets → 5.00 °C at the suction connection (drop 0.05 K, coupled into capacity).",
"Warning: Liquid velocity (0.06 m/s) is too low (<0.3 m/s). Risk of poor oil return and flow stratification.",
"Warning: Vapor velocity (1.78 m/s) is too low (<3 m/s). Risk of poor oil return.",
"Refrigerant-limited: achieved superheat 21.7 K exceeds target by more than 2 K (66 % of area superheating vapour). A TXV would increase mass flow and capacity.",
"Wet surface on 34 % of the coil area: SHR = 0.788, condensate 2.38 kg/h",
"Model: mean-circuit crossflow moving boundary with pressure-coupled saturation (MSH friction, Domanski–Hermes bends, homogeneous momentum); Chen two-phase HTC does not model dryout near x → 1."
]
},
"zones": {
"tp_fraction": 0.34306774086665626,
"sh_fraction": 0.6569322591333437,
"wet_fraction": 0.34306774086665626,
"Q_tp_W": 6885.446862985299,
"Q_sh_W": 1023.8564008883747
},
"timestamp": "2026-11-02T15:44:41.927Z",
"engineVersion": "6.1.0"
}
}
}4. DX कंडेंसर: ऊष्मा निष्कासन लक्ष्य
POST /api/v1/calculate/dx-condenser में ref.fluid, Tcond_C, Tin_gas_C, subcool_K, circuits, mode और RATING mdot_ref_kg_s हैं। Tin_gas_C प्रवेश गैस का वास्तविक °C तापमान है, discharge superheat नहीं। Tin_gas_C ≥ Tcond_C, subcool_K ≥ 0 और Tcond_C चयनित table की subcritical सीमा में हो। SIZING का Q_target_W कंडेंसर heat rejection है, जिसमें upstream compressor heat शामिल करनी होती है। प्रवाह लक्ष्य enthalpy drop से मिलता है, कृत्रिम छोटी duty खोजकर नहीं।
calib में C_air, C_dsh, C_cond, C_sc, f_maldistribution; वैकल्पिक fouling में R_ext/R_int m²·K/W हैं। उत्तर airOut, perf.Q_dsh_W/Q_cond_W/Q_sc_W, achievedSubcool_K, status और refrigerantOutlet.phase उपयोग करता है। zones अंश क्षेत्रफल/लंबाई के हैं; heat_fractions अलग है। capacityShortfall_pct, targetMet और pressureDropExcessive जाँचें। तापीय गणना Tcond स्थिर रखती है; अनुमानित ΔP पूरे सर्किट के संतृप्ति तापमान को वापस प्रभावित नहीं करता। तापमान glide और विस्तृत पंक्ति/सर्किट परस्पर प्रभाव हल नहीं होते।
json
{
"request": {
"air": {
"Vdot_m3_s": 1.5,
"T_in_C": 30,
"RH_in": 0.5,
"P_Pa": 101325
},
"coil": {
"height_m": 0.508,
"tubesPerRow": 20,
"width_m": 1,
"rows": 4,
"fpi": 12,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.00952,
"wall_m": 0.0003,
"fin_m": 0.0001,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.6,
"finType": "plain"
},
"ref": {
"fluid": "R410A",
"Tcond_C": 45,
"subcool_K": 5,
"Tin_gas_C": 75,
"circuits": 10,
"mode": "RATING",
"mdot_ref_kg_s": 0.04
},
"calib": {
"C_air": 1,
"C_dsh": 1,
"C_cond": 1,
"C_sc": 1,
"f_maldistribution": 1
},
"fouling": {
"R_ext": 0,
"R_int": 0
},
"segments": 40
},
"response": {
"success": true,
"data": {
"engineVersion": "dx-cond-6.1.0",
"airOut": {
"T_out_C": 34.905833102639996,
"RH_out": 0.37920635932683405,
"W_out": 0.01331020383863019,
"h_out_J_kgda": 69268.25088365117
},
"perf": {
"Q_total_W": 8646.863272072569,
"Q_dsh_W": 1798.625303999998,
"Q_cond_W": 5929.402399999996,
"Q_sc_W": 918.8355680725742,
"v_face_m_s": 2.952755905511811,
"dP_air_Pa": 82.1050884443191,
"dP_ref_Pa": 265.3632161326799,
"mdot_ref_kg_s": 0.04,
"achievedSubcool_K": 12.142056810891162,
"status": "OK",
"satDrop_K": 0.004153328462578543,
"propertyModel": "coolprop_grid",
"Q_ref_W": 8646.863272072569,
"balanceError_pct": 1.8932766850595476e-13,
"requiredHeatRejection_W": 8124.959035999998,
"capacityShortfall_pct": 0,
"refrigerantOutlet": {
"T_C": 32.85794318910884,
"h_in_J_kg": 469048.89259999996,
"h_out_J_kg": 252877.31079818573,
"quality": null,
"phase": "subcooled"
},
"pressureDropBreakdown": {
"vapor_Pa": 103.73388610449132,
"liquid_Pa": 24.3684210978554,
"condensationFriction_Pa": 158.1821536620547,
"condensationBends_Pa": 8.76982049279011,
"acceleration_Pa": -29.691065224511664,
"accessories_Pa": 0
}
},
"zones": {
"dsh_fraction": 0.18317599713921148,
"cond_fraction": 0.5251466837984806,
"sc_fraction": 0.29167731906230787,
"heat_fractions": {
"dsh": 0.20800899093769123,
"cond": 0.6857287103348375,
"sc": 0.10626229872747119
}
},
"htc": {
"h_air_W_m2K": 66.77541103267734,
"h_ref_avg_W_m2K": 600.8301332918751,
"U_avg_W_m2K": 18.87836136527455,
"U_fouled_W_m2K": 18.87836136527455,
"eta_fin": 0.7704249008937955,
"eta_surface": 0.7837962000041732,
"h_dsh_W_m2K": 237.6991690054887,
"h_cond_W_m2K": 904.9932282548654,
"h_sc_W_m2K": 281.2531278597104
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 39.10246205044688,
"A_int_m2": 2.2418405176016765,
"totalTubes": 80,
"tubesH": 20,
"L_circuit_m": 8,
"Di_m": 0.00892
},
"flags": {
"converged": true,
"oversized": false,
"targetMet": true,
"pressureDropExcessive": false,
"notes": [
"Mean-circuit pure-crossflow moving-boundary model: uniform air and refrigerant flow; not a row-by-row circuit simulation.",
"Single-phase enthalpies from the CoolProp superheated/subcooled property grid (piecewise cp = Δh/ΔT); temperature glide and saturation-pressure variation along the circuit are not resolved.",
"Target duty is condenser heat rejection, not evaporator cooling capacity; compressor power must be included upstream.",
"Multiple depth rows use a mean-crossflow approximation; row mixing and circuit/airflow interaction require independent validation.",
"Refrigerant ΔP uses mean-circuit area lengths, MSH friction, homogeneous acceleration and distributed bend estimates; gravity and pressure/thermal coupling are not resolved.",
"Warning: Liquid velocity (0.07 m/s) is too low (<0.3 m/s). Risk of poor oil return and flow stratification.",
"Warning: Vapor velocity (0.53 m/s) is too low (<3 m/s). Risk of poor oil return."
]
}
}
}
}5. ठंडा पानी: mass flow आवश्यक
POST /api/v1/calculate/chilled-water में water.flowType (mass या volumetric), mdot_kg_s, T_in_C, glycol_pct आवश्यक हैं। Vdot_m3_s वैकल्पिक metadata है; इंजन सीधे mdot_kg_s उपयोग करता है, केवल volumetric अनुरोध को परिवर्तित नहीं करता। glycol_pct 0–60 एथिलीन ग्लाइकोल mass प्रतिशत है; शून्य पर पानी। पानी का प्रवेश हवा से ठंडा हो। इस रूट में water.T_out_C लक्ष्य या mode फ़ील्ड नहीं है।
hydraulic में circuits, passes तथा वैकल्पिक tubeCountOverride/circuitryPD हैं। calib में C_air, C_w, f_fouling, f_maldistribution, approach_K हैं। approach_K केवल compatibility के लिए है और अनदेखा होता है; 0 दें, निकास constraint न समझें। passes को सर्किट लंबाई में दोबारा नहीं गुणा किया जाता। इंजन lumped fouling और maldistribution को 0.5–1 में सीमित करता है। परिणाम में airOutlet, waterOutlet, sensible/latent duty, condensate kg/s, SHR, wetAreaFraction और rowProfile हैं। dP_water_kPa kPa तथा dP_air_Pa Pa में हैं। regime, notes, convergence और गीली हवा/वेग की चेतावनियाँ देखें।
json
{
"request": {
"air": {
"Vdot_m3_s": 1.5,
"T_in_C": 27,
"RH_in": 0.5,
"P_Pa": 101325
},
"water": {
"flowType": "mass",
"mdot_kg_s": 0.8,
"T_in_C": 7,
"glycol_pct": 0
},
"coil": {
"height_m": 0.508,
"width_m": 1,
"rows": 4,
"fpi": 12,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.00952,
"wall_m": 0.0003,
"fin_m": 0.0001,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.6,
"finType": "plain",
"tubeMat": "Cu",
"finMat": "Al"
},
"hydraulic": {
"circuits": 10,
"passes": 1,
"tubeCountOverride": 20
},
"calib": {
"C_air": 1,
"C_w": 1,
"f_fouling": 1,
"f_maldistribution": 1,
"approach_K": 0
},
"segments": 40
},
"response": {
"success": true,
"data": {
"airOutlet": {
"T_out_C": 17.59280443908688,
"RH_out": 0.7765505714650607,
"W_out": 0.009740516735050291,
"h_out": 42378.12881134521,
"Tdp_out_C": 13.647149565122389
},
"waterOutlet": {
"T_out_C": 13.83298923251135,
"dT_K": 6.83298923251135
},
"perf": {
"Q_total_W": 22902.7552948312,
"Q_sens_W": 16738.15895260657,
"Q_lat_W": 6164.596342224632,
"SHR": 0.7308360385959376,
"mcond_kg_s": 0.0024330194247277745,
"v_face_m_s": 2.952755905511811,
"v_water_m_s": 1.2806100545209298,
"dP_air_Pa": 102.16101340852097,
"dP_water_kPa": 31.131087580896573,
"balanceError_pct": 1.588445914152848e-14
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 39.10246205044688,
"A_int_m2": 2.2418405176016765,
"n_tubes": 80,
"n_tubes_H": 20,
"L_circuit_m": 8,
"Di_m": 0.00892
},
"htc": {
"h_air_avg": 66.82202962012009,
"h_water_avg": 5727.92773098421,
"U_overall": 45.13852142146351,
"eta_fin": 0.7703084264602427,
"eta_surface": 0.7836865094705112
},
"flags": {
"wetCoil": true,
"converged": true,
"oversized": false,
"regime": "Turbulent",
"notes": [
"Air ΔP includes a +30 % condensate allowance on the wet area (75 % wet); dry value 83 Pa.",
"Wet coil: 75 % of the area condensing, SHR = 0.731, latent 6.16 kW",
"Condensate rate: 8.76 kg/h"
],
"wetAreaFraction": 0.75,
"topology": "counter-cross-flow",
"rowProfile": [
{
"row": 1,
"Q_W": 5499.31813897424,
"T_air_out_C": 23.90926813806179,
"W_air_out": 0.011144473622459834,
"T_w_mean_C": 13.026969682536295,
"wetFraction": 0
},
{
"row": 2,
"Q_W": 5494.681101553189,
"T_air_out_C": 21.71020036768415,
"W_air_out": 0.010785290417758279,
"T_w_mean_C": 11.3995916157579,
"wetFraction": 1
},
{
"row": 3,
"Q_W": 5820.603392148445,
"T_air_out_C": 19.617081166279927,
"W_air_out": 0.010308018617014768,
"T_w_mean_C": 9.711871818476336,
"wetFraction": 1
},
{
"row": 4,
"Q_W": 6088.1526621553285,
"T_air_out_C": 17.59280443908688,
"W_air_out": 0.009740516735050291,
"T_w_mean_C": 7.936579335221592,
"wetFraction": 1
}
]
},
"timestamp": "2026-11-02T15:44:41.973Z",
"engineVersion": "6.0.0"
}
}
}6. गर्म पानी: संवेद्य ऊष्मा से गर्म करना
POST /api/v1/calculate/hot-water में ठंडे पानी जैसे water, coil, hydraulic, calib नाम हैं, लेकिन water.T_in_C > air.T_in_C होना चाहिए। flowType volumetric होने पर भी धनात्मक mdot_kg_s दें। glycol_pct एथिलीन ग्लाइकोल mass प्रतिशत है; इस रूट में प्रोपिलीन ग्लाइकोल चुनने का fluidType नहीं।
इंजन दी हुई ज्यामिति और प्रवाह रेट करता है; पानी का निकास तापमान लक्ष्य नहीं बनाता और कॉइल स्वतः आकार नहीं देता। approach_K अनदेखा होता है, passes लंबाई को दोहरा नहीं करता। हवा गर्म होने पर W_out स्थिर रहता है और RH बदलता है। परिणाम airOutlet, waterOutlet, perf.Q_total_W, dP_water_kPa और पंक्ति-वार निदान हैं; सामान्य sensibleCapacity_kW या coilCode नहीं। चयन से पहले regime, वेग चेतावनी और flags.converged देखें।
json
{
"request": {
"air": {
"Vdot_m3_s": 1.5,
"T_in_C": 15,
"RH_in": 0.5,
"P_Pa": 101325
},
"water": {
"flowType": "mass",
"mdot_kg_s": 0.8,
"T_in_C": 70,
"glycol_pct": 0
},
"coil": {
"height_m": 0.508,
"width_m": 1,
"rows": 4,
"fpi": 12,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.00952,
"wall_m": 0.0003,
"fin_m": 0.0001,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.6,
"finType": "plain",
"tubeMat": "Cu",
"finMat": "Al"
},
"hydraulic": {
"circuits": 10,
"passes": 1,
"tubeCountOverride": 20
},
"calib": {
"C_air": 1,
"C_w": 1,
"f_fouling": 1,
"f_maldistribution": 1,
"approach_K": 0
},
"segments": 40
},
"response": {
"success": true,
"data": {
"airOutlet": {
"T_out_C": 45.761722198035464,
"RH_out": 0.08548275287573397,
"W_out": 0.0052785443390815584,
"h_out": 59687.224743425075
},
"waterOutlet": {
"T_out_C": 52.970971133489016,
"dT_K": 17.029028866510984
},
"perf": {
"Q_total_W": 56935.16608498108,
"v_face_m_s": 2.952755905511811,
"v_water_m_s": 1.3104547892703775,
"dP_air_Pa": 82.60160250830555,
"dP_water_kPa": 26.25240208261644,
"balanceError_pct": 2.5558747306799374e-14
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 39.10246205044688,
"A_int_m2": 2.2418405176016765,
"n_tubes": 80,
"n_tubes_H": 20,
"L_circuit_m": 8,
"Di_m": 0.00892
},
"htc": {
"h_air_avg": 66.7732116534083,
"h_water_avg": 9792.613943179225,
"U_overall": 47.844060775088444,
"eta_fin": 0.7704303970347292,
"eta_surface": 0.7838013760296212
},
"flags": {
"converged": true,
"oversized": false,
"regime": "Turbulent",
"notes": [],
"topology": "counter-cross-flow",
"rowProfile": [
{
"row": 1,
"Q_W": 16668.64454630135,
"T_air_out_C": 24.00596675498907,
"T_w_mean_C": 55.41380080380971
},
{
"row": 2,
"Q_W": 14933.338963764221,
"T_air_out_C": 32.07435851144329,
"T_w_mean_C": 60.1476061140732
},
{
"row": 3,
"Q_W": 13369.768306539849,
"T_air_out_C": 39.297962599714644,
"T_w_mean_C": 64.38509129379582
},
{
"row": 4,
"Q_W": 11963.414268375656,
"T_air_out_C": 45.761722198035464,
"T_w_mean_C": 68.17579603667396
}
]
},
"timestamp": "2026-11-02T15:44:41.983Z",
"engineVersion": "6.0.0"
}
}
}7. भाप: गेज दाब और निकासी सीमाएँ
POST /api/v1/calculate/steam-coil में steam.P_steam_kPa kPa गेज दाब है, जिसका संदर्भ air.P_Pa है। table के लिए प्रवेश absolute pressure >20 और ≤2000 kPa हो तथा संतृप्ति तापमान प्रवेश हवा से 1 °C से अधिक ऊँचा हो। steam.controlType modulating/on_off है, dynamic control simulation नहीं। mode RATING या SIZING स्पष्ट दें; REST schema default नहीं लगाता। subcooling_K वैकल्पिक (default 5 K) है। quality इनपुट नहीं है; शुष्क संतृप्त भाप मानी जाती है।
calib में C_air, C_steam, f_fouling, f_noncondensables हैं। SIZING को धनात्मक steam.Q_target_W चाहिए; 1–4 पंक्तियाँ जाँचकर क्षमता पूरी करने वाली सबसे छोटी व्यवहार्य संख्या देता है। कोई न मिले तो चार पंक्तियों का परिणाम targetMet false के साथ देता है। selectedRows, pressureDropLimited, notes, steamOutlet और dP_steam_kPa देखें। steamTrapCapacity_kg_h और dP_steamAssemblies_kPa प्रारंभिक मार्गदर्शन हैं, trap/निकासी प्रमाणन नहीं। condensate subcooling क्षेत्र अलग मॉडल नहीं होता; gravity drainage, water hammer, उपलब्ध trap differential और यांत्रिक pressure rating की स्वतंत्र जाँच चाहिए।
json
{
"request": {
"air": {
"Vdot_m3_s": 1.5,
"T_in_C": 15,
"RH_in": 0.5,
"P_Pa": 101325
},
"steam": {
"P_steam_kPa": 100,
"controlType": "modulating",
"subcooling_K": 5,
"mode": "RATING"
},
"coil": {
"height_m": 0.508,
"width_m": 1,
"rows": 1,
"fpi": 8,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.01588,
"wall_m": 0.0008,
"fin_m": 0.0001,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.65,
"finType": "plain",
"tubeMat": "Cu",
"finMat": "Al"
},
"hydraulic": {
"circuits": 20,
"passes": 1,
"tubeCountOverride": 20
},
"calib": {
"C_air": 1,
"C_steam": 1,
"f_fouling": 1,
"f_noncondensables": 1
},
"segments": 40
},
"response": {
"success": true,
"data": {
"airOutlet": {
"T_out_C": 34.079225932632134,
"RH_out": 0.15946330926782845,
"W_out": 0.0052785443390815584,
"h_out": 47819.933671807084
},
"steamOutlet": {
"T_sat_C": 120.4008265,
"T_condensate_C": 115.40022902366081,
"mdot_steam_kg_s": 0.015890787995762996,
"mdot_steam_kg_h": 57.206836784746784
},
"perf": {
"Q_total_W": 35312.68146348002,
"v_face_m_s": 2.952755905511811,
"dP_air_Pa": 79.84088218559907,
"dP_steamAssemblies_kPa": 0,
"steamTrapCapacity_kg_h": 143.01709196186695,
"dP_steam_kPa": 0.004148565054761704,
"v_steam_in_m_s": 4.3669848655833485,
"satTempDrop_K": 0.0005974763391805027,
"balanceError_pct": 2.0604375857744306e-14,
"effectiveness": 0.18101641744854888,
"NTU": 0.19969124105470984,
"UA_W_K": 369.59744652696935
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 5.494324834912423,
"A_int_m2": 0.8972388618652448,
"n_tubes": 20,
"n_tubes_H": 20,
"L_circuit_m": 1,
"Di_m": 0.014279999999999998
},
"htc": {
"h_air_avg": 69.05378275896463,
"h_steam_avg": 16452.208245445134,
"U_overall": 67.26894707397848,
"eta_fin": 0.9040208158032803,
"eta_surface": 0.9208501857263931
},
"flags": {
"converged": true,
"oversized": false,
"notes": [
"In-tube condensation: max(Chato gravity-driven, Shah shear-driven) — governing: Chato (stratified); inlet vapour Re = 5474.",
"Steam ΔP in governing circuit 0.00 kPa → T_sat drop 0.00 K; capacity uses T_sat at the mean circuit pressure (120.4 °C).",
"Condensate hydrostatic head across the coil: 4.7 kPa (0 return bends per circuit). Ensure gravity drainage and trap differential.",
"Steam use includes 5.0 K condensate subcooling (h_fg + cp·ΔT_sub); the subcooling area is not modelled separately."
],
"pressureDropLimited": false,
"condensationModel": "Chato (stratified)",
"rowProfile": [
{
"row": 1,
"Q_W": 35312.68146348002,
"T_air_out_C": 34.079225932632134,
"h_steam_W_m2K": 16452.208245445134
}
]
},
"timestamp": "2026-11-02T15:44:41.989Z",
"engineVersion": "5.0.0"
}
}
}8. ड्राई कूलर: REST पर एक कॉइल की रेटिंग
POST /api/v1/calculate/dry-cooler का air अलग है: T_db_C, RH, altitude_m और Vdot_m3_s या v_face_m_s। दोनों हों तो धनात्मक v_face_m_s प्राथमिक है। fluid में fluidType water/eg/pg, glycolPct (mass %, 0–60), T_in_C और धनात्मक mdot_kg_s या Vdot_m3_s हैं; mass flow प्राथमिक है। द्रव प्रवेश हवा से गर्म हो। calib में C_air, C_fluid, f_fouling_air, f_fouling_fluid, वैकल्पिक R_fouling_air_m2KW/R_fouling_fluid_m2KW (m²·K/W), f_maldistribution, approach_K हैं; approach_K अनदेखा होता है।
REST handler केवल solveDryCooler बुलाता है। साझा types में fluid.T_out_C, vShape, vAngle_deg होने से इस endpoint पर लक्ष्य निकास-तापमान sizing या V-shape solver सक्रिय नहीं होते। यहाँ /dry-cooler/balanced रूट नहीं है। एक कॉइल की रेटिंग में airOutlet, fluidOutlet, Q_total_W, LMTD_K, F_correction, effectiveness, NTU और freezing निदान मिलते हैं। इस heat-rejection मॉडल में Q_lat_W शून्य और wetCoil false हैं; यह spray/evaporative cooler नहीं। nearFreezing, freezingMargin_K, regime, convergence और notes जाँचें।
json
{
"request": {
"air": {
"T_db_C": 30,
"RH": 0.5,
"altitude_m": 0,
"Vdot_m3_s": 1.5
},
"fluid": {
"fluidType": "eg",
"glycolPct": 30,
"T_in_C": 45,
"mdot_kg_s": 0.8
},
"coil": {
"height_m": 0.508,
"width_m": 1,
"rows": 4,
"fpi": 10,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.01588,
"wall_m": 0.0005,
"fin_m": 0.0002,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.55,
"finType": "plain",
"tubeMat": "Cu",
"finMat": "Al"
},
"hydraulic": {
"circuits": 10,
"passes": 1,
"tubeCountOverride": 20
},
"calib": {
"C_air": 1,
"C_fluid": 1,
"f_fouling_air": 1,
"f_fouling_fluid": 1,
"R_fouling_air_m2KW": 0,
"R_fouling_fluid_m2KW": 0,
"f_maldistribution": 1,
"approach_K": 0
},
"segments": 40
},
"response": {
"success": true,
"data": {
"airOutlet": {
"T_out_C": 37.963588732151216,
"RH_out": 0.32077369527978405,
"W_out": 0.01331020383863019,
"h_out": 72420.05383927401
},
"fluidOutlet": {
"T_out_C": 40.1532216213745,
"dT_K": 4.846778378625501
},
"perf": {
"Q_total_W": 14036.364768477986,
"Q_sens_W": 14036.364768477986,
"Q_lat_W": 0,
"v_face_m_s": 2.952755905511811,
"v_fluid_m_s": 0.44169081528152904,
"dP_air_Pa": 220.66091438182707,
"dP_fluid_kPa": 3.170390159951273,
"balanceError_pct": 2.2030504600253869e-13,
"LMTD_K": 8.499786553833324,
"F_correction": 0.9964684620436388,
"effectiveness": 0.530905915476746,
"NTU": 0.9402368011687094
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 26.353776660889263,
"A_int_m2": 3.7397518948332893,
"n_tubes": 80,
"n_tubes_H": 20,
"L_circuit_m": 8,
"Di_m": 0.014879999999999997
},
"htc": {
"h_air_avg": 158.41035024054196,
"h_fluid_avg": 784.605812708763,
"U_overall": 62.88400693514512,
"UA_W_K": 1657.2310743106261,
"eta_fin": 0.8992749036562225,
"eta_surface": 0.9133028338448336
},
"flags": {
"wetCoil": false,
"wetFraction": 0,
"converged": true,
"oversized": false,
"regime": "Transitional",
"nearFreezing": false,
"freezingPoint_C": -13.544999999999998,
"freezingMargin_K": 53.6982216213745,
"notes": [
"Warning: Glycol mixture velocity (0.44 m/s) below 0.5 m/s. Glycol mixtures need higher velocity for adequate heat transfer.",
"Notice: Fluid flow is transitional (Re = 2798). Results may have higher uncertainty.",
"Dry cooler: the fin surface is warmer than the air, so no condensation can occur (latent capacity = 0)."
],
"topology": "counter-cross-flow",
"rowProfile": [
{
"row": 1,
"Q_W": 3885.8246219918224,
"T_air_out_C": 32.20463842919675,
"T_w_mean_C": 40.80778501827438
},
{
"row": 2,
"Q_W": 3634.220318092688,
"T_air_out_C": 34.266528131601234,
"T_w_mean_C": 42.10730054946271
},
{
"row": 3,
"Q_W": 3382.1877594860885,
"T_air_out_C": 36.18542613516059,
"T_w_mean_C": 43.31977794477613
},
{
"row": 4,
"Q_W": 3134.1320689073873,
"T_air_out_C": 37.963588732151216,
"T_w_mean_C": 44.445822404284186
}
]
},
"timestamp": "2026-11-02T15:44:42.006Z",
"engineVersion": "2.0.0"
}
}
}9. balanced रूट के अनुबंध अलग हैं
POST /api/v1/calculate/dx-evaporator/balanced को {inputs: <पूर्ण इवैपोरेटर इनपुट>, options?: {tolPct?, maxIt?}} चाहिए। यह माँगा गया outlet superheat पाने के लिए रेफ्रिजरेंट mass flow खोजता है, यानी विस्तार वाल्व का कार्य-बिंदु। क्षमता परिणाम है, केवल Q_air = Q_ref मिलाना नहीं। अंदर RATING और प्रवाह न होने पर धनात्मक seed उपयोग होता है। maxIt default 60 है। मूल SIZING इनपुट में tolPct (default 1) क्षमता shortfall जाँचता है, superheat tolerance नहीं; इंजन की superheat स्वीकृति 0.05 K है। targetMet/converged false हो सकते हैं। calibration नहीं बदलती।
POST /api/v1/calculate/dx-condenser/balanced सीधे कंडेंसर इनपुट लेता है, {inputs, options} नहीं। सामान्य solver चलता है, RATING प्रवाह स्थिर रहता है, iterations 1 होता है और SIZING में duty, liquid phase और subcooling जाँचे जाते हैं। REST तीसरा options argument नहीं देता; body में options भेजने से अंदरूनी flow bounds, maxIt या tolerances उपलब्ध नहीं होते। इसे कमी छिपाने के लिए कम प्रवाह खोजने वाला endpoint न समझें। दोनों अपने सामान्य मॉड्यूल जैसा परिणाम देते हैं।
json
[
{
"method": "POST",
"path": "/api/v1/calculate/dx-evaporator/balanced",
"request": {
"inputs": {
"air": {
"Vdot_m3_s": 1.5,
"T_in_C": 27,
"RH_in": 0.5,
"P_Pa": 101325
},
"coil": {
"height_m": 0.508,
"tubesPerRow": 20,
"width_m": 1,
"rows": 4,
"fpi": 12,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.00952,
"wall_m": 0.0003,
"fin_m": 0.0001,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.6,
"finType": "plain"
},
"ref": {
"fluid": "R410A",
"Tevap_C": 5,
"superheat_K": 5,
"circuits": 10,
"mode": "RATING",
"mdot_ref_kg_s": 0.04,
"x_in": 0.2
},
"calib": {
"C_air": 1,
"C_tp": 1,
"C_sh": 1,
"f_maldistribution": 1
},
"segments": 40
},
"options": {
"tolPct": 1,
"maxIt": 60
}
},
"response": {
"success": true,
"data": {
"outlet": {
"T_out_C": 16.37866583468195,
"RH_out": 0.7700295163271693,
"W_out": 0.008931554267298955,
"h_out": 39086.848765679584,
"Tdp_out_C": 12.341546239274933
},
"perf": {
"Q_total_W": 28606.45485650264,
"Q_sens_W": 18898.46749721315,
"Q_lat_W": 9707.987359289491,
"SHR": 0.660636474949893,
"mcond_kg_s": 0.0038349295656768378,
"v_face_m_s": 2.952755905511811,
"dP_air_Pa": 83.4970954841905,
"dP_ref_Pa": 18853.52619300515,
"Q_ref_W": 28606.45485650279,
"balanceError_pct": 5.214107509615256e-13,
"mdot_ref_kg_s": 0.1606828269347608,
"x_out": 1,
"achievedSuperheat_K": 5.013566038697411,
"targetSuperheat_K": 5,
"refrigerantOutlet": {
"T_C": 10.01356603869741,
"h_in_J_kg": 250687.86399999997,
"h_out_J_kg": 428718.4314365398,
"phase": "superheated"
},
"refrigerantPressure": {
"P_in_Pa": 955060.1261930054,
"P_out_Pa": 936206.6000000002,
"T_sat_in_C": 5.648975814871859,
"T_sat_out_C": 5,
"satDrop_K": 0.648975814871859,
"x_in_local": 0.19609440443287166,
"dP_twoPhase_Pa": 17333.776101730764,
"dP_vapor_Pa": 1524.1357220685973,
"dP_accessoriesInlet_Pa": 0,
"dP_accessoriesOutlet_Pa": 0,
"massFlux_kg_m2s": 257.12829713694947,
"hydraulicFeasible": true
}
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 39.10246205044688,
"A_int_m2": 2.2418405176016765,
"n_tubes": 80,
"n_tubes_H": 20,
"L_circuit_m": 8,
"Di_m": 0.00892
},
"htc": {
"h_air_avg": 66.82588196002244,
"h_ref_avg": 3152.8354872556492,
"U_overall": 39.48790359750422,
"eta_fin": 0.7702988035387852,
"eta_surface": 0.7836774470234328
},
"flags": {
"wetCoil": true,
"superheated": true,
"converged": true,
"oversized": false,
"targetMet": true,
"hydraulicFeasible": true,
"pressureDropExcessive": false,
"notes": [
"Refrigerant ΔP 18.9 kPa (G = 257 kg/m²s per circuit): saturation 5.65 °C at the tube inlets → 5.00 °C at the suction connection (drop 0.65 K, coupled into capacity).",
"Warning: Liquid velocity (0.22 m/s) is too low (<0.3 m/s). Risk of poor oil return and flow stratification.",
"Wet surface on 93 % of the coil area: SHR = 0.661, condensate 13.81 kg/h",
"Model: mean-circuit crossflow moving boundary with pressure-coupled saturation (MSH friction, Domanski–Hermes bends, homogeneous momentum); Chen two-phase HTC does not model dryout near x → 1.",
"TXV: mdot_ref = 0.16068 kg/s gives 5.01 K superheat (12 evaluations)."
],
"iterations": 12
},
"zones": {
"tp_fraction": 0.9259358677567262,
"sh_fraction": 0.0740641322432738,
"wet_fraction": 0.9259358677567262,
"Q_tp_W": 27660.548469301222,
"Q_sh_W": 945.9063872014204
},
"timestamp": "2026-11-02T15:44:42.158Z",
"engineVersion": "6.1.0"
}
}
},
{
"method": "POST",
"path": "/api/v1/calculate/dx-condenser/balanced",
"request": {
"air": {
"Vdot_m3_s": 1.5,
"T_in_C": 30,
"RH_in": 0.5,
"P_Pa": 101325
},
"coil": {
"height_m": 0.508,
"tubesPerRow": 20,
"width_m": 1,
"rows": 4,
"fpi": 12,
"Pt_m": 0.0254,
"Pl_m": 0.022,
"Do_m": 0.00952,
"wall_m": 0.0003,
"fin_m": 0.0001,
"tube_k": 386,
"fin_k": 200,
"freeAreaRatio": 0.6,
"finType": "plain"
},
"ref": {
"fluid": "R410A",
"Tcond_C": 45,
"subcool_K": 5,
"Tin_gas_C": 75,
"circuits": 10,
"mode": "RATING",
"mdot_ref_kg_s": 0.04
},
"calib": {
"C_air": 1,
"C_dsh": 1,
"C_cond": 1,
"C_sc": 1,
"f_maldistribution": 1
},
"fouling": {
"R_ext": 0,
"R_int": 0
},
"segments": 40
},
"response": {
"success": true,
"data": {
"engineVersion": "dx-cond-6.1.0",
"airOut": {
"T_out_C": 34.905833102639996,
"RH_out": 0.37920635932683405,
"W_out": 0.01331020383863019,
"h_out_J_kgda": 69268.25088365117
},
"perf": {
"Q_total_W": 8646.863272072569,
"Q_dsh_W": 1798.625303999998,
"Q_cond_W": 5929.402399999996,
"Q_sc_W": 918.8355680725742,
"v_face_m_s": 2.952755905511811,
"dP_air_Pa": 82.1050884443191,
"dP_ref_Pa": 265.3632161326799,
"mdot_ref_kg_s": 0.04,
"achievedSubcool_K": 12.142056810891162,
"status": "OK",
"satDrop_K": 0.004153328462578543,
"propertyModel": "coolprop_grid",
"Q_ref_W": 8646.863272072569,
"balanceError_pct": 1.8932766850595476e-13,
"requiredHeatRejection_W": 8124.959035999998,
"capacityShortfall_pct": 0,
"refrigerantOutlet": {
"T_C": 32.85794318910884,
"h_in_J_kg": 469048.89259999996,
"h_out_J_kg": 252877.31079818573,
"quality": null,
"phase": "subcooled"
},
"pressureDropBreakdown": {
"vapor_Pa": 103.73388610449132,
"liquid_Pa": 24.3684210978554,
"condensationFriction_Pa": 158.1821536620547,
"condensationBends_Pa": 8.76982049279011,
"acceleration_Pa": -29.691065224511664,
"accessories_Pa": 0
}
},
"zones": {
"dsh_fraction": 0.18317599713921148,
"cond_fraction": 0.5251466837984806,
"sc_fraction": 0.29167731906230787,
"heat_fractions": {
"dsh": 0.20800899093769123,
"cond": 0.6857287103348375,
"sc": 0.10626229872747119
}
},
"htc": {
"h_air_W_m2K": 66.77541103267734,
"h_ref_avg_W_m2K": 600.8301332918751,
"U_avg_W_m2K": 18.87836136527455,
"U_fouled_W_m2K": 18.87836136527455,
"eta_fin": 0.7704249008937955,
"eta_surface": 0.7837962000041732,
"h_dsh_W_m2K": 237.6991690054887,
"h_cond_W_m2K": 904.9932282548654,
"h_sc_W_m2K": 281.2531278597104
},
"geometry": {
"A_face_m2": 0.508,
"A_ext_m2": 39.10246205044688,
"A_int_m2": 2.2418405176016765,
"totalTubes": 80,
"tubesH": 20,
"L_circuit_m": 8,
"Di_m": 0.00892
},
"flags": {
"converged": true,
"oversized": false,
"targetMet": true,
"pressureDropExcessive": false,
"notes": [
"Mean-circuit pure-crossflow moving-boundary model: uniform air and refrigerant flow; not a row-by-row circuit simulation.",
"Single-phase enthalpies from the CoolProp superheated/subcooled property grid (piecewise cp = Δh/ΔT); temperature glide and saturation-pressure variation along the circuit are not resolved.",
"Target duty is condenser heat rejection, not evaporator cooling capacity; compressor power must be included upstream.",
"Multiple depth rows use a mean-crossflow approximation; row mixing and circuit/airflow interaction require independent validation.",
"Refrigerant ΔP uses mean-circuit area lengths, MSH friction, homogeneous acceleration and distributed bend estimates; gravity and pressure/thermal coupling are not resolved.",
"Warning: Liquid velocity (0.07 m/s) is too low (<0.3 m/s). Risk of poor oil return and flow stratification.",
"Warning: Vapor velocity (0.53 m/s) is too low (<3 m/s). Risk of poor oil return."
],
"iterations": 1
}
}
}
}
]10. सफलता और सूची उत्तर पढ़ना
गणना का HTTP 200 उत्तर {success:true,data:<इंजन परिणाम>} है; कोई सार्वभौमिक capacity rename, coilCode, pagination या saved project नहीं। duty W में, रेफ्रिजरेंट/condensate mass flow kg/s में, स्पष्ट kg_h अपवाद के साथ; हवा और DX दाब-पतन Pa में, kPa से समाप्त liquid/steam फ़ील्ड kPa में। उदाहरणों में पूर्ण कृत्रिम उत्तर हैं। नीचे का संक्षिप्त field catalogue सशर्त फ़ील्ड भी दिखाता है; यह फ़ील्ड संकेत है, चलने योग्य TypeScript या JSON अनुरोध नहीं। वैकल्पिक गुण अनुपस्थित हो सकते हैं।
HTTP सफलता केवल solver का लौटना बताती है, लक्ष्य क्षमता या सुरक्षित निर्माण नहीं। flags.converged, flags.notes, उपलब्ध targetMet, वास्तविक superheat/subcooling, outlet phase, hydraulic और freezing निदान देखें। छोटा balanceError_pct आंतरिक conservation residual है, स्वतंत्र प्रयोगशाला सत्यापन नहीं। कंडेंसर engineVersion देता है, timestamp नहीं; सभी इंजन का metadata समान न मानें।
GET /api/v1/refrigerants केवल data में सटीक नामों की सूची देता है; GWP, ODP, सुरक्षा वर्ग या property tables नहीं। GET /api/v1/health सीधे status, version, ISO timestamp देता है, success/data नहीं; version API का है, हर इंजन का नहीं। दोनों GET प्रमाणित हैं। रेफ्रिजरेंट सूची में होना transcritical उपयोग या असीमित तापमान का समर्थन नहीं।
text
// HTTP 200 calculators: { success: true, data: Result }
// A trailing ? marks an optional field; names and units are literal API keys.
Air = {T_out_C, RH_out, W_out, h_out}; // numbers: °C, fraction, kg/kg dry air, J/kg dry air
Geometry = {A_face_m2, A_ext_m2, A_int_m2, n_tubes, n_tubes_H, L_circuit_m, Di_m};
HTC = {h_air_avg, U_overall, eta_fin, eta_surface}; // W/(m²·K), efficiencies 0–1
Row = {row, Q_W, T_air_out_C, T_w_mean_C};
DXEvaporator = {
outlet: Air & {Tdp_out_C}, geometry: Geometry, htc: HTC & {h_ref_avg},
perf: {Q_total_W,Q_sens_W,Q_lat_W,SHR,mcond_kg_s,v_face_m_s,dP_air_Pa,dP_ref_Pa,
Q_ref_W,balanceError_pct,mdot_ref_kg_s,x_out,achievedSuperheat_K?,targetSuperheat_K?,
targetCapacity_W?,capacityShortfall_pct?,
refrigerantOutlet?: {T_C,h_in_J_kg,h_out_J_kg,phase},
refrigerantPressure?: {P_in_Pa,P_out_Pa,T_sat_in_C,T_sat_out_C,satDrop_K,x_in_local,
dP_twoPhase_Pa,dP_vapor_Pa,dP_accessoriesInlet_Pa,dP_accessoriesOutlet_Pa,massFlux_kg_m2s,hydraulicFeasible}},
zones?: {tp_fraction,sh_fraction,wet_fraction,Q_tp_W,Q_sh_W},
flags: {wetCoil,superheated,converged,oversized,targetMet?,hydraulicFeasible?,pressureDropExcessive?,iterations?,notes},
timestamp, engineVersion
};
DXCondenser = {
airOut: {T_out_C,RH_out,W_out,h_out_J_kgda},
perf: {Q_total_W,Q_dsh_W,Q_cond_W,Q_sc_W,v_face_m_s,dP_air_Pa,dP_ref_Pa?,
mdot_ref_kg_s,achievedSubcool_K,status,satDrop_K?,propertyModel?,Q_ref_W,balanceError_pct,
targetCapacity_W?,targetError_pct?,requiredHeatRejection_W?,capacityShortfall_pct?,
refrigerantOutlet?: {T_C,h_in_J_kg,h_out_J_kg,quality,phase},
pressureDropBreakdown?: {vapor_Pa,liquid_Pa,condensationFriction_Pa,condensationBends_Pa,acceleration_Pa,accessories_Pa}},
zones: {dsh_fraction,cond_fraction,sc_fraction,heat_fractions?:{dsh,cond,sc}},
htc: {h_air_W_m2K,h_ref_avg_W_m2K,U_avg_W_m2K,U_fouled_W_m2K?,eta_fin,eta_surface,h_dsh_W_m2K?,h_cond_W_m2K?,h_sc_W_m2K?},
geometry: {A_face_m2,A_ext_m2,A_int_m2,totalTubes,tubesH?,L_circuit_m?,Di_m?},
flags: {converged,iterations?,oversized,targetMet?,pressureDropExcessive?,notes}, engineVersion?
};
ChilledWater = {
airOutlet: Air & {Tdp_out_C}, waterOutlet:{T_out_C,dT_K}, geometry:Geometry,
htc:HTC & {h_water_avg},
perf:{Q_total_W,Q_sens_W,Q_lat_W,SHR,mcond_kg_s,v_face_m_s,v_water_m_s?,dP_air_Pa,dP_water_kPa,balanceError_pct},
flags:{wetCoil,converged,oversized,regime,notes,wetAreaFraction?,topology?,
rowProfile?: Array<Row & {W_air_out,wetFraction}>}, timestamp,engineVersion
};
HotWater = {
airOutlet:Air,waterOutlet:{T_out_C,dT_K},geometry:Geometry,htc:HTC & {h_water_avg},
perf:{Q_total_W,v_face_m_s,v_water_m_s?,dP_air_Pa,dP_water_kPa,balanceError_pct},
flags:{converged,oversized,regime,notes,topology?,rowProfile?:Row[]},timestamp,engineVersion
};
Steam = {
airOutlet:Air,steamOutlet:{T_sat_C,T_condensate_C,mdot_steam_kg_s,mdot_steam_kg_h},
geometry:Geometry,htc:HTC & {h_steam_avg},
perf:{Q_total_W,v_face_m_s,dP_air_Pa,dP_steamAssemblies_kPa,steamTrapCapacity_kg_h,
dP_steam_kPa?,v_steam_in_m_s?,satTempDrop_K?,balanceError_pct?,effectiveness?,NTU?,UA_W_K?},
flags:{converged,oversized,notes,targetMet?,selectedRows?,pressureDropLimited?,condensationModel?,
rowProfile?:Array<{row,Q_W,T_air_out_C,h_steam_W_m2K}>},timestamp,engineVersion
};
DryCooler = {
airOutlet:Air,fluidOutlet:{T_out_C,dT_K},geometry:Geometry,htc:HTC & {h_fluid_avg,UA_W_K},
perf:{Q_total_W,Q_sens_W,Q_lat_W,v_face_m_s,v_fluid_m_s,dP_air_Pa,dP_fluid_kPa,
balanceError_pct,LMTD_K,F_correction,effectiveness,NTU},
flags:{wetCoil,wetFraction,converged,oversized,regime,nearFreezing,freezingPoint_C,freezingMargin_K,
notes,topology?,rowProfile?:Row[],targetMet?},timestamp,engineVersion
};
// Numbers unless named otherwise: flags booleans; notes string[]; rowProfile arrays.
// timestamp: ISO string; engineVersion/regime/topology/propertyModel/status/phase/condensationModel: strings.
// Condenser refrigerantOutlet.quality: number | null. No condenser timestamp is returned.
// Evaporator phase: two_phase | saturated_vapor | superheated.
// Condenser phase: superheated | two_phase | saturated_liquid | subcooled.
// Condenser status type: OK | NO_CONDENSE | NO_SUBCOOL | LIMITED_UA | PARTIAL.
// Current condenser solver emits OK, NO_CONDENSE, NO_SUBCOOL or PARTIAL.
// propertyModel: coolprop_grid | constant_cp_fallback; topology: counter-cross-flow.
// condensationModel: Chato (stratified) | Shah (annular).
// GET /api/v1/health: {status:"ok",version:"1.0.0",timestamp:"<ISO>"}
// GET /api/v1/refrigerants: {success:true,data:["R32","R410A","R134a","R22","R290","R1234yf","R404A","R507A","R407C","R1234ze(E)","R717","R744","R600a","R1270","R123","R245fa"]}11. त्रुटियाँ, सीमाएँ और सुरक्षित समस्या-निवारण
रूट का JSON error {error:<code>,message:<text>} है; success:false या फ़ील्ड-errors array नहीं। नीचे के literal templates में कोणीय कोष्ठक वाले मान बदलते हैं। सामान्य DX में missing/unknown refrigerant संदेश अलग हैं। इवैपोरेटर balanced पहले inputs देखता है और दोनों balanced छोटा Unknown refrigerant संदेश देते हैं। भीतर के फ़ील्ड गायब होने पर exception 422 बन सकता है। object जाँच सतही है; JavaScript arrays भी objects हैं। इसे पूर्ण validation न मानें।
401 पर Bearer, exk_ और कुंजी की वैधता जाँचें, रहस्य न दिखाएँ। 403 पर revocation, expiry, सदस्यता और calc:read। 400 पर body या रेफ्रिजरेंट key ठीक करें। 422 पर इंजन संदेश के अनुसार इकाइयाँ, आवश्यक फ़ील्ड, प्रवाह/तापक्रम क्रम, ज्यामिति और property range सुधारें; खराब इनपुट बार-बार न भेजें। प्रमाणीकरण/storage के uncaught errors wrapSolver से normalize नहीं होते। गलत JSON या बड़ा body Express में REST से पहले अस्वीकृत हो सकता है; app parser सीमा 50mb है और उन त्रुटियों का यह JSON format सुनिश्चित नहीं।
सीमा प्रति कुंजी process memory में है; 60-second window पहली स्वीकृत authentication से शुरू होती है। configured limit उपयोग होता है, falsy होने पर 100 अनुरोध/मिनट; यह सार्वभौमिक plan quota या distributed limiter नहीं। X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (Unix seconds) authentication/rate checks के बाद और 429 में मिलते हैं, हर 401/403 में नहीं। बाद की permission/input failures quota लेती हैं। 429 पर reset तक प्रतीक्षा और bounded backoff करें; Retry-After की गारंटी नहीं। केवल endpoint, कृत्रिम/अनाम input, HTTP status और निदान लॉग करें, रहस्य नहीं।
text
HTTP 401: {"error":"unauthorized","message":"Missing or invalid Authorization header. Use: Bearer exk_your_api_key"}
HTTP 401: {"error":"unauthorized","message":"Invalid API key format. Keys start with 'exk_'."}
HTTP 401: {"error":"unauthorized","message":"Invalid API key."}
HTTP 403: {"error":"forbidden","message":"API key has been revoked."}
HTTP 403: {"error":"forbidden","message":"API key has expired."}
HTTP 403: {"error":"forbidden","message":"API access requires an active Enterprise or Manufacturer subscription."}
HTTP 403: {"error":"forbidden","message":"This API key does not have the 'calc:read' permission."}
HTTP 429: {"error":"rate_limit_exceeded","message":"Rate limit of <limit> requests per minute exceeded. Try again later."}
HTTP 400: {"error":"bad_request","message":"Request body must be a JSON object with calculation inputs."}
HTTP 400: {"error":"bad_request","message":"Missing refrigerant in input. Provide ref.fluid (or legacy ref.refrigerant)."}
HTTP 400: {"error":"bad_request","message":"Unknown refrigerant '<name>'. Available: <keys>"}
HTTP 400: {"error":"bad_request","message":"Request body must contain 'inputs' and optional 'options' fields."}
HTTP 400: {"error":"bad_request","message":"Unknown refrigerant '<name>'."}
HTTP 422: {"error":"calculation_error","message":"<engine error>"}
// Non-Error fallbacks: normal routes = Calculation failed; balanced routes = Balanced solve failed.