Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TVC model #1516

Merged
merged 29 commits into from
Dec 13, 2024
Merged

add TVC model #1516

merged 29 commits into from
Dec 13, 2024

Conversation

ElmiraShamlou
Copy link
Contributor

Fixes/Resolves:

(replace this with the issue # fixed or resolved, if no issue exists then a brief statement of what this PR does)

Summary/Motivation:

Changes proposed in this PR:

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.

@ElmiraShamlou ElmiraShamlou self-assigned this Nov 5, 2024
@lbianchi-lbl
Copy link
Contributor

The failures are due to #1514 and are most likely unrelated to the changes in this PR.

@ElmiraShamlou ElmiraShamlou marked this pull request as ready for review November 6, 2024 02:13
@lbianchi-lbl lbianchi-lbl added the Priority:Normal Normal Priority Issue or PR label Nov 7, 2024
@ksbeattie
Copy link
Contributor

@ElmiraShamlou, just needs to add some documentation.

# Empirical correlation constraints
@self.Constraint(doc="Pressure Correction Factor (El-Dessouky, 1997)")
def eq_PCF(b):
A_PCF = 3e-7 / pyunits.kPa**2
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason not to create/declare the parameters for PCF and TCF as model variables as is the usual practice?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or at least as model parameters? Might there ever be a case where these coefficients would change due to parameter estimation using a new dataset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defining them as Param or Var is unnecessary because PCF and TCF are fully derived from other variables through fixed empirical relationships

watertap/unit_models/thermo_compressor_0D.py Outdated Show resolved Hide resolved
watertap/unit_models/thermo_compressor_0D.py Outdated Show resolved Hide resolved
@adam-a-a adam-a-a added the 🍒 Merge to rel Merge commit(s) from this PR to release branch label Dec 11, 2024
Copy link
Contributor

@adam-a-a adam-a-a left a comment

Choose a reason for hiding this comment

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

I have some quick, minor comments and will aim to take another pass after having checked the reference paper(s). However, the main missing piece now is documentation for the unit model. I'd recommend pushing what you have and potentially tagging someone to support on polishing that off.

watertap/unit_models/tests/test_thermo_compressor_0D.py Outdated Show resolved Hide resolved
watertap/unit_models/tests/test_thermo_compressor_0D.py Outdated Show resolved Hide resolved
watertap/unit_models/tests/test_thermo_compressor_0D.py Outdated Show resolved Hide resolved
watertap/unit_models/thermo_compressor_0D.py Outdated Show resolved Hide resolved
watertap/unit_models/thermo_compressor_0D.py Outdated Show resolved Hide resolved
watertap/unit_models/thermo_compressor_0D.py Outdated Show resolved Hide resolved
watertap/unit_models/thermo_compressor_0D.py Outdated Show resolved Hide resolved
# Empirical correlation constraints
@self.Constraint(doc="Pressure Correction Factor (El-Dessouky, 1997)")
def eq_PCF(b):
A_PCF = 3e-7 / pyunits.kPa**2
Copy link
Contributor

Choose a reason for hiding this comment

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

Or at least as model parameters? Might there ever be a case where these coefficients would change due to parameter estimation using a new dataset?

Copy link
Contributor

@MarcusHolly MarcusHolly left a comment

Choose a reason for hiding this comment

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

Couple of minor comments on the documentation. I'll leave the more technical feedback to the other reviewers, but I can provide a rubber stamp to push this PR through, if necessary.

docs/technical_reference/unit_models/steam_ejector.rst Outdated Show resolved Hide resolved
docs/technical_reference/unit_models/steam_ejector.rst Outdated Show resolved Hide resolved
docs/technical_reference/unit_models/steam_ejector.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@adam-a-a adam-a-a left a comment

Choose a reason for hiding this comment

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

LGTM - I agree with @MarcusHolly 's suggestions on the documentation and just think you should make those changes before we merge.

@MarcusHolly
Copy link
Contributor

It seems like in the latest commit (refine doc), you accidentally undid the changes to spelling out TCF & PCF as well as correcting the degrees of freedom typo. Once this is addressed, I'll approve.

Copy link
Contributor

@MarcusHolly MarcusHolly left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for the quick fixes

@ElmiraShamlou ElmiraShamlou requested review from adam-a-a and removed request for adam-a-a December 13, 2024 22:24
Copy link
Contributor

@adam-a-a adam-a-a left a comment

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 merged commit 0ad38c3 into watertap-org:main Dec 13, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 Merge to rel Merge commit(s) from this PR to release branch Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants