idaes-pse icon indicating copy to clipboard operation
idaes-pse copied to clipboard

Standardizing names in heat exchanger models

Open andrewlee94 opened this issue 2 years ago • 1 comments

Fixes #730

Summary/Motivation:

Each heat exchanger models uses a different set of naming conventions for the control volumes and Ports. This PR aims to standardize these to the following:

  • Control Volumes names hot_side and cold_side
  • Ports names hot_side_inlet, hot_side_outlet, cold_side_inlet and cold_side_outlet
  • Config Blocks names hot_side_config and cold_side_config
  • Config arguments for user provided names for each side: hot_side_name and cold_side_name.

Note that due to the extend of the changes in this PR, backwards compatibility is not being maintained and so this should not be merged until after the August release (and we are preparing the actual v2.0 release).

Changes proposed in this PR:

  • Standardizing names in HX0D, HX_LC

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.

andrewlee94 avatar Jul 13 '22 20:07 andrewlee94

Codecov Report

Merging #910 (10821fb) into main (c58de2a) will increase coverage by 0.00%. The diff coverage is 90.94%.

@@           Coverage Diff           @@
##             main     #910   +/-   ##
=======================================
  Coverage   73.29%   73.30%           
=======================================
  Files         586      587    +1     
  Lines       66071    66086   +15     
  Branches    12395    12375   -20     
=======================================
+ Hits        48429    48446   +17     
- Misses      15358    15385   +27     
+ Partials     2284     2255   -29     
Impacted Files Coverage Δ
...er_generation/unit_models/boiler_heat_exchanger.py 88.63% <75.00%> (+3.31%) :arrow_up:
idaes/models/unit_models/heat_exchanger.py 88.93% <75.32%> (-0.22%) :arrow_down:
...eration/unit_models/feedwater_heater_0D_dynamic.py 87.30% <77.08%> (ø)
...ower_generation/unit_models/feedwater_heater_0D.py 94.70% <82.14%> (ø)
idaes/models/unit_models/heat_exchanger_1D.py 90.96% <89.47%> (-0.06%) :arrow_down:
idaes/models/unit_models/shell_and_tube_1d.py 98.18% <98.18%> (ø)
idaes/core/util/testing.py 98.35% <100.00%> (+0.01%) :arrow_up:
...properties/interrogator/properties_interrogator.py 95.45% <100.00%> (+0.18%) :arrow_up:
idaes/models/unit_models/__init__.py 100.00% <100.00%> (ø)
idaes/models/unit_models/heat_exchanger_lc.py 97.14% <100.00%> (-2.86%) :arrow_down:
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Jul 28 '22 22:07 codecov[bot]

I think this PR is getting close to ready - I still need to update documentation and fix a fragile test, but otherwise I think this is good.

As a general update, I have broken the old 1D HX model into two parts- a generic 1D HX model with a total HX area and average heat transfer coefficient, and a derived model with the shell-and-tube geometry with wall temperature. In doing so, I have now managed to use standard names for the control volumes and port and alias them as appropriate for the shell and tube case (including allowing the user to identify whether the shell is the hot or cold side).

andrewlee94 avatar Aug 18 '22 19:08 andrewlee94

@dallan-keylogic Do you have time to review this? The IDAES release is almost done, so this is probably the next big thing to merge.

andrewlee94 avatar Aug 30 '22 15:08 andrewlee94