Expose solved two-sided heat exchanger performance - #79
Conversation
|
@codex review exact head |
There was a problem hiding this comment.
Pull request overview
This PR extends the Process Chat / workbook model adapter to expose a richer, explicitly unit-labeled set of solved performance properties for native two-sided HeatExchanger units (hot/cold inlet/outlet conditions, UA, duty, effectiveness, and side-duty closure), and expands the conservation regression suite to validate these new surfaced properties (including nearby-point trend checks).
Changes:
- Add explicit hot/cold inlet/outlet temperatures, pressures, and mass flows plus UA/duty/approach/effectiveness to
HeatExchangerunit properties and KPIs. - Compute and publish hot-side and cold-side duties plus a duty-closure residual (kW and %).
- Add regression tests for workbook/KPI mapping and for expected nearby-point exchanger trends (duty ↑ with flow, effectiveness ↓ with flow).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
process_chat/process_model.py |
Adds heat-exchanger solved-property extraction, unit mapping, and KPI publishing for two-sided HeatExchanger. |
tests/test_process_graph_conservation.py |
Adds unit tests validating the new workbook/KPI property exposure and extends native exchanger conservation tests with duty/effectiveness checks. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4929feadf7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9970fec715
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ad5245a99
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review exact head |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
process_chat/process_model.py:2584
enthalpy_kWhere is actually an enthalpy flow (power) in kW (computed fromfluid.getEnthalpy()/1000). Using a name that implies specific enthalpy (or stored energy) is misleading, especially since other adapter code usesenthalpy_flow_kW. Renaming the local variable and the internal dict key would make the duty math easier to audit.
temperature_C = float(stream.getTemperature("C"))
pressure_bara = float(stream.getPressure("bara"))
flow_kg_hr = float(stream.getFlowRate("kg/hr"))
fluid = stream.getFluid()
fluid.init(3)
enthalpy_kW = float(fluid.getEnthalpy()) / 1000.0
except Exception:
process_chat/process_model.py:2632
approachTemperature_Kis computed as a raw minimum of terminal temperature differences, which can become negative (e.g., from floating noise or temperature crossover) even though this property is described/consumed as a physical approach temperature in K. Consider reporting the physical magnitude to keep the KPI/workbook contract non-negative.
properties["approachTemperature_K"] = min(
named_sides["hot"]["inlet"]["temperature_C"]
- named_sides["cold"]["outlet"]["temperature_C"],
named_sides["hot"]["outlet"]["temperature_C"]
- named_sides["cold"]["inlet"]["temperature_C"],
)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 221091c5ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
process_chat/process_model.py:3460
- Same issue as
run(): clearing_direct_unit_run_provenanceat the start ofrerun()can drop previously trusted direct-run exchanger metrics when the rerun fails, even if the old snapshot is still valid. Since_capture_heat_exchanger_state_snapshots()already clears/rebuilds provenance atomically on successful runs, keeping the existing cache until success better matches the "retain prior trusted snapshot on failure" contract.
self._direct_unit_run_provenance.clear()
process_chat/process_model.py:3423
- Clearing
_direct_unit_run_provenanceat the start ofrun()can inadvertently hide previously trusted direct-run heat-exchanger properties if the current run fails or times out.list_units()/_extract_unit_properties()will then call_heat_exchanger_operating_properties()without the required provenance (inlet UUIDs differ from exchanger UUID for direct runs) and return{}even though the old snapshot is still valid and should be preserved on failed runs.
This issue also appears on line 3460 of the same file.
self._direct_unit_run_provenance.clear()
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ddf5647ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Copilot suppressed-review disposition for the |
|
@codex review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13740ca0a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4da2e82226
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bc1581f7b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d459655c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review exact head |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
HeatExchangerunitsEngineering validation
2bc1581f7bda9b3b3d41a5ed654baa65abe8fa77; thirty bounded commits (three planned implementation commits and twenty-seven review repairs)online-new-snapshot; 48 public-PyPI wheels verified by manifest, size, and SHA-256run(UUID)is hidden before explicit provenance recording and publishes 2,389.153 kW afterward; internal acyclic and clone-time direct-run paths capture valid provenance automaticallyFalse; direct provenance is authorized only after a completed mixer-bearing pass, and successful capture clears/rebuilds both provenance caches atomicallyProcessSystem.getRunStatus().isSuccess()after join and cannot be reported as completed simulations/_stcore/health=oktwice, process livemain; diff is limited to the shared model/builder adapters and conservation regression suiteDocumentation impact
Documentation impact: none. The Studio workbook and Process Chat property surfaces are metadata-driven and self-label every new value with an explicit unit. The solved-state trust contract is documented by public docstrings and executable regressions; normal Studio workflows require no new user action.
Roadmap
Advances commits 41–50 (metadata-driven heat-exchanger properties), 51–60 (per-unit solved energy closure and nearby-point mapping), and supports commits 71–80 (UA/duty equipment-design evidence).