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

pcsaft_phase_diagram.ipnyb error #260

Closed
juanimila opened this issue Nov 15, 2024 · 1 comment · Fixed by #266
Closed

pcsaft_phase_diagram.ipnyb error #260

juanimila opened this issue Nov 15, 2024 · 1 comment · Fixed by #266

Comments

@juanimila
Copy link

When I try to run the example, in the line:
df = pd.DataFrame(phase_diagram.to_dict())
df.head()
I get an error message:
PanicException Traceback (most recent call last)
Cell In[6], line 1
----> 1 df = pd.DataFrame(phase_diagram.to_dict())
2 df.head()

PanicException: No ideal gas model initialized!

@g-bauer
Copy link
Contributor

g-bauer commented Nov 15, 2024

Hey!

You can fix this by providing Contributions.Residual to the function to calculate residual properties:

from feos.eos import Contributions
df = pd.DataFrame(phase_diagram.to_dict(Contributions.Residual))

The default argument to to_dict is Contributions.Total which fails if no ideal gas model is initialized.

@prehner prehner linked a pull request Jan 7, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants