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

Optimizing T_mid for NASA and NASA9 polynomials #98

Open
jonlym opened this issue Sep 30, 2019 · 0 comments
Open

Optimizing T_mid for NASA and NASA9 polynomials #98

jonlym opened this issue Sep 30, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@jonlym
Copy link
Member

jonlym commented Sep 30, 2019

Currently, converting a model object (e.g. StatMech) to a Nasa object is done in the following steps:

  1. Use the model object to generate CpoR, HoRT, and SoR data.
  2. Determine T_mid by iteratively partitioning a low range and a high range of temperatures and determining which T_mid value minimizes the fitting mean-squared error of CpoR.
  3. Assign a values to each partition by curve fitting to data in (1)

While this exhaustive approach will always give an answer, it is presumably not the most efficient (with respect to time and finding a global minimum). We also make assumptions that the first minimum in error encountered is the global minimum, which is not necessarily true. This approach becomes more inefficient for Nasa9 objects that can have an arbitrary number of T_mid values.

We have attempted to use scipy's minimize functions where step 2 no longer exhaustive. Surprisingly, we find this method is ~50 times slower than the exhaustive method. This is likely due to the increased number of method calls for model.get_CpoR.

Since the error for the Nasa is not extremely sensitive to T_mid, we will favor the exhaustive method for now. However, I would still like to optimize this in the future.

@jonlym jonlym added the enhancement New feature or request label Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant