CalebBell / thermo

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

Mercury density #133

Closed gamafreire closed 1 year ago

gamafreire commented 1 year ago

Dear @CalebBell,

from thermo import Chemical Hg = Chemical('Hg') Hg.rho

12737.02 kg/m3 <-> 13.534 g/cm3

thermo.version '0.2.23'

Its' only 7% but its important in pressure units for instance.

Best regards, Filipe Gama Freire

CalebBell commented 1 year ago

Hi @gamafreire, it seems experimental data is in thermo but the source only has data starting at 600 K and up so the extrapolation to room temperature is off. I try to avoid adding data for specific chemicals in favor of compilations of chemical properties. Do you know a good source with many temperature-dependent metal densities? Mercury is a rough one to get wrong, though.

You can manually add the data from e.g. the CRC table as follows:

from thermo import *

from chemicals import rho_to_Vm
CRC_mercury_rho_Ts = [253.15, 254.15, 255.15, 256.15, 257.15, 258.15, 259.15, 260.15, 261.15, 262.15, 263.15, 264.15, 265.15, 266.15, 267.15, 268.15, 269.15, 270.15, 271.15, 272.15, 273.15, 274.15, 275.15, 276.15, 277.15, 278.15, 279.15, 280.15, 281.15, 282.15, 283.15, 284.15, 285.15, 286.15, 287.15, 288.15, 289.15, 290.15, 291.15, 292.15, 293.15, 294.15, 295.15, 296.15, 297.15, 298.15, 299.15, 300.15, 301.15, 302.15, 303.15, 304.15, 305.15, 306.15, 307.15, 308.15, 309.15, 310.15, 311.15, 312.15, 313.15, 314.15, 315.15, 316.15, 317.15, 318.15, 319.15, 320.15, 321.15, 322.15, 323.15, 324.15, 325.15, 326.15, 327.15, 328.15, 329.15, 330.15, 331.15, 332.15, 333.15, 334.15, 335.15, 336.15, 337.15, 338.15, 339.15, 340.15, 341.15, 342.15, 343.15, 344.15, 345.15, 346.15, 347.15, 348.15, 349.15, 350.15, 351.15, 352.15, 353.15, 354.15, 355.15, 356.15, 357.15, 358.15, 359.15, 360.15, 361.15, 362.15, 363.15, 364.15, 365.15, 366.15, 367.15, 368.15, 369.15, 370.15, 371.15, 372.15, 373.15, 383.15, 393.15, 403.15, 413.15, 423.15, 433.15, 443.15, 453.15, 463.15, 473.15, 483.15, 493.15, 503.15, 513.15, 523.15, 533.15, 543.15, 553.15, 563.15, 573.15, ]
CRC_mercury_rho_rhos = [13644.61, 13642.12, 13639.64, 13637.16, 13634.68, 13632.2, 13629.72, 13627.24, 13624.76, 13622.28, 13619.81, 13617.33, 13614.85, 13612.38, 13609.91, 13607.43, 13604.96, 13602.49, 13600.02, 13597.55, 13595.08, 13592.61, 13590.14, 13587.68, 13585.21, 13582.75, 13580.28, 13577.82, 13575.35, 13572.89, 13570.43, 13567.97, 13565.51, 13563.05, 13560.59, 13558.13, 13555.67, 13553.22, 13550.76, 13548.31, 13545.85, 13543.4, 13540.94, 13538.49, 13536.04, 13533.59, 13531.14, 13528.69, 13526.24, 13523.79, 13521.34, 13518.89, 13516.45, 13514, 13511.56, 13509.11, 13506.67, 13504.22, 13501.78, 13499.34, 13496.9, 13494.46, 13492.02, 13489.58, 13487.14, 13484.7, 13482.26, 13479.82, 13477.39, 13474.95, 13472.51, 13470.08, 13467.65, 13465.21, 13462.78, 13460.35, 13457.91, 13455.48, 13453.05, 13450.62, 13448.19, 13445.76, 13443.33, 13440.9, 13438.48, 13436.05, 13433.62, 13431.2, 13428.77, 13426.35, 13423.92, 13421.5, 13419.08, 13416.65, 13414.23, 13411.81, 13409.39, 13406.97, 13404.55, 13402.13, 13399.71, 13397.29, 13394.87, 13392.45, 13390.03, 13387.62, 13385.2, 13382.78, 13380.37, 13377.95, 13375.54, 13373.13, 13370.71, 13368.3, 13365.89, 13363.47, 13361.06, 13358.65, 13356.24, 13353.83, 13351.42, 13327.3, 13303.3, 13279.3, 13255.3, 13231.4, 13207.5, 13183.6, 13159.7, 13135.9, 13112, 13088.2, 13064.4, 13040.6, 13016.7, 12992.9, 12969.1, 12945.3, 12921.4, 12897.5, 12873.6, ]
mercury = Chemical('mercury')
MW = mercury.MW
CRC_mercury_Vms = [rho_to_Vm(rho=rho, MW=MW) for rho in CRC_mercury_rho_rhos]
mercury.VolumeLiquid.add_tabular_data(Ts=CRC_mercury_rho_Ts, properties=CRC_mercury_Vms, name='CRC 90E')
mercury.rho
gamafreire commented 1 year ago

Hi @CalebBell, Thank you very much, I will try for open source. f

CalebBell commented 1 year ago

Hi gamafreire,

I am experimenting with ways to add data for specific chemicals. In the past I could only add compilations, but now I am trying to develop a workflow that lets data for specific chemicals be added. So far I explored a few elements. I have included the data I showed above in the latest release of thermo==0.2.25.

I hope you find this useful, Caleb