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

Ill-defined isobaric mixing for different pressures? #1461

Closed
Naikless opened this issue Mar 2, 2023 · 1 comment · Fixed by #1517
Closed

Ill-defined isobaric mixing for different pressures? #1461

Naikless opened this issue Mar 2, 2023 · 1 comment · Fixed by #1517

Comments

@Naikless
Copy link
Contributor

Naikless commented Mar 2, 2023

Abstract

Should isobaric mixing of two Quantities with different pressures be disallowed/warned about?

Motivation

I might be wrong, but it seems to me that the current implementation of __iadd__ for the Quantity class doesn’t make physical sense if you set your object‘s constants to 'HP' and then try to add (=mix) two objects with different pressures. The resulting pressure will be the mass averaged pressure off the two gases, which doesn't make much sense thermodynamically and causes the overall entropy of the mixture to decrease, violating the 2nd law if we assume a closed system. In any case, I am not sure if „isobaric“ mixing of two quantities with different pressures is a well-defined process in the first place.

Possible Solutions

Maybe implement a check that pressures are the same (within floating point errors)?

@speth
Copy link
Member

speth commented Mar 21, 2023

Yes, I agree this should probably disabled. I'm going to transfer this over to the main code repository, as I think it should just be regarded as a bug, and also not that difficult to fix.

@speth speth transferred this issue from Cantera/enhancements Mar 21, 2023
speth added a commit to speth/cantera that referenced this issue Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants