MAMMA (Magma Ascent Mathematical Modeling and Analysis) is a FORTRAN90 code designed to solve a conservative model for magma ascent in a volcanic conduit, described as a compressible multicomponent two-phase flow. The system of conservation equations is derived from the theory of thermodynamically compatible systems, considering the effects of the main processes that magmas experience during ascent, such as crystallization, rheological changes, fragmentation, physical interaction with conduit walls, outgassing and degassing. The system is described as a mixture of two phases (i=1,2), each one characterized by a volume fraction, density, velocity and specific entropy. Below the fragmentation level, phase 1 is a mixture of crystals, dissolved water and melt (continuous phase); while phase 2 is composed by the exsolved gas bubbles (dispersed phase). Above magma fragmentation, phase 1 is constituted by magma fragments (dispersed phase) and phase 2 is the exsolved gas mixture (continuous phase). Magma fragmentation occurs when the exsolved gas volume fraction reaches a critical value. The model is capable of describing conduits with elliptical cross sections and depth-dependent dimensions, and it includes the conservation laws for total mass, momentum, energy, mass of crystals, mass of dissolved water and mass of exsolved gas. It also includes some expressions for controlling the relative velocity between the two phases and the volume fraction of phase 1.

This version is not the full version of the model, which can be downloaded from:

http://demichie.github.io/MAMMA/


If you have downloaded this simplified version of the tool, please use:

> ./configure
> make
> make install

The executable is copied in the bin folder. When you want to do a simulation
copy the executable in a folder with the input file and then execute it from
the command line:

> ./MAMMA -iINPUTFILE -oOUTPUTFILE

If no arguments are passed to MAMMA from the command line, defualt values are used.
The default name for INPUTFILE is "condiut_solver.inp" and the default value for OUTPUTFILES is "test.out".

In the "examples" folder two input files are provided.
In the "scripts" folder a python script to plot the results is provided.

