tespy icon indicating copy to clipboard operation
tespy copied to clipboard

New Feature: Support for INCOMP binary mixtures

Open jelic1marko opened this issue 4 years ago • 2 comments

This pull request aims to implement minor changes to the backend processing of fluid properties so that mass-based binary mixtures included in CoolProp can be natively supported as network fluids. These fluids are crucial for simulation of low temperature applications such as ground-sourced energy.

The API is relatively straightforward. These mixtures should be included into the network just as any other, with a specified mass fraction and back end following the given syntax:

nw = Network(fluids=['INCOMP::MEG[0.2]', 'INCOMP::MPG[0.4]', 'water', ...], ...)

while these fluids can later be utilized as connection parameters like:

meg_in_hx.set_attr(fluid={'MEG[0.2]': 1, 'MPG[0.4]': 0, 'water': 0, ...}, ...).

No bugs appear to arise from this introduction and the regular operation appears not to be influenced in any way.

A simple demonstration of how these mixtures can be utilized is depicted in tutorials/binary_mixtures.py.

jelic1marko avatar Nov 30 '21 10:11 jelic1marko

Hello @jelic1marko! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 11:80: E501 line too long (87 > 79 characters)

pep8speaks avatar Nov 30 '21 10:11 pep8speaks

Thank you very much for you suggestion :). Will look into it as soon as possible. We might need to set up one or two tests, and then we can include it with the next release.

fwitte avatar Nov 30 '21 11:11 fwitte

Dealt with by #384

fwitte avatar Oct 11 '23 18:10 fwitte