Published September 17, 2022 | Version v1
Journal article Open

The code used for Qin et al. (2022), Maintaining open-system conditions in persistently active volcanoes requires magma recirculation.

  • 1. Guangxi University
  • 2. ETH Zurich
  • 3. Stanford University

Description

Including the code used in Qin et al (2022): Maintaining open-system conditions in persistently active volcanoes requires magma recirculation.

This repository has two folders, including the code used to model the segregated gas flux and the the joint flux of gas and magma, separately. In addition, we added a computational example into each folder. The reader should obtain the same results as that in the computational example folder once they run the code in the code folder.

We introduce the content in the code folder, as well as how to run the code in readers' local computer or server. 

Code Folder:

The code folder includes the code developed using FORTRAN. Specifics on the development of the model and implementation are included in Qin et al (2022). To run this code, the reader should copy the whole folder into a single directory in his/her local computer or a server.

•    UMFPACK Library

Our codes use UMF library to solve the large sparse matrix. The UMFPACK library, written by Timothy Davis, is part of the SuiteSparse package, which is available from http://www.cise.ufl.edu/research/sparse/ . The library files used by the authors have been included in the CODE/lib. To run a code, save all library files and the code in a same directory. However, these library files might not work in readers' local computer. Therefore, the readers need to download and install their own library in their local computer before running the codes. The UMFPACK use guide is in: https://fossies.org/linux/SuiteSparse/UMFPACK/Doc/UMFPACK_UserGuide.pdf.

•    Input

Our codes are suitable for a wide range of parameters. The input of geometry and properties of fluids can be typed manually by readers in the “data input” area at the beginning of each code.

•    Output

We output the properties of multiphase, velocity and pressure profile frequently. Besides, in order to monitor the progress of the simulations, we output a runtime text file that prints the temperature of the gas pocket (or core flow), the pure magma (or annular flow) and the mean flow.

•    Run

To begin running a code, readers need to assign the name of the code in the file, "comp_2d2", then type and run “./comp_2d2” in a linux terminal to compile the fortran code executable, which will be named "a.out". After the executable file was formed, type and run “./a.out”. The run time depends on the spatial and temporal resolution. Simulation output files will be created in the same directory as the code is run. 

Files

Files (7.1 MB)

Name Size Download all
md5:a9e200370c0500de2d4d422c299046a7
7.1 MB Download