Matlab Codes for Volcanology - Stokes Rise Calculations for Bubbles

By Tom D Pering

University of Sheffield, England

Published on


A series of Matlab codes for the determination of the rise speed of stokes bubbles at a single point (i.e. at a given depth and set radius) and over a range of depths. The aim of these files is to allow the calculation of rise speed given the overall bubble composition and the proportions or mass of its major constituents (carbon dioxide, sulphur dioxide and water vapour).

Firstly, a file has been included "atmpressure.m" to calculate atmospheric pressure at vent height - essential for calculating the rise speed of bubbles (and Taylor bubbles or slugs). After this the molar mass and density of the bubble need to be calculated, for this the "slug.m" is included. Of course to do this the gas properties are needed, these are in the included "gas_properties.mat" file which just needs to be in the Matlab Current Directory.

Secondly the file "stokes.m" is a standalone file for calculating the rise speed given a set radius.

The last file included is the dynamic rise of bubbles "stokesf.m". Given inputs of; height above sea level, amounts of gas, density, viscosity, magma temperature and length of the conduit, the outputs; rise speed, radii, slug travel time, reynolds number, pressure in the bubble and volume of the bubble are determined. These are determined for every 1 m step. Be careful that the system you are modelling can in fact be represented by stokes rise of bubbles as not all can!

All of these files are relatively self-explanatory, but if you have any questions please don't hesitate to contact me.

Cite this work

Researchers should cite this work as follows:

  • Tom D Pering (2013), "Matlab Codes for Volcanology - Stokes Rise Calculations for Bubbles ,"

    BibTex | EndNote