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

Question regarding the calculation of the ideal gas molar entropy #199

Closed
LoGaL93 opened this issue Nov 10, 2023 · 2 comments
Closed

Question regarding the calculation of the ideal gas molar entropy #199

LoGaL93 opened this issue Nov 10, 2023 · 2 comments

Comments

@LoGaL93
Copy link

LoGaL93 commented Nov 10, 2023

Hello,

Perhaps a not so smart question, but I was wondering what is the reason for this discrepancy:

Given joback Cp ig parameters for Hexane:

a=-2.566
b=0.57384
c=-0.0003026
d=0.0000000602
e=0

given Temperature = 350K and Pressure = 1 bar

if i request the ideal gas entropy to feOs ( in case i assembled hexane from groups) I obtain: 24.278895875604746 J/mol/K

If i calculate it analytically by using:
s_ig = a* log(T/T0) + b*(T-T0) + c/2*(T^2-T0^2) + d/3*(T^3-T0^3) + e/4*(T^4-T0^4) - 8.314*np.log(P/P0)
with T0 = 298.15, P0 = 1e5

I obtain: 24.586025472033747 J/mol/K

Am I missing something?

@prehner
Copy link
Contributor

prehner commented Nov 10, 2023

Hello,

the expression for the ideal gas entropy that you use calculates the entropy for given temperature and pressure.

If you use State.molar_entropy(Contributions.IdealGas), you calculate the entropy of an ideal gas at the same temperature and density as your state, rather than at the same temperature and pressure. You can calculate

T = 350 * KELVIN
P = BAR

State(eos, T, density=P / (RGAS * T)).molar_entropy(Contributions.IdealGas)

to validate that both implementations of the Joback model are equivalent.

@LoGaL93
Copy link
Author

LoGaL93 commented Nov 10, 2023

ok, great thanks :)

@g-bauer g-bauer closed this as completed Nov 10, 2023
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

3 participants