Skip to content

Expose valve opening and solved Cv in Process Studio - #74

Merged
EvenSol merged 4 commits into
mainfrom
automation/studio-valve-opening
Aug 2, 2026
Merged

Expose valve opening and solved Cv in Process Studio#74
EvenSol merged 4 commits into
mainfrom
automation/studio-valve-opening

Conversation

@EvenSol

@EvenSol EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • expose steady-state valve opening as an explicit 1–100% Process Studio property
  • migrate older pressure-only valve graph parameters to a fully open valve without mutating saved input
  • report solved valve opening and label NeqSim's coefficient explicitly as US Cv
  • benchmark 100% and 60% openings at baseline and +5% flow with native NeqSim

Engineering evidence

For a 90/10 methane/ethane feed at 80 bara and a specified 30 bara outlet:

Flow scale Opening Required Cv
1.00 100% 22.217211 US Cv
1.00 60% 37.028686 US Cv
1.05 100% 23.328072 US Cv
1.05 60% 38.880120 US Cv

The lower opening requires the expected larger installed Cv, and the +5% flow point increases Cv monotonically. Outlet pressure and temperature are unchanged for the same specified-pressure throttle. Every point converged with mass, maximum-component, and energy residuals below 1e-6%.

Validation

  • python -m compileall -q process_chat pages tests
  • 270 focused, schema, Process Chat, serialization/workbook, native conservation, nearby-point, and warm-deployment tests passed
  • fresh Streamlit process: root HTTP 200 twice, /_stcore/health = ok twice, process remained live
  • NeqSim 3.16.0; Python 3.12.13; OpenJDK 17.0.19
  • environment resolution: online-new-snapshot, 80 public-PyPI wheels with manifest/hash verification

Roadmap

Advances commits 41–50 (metadata-driven valve properties and deterministic migration) and 71–80 (explicit valve Cv convention and design evidence).

Documentation impact

The Studio palette/editor metadata and solved workbook KPI labels are the user-facing documentation for this property. No separate equipment-property guide currently exists.

EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact head 1fd2fd8ca728e7548202c49163f4d893e64eb709, with particular attention to backward-compatible valve parameter migration, native NeqSim opening semantics, explicit US Cv units, conservation/convergence, and nearby-point robustness.

@EvenSol
EvenSol marked this pull request as ready for review August 2, 2026 00:28

EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Retrying the exact-head review now that PR #74 is ready. Please assess commit 1fd2fd8ca728e7548202c49163f4d893e64eb709.

EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@copilot review

Please review exact head 1fd2fd8ca728e7548202c49163f4d893e64eb709, especially valve-opening compatibility, NeqSim API semantics, US Cv labeling, and the nearby-point conservation benchmark.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 1fd2fd8ca7

ℹ️ 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".

EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@copilot review

Retrying the mandatory exact-head review for 1fd2fd8ca728e7548202c49163f4d893e64eb709. Please assess valve-opening migration, native NeqSim semantics, US Cv labeling, and the baseline/+5% conservation benchmark.

EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Readiness recheck for exact head 1fd2fd8ca728e7548202c49163f4d893e64eb709:

  • hosted Process Flowsheet Studio run 238: success
  • prior complete local gate: 270 tests, native baseline/+5% conservation and convergence, fresh Streamlit root/health probes
  • exact-head Codex review: no major issues
  • branch: mergeable, 3 commits ahead and 0 behind main; intended 4-file diff
  • review threads: none

Merge remains intentionally blocked because Copilot has not submitted the required exact-head review after bounded retries. The same PR remains open; next action is to recheck Copilot and merge by rebase only if its review completes cleanly.

EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@copilot review

Bounded retry for exact head 1fd2fd8ca728e7548202c49163f4d893e64eb709. The branch is unchanged, current with main, mergeable, and hosted/local gates are green. Please review all four changed files for valve-opening migration, NeqSim API semantics, explicit US Cv units, and native conservation/convergence.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Process Studio valve model by making steady-state valve opening an explicit, validated property and by surfacing solved valve opening and valve Cv KPIs with an explicit “US Cv” unit label, including legacy-parameter migration behavior.

Changes:

  • Added percent_valve_opening to valve editor metadata (1–100%) and migrated legacy pressure-only valve params to default 100% opening without mutating saved input.
  • Extended KPI extraction to expose percentValveOpening for valves and to label Cv KPI units as US Cv.
  • Expanded conservation/nearby-point tests to assert valve opening behavior and Cv sizing monotonicity across openings and flow scales.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/test_process_graph_conservation.py Adds assertions and a new benchmark-style test validating solved valve opening KPI and Cv sizing behavior.
tests/test_flowsheet_editor.py Adds coverage for valve property metadata (units/defaults) and legacy param migration + validation.
process_chat/process_model.py Exposes valve opening KPI and relabels Cv KPI unit as US Cv.
process_chat/flowsheet_editor.py Adds percent_valve_opening property metadata and migrates legacy valve params to 100% opening.

Comment thread tests/test_process_graph_conservation.py
Comment thread process_chat/flowsheet_editor.py

EvenSol commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact repair head dda7775b64cceaf6c5523a67f3d973e69aa1b64e. The only new change replaces a platform-fragile 1e-8 °C valve outlet-temperature equality tolerance with the established 0.05 °C process-temperature tolerance; all conservation, convergence, Cv monotonicity, opening, and pressure assertions remain unchanged.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: dda7775b64

ℹ️ 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".

@EvenSol
EvenSol merged commit 35a3e01 into main Aug 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants