Code and Documentation

 

The MCS code and documentation undergoes periodic upgrades to fix minor issues, add graphical and additional post-simulation code to aid analysis of runs and make major upgrades. This page is the link to the current version for download and includes detailed instructions in text and video format to install, set-up input, run petrologic RnAFC scenarios and read MCS output.

MCS Download

Included in the MCS Download Folder are all the files required to run the MCS. It is suggested that, independent of MCS, the user has access to ‘stand-alone’ MELTS although this is not a necessity to run MCS. If you wish to learn more about the MELTS suite of codes, more information may be found here: http://melts.ofm-research.org.

Requirements:

  • Mac OS X 10.11 (El Capitan) or later
  • Microsoft OFFICE: MAC 2011 HOME and BUSINESS

MCS Download Folder

Download MCS

MCS Installation and Documentation

 

MCS Installation

  1. Upon downloading the MCS folder, it is advised to immediately make a duplicate copy and store on your machine but NOT in your documents file where the primary folder should be. In case working MCS folder, the one you use to run simulations, becomes corrupted, you will have a duplicate MCS FOLDER that can be moved to your DOCUMENTS folder. Storing a backup MCS FOLDER on a flash drive is also a good idea. Of course, you can always go to the MCS site and download a clean version.
  2. Once the download is complete, navigate to the Downloads folder and move the MCS folder into the Documents folder - DO NOT RENAME THIS FILE. This file must remain as is, in the documents folder, in order for the MCS to function.
  3. Navigate to the folder within the MCS folder called “MCS VBL CODE” Open up the MCS excel file, upon opening this file, you will ENABLE MACROS when prompted. Another popup window will subsequently show up declaring the MCS version you are running, at this window, press “OK”. At the third popup window, you will be prompted to enter in your username in order to complete the file pathways that are required for the MCS to function. In this box, enter the computer username, or the name next to the home icon in a Finder window.
  4. Press “OK” and the MCS installation is complete. Close out of the MCS excel file and DO NOT SAVE. NEVER save the MCS excel file even after a successful run or else reinstallation is necessary.

 

How to run MCS

Preparation

In order to run the MCS, a MES file must first be created. A prototype MES file is located in the “Input & Output” folder in the MCS folder structure named “Prototype_MES.” This provides the structure of the input file that the MCS uses during and preceeding a simulation. Prior to performing a simulation, the MES file must be renamed by the user so that it begins with “MES_” thus, the “Prototype_MES” file must be renamed prior to use in a MCS simulation. You can make as many MES files as necessary, but just remember these files MUST begin with “MES_” in order for the MCS to read the file; there are no restrictions on naming after the under slash, but it is advised to stay away from any special characters. Input all parameters into the MES file, and save the file inside the “Input & Output” folder.

Setting up MES INPUT: the <MES_filename> file

The MES spreadsheet contains the input for all parameters required to run a Magma Chamber Simulator (MCS) simulation.

MES Input Instructions

Running

Once a MES file has been created and saved in the “Input & Output” folder, open up the MCS excel file within the “MCS VBL CODE” folder. Again, ENABLE MACROS, and continue through the next prompt by pressing “OK”. Next, open up a Terminal window and create 3 tabs or separate terminal windows. Return to the MCS program, click the “Melts Terminal Commands” button, and select the MELTS version that will be used using the drop down menu. Then, click the “put in clipboard” button for Magma to copy the pathway the MCS will follow in order to interact with the “Magma” folder that is inside the MCS folder structure. Once copied, paste the pathway into one of the terminal windows. Repeat this process with the “Wallrock” and “Recharge” pathways and paste them serially into separate terminal windows.  At this point, three separate terminal windows, for Magma, Wallrock, and Recharge, should be open.

Next, click the “Select MES input file and create new MCS output file” button and the popup window will prompt you to enter a name for the output file that can be no longer than 6 characters in length. This is your (the user) name for the output file that MCS will create for your RnAFC simulation. Next, from the dropdown menu, select the MES_filename file that you want MCS to run and then select “Finish”

Now, select the “Find Wallrock (WR) Solidus” button and wait for MCS to finish this operation. Once it is finished, a popup window will appear and inform you that WR is primed at some T and the mass per cent melt at that T in WR is at some value just above the fmzero that was set in the MES_file. It will also tell you an estimate of the solidus temperature (no liquid present in WR. To move on  select “OK”. Next, click “Run MCS” and the RAFC simulation will begin. Now you must wait for the MCS to compute your RAFC scenario. When the simulation finishes, select “Export Run Results” in order to save the simulation results. The results are stored in the “Input & Output” folder in the MCS file structure and is stored as the filename you gave it during in Step 2.

To access the results, navigate to the MCS folder > Input & Output. Information on reading the OUTPUT file can be found on this website.Remember, the name of the OUTPUT is what you(user) assigned in Step 2 during MCS set-up. The output file will have an echo of your input MES_ filename file. There should never be an ambiguity of which  input goes with which output! IGOR LOVES YOU!

Reading MCS OUTPUT File

MCS Output explanation

Additional Geochemical Codes

The ancestor to the MCS was the EC-RAFC model. The link below allows downloading of the EC-RAFC code. EC-RAFC has now been largely superseded by the MCS. However, for many years it was a popular modeling tool and it provided the essential conceptual backbone to the MCS. Although the EC code has been superseded, much of the geologic discussion and conceptual framework remains valid today nearly a quarter of a century after its conception. The literature references for the EC-RAFC suite of models include:

F.J. Spera, Bohrson, W. A., Till, C.B., Ghiorso, M.S., (2007), Partitioning of trace elements among coexisting crystals, melt, and supercritial fluid during isobaric crystallization and melting American Mineralogist, Vol 92, pages 1881-1898 .

Bohrson, W. A., and F. J. Spera (2007), Energy-Constrained echarge, Assimilation, and Fractional Crystallization (EC-RA/É'/FC): A Visual Basic computer code for calculating trace element and isotope variations of open-system magmatic systems, Geochem. Geophys. Geosyst., 8, Q11003, doi:10.1029/2007GC001781 (PDF file).

Bohrson, W. A., and F. J. Spera (2007), Energy-Constrained echarge, Assimilation, and Fractional Crystallization (EC-RA/É'/FC): A Visual Basic computer code for calculating trace element and isotope variations of open-system magmatic systems, Geochem. Geophys. Geosyst., 8, Q11003, doi:10.1029/2007GC001781 (XLS file).

Spera, F.J., and Bohrson,W. (2004) Open-System Magma Chamber Evolution: an Energy-constrained Geochemical Model Incorporating the Effects of Concurrent Eruption, Recharge, Variable Assimilation and Fractional Crystallization . Journal of Petrology, vol.45, no.12, pp.2459-2480, 

Spera, F. J., and W. A. Bohrson (2002) Energy-constrained open-system magmatic processes 3. Energy-Constrained Recharge, Assimilation, and Fractional Crystallization (EC-RAFC), Geochem. Geophys. Geosyst., 3(12), 8001, doi:10.1029/2002GC000315.

Bohrson, W. A., Spera, F. J. (2001) Energy-Constrained Open-System Magmatic Processes II: Application of Energy-Constrained Assimilation-Fractional Crystallization (EC-AFC) Model to Magmatic Systems. Journal of Petrology, v. 42, p. 1019-1041.

Spera, F. J., Bohrson, W. A. (2001) Energy-Constrained Open-System Magmatic Processes I: General Model and Energy-Constrained Assimilation and Fractional Crystallization (EC-AFC) Formulation. Journal of Petrology, v. 42, p. 999-1018.

The toy model is a a VBL code given in Excel that allows one to engage in open system calculations for any binary eutectic system. The literature reference  for the Toy model is:

Spera, Frank J., Schmidt, J. S., Bohrson, W. A. and Brown G. A., 2016. Dynamics and thermodynamics of magma mixing: Insights from a simple exploratory model. American Mineralogist, Vol. 97, p.1155-1164.

EC-RAFC

EC-RAFC Download

Toy model

Toy model Download