Skip to content

Document SteamHeater0D unit model - #1837

Open
aryanputta wants to merge 3 commits into
watertap-org:mainfrom
aryanputta:docs-steam-heater-reference
Open

Document SteamHeater0D unit model#1837
aryanputta wants to merge 3 commits into
watertap-org:mainfrom
aryanputta:docs-steam-heater-reference

Conversation

@aryanputta

@aryanputta aryanputta commented Jun 26, 2026

Copy link
Copy Markdown

Fixes #1825.

Summary

  • Add a technical reference page for SteamHeater0D.
  • Link the page from the unit model documentation index.
  • Document the model purpose, configuration options, degrees of freedom, model structure, added constraints, and class references.

Validation

  • python -c "from watertap.unit_models.steam_heater_0D import SteamHeater0D, Mode"
  • git diff --check
  • sphinx-build -M html docs docs/_build -W --keep-going completed HTML generation and did not emit warnings for the new steam_heater_0D.rst page. The local command exited nonzero because existing/global docs warnings were treated as errors, including unreachable intersphinx inventories and existing unresolved references outside this change.

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@aryanputta
aryanputta force-pushed the docs-steam-heater-reference branch from 899c570 to f1332d7 Compare June 26, 2026 08:33

@MarcusHolly MarcusHolly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for putting this together, just a few improvements to be made. I'd be fine with merging this as is and refining at a later date if we just want to get some level of documentation in before the release.

Comment thread docs/technical_reference/unit_models/steam_heater_0D.rst Outdated
Comment thread docs/technical_reference/unit_models/steam_heater_0D.rst
Comment thread docs/technical_reference/unit_models/steam_heater_0D.rst
@adam-a-a

Copy link
Copy Markdown
Contributor

The PR description is missing the required Legal Acknowledgment section to contribute code.

@adam-a-a

Copy link
Copy Markdown
Contributor

We would need to ensure the documentation aligns with the latest revisions to the steamheater model, which may have removed the heater and condenser modes. We'll need to double-check to be sure.

@aryanputta

Copy link
Copy Markdown
Author

Thanks @adam-a-a. I double-checked against the current main (model last touched in #1717, commit e50196e) and both modes are still present in watertap/unit_models/steam_heater_0D.py:

  • class Mode(Enum): HEATER = auto(); CONDENSER = auto()
  • CONFIG.declare("mode", ... default=Mode.HEATER, domain=Mode)
  • CONFIG.declare("estimate_cooling_water", ... default=False), used only in condenser mode

So nothing was removed. The reference page documents exactly those two config options, the two added hot-side constraints (outlet_liquid_mass_balance, outlet_pressure_sat), and the default heat-exchanger costing method, all matching the model. I also tightened the mode row to mirror the model's own config description ("Mode of operation: heater or condenser") instead of "Initialization mode." Let me know if you'd like the condenser-mode initialization paths spelled out further.

@kurbansitterley

Copy link
Copy Markdown
Contributor

Thanks @adam-a-a. I double-checked against the current main (model last touched in #1717, commit e50196e) and both modes are still present in watertap/unit_models/steam_heater_0D.py:

  • class Mode(Enum): HEATER = auto(); CONDENSER = auto()
  • CONFIG.declare("mode", ... default=Mode.HEATER, domain=Mode)
  • CONFIG.declare("estimate_cooling_water", ... default=False), used only in condenser mode

So nothing was removed. The reference page documents exactly those two config options, the two added hot-side constraints (outlet_liquid_mass_balance, outlet_pressure_sat), and the default heat-exchanger costing method, all matching the model. I also tightened the mode row to mirror the model's own config description ("Mode of operation: heater or condenser") instead of "Initialization mode." Let me know if you'd like the condenser-mode initialization paths spelled out further.

#1760 would go in first so this doc should align with the model there.

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Jun 29, 2026
@aryanputta
aryanputta force-pushed the docs-steam-heater-reference branch from 659a13c to 6c064a9 Compare July 2, 2026 01:24
@aryanputta

Copy link
Copy Markdown
Author

@kurbansitterley #1760 has merged, so I rebased this doc onto latest main and confirmed it matches the updated SteamHeater0D model:

  • Documents the new pressure_deltaP margin variable and the set_subcooling_margin / release_subcooling_margin helpers.
  • outlet_pressure_sat is now documented as the equality P = P_sat + ΔP (no longer the old inequality).
  • Total condensation is documented as the hot-side vapor flow being fixed to its lower bound, replacing the removed outlet_liquid_mass_balance constraint.

Every model object referenced in the page exists in the merged model. Ready for another look.

@aryanputta

Copy link
Copy Markdown
Author

will work on this tdy.

@aryanputta
aryanputta force-pushed the docs-steam-heater-reference branch from 6c064a9 to 8b21449 Compare July 10, 2026 00:04
@aryanputta

Copy link
Copy Markdown
Author

Thanks @MarcusHolly. I have addressed all three points:

  1. Variables and Sets sections are now included, following the pattern in the other unit model reference pages.
  2. The added hot-side relationships are written out under Equations and Relationships: total condensation (hot-side vapor flow fixed to its lower bound) and the outlet pressure relation P = P_sat + deltaP.
  3. The mode row is no longer present. Fixes redundunt constraint in SteamHeater0D #1760 removed the heater/condenser Mode config, so the page instead documents the current model: the pressure_deltaP margin variable and the set_subcooling_margin / release_subcooling_margin helpers.

The branch is rebased onto latest main (post #1760) and I verified the page against the current steam_heater_0D.py. The Read the Docs build passes. Please let me know if you would like anything else refined.

@MarcusHolly MarcusHolly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@adam-a-a
adam-a-a requested a review from ElmiraShamlou July 15, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority:Normal Normal Priority Issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SteamHeater Model documentation

6 participants