Calculating liquid densities

The VESIcal.calculate_liquid_density() function calculates the density of the silicate liquid given composition, temperature, and pressure. The function uses the DensityX model of Iacovino and Till (2019). No other models are currently available for this calculation.

Method Structure

Single sample:

def calculate_liquid_density(self, sample, pressure, temperature).result

BatchFile process:

def calculate_liquid_density(self, pressure, temperature)

Required inputs:

sample: Only for single-sample calculations. The composition of a sample as Sample class.

pressure: The pressure in bars. For BatchFile calculations, if pressure information is present in the file (e.g., as a column with unique pressure values for each sample), this can be accessed by passing the column name in quotes to the pressure variable.

temperature: The temperature in degres C. For BatchFile calculations, if temperature information is present in the file (e.g., as a column with unique temperature values for each sample), this can be accessed by passing the column name in quotes to the temperature variable.

Calculated outputs: The density of the liquid in grams per liter, rounded to 3 dp.

For an entire dataset

Import a data file

myfile = v.BatchFile('example_data.xlsx')
myfile.get_data()
Output
Label SiO2 TiO2 Al2O3 Fe2O3 Cr2O3 FeO MnO MgO NiO CoO CaO Na2O K2O P2O5 H2O CO2 Press Temp
BT-ex 77.5 0.08 12.5 0.207 0 0.473 0 0.03 0 0 0.43 3.98 4.88 0 5.5 0.05 500 900
TVZMa-ex 78.37 0.13 11.94 0 0 0.99 0.04 0.05 0 0 0.53 3.8 4.14 0 4.06 0.005 600 800
TVZOh-ex 77.9 0.08 12.15 0 0 0.95 0.05 0.06 0 0 0.55 4.05 4.12 0 4.63 0.005 50 900
Oh48-FTIR1-MI1-a 78.27 0.0298 12.02 0 0 0.9828 0.0336 0.0515 0 0 0.4772 4.05 4.09 0 4.214912406 0.004565932 250 950
Oh48-FTIR1-MI1-b 78.27 0.0298 12.02 0 0 0.9828 0.0336 0.0515 0 0 0.4772 4.05 4.09 0 4.005815793 0.004447963 500 1025
Oh48-FTIR1-MI1-IRc 78.27 0.0298 12.02 0 0 0.9828 0.0336 0.0515 0 0 0.4772 4.05 4.09 0 3.885649341 0.004654367 5000 925
Oh50-4.1 77.91 0.0984 12.07 0 0 1.0556 0.0257 0.0999 0 0 0.5216 4.04 4.18 0 4.641842879 0.004565932 1000 862
Oh50-4.2 77.91 0.0984 12.07 0 0 1.0556 0.0257 0.0999 0 0 0.5216 4.04 4.18 0 4.402133476 0.004447963 100 770
Oh49-4.1 77.92 0.0099 12.11 0 0 1.002 0.0672 0.0546 0 0 0.5346 4.01 4.3 0 4.283934433 0.004565932 1000 855
Oh49-4.2 77.92 0.0099 12.11 0 0 1.002 0.0672 0.0546 0 0 0.5346 4.01 4.3 0 4.230532593 0.004447963 500 1000
Ma55-5a.1 77.68 0.0096 12.27 0 0 1.0272 0.0628 0.0342 0 0 0.6064 3.97 4.35 0 4.459767403 0.004654367 5000 1010
Ma57-3b.2 77.9 0.0498 12.07 0 0 1.0844 0.0748 0.0355 0 0 0.4759 4.1 4.21 0 3.712506046 0.004447963 1000 1012
Ma57-3c.1 77.65 0.159 12.28 0 0 0.9769 0.0597 0.0577 0 0 0.5598 4.08 4.18 0.0064 4.443973024 0.004654367 100 885
Ma57-3c.2 77.65 0.159 12.28 0 0 0.9769 0.0597 0.0577 0 0 0.5598 4.08 4.18 0.0064 4.283171078 0.004644523 1000 885

Do the calculation

densities = myfile.calculate_liquid_density(pressure=1000, temperature=900)
densities
Output
  SiO2 TiO2 Al2O3 Fe2O3 Cr2O3 FeO MnO MgO NiO CoO CaO Na2O K2O P2O5 H2O CO2 Press Temp Density_liq_VESIcal Temperature_C_VESIcal Pressure_bars_VESIcal Model Warnings
BT-ex 77.5 0.08 12.5 0.207 0.0 0.473 0.0 0.03 0.0 0.0 0.43 3.98 4.88 0.0 5.5 0.05 500 900 2142.827 900 1000 DensityX  
TVZMa-ex 78.37 0.13 11.94 0.0 0.0 0.99 0.04 0.05 0.0 0.0 0.53 3.8 4.14 0.0 4.06 0.005 600 800 2193.334 900 1000 DensityX  
TVZOh-ex 77.9 0.08 12.15 0.0 0.0 0.95 0.05 0.06 0.0 0.0 0.55 4.05 4.12 0.0 4.63 0.005 50 900 2174.673 900 1000 DensityX  
Oh48-FTIR1-MI1-a 78.27 0.0298 12.02 0.0 0.0 0.9828 0.0336 0.0515 0.0 0.0 0.4772 4.05 4.09 0.0 4.214912406 0.004565932 250 950 2187.622 900 1000 DensityX  
Oh48-FTIR1-MI1-b 78.27 0.0298 12.02 0.0 0.0 0.9828 0.0336 0.0515 0.0 0.0 0.4772 4.05 4.09 0.0 4.005815793 0.004447963 500 1025 2194.799 900 1000 DensityX  
Oh48-FTIR1-MI1-IRc 78.27 0.0298 12.02 0.0 0.0 0.9828 0.0336 0.0515 0.0 0.0 0.4772 4.05 4.09 0.0 3.885649341 0.004654367 5000 925 2198.958 900 1000 DensityX  
Oh50-4.1 77.91 0.0984 12.07 0.0 0.0 1.0556 0.0257 0.0999 0.0 0.0 0.5216 4.04 4.18 0.0 4.641842879 0.004565932 1000 862 2175.721 900 1000 DensityX  
Oh50-4.2 77.91 0.0984 12.07 0.0 0.0 1.0556 0.0257 0.0999 0.0 0.0 0.5216 4.04 4.18 0.0 4.402133476 0.004447963 100 770 2183.805 900 1000 DensityX  
Oh49-4.1 77.92 0.0099 12.11 0.0 0.0 1.002 0.0672 0.0546 0.0 0.0 0.5346 4.01 4.3 0.0 4.283934433 0.004565932 1000 855 2186.445 900 1000 DensityX  
Oh49-4.2 77.92 0.0099 12.11 0.0 0.0 1.002 0.0672 0.0546 0.0 0.0 0.5346 4.01 4.3 0.0 4.230532593 0.004447963 500 1000 2188.267 900 1000 DensityX  
Ma55-5a.1 77.68 0.0096 12.27 0.0 0.0 1.0272 0.0628 0.0342 0.0 0.0 0.6064 3.97 4.35 0.0 4.459767403 0.004654367 5000 1010 2181.905 900 1000 DensityX  
Ma57-3b.2 77.9 0.0498 12.07 0.0 0.0 1.0844 0.0748 0.0355 0.0 0.0 0.4759 4.1 4.21 0.0 3.712506046 0.004447963 1000 1012 2206.841 900 1000 DensityX  
Ma57-3c.1 77.65 0.159 12.28 0.0 0.0 0.9769 0.0597 0.0577 0.0 0.0 0.5598 4.08 4.18 0.0064 4.443973024 0.004654367 100 885 2182.637 900 1000 DensityX  
Ma57-3c.2 77.65 0.159 12.28 0.0 0.0 0.9769 0.0597 0.0577 0.0 0.0 0.5598 4.08 4.18 0.0064 4.283171078 0.004644523 1000 885 2188.106 900 1000 DensityX  

For a single sample

Extract a single sample from your dataset

SampleName = 'BT-ex'
extracted_bulk_comp = myfile.get_sample_composition(SampleName, asSampleClass=True)

Do the calculation

v.calculate_liquid_density(sample=extracted_bulk_comp, pressure=1000, temperature=900).result
2142.827