drcassar / glasspy

Python module for scientists working with glass materials
https://glasspy.readthedocs.io
Other
28 stars 7 forks source link

Units of electrical resistivity are likely wrong #24

Closed japaf closed 1 month ago

japaf commented 2 months ago

I did some testing with Glasspy 0.4.6 and believe there is an issue with the electrical resistivity models. A minimal example is to test on a composition found in Table 10.19 of Mazurin, O. V. and O. A. Prokhorenko (2005). Electrical Conductivity of Glass Melts. Properties of Glass-Forming Melts. D. L. Pye, A. Montenero and I. Joseph. Boca Raton, FL, USA, CRC Press:

# defined composition in mol%
dtx = pd.Series({'SiO2': 75, 'CaO': 10, 'K2O': 5, 'Na2O': 10}).to_frame().T
# EC at 1200 °C
model.predict(dtx)['Resistivity1473K'].values[0]

This returns -2.98, which is meant to be in log10(Ohm.m) (I think). The book gives the experimental value as 1.22 log10(Ohm.cm), i.e., -0.78 log10(Ohm.m). Thus, there is a discrepancy of 2.2 log10(Ohm.m) between the measured and predicted values.

I have also done a larger comparison with data found in Fluegel's report. Again, the measured values seem to be underestimated by about 2 orders of magnitude (I can send the code or results if needed).

So, I suspect there is a unit conversion error somewhere. I don't know if the electrical resistivity data in Glasspy's database are also affected or if it is only on the model side.

drcassar commented 2 months ago

Great catch, @japaf, thank you for letting me know. This issue was addressed in the PR #17 and will be incorporated in GlassPy 0.5. You can try the development version right now if you want, it is available in this branch: https://github.com/drcassar/glasspy/tree/dev

I am still testing the new version, but I intent to release it soon.

Thanks!

japaf commented 2 months ago

Great, sounds good.

japaf commented 1 month ago

I tested it again on v0.5.1. It behaves as expected. I am closing the issue.