libantioch / antioch

C++ Chemical Kinetics, Thermodynaimics, and Transport Library
https://libantioch.github.io/
Other
23 stars 17 forks source link

No warning about incorrect thermo things #167

Open rebeccaem opened 9 years ago

rebeccaem commented 9 years ago

I'm using the same setup as in #165 (Nasa7, GriMech thermo file). The upper temperature limit is 3500K for the polynomial fits. If you ask for Cp or Cv at a temperature higher than this (even by a degree), then nonsensical things are returned (for ex: -450.969 for Cp/R for H2). However, there is no error or notification that something is wrong.

@pbauman: thanks for the diagnosis.

variscarey commented 9 years ago

The quick hack for most mechanisms would be to increase Tmax for the upper temperature to something much larger(5000?). I am guessing that if T > Tmax(upper) it doesn't find a temperature interval for a curve fit and defaults to the first set of polynomials(the lower temperature), which admits negative values for C_p/R at this T value.

(That is my naive reading of the interval selection logic in nasa_curve_fit.h) The upper temperature curve fits should be increasing in T.

Varis

On Mon, Aug 31, 2015 at 3:36 PM, Rebecca Morrison notifications@github.com wrote:

I'm using the same setup as in #165 https://github.com/libantioch/antioch/issues/165 (Nasa7, GriMech thermo file). The upper temperature limit is 3500K for the polynomial fits. If you ask for Cp or Cv at a temperature higher than this (even by a degree), then nonsensical things are returned (for ex: -450.969 for Cp/R for H2). However, there is no error or notification that something is wrong.

@pbauman https://github.com/pbauman: thanks for the diagnosis.

— Reply to this email directly or view it on GitHub https://github.com/libantioch/antioch/issues/167.

Varis Carey Assistant Professor Department of Mathematical and Statistical Sciences University of Colorado Denver