##################### Melting and freezing ########################

# Because the model includes reactions that might be on a faster time scale
# than the time step of the model (melting and the freezing of melt), we use
# the operator splitting scheme.
set Use operator splitting                     = true

subsection Solver parameters
  subsection Operator splitting parameters
    # We choose the size of the reaction time step as 200 years, small enough
    # so that it can accurately model melting and freezing.
    set Reaction time step                     = 2e2

    # Additionally, we always want to do at least 10 operator splitting time
    # steps in each model time step, to accurately compute the reactions.
    set Reaction time steps per advection step = 10
  end
end

# We use the melt simple material model that includes melting and freezing of
# melt for an average mantle composition that is characteristic for a mid-ocean
# ridge setting, and mainly use its default parameters.
# In particular, we have to define how fast melting and freezing should be.
# We assume that both reactions happen on a time scale of 200 years (or a rate
# of 5e-3/year), which should be substantially shorter than the time step size,
# so that the melt fraction will always be close to equilibrium.
# As the model includes melting and freezing, we do not have to extract any melt.

subsection Material model
  set Model name = melt simple

  subsection Melt simple
    set Reference permeability = 1e-7
    set Melt extraction depth = 0.0
    set Freezing rate         = 0.005
    set Melting time scale for operator splitting = 2e2
  end
end
