-
Notifications
You must be signed in to change notification settings - Fork 91
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
Vapour Quality and State Reporting #592
Conversation
Hello @tlmerbecks! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2025-01-22 20:13:24 UTC |
Looks like my PR was not overly successful... Unfortunately, I am somewhat struggling to understand exactly what tests have failed |
@tlmerbecks, thank you for your contribution. I will have a look today evening, my first guess is, that it is because the |
Ciao @fwitte, that may well be it... That being said, I was a bit confused that the Perhaps this was unclear in the original PR, most of the additions are simply to allow to the |
Actually, it seems as though the class Connection:
def __init__(self, ...):
# some other code
# set default values for kwargs
self.property_data = self.get_parameters() # I defined the state field in here
self.parameters = {
k: v for k, v in self.get_parameters().items()
if hasattr(v, "func") and v.func is not None
}
self.state = dc_simple() # currently tespy declares the state variable here
self.property_data0 = [x + '0' for x in self.property_data.keys()]
self.__dict__.update(self.property_data) # <-- overwrites the directly declared variable with my definition...
# some other code |
@tlmerbecks, thank you for your contribution! I updated the changelog, bumped the version and removed that commeted section in the |
Ciao @fwitte,
I noticed that the property reporting for
Connections
does not include the vapour quality or the state, hence the overall aim of this pull request is to include them in the table of properties forConnections
.I implemented the following changes:
CoolPropWrapper
with that of theIAPWSWrapper
. Currently theCoolPropWrapper
reports a vapour quality of-1
for all single phase states (irrespective of it being gas or liquid). With the changes below, the vapour quality is now reported as0
for liquids and1
for gases, for subcritical conditions.FluidPropertiesWrapper
, theCoolPropWrapper
and theIAPWSWrapper
. Unfortunately, I lack expertise with Pyromat and so have not done this... yet)fluid_properties_data
(global_vars) with astate
properties fieldstate
propertyvapour quality
andstate
to the reportedConnection
resultsI hope the above is clear enough. Is there anything else that would be helpful?