CalebBell / thermo

Thermodynamics and Phase Equilibrium component of Chemical Engineering Design Library (ChEDL)
MIT License
634 stars 117 forks source link

Inconsistent "rhol_60Fs_mass" values for normal paraffins #148

Open aegis4048 opened 8 months ago

aegis4048 commented 8 months ago

(Perhaps this issue should be opened in chemicals... but since I'm using Thermo and you are the maintainer of both Thermo and Chemicals, I'm posting here)

The densities of the normal paraffins seem to be inconsistent. For example n-C30 (=n-triacontane=638-68-6) from thermo shows density=682.91. I have two online sources that claim the density to be 775.0 (link) and 779.7 (link).

Another example is tritriacontane (CAS=630-05-7), which Thermo reports 747.24, but it actually should be around 903.2 (source)

I observed this inconsistency for normal paraffins upto C50 (didn't check beyond that). Thermo gives acceptable density values for some, but some doesn't. The common sense is that the density should increase with increasing carbon number (or molecular weight) but the density reported by Thermo doesn't agree with this.

Example:

from thermo import ChemicalConstantsPackage

n_paraffins = ['n-C6', 'n-C7', 'n-C8', 'n-C9', 'n-C10',
 'n-C11', 'n-C12', 'n-C13', 'n-C14', 'n-C15', 'n-C16', 'n-C17', 'n-C18', 'n-C19', 'n-C20',
 'n-C21', 'n-C22', 'n-C23', 'n-C24', 'n-C25', 'n-C26', 'n-C27', 'n-C28', 'n-C29', 'n-C30',
 'n-C31', 'n-C32', 'n-C33', 'n-C34', 'n-C35', 'n-C36', 'n-C37', 'n-C38', 'n-C39', 'n-C40',
 'n-C41', 'n-C42', 'n-C43', 'n-C44', 'n-C45', 'n-C46', 'n-C47', 'n-C48', 'n-C49', 'n-C50']

constants = ChemicalConstantsPackage.constants_from_IDs(n_paraffins)
for a, b in zip(constants.names, constants.rhol_60Fs_mass):
    print("{0:20}: {1}".format(a, round(b, 3)))
hexane              : 663.383
heptane             : 687.596
octane              : 706.183
nonane              : 721.529
decane              : 733.863
undecane            : 743.692
dodecane            : 752.737
tridecane           : 756.957
tetradecane         : 765.155
pentadecane         : 770.036
hexadecane          : 775.049
heptadecane         : 774.043
octadecane          : 774.123
nonadecane          : 775.741
eicosane            : 771.17
heneicosane         : 796.868
docosane            : 778.837
tricosane           : 799.489
tetracosane         : 802.598
pentacosane         : 793.723
hexacosane          : 800.671
heptacosane         : 765.35
octacosane          : 797.185
nonacosane          : 777.126
triacontane         : 682.918
hentriacontane      : 752.603
dotriacontane       : 834.028
tritriacontane      : 747.243
tetratriacontane    : 744.29
pentatriacontane    : 739.241
hexatriacontane     : 625.765
heptatriacontane    : 735.882
octatriacontane     : 736.663
nonatriacontane     : 737.428
tetracontane        : 840.562
hentetracontane     : 738.813
dotetracontane      : 739.439
tritetracontane     : 740.005
tetratetracontane   : 844.711
pentatetracontane   : 741.159
hexatetracontane    : 741.654
heptatetracontane   : 742.141
octatetracontane    : 742.71
nonatetracontane    : 743.094
pentacontane        : 743.562
CalebBell commented 7 months ago

Hi Eric,

You are correct - this is an issue, one difficult to remedy today in thermo. Not all methods are available for all chemicals. Methods are based on different data sets, and developed by authors of varying capacities. Modifying your example to show the methods used for each chemical, we can see the HTCOSTALDFIT and MMSNM0 methods are somewhat sub-par and don't display the correct trend in all cases.

I hope a more accurate data source becomes available that can replace those two for these components. I am happy with the issue being in thermo and staying open until it is fixed; the HTCOSTALDFIT and MMSNM0 methods aren't buggy, just under performing.

Sincerely, Caleb

from thermo import ChemicalConstantsPackage

n_paraffins = ['n-C6', 'n-C7', 'n-C8', 'n-C9', 'n-C10',
 'n-C11', 'n-C12', 'n-C13', 'n-C14', 'n-C15', 'n-C16', 'n-C17', 'n-C18', 'n-C19', 'n-C20',
 'n-C21', 'n-C22', 'n-C23', 'n-C24', 'n-C25', 'n-C26', 'n-C27', 'n-C28', 'n-C29', 'n-C30',
 'n-C31', 'n-C32', 'n-C33', 'n-C34', 'n-C35', 'n-C36', 'n-C37', 'n-C38', 'n-C39', 'n-C40',
 'n-C41', 'n-C42', 'n-C43', 'n-C44', 'n-C45', 'n-C46', 'n-C47', 'n-C48', 'n-C49', 'n-C50']

constants, packages = ChemicalConstantsPackage.from_IDs(n_paraffins)
for a, b, c in zip(constants.names, constants.rhol_60Fs_mass, packages.VolumeLiquids):
    print("{0:20}: {1} kg/m^3 from method {2}".format(a, round(b, 3), c.method))

hexane              : 663.383 kg/m^3 from method HEOS_FIT
heptane             : 687.596 kg/m^3 from method HEOS_FIT
octane              : 706.183 kg/m^3 from method HEOS_FIT
nonane              : 721.529 kg/m^3 from method HEOS_FIT
decane              : 733.863 kg/m^3 from method HEOS_FIT
undecane            : 743.692 kg/m^3 from method HEOS_FIT
dodecane            : 752.737 kg/m^3 from method HEOS_FIT
tridecane           : 756.957 kg/m^3 from method DIPPR_PERRY_8E
tetradecane         : 765.155 kg/m^3 from method DIPPR_PERRY_8E
pentadecane         : 770.036 kg/m^3 from method DIPPR_PERRY_8E
hexadecane          : 775.049 kg/m^3 from method HEOS_FIT
heptadecane         : 774.043 kg/m^3 from method DIPPR_PERRY_8E
octadecane          : 774.123 kg/m^3 from method DIPPR_PERRY_8E
nonadecane          : 775.741 kg/m^3 from method DIPPR_PERRY_8E
eicosane            : 771.17 kg/m^3 from method DIPPR_PERRY_8E
heneicosane         : 796.868 kg/m^3 from method HTCOSTALDFIT
docosane            : 778.837 kg/m^3 from method HEOS_FIT
tricosane           : 799.489 kg/m^3 from method HTCOSTALDFIT
tetracosane         : 802.598 kg/m^3 from method HTCOSTALDFIT
pentacosane         : 793.723 kg/m^3 from method HTCOSTALDFIT
hexacosane          : 800.671 kg/m^3 from method HTCOSTALDFIT
heptacosane         : 765.35 kg/m^3 from method HTCOSTALDFIT
octacosane          : 797.185 kg/m^3 from method HTCOSTALDFIT
nonacosane          : 777.126 kg/m^3 from method MMSNM0
triacontane         : 682.918 kg/m^3 from method MMSNM0
hentriacontane      : 752.603 kg/m^3 from method MMSNM0
dotriacontane       : 834.028 kg/m^3 from method MMSNM0
tritriacontane      : 747.243 kg/m^3 from method MMSNM0
tetratriacontane    : 744.29 kg/m^3 from method MMSNM0
pentatriacontane    : 739.241 kg/m^3 from method MMSNM0
hexatriacontane     : 625.765 kg/m^3 from method MMSNM0
heptatriacontane    : 735.882 kg/m^3 from method MMSNM0
octatriacontane     : 736.663 kg/m^3 from method MMSNM0
nonatriacontane     : 737.428 kg/m^3 from method MMSNM0
tetracontane        : 840.562 kg/m^3 from method MMSNM0
hentetracontane     : 738.813 kg/m^3 from method MMSNM0
dotetracontane      : 739.439 kg/m^3 from method MMSNM0
tritetracontane     : 740.005 kg/m^3 from method MMSNM0
tetratetracontane   : 844.711 kg/m^3 from method MMSNM0
pentatetracontane   : 741.159 kg/m^3 from method MMSNM0
hexatetracontane    : 741.654 kg/m^3 from method MMSNM0
heptatetracontane   : 742.141 kg/m^3 from method MMSNM0
octatetracontane    : 742.71 kg/m^3 from method MMSNM0
nonatetracontane    : 743.094 kg/m^3 from method MMSNM0
pentacontane        : 743.562 kg/m^3 from method MMSNM0