Calculating saturation presures

The VESIcal.calculate_saturation_pressure() function calculates the minimum pressure at which a given silicate melt with known temperature and H2O and CO2 concentrations would be saturated with fluid. This is calcualted by finding the pressure at which the smallest amount of vapor is present. This function also calculates the composition of the vapor in equilibrium with the melt at those conditions.

The function works by calculating the equilibrium state of the given melt at very high pressure (2,000 MPa) and then decreasing the pressure in steps of 100 MPa until the mass of vapor is >0 grams. At this point, the pressure space is narrowed and searched in steps of 10 MPa and then in steps of 1 MPa until the saturation pressure is found.

Method structure:

Single sample:

def calculate_saturation_pressure(self, sample, temperature, verbose=False).result

BatchFile process:

def calculate_saturation_pressure(self, temperature, print_status=False)

Required inputs:

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

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.

Optional inputs:

verbose: Only for single-sample calculations. Default value is False. If set to True, additional parameters are returned in a dictionary: saturation pressure in bars, H2O and CO2 concentrations in the fluid, mass of the fluid in grams, and proportion of the fluid in the system in wt%.

print_status: Only for ExcelFile batch calcualtions. The default value is False. If True is passed, the progress of the calculation will be printed to the terminal.

Calculated outputs: If a single sample is passed to sample, the saturation pressure in bars is returned as a numerical value (float) (plus additional variables ‘XH2O_fl’, ‘XCO2_fl’, ‘FluidMass_grams’, and ‘FluidProportion_wtper’ if verbose is set to True).

If mutliple samples are passed as a BatchFile object, a pandas DataFrame is returned with sample information plus calculated saturation pressures, equilibrium fluid compositions, mass of the fluid in grams, and proportion of the fluid in the system in wt%. Temperature (in degrees C) is always returned.

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

satPs = myfile.calculate_saturation_pressure(temperature=925.0)
satPs
Output

SiO2

TiO2

Al2O3

Fe2O3

Cr2O3

FeO

MnO

MgO

NiO

CoO

CaO

Na2O

K2O

P2O5

H2O

CO2

Press

Temp

SaturationP_bars_VESIcal

Temperature_C_VESIcal

XH2O_fl_VESIcal

XCO2_fl_VESIcal

FluidMass_grams_VESIcal

FluidSystem_wt_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

2490.0

925.0

0.779065189604324

0.220934810395676

0.000123397898635469

0.00012339789863546896

MagmaSat

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

1080.0

925.0

0.942302508813074

0.0576974911869265

0.000150947745313106

0.00015094774531310598

MagmaSat

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

1310.0

925.0

0.95626058857227

0.0437394114277299

0.00283998353337547

0.0028399835333754683

MagmaSat

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.214912

0.004566

250

950

1130.0

925.0

0.949374231597921

0.0506257684020789

0.000404109570588202

0.0004041095705882021

MagmaSat

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.005816

0.004448

500

1025

1040.0

925.0

0.947851593164291

0.0521484068357088

0.00214691451486304

0.0021469145148630426

MagmaSat

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.885649

0.004654

5000

925

1000.0

925.0

0.940441195942963

0.0595588040570372

0.000719620652966339

0.0007196206529663392

MagmaSat

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.641843

0.004566

1000

862

1310.0

925.0

0.960119680294163

0.0398803197058366

0.00262211457322201

0.002622114573222014

MagmaSat

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.402133

0.004448

100

770

1210.0

925.0

0.954961377387157

0.0450386226128433

0.00056565135769863

0.0005656513576986305

MagmaSat

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.283934

0.004566

1000

855

1160.0

925.0

0.950482808035888

0.0495171919641118

0.000249647928197421

0.0002496479281974212

MagmaSat

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.230533

0.004448

500

1000

1130.0

925.0

0.953403510967921

0.0465964890320793

0.00295966478946109

0.0029596647894610914

MagmaSat

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.459767

0.004654

5000

1010

1230.0

925.0

0.957180688395138

0.0428193116048623

0.0044049887076211

0.004404988707621104

MagmaSat

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.712506

0.004448

1000

1012

930.0

925.0

0.938372072750656

0.0616279272493436

0.00121285962896932

0.0012128596289693206

MagmaSat

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.443973

0.004654

100

885

1230.0

925.0

0.956006886979151

0.0439931130208494

0.0031175255125327

0.003117525512532702

MagmaSat

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.283171

0.004645

1000

885

1160.0

925.0

0.954021083810811

0.0459789161891886

0.00422299839546271

0.004222998395462716

MagmaSat

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_saturation_pressure(sample=extracted_bulk_comp, temperature=925.0).result
2490.0