# Mass Fraction to PPM

I want to convert from mass fraction of a species into PPM in a UDF or custom field function. I saw many define it as mass fraction x 10^6 while others define it as mass fraction x density of mixture x 10^6 / density of species. Would you please let me know which one is correct or if there is another way. Thanks

## Comments

6,649You need to stick to one of the definitions from the literature: ppm mole or ppm weight or ppm volume or..... All definitions are correct you need to select one which fits your needs. You have to make that decision!

33If volume: PPM = mass fraction * density_mix * 10^6 / density_species

If weight: PPM = mass fraction * 10^6

If mole: PPM = mass fraction * 10^6 * MW_mix / MW_species

In UDF: you can access the mass fraction via C_YI(c, t, i) where i is the species index. C_R(c, t) for the density of the mixture. I did not need to call the molecular weight (MW) before so I am not sure how to access it through the UDF. Hope this helps.

1I suggest to use ppm to percent calculator