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

Fractional Crystallization in MELTS

Started by agion, July 17, 2023, 07:36:50 AM

Previous topic - Next topic

agion

When running a fractional crystallization model in MELTS for MATLAB is it possible to determine when during the process the solids are removed from the system? At the moment it seems like the solids are removed after each equilibration, but is it possible to change this to remove the solids after adding the next node? Or should I simply perform the calculation with fractionation turned off and manually remove the solids from the bulk composition at each node?

Thanks,
Austin

Paula

From MELTSengine.m (these refer to runMode and outputFlag, which are the first and second codes that you input):

Quote% Calculation mode is set in parent MELTSdyanmic list: 1. rhyolite-MELTS 1.0.2; 2. pMELTS; 3. rhyolite-MELTS 1.1.0; 4. rhyolite-MELTS 1.2.0.
% Output is post-equilibration / pre-fractionation (1) by default, but calculation can also be batch, no fractionation (0), or output can be after fractionation (2).

The value of outputFlag affects what ends up in quantities labelled as OUTPUT only in the MELTSengine.m comments. Quantities that are labelled "INPUT and OUTPUT" will always be updated based on the last thing to happen. So by default (outputFlag=1) the bulkComposition variable will be the values after fractionation, whereas dispComposition("bulk") will be the values after equilibration and before fractionation (similar to what goes into the text output).

When you add a node it will inherit the (post-fractionation) bulkComposition values and the dispComposition("bulk") values will be reset (unless you use copyAndKeepOutput). If this isn't the order of events that you need then you can try calling calcEquilibriumState twice and add the new node in between e.g:

  • 1st time outputFlag = 0: only equilibrium state is calculated and everything is pre-fractionation
  • 2nd time outputFlag = 1: bulkComposition is post-fractionation, dispComposition("bulk") is post-equilibration / pre-fractionation

Or:

  • 1st time outputFlag = 1: bulkComposition is post-fractionation, dispComposition("bulk") is post-equilibration / pre-fractionation
  • 2nd time outputFlag = 2: everything is post-fractionation (so you can see the small amounts of fractionating phases that are retained by the system)

Either way, the equilibration in the second call to calcEquilibriumState is trivial and shouldn't affect the run speed (but if it does, please let me know).

Hope that helps,
Paula

agion

Paula,

Thank you for the advice. Your first suggestion for the output flags is working well. I have not noticed any problems with the run speed and all the calculations have been stable.

Thanks,
Austin