Term-project demo prep: RsDb rename, per-step compositions, vapor placeholder drop - #10
Closed
olefair wants to merge 2 commits into
Closed
Term-project demo prep: RsDb rename, per-step compositions, vapor placeholder drop#10olefair wants to merge 2 commits into
olefair wants to merge 2 commits into
Conversation
…ake Newton dew guess-invariant The plus-fraction dew-point lumped-path validation test was silently xfailed across six parametrizations (dry_gas_a/b, gas_condensate_a/b, co2_rich_gas_a/b) because the lumped dew pressure disagreed with the explicit-fluid dew pressure by 3-30%. Two separate regressions were driving this: 1. The default lumping_method was flipped from "contiguous" to "whitson" in a checkpoint commit. The stored test fixtures (and the desktop runtime's gas_condensate preset, which explicitly expects lumping_n_groups=2) were captured under contiguous lumping. Restore "contiguous" as the default in CharacterizationConfig, PlusFractionEntry, and all six plus_fraction_policy presets, and update the runtime contract test accordingly. 2. The Newton dew-point fast path was seeding Newton directly from a user-supplied pressure_initial. For retrograde fluids this frequently pushed the iterate onto the upper dew branch (e.g. 14.5 MPa instead of ~17 kPa for dry_gas_b at 5e7 Pa init), producing guess-dependent answers. Always seed Newton from the Wilson estimate, which lies close to the lower dew branch and produces a canonical, guess-invariant dew pressure. Refresh the two gas_condensate fixtures whose stored values predate the current Newton solver, and remove the xfail decorator so the test runs strictly in CI.
…or placeholder - Rename RsDi (initial solution GOR) to RsDb (solution GOR at bubble point) everywhere in the GUI layer: text output table/header, results view plot series key+label, DL composition_table header, CSV export column header. RsDb is the more accurate label (Rs at P=Pb) and matches the term-project assignment nomenclature. - Plumb per-step phase compositions through to the Text Output view. The engine already emits liquid_composition/vapor_composition (CCE) and liquid_composition/gas_composition (DL) on each step; extend the DTO schemas (CCEStepResult, DLStepResult), zip them into dicts in the job_runner, and render wide-format pressure-by-component tables after the CCE and DL result tables. - Remove the "Vapor saturation" calculation placeholder (label + ViewSpec + view_widgets entry) from the main window. That calc type is not wired to the engine and the placeholder is a visible artifact during the demo. https://claude.ai/code/session_01Lp51eQA5DXfTPJb9HoAc8g
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GUI polish + DTO plumbing so the PETE 665 term-project mini-sim demo shows complete, correctly-labelled results. Sits on top of the earlier dew-fix commit (
22d72da) on this branch.Changes
RsDi→RsDbrename across the GUI layer. RsDb (solution GOR at the bubble point) is the accurate label and matches the assignment nomenclature. Renamed in:src/pvtapp/widgets/text_output_view.py)src/pvtapp/widgets/results_view.py)src/pvtapp/widgets/results_view.py)src/pvtapp/main.py)Per-step phase compositions surfaced to the Text Output view. The engine already emits
liquid_composition/vapor_compositionon eachCCEStepResultandliquid_composition/gas_compositionon eachDLStepResult, but the DTO layer was stripping them. Now:CCEStepResult/DLStepResultschemas carry optional component-keyed dicts (src/pvtapp/schemas.py)job_runner.execute_cce/execute_dlzip the engine arrays into dicts via a new_composition_array_to_dicthelper (src/pvtapp/job_runner.py)src/pvtapp/widgets/text_output_view.py)Remove unwired "Vapor saturation" calc-type placeholder from the main window (
src/pvtapp/main.py) — the underlying engine path is not implemented and the placeholder is a visible artifact during live demo.Test plan
pytest tests/— 663 passed, no regressionsRsDbheaderhttps://claude.ai/code/session_01Lp51eQA5DXfTPJb9HoAc8g