Units in kmcos

44 views
Skip to first unread message

Nam Tran

unread,
Apr 21, 2023, 12:05:29 PM4/21/23
to kmcos-users
Hi Everyone,

I am following the tutorial examples of kmcos:


I found that we need to add conversion factors (i.e., bar, umass or eV) to the expression of rate constant. 

i.e., rate_constant='p_CO*bar*A/sqrt(2*pi*umass*m_CO/beta)'

But I found this detailed paper, those factors can be removed.


It is appears to me that the authors used the inputs (i.e., partial pressure p_CO) thats were already in the correct units of kmcos and conversion factors were not needed.

So, I would like to know what is the units using in kmcos.

Best regards
Nam

Aditya "Ashi" Savara

unread,
Apr 21, 2023, 12:48:12 PM4/21/23
to kmcos-users
Process rate constants are always in s^-1

The models used in that paper are in Zenodo:

Downloading one of the small files (below link) and looking inside...

The 111 model used in that paper does have the "bar" listed.

We see that the "bar" is inside the string, so it is not a python variable.

We see that the value of "A" does have units, near the top of the file.

Kmcos does include some automatic conversion of units from within the string.  If we look at the below file, we see that "bar" is defined as 1E5. I recognize that number:  that means it is configured that a person can add the word "bar" into the string to convert from units of Pa to units of bar.


It is important to recognize that you do not need to write "bar" in the string.  As long as your process equation evaluates into s^-1, then the units are not necessary.  Also, if a person removed "bar" from that string and included their pressures already in Pa, then the simulation would not change.  The "bar" string is simply a convenience conversion factor variable.

We also separately see some cases like " GibbsGas_O2gas".
That variable is related to some built in thermodynamics of gases features. It is not necessary to use those, but if one is using them, one can compare to the examples. We have two ways of including temperature dependent gas phase thermodynamics:

The ASE way:
The JANAF way:

Of course, if a user is doing simulations where the temperature does not change every step, they can also use their own functions to update the rate constants to depend on whatever function they want to.

These variable capabilities for built in unit conversions, and also the built in thermodynamics of gas phase species, did come up during discussion recently as features that should be documented better.

If people have suggestions of where to put in more info (guide, read the docs, etc.) and provide the text and tell me where to put it... so that I just need to copy and paste, then I will usually be pretty quick about putting that into the documentation.

Nam Tran

unread,
Apr 22, 2023, 1:23:39 AM4/22/23
to kmcos-users
Dear Aditya,

Thank you for you reply. It already explains my question.
Also:
the word "bar" into the string to convert from units of Pa to units of bar.
This should be in the opposite way right?

Best
Nam

Aditya Ashi Savara

unread,
Apr 22, 2023, 3:14:01 PM4/22/23
to Nam Tran, kmcos-users
Yes, you are right, my phrasing was backwards. The 1E5 means a person's pressure will be multiplied by 1E5, which means it will convert from bar to Pa.

--
You received this message because you are subscribed to a topic in the Google Groups "kmcos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kmcos-users/bAczdm8ptRo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kmcos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kmcos-users/368de8a3-240e-40b5-9138-08841a082eben%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages