News:

alphaMELTS 2.3 standalone & for MATLAB/Python is now open source and available on GitHub (https://github.com/magmasource/alphaMELTS).
alphaMELTS 1.9 is available at the legacy download and information site.
For news of all MELTS software see the MELTS Facebook page.

Main Menu

[EX] CORBA MELTS version of tutorial: 'Quick start using MELTS'

Started by Paula, June 22, 2012, 05:08:20 PM

Previous topic - Next topic

Paula

This topic will show you how to work through one page of the (old) MELTS tutorial, using the CORBA MELTS web applet:

Testing MELTS installation using the sample input file - Try this first

The page is part of the 'Getting Started: Testing and Examples' section of the MELTS manual, written by Mark Ghiorso for the original graphical-user-interface (GUI) version. The idea of this topic is to show similarities and differences between the CORBA MELTS interface and the downloadable GUI programs and as a comparison with the alphaMELTS and older adiabat_1ph versions of the same tutorial. This post is for the alpha release of CORBA MELTS and will be updated if there are any future changes.

As CORBA MELTS is still being developed and tested, there are a few bugs in the front-end. Rest assured that the results of the thermodynamic calculations are just as reliable as with other versions of MELTS and that most of the quirks in the interface can be easily worked around. CORBA MELTS is great for one off calculations on any operating system when you don't want to go to the trouble of downloading the installing one of the alternatives. For Windows it is the only up to date graphical user interface. However, at present only the MELTS liquid calibration is available and if the server load is heavy it can be slow. So if you need to use pMELTS or rhyolite-MELTS, or if you have a lot of MELTS calculations to perform, then consider using a downloadable version of MELTS. This links page summarizes the download options and installation procedures for GUI versions of MELTS, as well as offering alternative strategies for Windows users. The screen output in this particular example is from Firefox running on a Mac but almost all the information applies for using CORBA MELTS with other popular browsers and on Windows and Linux operating systems.

This example uses an input file that has been modified from the Morb.melts file used in the original tutorial. The modifications simply bring it up to date with the latest GUI versions of MELTS and do not affect software results. Early versions of the MELTS software used a 'Mode: Fractionation' line in the input file to to select fractional crystallization, whereas in later versions this is replaced by 'Mode: Fractionate Solids'. Also some phases were suppressed in the original tutorial because the solid solution models were still being developed / tested. None of the phases are stable for the run conditions of the tutorial example, so suppressing these phases has no effect. However, the 'Suppress: …' lines can cause read errors as the names of some phases have changed slightly since (see here).

If you have downloaded and installed alphaMELTS then the modified Morb.melts file will be in the installation folder and you can copy it from there. Otherwise, you can download Morb.txt by following the link at the end of this post and (optionally) rename it as 'Morb.melts'. Note that the version of Morb.melts available on the MAGMA Source server is the same except that it has Windows line endings but the morb.melts version linked on the Mac OS X download site differs slightly in Cr2O3 content and in the P-T conditions.

When the original tutorial was written there was only one liquid calibration (i.e. MELTS) and so the software could be started by double-clicking it. As CORBA MELTS also only has the MELTS liquid model implemented (so far) you can simply navigate to the CORBA MELTS page and, assuming your web browser has a suitable version of the Java Runtime Engine (JRE), the applet will start automatically. There will be a short wait. If after a reasonably amount of time nothing is happening on Windows then check whether Java is running in Task Manager; if so, try killing the java.exe process and reloading the page. You should see a pop-up something like this:


Click 'Allow', 'Accept' or 'Run' as appropriate and a new window will open. At first it will be tiny with nothing in it but after a while the whole graphical user interface, or rather most of it, will pop up like this:


If you are on a laptop with a smallish screen this will not look very promising. Actually you only need to expand the the window width very slightly, by dragging on the bottom right-hand corner, and the menu options (top) and phase properties panel (bottom) will magically appear. You can resize the window properly after that:


Phew that look better! The next thing you will notice is that the great big AFM plot shown in the original screentshot is missing. Don't get your hopes up with the 'Graphics Display Window' button either as that option has not yet been implemented. In fact, the graphics are disabled in all current GUI versions of MELTS and rhyolite-MELTS but there are many different tools widely available for plotting the MELTS results. The other Icons don't do much either, unfortunately, but you can find links to the Supplemental Calculator (a.k.a the Phase Properties calculator) here and a text editor or spreadsheet program can be used to open the output file.

O.K. that's most of the bad news over, it should be (almost) plain sailing from now on!

CORBA MELTS opens with an initial bulk composition and P-T conditions already loaded. There are only a few differences compared to what we need, but for consistency with the other versions of the tutorial we will read in the Morb.melts / Morb.txt file by selecting 'Commands' and the 'Open...'. The pop-up dialogue will look quite different to the one for the downloadable GUI -- more Windowsy and less Unixy -- but should be fairly self-explanatory. It will start in the users home space on Mac or Linux and in "My Documents" (XP) or "Documents" on Windows. By default the program looks for .melts files (or whatever it was last looking for), so if your input file is still called Morb.txt then select 'All Files'. CORBA MELTS is much more tolerant of line endings than other GUI versions of MELTS. So if you get an error message during the file read then you probably have an incompatible 'Suppress: …' line that you can delete; in many cases, the bulk composition will still be read in correctly but you will need to check the P-T conditions are set correctly by selecting 'Intensive Variables…' then 'T, P…'. Note also that an outdated 'Mode: Fractionation' line does not cause an error in CORBA MELTS but is ignored. Either way, it's a good idea to check that fractional crystallization is switched on by selecting 'Fractionate Solids' under the 'Options' menu.

Although the front-end program looks a little different to the one in the original tutorial, the settings for the underlying MELTS algorithm should now the same as described in the 'Four things have been accomplished:' list there.  If you have not already done so, you can verify that the P-T conditions are set correctly by selecting 'Intensive Variables', then 'T, P …'.

Follow the instructions to find the liquidus temperature. The program will ask for a name and location for the output file - equivalent to melts.out in the downloadable GUI programs. It will default to using the last accessed file, so you will need to change it (including, for example, changing '.melts' to '.out') to avoid overwriting the input file. Note that the Solids Display panel is a little buggy in CORBA MELTS; the first three columns should be fine but some of the formulas, mole frac and component columns are incorrect or mixed up. The new few steps in the tutorial can be followed as is, except that the 'Execute/Halt' menu option is replaced by 'Equilibrate'. If you get a message like 'Cannot create file' then check whether another other program (e.g. Excel) is accessing file; this is most often a problem on Windows.

After a while CORBA MELTS will stop with an error:


It is relatively easy to recover from this error using a strategy that is useful in all versions of MELTS (it just happens that the other versions of MELTS don't need it for this particular example). Choose 'Save As' from the 'Commands' menu and save the current bulk composition as Morb2.melts (or Morb2.txt if you prefer). Open the file with a text editor; keep the CORBA MELTS window open while you do this so that it will continue to use the same output files once you restart it. The file will look something like this:

Quote
Title: File created by MELTS/pMELTS CORBA client. v.0.8, August 2007.
Initial Composition: SiO2 13.833550385041853
Initial Composition: TiO2 0.7244205632661624
Initial Composition: Al2O3 3.381565973034754
Initial Composition: Fe2O3 0.551148069556408
Initial Composition: Cr2O3 6.303078692489113E-7
Initial Composition: FeO 4.221936773644614
Initial Composition: MnO 0.0
Initial Composition: MgO 1.1109891917818555
Initial Composition: NiO 0.0
Initial Composition: CoO 0.0
Initial Composition: CaO 2.1115840375626767
Initial Composition: Na2O 1.4052510544180477
Initial Composition: K2O 0.02681028845459995
Initial Composition: P2O5 0.08
Initial Composition: H2O 0.2
Initial Composition: CO2 0.0
Initial Composition: SO3 0.0
Initial Composition: Cl2O-1 0.0
Initial Composition: F2O-1 0.0
Initial Temperature: 1200.0
Final Temperature: 1000.0
Increment Temperature: 3.0
Initial Pressure: 500.0
Final Pressure: 500.0
Increment Pressure: 0.0
dp/dt: 0.0
Increment Enthalpy: 0.0
dp/dH: 0.0
Increment Entropy: 0.0
dp/dS: 0.0
Increment Volume: 0.0
dt/dV: 0.0
log fo2 Path: None
Suppress: cummingtonite
Mode: Fractionate Solids

It seems Cr2O3 is almost exhausted but, for whatever reason, it does not quite fall below the threshold at which point CORBA MELTS would zero the component out. Instead, we will manually set it to zero. Replace '6.303078692489113E-7' with '0.0' in the 'Initial Composition: Cr2O3' line and also insert the current temperature (which you can get from the System Properties display) in the 'Initial Temperature' line. Save Morb2.melts / Morb2.txt, close the text editor and then open the new input file in CORBA MELTS as before. There is one last minor wrinkle with the interface: 'Fractionate Solids' seems to be a toggle in CORBA MELTS. So reading in the second file may have turned it off! Check and, if necessary, turn it back on by selecting 'Options', and then 'Fractionate Solids'. Choose 'Equilibrate' again and the program should run all the way down to the minimum temperature. When it is finished the program window will look like this:


There is no 'Exit' option under 'Commands', so just close the window. As with the downloadable GUI and alphaMELTS runs there will be slight discrepancies between the newly generated output file and the original output file. The most striking differences are just formatting ones - the downloadable graphical user interfaces (old and new) use mol % of end members, where CORBA MELTS uses mole fraction of end members and also displays the wt % oxide compositions. The phase compositions are essentially the same though and differences in the phase masses are a few hundredths of a gram, at most.

If there are any problems or feedback about this post then please let me know.

Cheers!
Paula