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

Improve precision of BICUBIC interpolation close to the critical point #53

Open
casella opened this issue Feb 21, 2022 · 0 comments
Open
Assignees

Comments

@casella
Copy link
Collaborator

casella commented Feb 21, 2022

I am involved in several studies of sCO2 systems, for which the interpolated CO2 medium of CoolProp is extremely handy. However, sCO2 systems exploit the strong real-gas effects close to the critical point, so it is important that the fluid properties are computed with a decent approximation in the region just above the critical point in the ph-plane.

The attached model TestInterpolatedCO2.mo.txt computes the fluid properties on an isobaric line at 90 bar, which is relatively close to the critical pressure (but not too close either), using the setState_pT function.

These two plots show the comparison between the full CoolProp model and the BICUBIC interpolation, when giving pT as input and retrieving density and specific enthalpy
immagine
immagine
The maximum error on density is about 8%, which is not dramatic, but still significant.

Is there a simple way to increase the number of data points of the interpolation table, by just adding stuff to the medium configuration string? I understand doubling the number of nodes on both axes would increase the table size by a factor four, but give the cubic approximation, the error will shrink by 2^4, i.e. become less than 0.5%.

It could also be useful if one could specify the upper and lower limits of pressure, cutting out useless data points that will never be used for the application at hand (e.g. 74 and 300 bars for sCO2 cycles).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants