pr-omethe-us / PyKED

Python interface to the ChemKED database format
https://pr-omethe-us.github.io/PyKED/
BSD 3-Clause "New" or "Revised" License
15 stars 15 forks source link

Should the special keyword balance be allowed in the species dictionary to indicate the remaining mole fraction? #58

Open bryanwweber opened 7 years ago

bryanwweber commented 7 years ago

PyKED/ChemKED version

v0.1.5

Title question suggested by Mike Burke's group at Columbia

bryanwweber commented 7 years ago

My initial thought is no, that the user can do the subtraction and put in a number. This might be prone to typos, but it will be the easiest to handle on our end. Other thoughts?

kyleniemeyer commented 7 years ago

Yeah this seems like a "lazy" (or, more charitably, "convenience") option that doesn't provide much value—explicit is better than implicit :)

Although requiring the amount to be specified might introduce one other possible avenue for typos, I think forcing this actually would lead to fewer overall errors, because our validation will check that everything adds up correctly. With a balance option, a typo in another value won't be caught.

bryanwweber commented 7 years ago

With a balance option, a typo in another value won't be caught.

Good point! Although I was doing some work today and found a typo that I made where I did the rounding incorrectly, so YMMV :smile:

kyleniemeyer commented 7 years ago

Hah ok, well I can't guarantee saving you from all your typos :)

bryanwweber commented 7 years ago

From Mike Burke via email:

Many papers only report an Ar balance, for example, rather than the mole fraction of Ar. I personally see value in allowing specification of balance rather than a mole fraction value from the standpoint of uncertainty quantification. Let's say you're evaluating the effect of having one of the reactants at the upper uncertainty limit of their nominal mole fractions, then to get the mole fractions to sum to 1, you'd need to mole fraction of the Ar balance to go down to compensate. Thoughts?

bryanwweber commented 7 years ago

That's a pretty good point. Is there some way we can incorporate Kyle's comment about catching typos, and this uncertainty idea? Perhaps a new field balance-species in the composition block?