-
Notifications
You must be signed in to change notification settings - Fork 17
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
Negative CVs from NASA7CurveFit #165
Comments
@beanSnippet thanks for reporting. I've used a modified version of your program (plus a matplotlib script) to generate the images attached (I tried scalable pdfs, but GitHub only allows png, gif or jpg... sigh). Something is definitely funky. @beanSnippet could you please do one additional step for me: could you take one of the obviously wrong species, e.g. |
Could you attach the gri_thermo data file? What I suspect is that (for Varis On Tue, Aug 25, 2015 at 9:13 AM, Rebecca Morrison notifications@github.com
Varis Carey |
@variscarey I'm emailing it to you privately as GitHub only allows posting images... |
@variscarey I figure it's probably something along the lines you mentioned. I'm hoping that @beanSnippet can manually do one of the polynomial sets and we can visually confirm that something like that is going on and focus our efforts. (Hopefully I'll finish #164 today so it will give us an easy way to add tests in for this wherever the bug is.) |
It's not switching to the right curve. I used a gri_thermo database I had Varis On Tue, Aug 25, 2015 at 9:35 AM, Paul T. Bauman notifications@github.com
Varis Carey |
Thanks @variscarey. I'll try and look into this tonight, but someone feel free to beat me to it. |
Just FYI, I quickly glanced at the code and it the jump based on the interval is there, so it might be related to the parsing of multiple intervals. (Also, what is up with looping over the interval there... we shouldn't need to do that since we already grabbed what interval we're in...) |
Derp, nevermind. It's for when |
The jump is at 1000K here. |
One more point: in the thermo file, the coefficients for T>1000K are listed first, followed by T<1000K. At first I didn't catch that and I got a plot that looked similar to @pbauman's C_p/R plot above. |
@beanSnippet: this is probably the problem. In the chemkin parser (file src/parsing/src/chemkin_parser, line 959 to 964; there), the Basically, changing
to
something of that sort. Can someone try it quickly and verify this is the problem? |
Ok I had time to check and see, I indeed switch from negative values to positive correct-looking values with this bugfix. The chemkin parser indeed really needs better testing... Thanks @beanSnippet for your remark. |
Thanks for fixing and verifying! |
#166 should fix this so I'm closing. @beanSnippet thanks for the report and please let us know if you encounter further issues. Regardless, hopefully we'll get better coverage of ChemKin parsing soon. |
I know some of you already know about this issue, but I thought I'd document it and consolidate the threads here.
I'm trying to run methane combustion using a reaction mechanism from GRIMech. This includes some species that are not in the default Antioch files. I augmented the default species file (name, molecular weight, enthalpy of formation, etc) and I pulled the thermo data from GRIMech. This GRIMech thermo file is in the NASA7 format. With help from @pbauman, I set this up using the
NASAThermoMixture
,NASAEvaluator
, etc.It compiles and runs up to a point-- that is, I start at T_0, and the temperature increases for a bit until some T' at which point it drops suddenly to <1. Obviously this should not happen. I tried printing out some things to see what was going wrong and I noticed that some of the species return negative cv's.
Even without the kinetics, I still get the negative values. Here is a code snippet that produces them (I left the CEA lines that I had been using before in case it is helpful):
For example, when
temp = 1857.0
, the cv ofH2
as calculated above is -80.1385.The text was updated successfully, but these errors were encountered: