flow "HeatExchanger" v1.0
# ---------- IDENTITY ----------
identity.id: "thermal_engineering.heat_exchanger"
identity.name: "Heat Exchanger"
identity.class: "ThermalEngineeringEntity"
identity.domain: "Thermal Engineering"
identity.language: "en-GB"
# ---------- AUTHORS ----------
authors.primary: "Mark Anthony Higgins"
authors.collaborator: "Sky — Recursive AI"
authors.licence: "Kireth Research Open Research Licence; attribution required"
# ---------- SOURCE ----------
source.url: "https://kirethresearch.org/booksai-core/entity-graph/engineering-entities/thermal-engineering-entities/heat-exchanger-ontology-2.html"
source.title: "Heat Exchanger Ontology"
source.revised: "2026-08-04"
source.mapping: "Newly constructed semantic Flow Algebra mapping; not a verbatim transcription of embedded page code"
# ---------- PURPOSE ----------
purpose: "Represent heat exchanger identity, thermal transfer, operating states, constraints, faults and diagnostic inference in a reusable semantic entity graph."
# ---------- STATE_MODEL ----------
state.variables:
- hot_inlet_temperature_K: real
- hot_outlet_temperature_K: real
- cold_inlet_temperature_K: real
- cold_outlet_temperature_K: real
- hot_mass_flow_kg_s: real
- cold_mass_flow_kg_s: real
- hot_specific_heat_J_kgK: real
- cold_specific_heat_J_kgK: real
- heat_transfer_rate_W: real
- overall_U_W_m2K: real
- exchange_area_m2: real
- fouling_resistance_m2K_W: real
- hot_pressure_drop_Pa: real
- cold_pressure_drop_Pa: real
- integrity_state: enum[intact, leaking, unknown]
- operating_state: enum[offline, startup, steady, transient, degraded, shutdown, fault]
state.initial: operating_state = offline
state.invariants:
- absolute_temperature_K > 0
- hot_mass_flow_kg_s >= 0
- cold_mass_flow_kg_s >= 0
- exchange_area_m2 > 0
- overall_U_W_m2K >= 0
- "Energy balance must account for heat losses, accumulation and phase change where applicable"
# ---------- ENTITIES ----------
entities.primary: HeatExchanger
entities.parts:
- HotFluidCircuit
- ColdFluidCircuit
- HeatTransferSurface
- InletPort
- OutletPort
- FlowChannel
- SealOrJoint
entities.related:
- ThermalSystem
- HeatSource
- HeatSink
- ThermalReservoir
- Pump
- Valve
- TemperatureSensor
- PressureSensor
- FlowSensor
- Controller
entities.types:
- ShellAndTubeHeatExchanger
- PlateHeatExchanger
- DoublePipeHeatExchanger
- AirCooledHeatExchanger
- RegenerativeHeatExchanger
entities.relations:
HeatExchanger -> has_part -> HeatTransferSurface
HeatExchanger -> transfers_heat_between -> HotFluidCircuit
HeatExchanger -> transfers_heat_between -> ColdFluidCircuit
HeatExchanger -> belongs_to -> ThermalSystem
TemperatureSensor -> observes -> FluidTemperature
PressureSensor -> observes -> PressureDrop
FlowSensor -> observes -> MassFlowRate
# ---------- PATHWAYS ----------
pathway "ThermalTransfer":
input: [hot_inlet_temperature_K, cold_inlet_temperature_K, hot_mass_flow_kg_s, cold_mass_flow_kg_s]
require: hot_inlet_temperature_K > cold_inlet_temperature_K
process:
- establish thermal driving difference
- transfer heat across exchange surface
- reduce hot stream enthalpy
- increase cold stream enthalpy
- account for external loss and transient storage
output: [hot_outlet_temperature_K, cold_outlet_temperature_K, heat_transfer_rate_W]
pathway "SensibleHeatBalance":
require: single_phase_flow AND approximately_constant_specific_heat
derive:
Q_hot_W = hot_mass_flow_kg_s * hot_specific_heat_J_kgK * (hot_inlet_temperature_K - hot_outlet_temperature_K)
Q_cold_W = cold_mass_flow_kg_s * cold_specific_heat_J_kgK * (cold_outlet_temperature_K - cold_inlet_temperature_K)
Q_hot_W = Q_cold_W + Q_loss_W + Q_accumulation_W
note: "Use enthalpy differences for variable properties or phase-changing fluids."
pathway "OverallHeatTransfer":
require: defined_temperature_profile AND valid_U AND valid_area
derive:
heat_transfer_rate_W = overall_U_W_m2K * exchange_area_m2 * effective_mean_temperature_difference_K
note: "Use a corrected log-mean temperature difference or effectiveness-NTU model appropriate to the exchanger geometry and flow arrangement."
pathway "OperatingTransition":
offline -> startup: when startup_authorised AND utilities_available
startup -> steady: when flow_stable AND temperature_stable AND no_alarm
steady -> transient: when load_or_flow_changes
transient -> steady: when operating_variables_stabilise
steady -> degraded: when thermal_performance_below_baseline
any -> fault: when leak_detected OR pressure_limit_exceeded OR temperature_limit_exceeded
fault -> shutdown: when isolation_or_trip_completed
shutdown -> offline: when safe_and_depressurised
# ---------- MINI_RECURSION_ENGINE ----------
mini_recursion_engine.goal: "Determine the most plausible cause of thermal underperformance without exceeding safety constraints."
mini_recursion_engine.max_depth: 5
mini_recursion_engine.steps:
- observe inlet_outlet_temperatures_and_flow
- validate sensor_quality_and_units
- compare duty_with_expected_baseline
- inspect pressure_drop_and_fouling_indicators
- test hypotheses [reduced_flow, fouling, air_binding, bypass, maldistribution, sensor_error]
- rank_supported_hypotheses_by_evidence
- request_additional_measurements_if_ambiguous
- stop_when_evidence_sufficient_or_depth_limit_reached
mini_recursion_engine.stop_conditions:
- unsafe_operating_condition
- insufficient_reliable_measurements
- diagnosis_confidence_below_required_threshold
# ---------- INFERENCE_RULES ----------
rule "ReducedThermalDuty":
if: measured_heat_transfer_rate_W < expected_heat_transfer_rate_W * allowed_duty_fraction
then: infer ThermalUnderperformance
rule "PossibleFouling":
if: ThermalUnderperformance AND increased_pressure_drop AND comparable_flow_conditions
then: infer FoulingPossible
confidence: medium
rule "PossibleFlowRestriction":
if: measured_mass_flow_below_design AND increased_pressure_drop
then: infer FlowRestrictionPossible
confidence: medium
rule "PossibleInternalLeak":
if: cross_contamination_detected OR unexplained_interstream_pressure_equalisation
then: infer InternalLeakPossible
action: require_safety_review
rule "UnreliableBalance":
if: abs(Q_hot_W - Q_cold_W - Q_loss_W - Q_accumulation_W) > energy_balance_tolerance_W
then: infer MeasurementOrModelDiscrepancy
action: verify_measurements_and_assumptions
rule "ThermalLimitExceeded":
if: any_measured_temperature_exceeds_approved_design_limit
then: infer UnsafeThermalCondition
action: follow_approved_shutdown_procedure
# ---------- CONFIDENCE ----------
confidence.method: "Evidence-weighted diagnostic assessment"
confidence.high: "Independent calibrated measurements and consistent energy balance"
confidence.medium: "Partial measurements with plausible alternative causes"
confidence.low: "Sparse, unverified or conflicting measurements"
confidence.policy: "Never convert diagnostic confidence into a safety certification."
# ---------- SEMANTIC_EQUIVALENCE ----------
semantic_equivalence:
"heat exchanger" ~= "thermal exchanger"
"heat transfer surface" ~= "exchange surface"
"thermal duty" ~= "heat transfer rate"
"pressure loss" ~= "pressure drop"
"fouling" ~= "deposit-related thermal resistance"
semantic_distinctions:
- "Heat exchanger is not necessarily a heat source."
- "Heat sink and heat exchanger are not synonymous."
- "Heat transfer rate (W) differs from heat quantity (J)."
- "Temperature difference differs from absolute temperature."
# ---------- SAFETY_CONSTRAINTS ----------
safety.require:
- operate_within_approved_pressure_and_temperature_ratings
- verify_compatibility_of_fluids_and_construction_materials
- prevent_overpressure_and_uncontrolled_thermal_expansion
- isolate_and_depressurise_before_maintenance
- assess_cross_contamination_risks_before_return_to_service
- follow_site_specific_engineering_and_regulatory_procedures
safety.note: "Semantic reasoning is not a substitute for certified engineering design, inspection or operating procedures."
# ---------- FLOW_HASH ----------
flow_hash.algorithm: "SHA-256"
flow_hash.canonicalisation: "UTF-8; LF newlines; exclude flow_hash.value from digest"
flow_hash.value: "compute_on_publication"
# ---------- UPDATE_MODEL ----------
update_model.version: "1.0"
update_model.date: "2026-11-16"
update_model.triggers:
- ontology_revision
- validated_new_entity_relationship
- corrected_thermodynamic_assumption
- new_failure_mode_evidence
update_model.policy: "Preserve attribution, provenance and revision history; revalidate rules after changes."
end flow
Download Code
Copy to Clipboard