kaylai / VESIcal

A generalized python library for calculating and plotting various things related to mixed volatile (H2O-CO2) solubility in silicate melts.
MIT License
26 stars 9 forks source link

Iacono-Marziano Model #68

Closed PennyWieser closed 4 years ago

PennyWieser commented 4 years ago

Hi Simon/Kayla, Iacono-Marziano sent me a link to their new online calculator. http://calcul-isto.cnrs-orleans.fr/thermodynamics/applications/#/script?name=workers~worker_equilibrium_pressure.js.

Simon, when I ran my Hawaiian melt inclusions through the old version of your python script it returned values for Iacono-Marziano that were significantly higher than other models (Using the KS test). image

When I run the same compositions through the web calculator, i get lower pressures that align with other models (e.g. for two compositions in attached spreadsheet - online calculator gives P=626 and P=924 bar, while your code returned P=814 and 1269 bars). At the moment, I can't get these compositions to run at all in the "manuscript" I think because of the low volatile problem issue #63? It returns error

InputError: X_fluid must sum to 1.0

If you could let me know once you've fixed this and I can test whether this discrepancy Iacono_SatPChecks.xlsx still exists with the newer code. vs. the web calculator

simonwmatthews commented 4 years ago

Are they using the same version of the parameterisation? There's one version that takes into account dissolved water, and one that doesn't. You can switch between the two in VESIcal- see the IaconoMarziano documentation in the module. The code required to do this (if VESIcal is imported as v) is: model = v.IaconoMarzianoCarbon(hydrous=False) v.calculate_saturation_pressure(model=model) or for a mixed fluid (again see docs for more info): model = v.MixedFluid({'CO2':v.IaconoMarzianoCarbon(hydrous=False),'H2O':v.IaconoMarzianoWater(hydrous=False)}) v.calculate_saturation_pressure(model=model) If that's not the reason for the discrepancy then I have no idea what's causing it.

simonwmatthews commented 4 years ago

The discrepancy may also be related to issue #23

PennyWieser commented 4 years ago

Hi Simon, now i've just downloaded the new version of VESIcal it work now without an error,and matches the online calculator! Thanks