libantioch / antioch

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

Fixing some errors calculating the Diffusion coefficients and thermal conductivity for kinetics theory. #267

Open klbudzin opened 6 years ago

klbudzin commented 6 years ago

When comparing Transport values with cantera I noticed a few problems that arose in the calculation of the mixture averaged Diffusion coefficients. First, we are not clipping non-realistic values for mass fractions, so if the user doesn't do this themselves, were throwing out non-physical values. Secondly I converted how we calculate the diffusing mixing rule to use mole fractions instead of mass fractions. For some reason, using mass fractions gives us a different mixture molecular weight than the mole fractions. From my testing, the diffusion coefficients are very sensitive to the mixture molecular weight causing our values to be highly different from the expected values for near pure species mixture concentrations.

I also changed how we calculate the thermal conductivity to match how it is calculated in ("Chemically Reacting Flow" by Kee, Coltrin, and Glarborg, page 519). These values now seem to match to canteras calculated values to at least the third digit. Finally there is also a changed to the unit test that was tripped with the thermal conductivity change.

pbauman commented 6 years ago

Thanks for reviewing @roystgnr. @klbudzin please address his comments.

roystgnr commented 6 years ago

Is this going to trip a bunch of GRINS regression tests too?

pbauman commented 6 years ago

Is this going to trip a bunch of GRINS regression tests too?

At least one. I told him to do this first then we'll update GRINS down stream.

klbudzin commented 6 years ago

I've updated a few of the concerns here. I added a separate method to calculate the perturbed mass fractions using the EGlib method, and call it in the mu_k_and_d method before calculating any of the transport properties. I have still yet to add a default argument for the clipping, but I could easily add one to the mu_k_and_d method now. I also added some more documentation in.