Visco-elasto-plasticity
With cfg.useViscoelastoplastic = true the viscosity built by the rheology is passed through viscoelastoplastic (physics/viscoelastoplastic.jl), which combines it with a Maxwell elastic element and a Drucker-Prager stress cap. In MILEVA elasticity acts as a viscosity reduction. The function returns an effective viscosity, and that viscosity is the only part of the calculation that reaches the momentum equation. The deviatoric stress the function also updates is kept between steps but is not fed back into the momentum equation or into the viscosity.
Physical background
Three ways a rock can deform
Rock in a planetary mantle and lithosphere responds to stress in three distinct ways, and which one dominates depends on temperature, pressure, stress and the time scale of loading (Ranalli 1995; Turcotte & Schubert 2014).
Viscous creep. At high temperature, crystals deform by the slow motion of defects (diffusion and dislocation creep, see flow laws). Stress is proportional to strain rate, and the deformation is permanent. This is the behaviour that lets the mantle convect, with viscosities of order
Pa s inferred for Earth's upper mantle from postglacial rebound (Turcotte & Schubert 2014). Elasticity. On short time scales the same rock behaves as a spring. Stress is proportional to strain, with the shear modulus
as the constant, and the strain is recovered when the load is removed. Seismic waves and the flexure of the lithosphere under volcanoes and at trenches are elastic phenomena. The Preliminary Reference Earth Model gives shear moduli of roughly 65 to 80 GPa in the upper 400 km of the mantle (Dziewonski & Anderson 1981). Brittle failure and plastic flow. In the cold, near-surface part of the lithosphere, rock fails along faults once the shear stress reaches a strength that grows with confining pressure. Laboratory friction experiments show that this strength depends little on rock type. For normal stress below about 200 MPa the shear stress needed for sliding is about 0.85 times the normal stress, and above it about 50 MPa plus 0.6 times the normal stress (Byerlee 1978). Continuum models represent the many faults of a large region as plastic yielding at a stress limit.
A material that shows all three behaviours is called visco-elasto-plastic. The classical picture of lithospheric strength combines them in a strength envelope. Frictional strength rises with depth near the surface, creep strength falls with depth as temperature rises, and the weaker of the two sets the strength at each depth (Goetze & Evans 1979; Kohlstedt et al. 1995).

The three responses with the numbers of this section. Left: elasticity, viscoelastoplastic (20 MPa + 0.2 P, capped at 300 MPa), which is far weaker. The curves evaluate the elementary laws directly. Script: docs/scripts/fig_viscoelastoplastic_sections.jl.
The Maxwell body and the Maxwell time
The simplest model that is elastic at short times and viscous at long times is the Maxwell body, a spring of modulus
Under a constant strain rate the stress builds up as
With
The dimensionless number that compares the two is the Deborah number, the Maxwell time divided by the time scale of the process. In a time-stepping code the natural time scale is the step
A Deborah number

Left: docs/scripts/fig_viscoelastoplastic_sections.jl.
Why plasticity matters for planets
Creep viscosity depends exponentially on temperature, so the cold top of a convecting mantle becomes so stiff that it cannot move, and the mantle convects beneath a stagnant lid (Solomatov 1995; see also rheology). A stress limit lets the lid break where convective stresses exceed its strength. Treating that limit as a viscosity cap,
Elasticity matters less for the mantle than for the lid. It limits the stress a stiff region can build within one step to about

The pseudo-plastic cap on the upper 300 km of a column of 289 cells (10 km each). Dashed: creep viscosity from composite_rheology (yield branch off) on the code's geotherm, which puts the lid at the upper clamp of viscoelastoplastic with a step of 1 Gyr, long enough that elasticity plays no part, so only the cap docs/scripts/fig_viscoelastoplastic_sections.jl.
The Drucker-Prager criterion
The Drucker-Prager criterion (Drucker & Prager 1952) is a pressure-dependent yield condition on the second invariant of the deviatoric stress. It is a smooth approximation of the Mohr-Coulomb law of faulting and is written as a cohesion plus a friction term that grows with pressure. MILEVA uses the form

The yield stress as viscoelastoplastic applies it, read from the stress it returns in cells forced to yield (docs/scripts/fig_viscoelastoplastic_sections.jl.
Effective viscosity
The function works cell by cell in a fixed order. It first softens the viscosity with a spring in series (the Maxwell viscosity), uses it to estimate the stress the cell would carry, and compares that stress with the strength of the rock at the cell's depth. A cell whose stress would exceed that strength has its viscosity lowered until the stress equals the strength. The function then advances the stored stress, applies the global viscosity bounds, and hands the viscosity to the Stokes solve.
The stages of viscoelastoplastic for three cells of one column of 289 cells with a time step of 5 kyr and the default parameters: a lid cell at 15 km depth (docs/scripts/fig_viscoelastoplastic_pipeline.jl.
For each cell, with
The Maxwell viscosity
The yield stress is a Drucker-Prager law on a lithostatic pressure,
with mat.cohesion_upper, mat.friction_upper and mat.maxYieldStress at every depth, and
otherwise
The symbols of this page, with their units and where each value comes from:
| symbol | meaning | unit | source in MILEVA |
|---|---|---|---|
| viscous viscosity of the step, before this function | Pa s | ETA from the simple or composite path | |
| second invariant of the strain-rate tensor, | s | strainII of the previous step | |
| time step | s | dt of the previous step | |
| shear modulus | Pa | 80 GPa, fixed in the function | |
| Maxwell (viscoelastic) viscosity | Pa s | computed | |
| stress the cell would carry at | Pa | computed | |
| cohesion and friction coefficient | Pa, - | mat.cohesion_upper, mat.friction_upper | |
| reference density, gravity, depth of the cell centre | kg m | cfg.rho0, cfg.g, uniform grid | |
| upper limit of the yield stress | Pa | mat.maxYieldStress | |
| yield stress | Pa | computed | |
| effective viscosity passed to the Stokes solve | Pa s | returned | |
| stored scalar stress before and after the step | Pa | tau_vep |
Read together, the two equations above make
Stress update
The function also advances a scalar stress per cell, held by the driver in the grid array tau_vep (zero at the start of the run):
Under a constant strain rate this relaxes toward

A stress of 2 MPa stored in a column at viscoelastoplastic repeatedly with zero strain rate and time steps of 0.1, 1 and 2.5 Maxwell times. The update multiplies by docs/scripts/fig_viscoelastoplastic_sections.jl.
What enters the momentum equation
| quantity | used by the Stokes solve |
|---|---|
| yes, as the viscosity of the step | |
tau_vep) | no; it is passed back as |
| elastic mask (Deborah number | no; returned and not used by the driver. The elastic mask marks the cells whose Maxwell time is longer than the step, the elastic ones in the sense of the Deborah number above |
There is no elastic stress-history term on the right-hand side of the momentum equation, so material does not recover elastic strain. tau_vep is a cell field, not a marker field. It stays at its grid position, is not advected, and is not written to checkpoints or VTK output.
In the time loop. viscoelastoplastic is called in step 2 of main_SphCon.jl, after the simple or composite viscosity and before damage, when composite_rheology in every sweep after the first and reapplies only the damage factor, so the solve that ends a multi-sweep iteration uses the viscosity without the Maxwell and plastic reduction of this page. The composite path has its own Drucker-Prager branch with strain weakening; the cap here is a second, independent one with the upper-mantle parameters and no temperature gate.

viscoelastoplastic called repeatedly on a column of 290 cells at constant strain rate tau_new for four time steps, against the analytic Maxwell build-up
Assumptions and simplifications
The function is a deliberately reduced form of visco-elasto-plasticity. Each simplification below follows from the code and has a reason.
Elasticity as a viscosity reduction only. A full viscoelastic formulation evaluates the trial stress as
plus a term proportional to the stress of the previous step, and adds the advected old stress to the right-hand side of the momentum equation (Moresi et al. 2003; Gerya & Yuen 2007). MILEVA's trial stress is alone, and the momentum equation contains no stress-history term. The model therefore captures the time-step-limited stress of stiff cells but not elastic flexure or the recovery of elastic strain. For mantle convection over millions of years this is the regime that matters most: at Pa s and a 10 kyr step, , so a mantle of that viscosity relaxes within a step. Cells stiffer than , about Pa s at 10 kyr, have ; the figure below shows where that happens with the default creep laws. A scalar, Eulerian stress.
tau_vepis one number per cell rather than a stress tensor, and it is not carried with the material. This is consistent with its role, since it does not reach the momentum equation.Lithostatic pressure in the yield law. The pressure is
on a uniform radial grid, not the dynamic pressure of the Stokes solution and not the pressure on a stretched grid. This keeps the yield stress a fixed, smooth function of depth that cannot feed back on the flow through the pressure. One set of yield parameters. Cohesion and friction are the upper-mantle values at every depth and in every material, with no temperature gate and no strain weakening. In practice the 300 MPa cap sets the strength below about 43 km with the defaults. In convecting mantle the stress is far below any of these values. At
Pa s and s it is 2 MPa, so the cap acts only in the lid. A constant shear modulus.
GPa is a representative upper-mantle value. It enters only through and the relaxation factor, and matters only in cells with near or above one. Lagged strain rate.
and are those of the previous step, so the viscosity cap is explicit in time.

Where the elastic reduction acts. Left: the Deborah number composite_rheology (yield off, default clamps, viscoelastoplastic marks as elastic. Right: the ratio docs/scripts/fig_viscoelastoplastic_sections.jl.
Scope
The page describes an optional reduction of the viscosity, off by default. It is not a substitute for a viscoelastic formulation with stress advection when elastic flexure or stress transfer is the subject of a study.
2-D and 3-D
The function accepts 2-D and 3-D cell arrays; the pressure column is broadcast over

The same column (creep viscosity of the figure above, viscoelastoplastic as a docs/scripts/fig_viscoelastoplastic_sections.jl.
Configuration
| field | default | meaning |
|---|---|---|
cfg.useViscoelastoplastic | false | apply the Maxwell and plastic reduction |
mat.cohesion_upper | 20 MPa | cohesion |
mat.friction_upper | 0.2 | friction coefficient |
mat.maxYieldStress | 300 MPa | cap |
cfg.eta_min, cfg.eta_max | clamps on | |
cfg.rho0, cfg.g | 3300 kg m | lithostatic pressure of the cap |
The shear modulus (80 GPa) is fixed in the function.
Where in the code
| What | File, function |
|---|---|
| Maxwell viscosity, cap, stress update | physics/viscoelastoplastic.jl: viscoelastoplastic |
call, tau_vep storage | main_SphCon.jl, step 2 |
| the composite path's own yield branch | physics/composite_rheology.jl: composite_rheology |
Tests
tests/test_config_matrix.jl: visco-elasto-plasticity is off by default.
Key references
Moresi, L., Dufour, F. & Mühlhaus, H.-B. (2003). A Lagrangian integration point finite element method for large deformation modeling of viscoelastic geomaterials. J. Comput. Phys. 184, 476-497. doi:10.1016/S0021-9991(02)00031-1
Gerya, T. V. & Yuen, D. A. (2007). Robust characteristics method for modelling multiphase visco-elasto-plastic thermo-mechanical problems. PEPI 163, 83-105. doi:10.1016/j.pepi.2007.04.015
Drucker, D. C. & Prager, W. (1952). Soil mechanics and plastic analysis or limit design. Q. Appl. Math. 10, 157-165. doi:10.1090/qam/48291
Further reading
Byerlee, J. (1978). Friction of rocks. Pure Appl. Geophys. 116, 615-626. doi:10.1007/BF00876528
Dziewonski, A. M. & Anderson, D. L. (1981). Preliminary reference Earth model. Phys. Earth Planet. Inter. 25, 297-356. doi:10.1016/0031-9201(81)90046-7
Gerya, T. (2019). Introduction to Numerical Geodynamic Modelling, 2nd ed. Cambridge University Press. doi:10.1017/9781316534243
Goetze, C. & Evans, B. (1979). Stress and temperature in the bending lithosphere as constrained by experimental rock mechanics. Geophys. J. Int. 59, 463-478. doi:10.1111/j.1365-246X.1979.tb02567.x
Kohlstedt, D. L., Evans, B. & Mackwell, S. J. (1995). Strength of the lithosphere: constraints imposed by laboratory experiments. J. Geophys. Res. 100, 17587-17602. doi:10.1029/95JB01460
Moresi, L. & Solomatov, V. (1998). Mantle convection with a brittle lithosphere: thoughts on the global tectonic styles of the Earth and Venus. Geophys. J. Int. 133, 669-682. doi:10.1046/j.1365-246X.1998.00521.x
Ranalli, G. (1995). Rheology of the Earth, 2nd ed. Chapman & Hall.
Solomatov, V. S. (1995). Scaling of temperature- and stress-dependent viscosity convection. Phys. Fluids 7, 266-274. doi:10.1063/1.868624
Tackley, P. J. (2000). Self-consistent generation of tectonic plates in time-dependent, three-dimensional mantle convection simulations. Geochem. Geophys. Geosyst. 1. doi:10.1029/2000GC000036
Turcotte, D. L. & Schubert, G. (2014). Geodynamics, 3rd ed. Cambridge University Press. doi:10.1017/CBO9780511843877