# Using a free surface in a model with a crust
*This section was contributed by William Durkin*.
This cookbook is a modification of the previous example that explores changes
in the way topography develops when a highly viscous crust is added. In this
cookbook, we use a material model in which the material changes from low
viscosity mantle to high viscosity crust at $z = z_j = \texttt{jump height}$,
i.e., the piecewise viscosity function is defined as
```{math}
\begin{aligned}
\eta(z) = \left\{
\begin{matrix}
\eta_U & \text{for}\ z > z_j, \\
\eta_L & \text{for}\ z \le z_j.
\end{matrix}
\right.
\end{aligned}
```
where $\eta_U$ and $\eta_L$ are the viscosities of
the upper and lower layers, respectively. This viscosity model can be
implemented by creating a plugin that is a small modification of the `simpler`
material model (from which it is otherwise simply copied). We call this
material model "SimplerWithCrust." In particular, what is
necessary is an evaluation function that looks like this:
``` c++
template
void
SimplerWithCrust::
evaluate(const typename Interface::MaterialModelInputs &in,
typename Interface::MaterialModelOutputs &out ) const
{
for (unsigned int i=0; ijump_height)
out.viscosities[i] = eta_U;
else
out.viscosities[i] = eta_L;
out.densities[i] = reference_density * (1.0 - thermal_expansion_coefficient * (in.temperature[i] - reference_temperature));
out.thermal_expansion_coefficients[i] = thermal_expansion_coefficient;
out.specific_heat[i] = reference_specific_heat;
out.thermal_conductivities[i] = thermal_conductivity;
out.compressibilities[i] = 0.0;
out.entropy_derivative_pressure[i] = 0.0;
out.entropy_derivative_temperature[i] = 0.0;
for (unsigned int c=0; c
Adding a viscous crust to a model with surface topography. The thermal anomaly spreads horizontally as it collides with the highly viscous crust (left, white solid line). The addition of a crustal layer both dampens and delays the appearance of the topographic maximum and minimum (right).
```