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

Add critical_temperature argument to VaporPressure constructor #86

Merged
merged 4 commits into from
Dec 13, 2022

Conversation

g-bauer
Copy link
Contributor

@g-bauer g-bauer commented Dec 13, 2022

This PR adds a new optional argument to the constructors of VaporPressure and DataSet.vapor_pressure, i.e. the critical temperature.

  • If provided, it is used as initial temperature when calculating the critical point in the predict method.

  • If not provided, the maximum temperature of the input temperatures is used.

  • If the calculation of the critical point within predict fails (using either the provided or maximum temperature), another call to the method using the default temperatures is used.

  • Did some cleanup of the documentation and added eos.estimator to the documentation.

@g-bauer g-bauer requested a review from prehner December 13, 2022 12:12
@g-bauer g-bauer changed the title Vapor pressure dataset critical temperature Add critical_temperature argument to VaporPressure constructor Dec 13, 2022
Copy link
Contributor

@prehner prehner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent stuff! I tried it on a larger dataset and it works as intended. Nice compromise between robustness and flexibility.

src/estimator/python.rs Outdated Show resolved Hide resolved
@g-bauer g-bauer merged commit cdf0f9e into main Dec 13, 2022
@g-bauer g-bauer deleted the vapor_pressure_dataset_critical_temperature branch December 13, 2022 13:19
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 this pull request may close these issues.

2 participants