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

PYROMAT: SO2 - ideal gas behavior #10

Closed
guipradow opened this issue May 22, 2020 · 2 comments
Closed

PYROMAT: SO2 - ideal gas behavior #10

guipradow opened this issue May 22, 2020 · 2 comments

Comments

@guipradow
Copy link

Hi. I'm an engineering student from Brazil and I'm implementing in Python an EES program from my Professor. While working with SO2 entropy and enthalpy I noticed a big difference between EES and Pyromat values. Initially I thought it was a reference state difference, but while analyzing the delta between two different temperatures these differences persisted. I worked with CO2, H2O, N2, O2 and for these compounds Pyromat is the same as EES to enthalpy and entropy values (for delta T and individual values), only SO2 doesn't yield the same values as EES. I will be grateful if you can help me.

Thank you very much in advance.
Best regards
image
image

@chmarti1
Copy link
Owner

The issue is that PYroMat's SO2 data set is only valid down to 300K, and 25C is outside of that range by 1.85C. The ig2 class SHOULD issue a warning, but it hasn't. Instead, it just returns 0 for enthalpy. You can verify this by typing
SO2.Tlim()
The Tlim() function will return a list with upper and lower temperature limits on the data set in the configured unit system.

@chmarti1
Copy link
Owner

As a work-around, to FORCE PYroMat to extrapolate down to 25C, you can manually modify the data range inline. You'll be out of the recommended range for these polynomials, but only by 1.85C.

>>> SO2.data['Tlim']
[300.0, 1000.0, 5000.0]
>>> SO2.data['Tlim'][0] = 290.0
>>> so2.h(25)
array([-4633.3206084])

In the next version, I will add out-of-range warnings to the ig2 class. I'll also check to make sure the other classes also handle this error properly (I think do). I will also look to see whether it is worth it to transition to a different coefficient set for some of these ig2 species.

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

No branches or pull requests

2 participants