This article introduces the software Melange, a 3D lattice-particle hybrid model. The software was specifically designed in order to simulate ductile visco-elasto-plastic deformation and can be used to study tectonic processes in the lithosphere from the micro to the macro scale. Melange is under an open source license. The code takes both relevant yield mechanisms for the deformation of lithospheric material into account: dynamic brittle failure and ductile creep, where ductile creep is modeled as viscoelasticity. The software considers effects of the local geology, of the inherent disorder of geomaterials, of rheological layering of the lithosphere and applies repulsion when the material fractures. Driving forces are the externally applied strain and the gravitational load. Melange applies an elastically isotropic regular 3D lattice with HCP geometry and next-nearest neighbor interactions. Young's modulus, viscosity, material density and system size can be freely chosen. Poisson's ratio is restricted to values <0.25. The most important innovation of the software is a physically consistent scheme to model viscoelasticity in a lattice-particle model. The scheme couples the local lattice-geometry to the time-dependent volume-conservative viscoelastic deformation of particles. The procedure achieves the typical viscoelastic stress-strain relationship. The article incorporates a number of benchmark simulations, where the model output is being tested and evaluated. The results obtained with Melange show strong similarities with the benchmark values, e.g., stress fields in crack vicinity. Geologically relevant examples include structures associated with the brittle-ductile transition, growth of wing cracks and brittle graben formation.
If you can't find a tool you're looking for, please click the link at the top of the page to "Go to old article view". Alternatively, view our Knowledge Base articles for additional help. Your feedback is important to us, so please let us know if you have comments or ideas for improvement.
 In this article we introduce the computer software Melange, a 3D viscoelastic hybrid model which couples a regular lattice with a discrete particle approach. Melange was specifically developed to simulate deformation processes of the lithosphere, but it can also be used to model small and medium scale processes. In this article we describe the principles of the program and present benchmarks and example simulations on the micro and macro scale. Melange is open source and licensed under the GPL.
 While the uppermost part of the lithosphere compensates stress mainly with brittle failure, the middle and the lower lithosphere react with ductile creep. Consequently a consistent model of the lithosphere should take both modes of deformation into account. A further complication in the modeling of a realistic material behavior is the adequate consideration of material inhomogeneities, which exist as inherent disorder as well as large coherent bodies.
 Lattice models simulate the underlying physics on the level of micro-mechanical interaction rules between nodes, thus permitting the modeling of discontinuities [O'Brien, 2004, 2008; Ostoja-Starzewski and Wang, 2006]. The basic idea of discrete particle methods is similar to the idea behind molecular dynamics simulations [Greenspan, 1981; Wang et al., 2009]. However, instead of simulating single atoms or molecules, particles represent finite quantities of material. The combination of discrete and lattice models into hybrid models offer an interesting alternative to continuum models [Buxton et al., 2001; Wang et al., 2009], which treat the discontinuous nature of joints and dynamic fracture formation not always in a satisfactorily way [Gölke and Mechie, 1994; Regenauer-Lieb and Yuen, 2003; Schreurs et al., 2006].
 The discrete features of particles permit the simulation of heterogeneous materials, while the spring lattice enables the modeling of dynamic brittle failure. However, previously published regular lattice-particle models did have shortcomings which made them difficult to apply to geological processes. These shortcomings consisted mainly of the missing macroscopic elastic isotropy in most regular elastic 3D lattices [Wang and Mora, 2008] and of the missing volume-conservative viscoelastic creep [Buxton et al., 2001].
 Melange solves the problem of elastic lattice anisotropy with a next-nearest neighbor hexagonal close packed geometry. Viscoelastic volume conservation is attained on the basis of a combination of particle and lattice properties. Other special features of Melange include the consideration of shear failure of lattice elements – a common failure mechanism in the crust – in addition to the commonly implemented tensile failure. Elastic properties, namely the Poisson's ratio and the Young's modulus, are adjustable and repulsive forces between unconnected particles are considered.
 The code is written in C++ and runs parallelized on SMP architectures. Experiments are setup with the Python scripting language via a built-in Python API.
 The regular HCP NNN model has two distinctive advantages over NN lattice models. Most importantly the NNN structure generates macroscopic elastic isotropy of the lattice structure (Appendix A), while elastic anisotropy is a key disadvantage of three dimensional NN models [Wang and Mora, 2008]. A second key advantage is the significant reduction of effects caused by the lattice geometry, the so-called mesh bias [Schargott et al., 2007].
 The reduction of mesh bias as a result of the superposition of different regular lattice geometries has been discussed and demonstrated before [Ostoja-Starzewski, 2002; Dubus et al., 2006; Schargott et al., 2007; Wang et al., 2009]. Similarly, mesh bias in NNN HCP models is reduced, resulting from the superposition of different symmetry planes of the nearest and of next-nearest neighbor structures. However, a thorough and detailed testing of the mesh bias in case of the NNN HCP lattice has not yet been done.
 Many hybrid NN models circumvent the stated problems by using randomized lattice structures [Abe et al., 2004, 2006]. However, this technique has the inherent disadvantage that macroscopic elastic properties of the resulting lattice structure cannot be analytically predicted. Also the significance of random distributions – for instance inherent disorder which is often modeled as a Gaussian distribution of the elastic parameters – is reduced if the lattice structure is irregular.
 Discrete particles in Melange serve various purposes. They allow the definition of material properties for discrete volume elements and offer a straightforward way to model material heterogeneities, either as inherent disorder or as coherent bodies. They are also the basis for the calculation of repulsive forces once a spring is broken and are fundamental for the calculation of the effects of viscoelastic creep, as described in greater detail below.
2.2. General Procedure and Boundary Conditions
 In Melange, elastic relaxation and fracturing are assumed to occur instantaneous. External strain is applied by moving the outer system boundaries so that a new equilibrium configuration for the lattice has to be determined. The viscoelastic deformation routine requires that a time scale is associated with a strain increment.
 To achieve viscoelastic material behavior, the forces acting between two interacting nodes must be adjusted for the appropriate viscoelastic body [O'Brien, 2008]. Most lattice models introduce time dependent material parameters for this purpose [Buxton et al., 2001; O'Brien, 2004]. However, none of the published schemes is volume conservative, a precondition to model near-static tectonic systems that consider permanent forces as the gravitational load and externally imposed strain. To overcome the problem of volume conservation Melange alters the network geometry and the shape of particles on a particle basis, with respect to the local deviatoric stress tensor. The scheme is explained in greater detail in section 2.4.
 We implemented several different boundary conditions in Melange. Periodic boundaries comprise a setup where particles located on system boundaries are connected to particles on the opposite side of the system (Figure 3). Such a setup mimics very large systems and minimizes the influence of the system boundaries on results in most cases. In an alternative setting particle movements at sidewalls are inhibited or elastic walls are implemented, which form system boundaries and exert an elastic counter force on particles. If gravity is present in a simulation – the standard case for large-scale models – particles at the bottom of the system cannot be displaced to positions below the underlying system boundary but are otherwise unconstrained. No restrictions apply to the displacement of particles at the top of the lattice in this case, permitting the development of topography.
 A short description of the program design and implementation details is given in Appendix E.
2.3. Elastic Lattice Component
 Melange employs an over-relaxation algorithm in order to calculate a new equilibrium configuration [Allen, 1954]. This iterative scheme moves nodes according to the force acting on them (section 2.3.2). Force equilibrium is assumed once all nodal displacements Δunode remain below a predefined threshold. A new equilibrium configuration has to be calculated after externally applied strain increments or due to viscoelastic creep.
 Fractures form if either the tensile stress or the shear stress acting on a spring between two nodes exceeds a yield value. Once a spring breaks, it is removed from the model so that tensile or shear interaction between the affected nodes is no longer possible. However, they still retain the capacity for repulsive interactions if particles are pushed into each other.
 Many lattice models mimic tensile failure only and form fractures if a spring exceeds a critical tensile stress σcrit [Monette and Anderson, 1994; Malthe-Sørenssen et al., 1998; Flekkøy and Malthe-Sørenssen, 2002; Koehn et al., 2006]. However, a tensile breaking condition alone is not sufficient to describe brittle failure in the Earth's lithosphere, where the rheology and the inherent gravitational load favor shear failure. To model shear failure Melange applies the Mohr-Coulomb criterion, which considers both, friction and cohesion. The critical shear stress of a spring is given by
where ϕ is the angle of internal friction, is the normal stress acting on a spring r with equilibrium position r0, and c is the cohesion [Jiang and Xie, 2011]. The cohesion c can be derived from the tensile strength by [Jiang and Xie, 2011]:
 Using equations (1) and (2) the brittle yield strength is completely defined by the tensile strength and the angle of internal friction. In micro scale simulations it is sufficient to apply the known tensile strength of the material and a suitable angle of internal friction. In crustal scale simulations it is often useful to increase the tensile strength artificially in order to prevent the formation of small scale faults.
2.3.2. Forces Acting on a Node and Nodal Displacement
 The total force acting on a node consists of three components: the force exerted by connected nodes (fc), the repulsive force exerted by unconnected particles (fr) and the gravitational load of the particle (fg):
The shear force and the normal force acting on a single spring are calculated from the relative displacement in the normal and in the tangential direction of the neighbor node. The normal force is fn = knΔun and the shear force is fs = ksΔus. Δun and Δus are the normal and the tangential displacement of the neighbor node with reference to the equilibrium position r0 (Figure 4). Relative equilibrium positions of neighbor nodes in the initial and undeformed lattice are given in Appendix A. kn and ks denote spring constants for normal and shear interactions. The superscripts α and β indicate parameters related to nearest or next nearest neighbors, respectively. The total force over all connected springs is:
Δun and Δus can be efficiently calculated from the normalized spring vector and the total displacement Δu of a neighbor node by:
Once the spring between two nodes is broken only repulsive normal forces between particles are considered, no shear forces. The total force exerted on a particle by its unconnected neighbors is thus:
where the sum is over all unconnected particles in contact. The implementation in Melange considers viscoelastic deformation of the particle shape, as further explained in section 2.4. The scaled gravitational load acting on a node is calculated from the density ρ, the acceleration due to gravity g, the real volume of the associated particle VR and a scale factor s as
s must consider the low packing density of spherical particles arranged in a HCP matrix, which is only ∼0.74. To correct for a dense material equation (8) assumes a space filling hexagonal prismatic shape for real-world particles with a hexagonal base area and volume . The base area of model particles AM is circular.
 The factor χ in equation (8) is necessary to transform the theoretical one dimensional lithostatic stress into vertical strain within a three dimensional solid. The transformation uses the relation with
derived from as given in uniaxially compressed isotropic linearly elastic solids [Lai et al., 1996].
 The displacement of the node is finally calculated by [Davies, 1980],
where ktot is the sum over all spring constants used in the calculation of ftot.
2.3.3. Nodal Stress Tensor
 The stress field is a result of the lattice deformation. The total stress tensor at a node has contributions from the forces exerted by connected and unconnected neighbor particles. Gravity does not directly contribute to the stress, but deformation caused by the gravitational load. Thus:
with the total stress tensor, the stress caused by connected particles and the stress caused by repulsion from unconnected particles.
 Considering static equilibrium the spring force can be transformed into normal and shear stress on an arbitrary plane transecting the spring by and [Roylance, 2001b]. A is the area of a section through a particle, which is identical to the spring thickness, fn the normal force parallel to the spring extension and the angle θ is between the spring vector and the vertical (Figure 5).
 Expanding this relation to the 3D stress tensor and including shear forces can be expressed in tensor notation as follows:
where AM is the cross-sectional area of the particle and are the components of the normalized spring vector. Similarly, compressive stress exerted by unconnected particles is:
where the sum is over all unconnected particles exerting a repulsive force and are the components of the normalized position vector.
 Amount and orientation of the three principal stresses are given by the eigenvalues and the eigenvectors of the stress tensor. The deviatoric stress tensor tensor can be calculated by , where δij is the Kronecker delta [Sadd, 2005].
2.3.4. Macroscopic Elastic Properties
 The derivation of the macroscopic elastic properties of the isotropic NNN HCP lattice is given in Appendix A. The spring constants for normal ( ) and shear ( ) displacements of nearest neighbor springs are
 It is a precondition for lattice isotropy that the spring constants for the displacement of next nearest neighbors are defined as and .
 The shear modulus G for the given spring constants is:
The Poisson's ratio í of the lattice is limited to values <0.25. υ of lithospheric rocks is typically between 0.05 and 0.3 [Fossen, 2010].
2.4. Viscoelastic Component
2.4.1. General Scheme
 The basic idea behind the viscoelastic relaxation routine is the calculation of new equilibrium positions for the neighbor nodes of particles and of the particle shape (Figure 6). The deformation is controlled by the local symmetric stress tensor and retains the volume of individual particles. The technique is applicable to both, nearest and next-nearest neighbors.
 The forces acting on a particle are controlled by two different properties. First by the equilibrium position of neighbor nodes, which is the position were neither a normal force nor a shear force is exerted on the connecting spring. The second important property is the shape of the spherical or ellipsoidal particle hull, which is essential for the calculation of the repulsive force between unconnected particles.
 The internal description of the particle shape applies the positive definite matrix A, which defines an ellipsoid if xTAx = 1. Initially, A equals the unit matrix and describes the spherical particle shape prior to deformation. Figure 7 illustrates the evolution of the particle shape due to repulsion in a simplified setting.
 Both, the particle shape and the equilibrium position of connected neighbors are affected by viscoelastic deformations. The related calculations are performed using a transformation matrix T and the time step associated with the external deformation. A full derivation of the viscoelastic transformation matrix for individual particles and proof of the volume conservation is given in Appendix B.
 The scheme can be classified as non-iterative explicit, due to the coupling of an analytical solution for the particle deformation with finite time steps. The possible error associated with the scheme is strictly limited, because displacements calculated from T converge for large time steps, as demonstrated in Appendix B.
2.4.2. Viscoelastic Displacement of Equilibrium Positions of Neighbor Nodes
 The calculation of the new equilibrium position has to consider both, the local stress tensor at the node and at the respective neighbor node. Melange considers the spring vector to be composed of two independent segments s1, s2 (Figure 8, top) for this purpose. s1 is the distance from the lattice node to the particle hull in the direction of the equilibrium spring vector, s2 is the same parameter for the neighbor particle. The intersection of the spring segments with the respective hull is assumed to remain the contact point between the particles during the entire viscoelastic deformation step (Figure 8, middle and bottom).
 The movement of each intersection can be calculated by
so that Δs = snew − s. The length of snew is synced to the particle shape which is defined by the matrix A in order to avoid numerical instabilities resulting from the interaction of connected and unconnected particles.
 Finally the new equilibrium position r0 of the neighbor node is calculated as
3. Tests and Discussion
 We ran a number of benchmark experiments in order to test different aspects of the model accuracy. A detailed account of the experimental setup and the obtained results is given in Appendix D. Below we summarize and discuss the results.
3.1. Scaling With Resolution
3.1.1. Stress-Strain Relations
 We ran uniaxial extension experiments based on a simplified crustal rheology in a rift setup and using different model resolutions. The detailed setup and a full discussion of the results are given in section D.1. Below we discuss the impact of the resolution on the average stress-strain curve, summarized in Figure 9.
 The initial experiment considered viscous relaxation and gravity, yet inhibited faulting. We re-ran the experiment twice, first omitting gravity and then gravity and viscoelasticity. The simulations considered two different resolution: 45 × 18 × 6 (=4860) particles and 85 × 32 × 13 (=35360) particles.
 A comparison of Figures 9a and 9b shows that the gravity scaling is responsible for a relative stress difference of ∼3.8% prior to deformation. The higher stress occurs in the model with higher resolution, in the simulation considering gravity. This relation is reverted with progressive extension and the further development is similar to experiments excluding gravity.
 In experiments where gravity or both gravity and viscoelasticity are omitted, the stress difference between the two considered lattice resolutions at a strain ε = 0.077 is 2.3 and 2.1% (Figures 9b and 9c). This leads to the conclusion that the impact of the viscoelasticity algorithm and of the gravity force on the stress scaling are negligible once a certain amount of external deformation is reached. The main reason for stress deviations between experiments with different resolutions seems to be related to the distortion of the lattice geometry.
3.1.2. Evolution of Fault Networks and Breaking Strength Scaling
 We ran experiments with the same setup as described above but including fault formation with three different resolutions (45 × 18 × 6, 65 × 30 × 8 and 85 × 32 × 13 particles, section D.1). The resulting fault networks are displayed in Figure 10. The experiments used a Gaussian distribution with a 30% deviation on the breaking strength of springs, a common procedure for the modeling of fractures in lattice models [Malthe-Sørenssen et al., 1998; Flekkøy and Malthe-Sørenssen, 2002]. The mean breaking strength is identical throughout all experiments.
 The key parameters wavelength, depth and geometry of the fault structures are largely independent of the model resolution. In all simulations listric fault surfaces and graben structures develop. The main impact of the model resolution is a better localization of fault surfaces with increasing resolution.
 We conclude that the structural development and thus the breaking strength is independent from the lattice resolution.
3.2. Comparison with Physical Processes
3.2.1. Brittle Ductile Transition and Listric Faulting
 Using the experiments described in section 3.1.2 it is also possible to evaluate the transition from brittle to ductile yielding and depth dependence of the fault structures (section D.1 and Figure 10). Faults are steep in the uppermost part of the crust where mostly tensile failure occurs, because tensile cracks develop perpendicular to the extension. Fault inclination reduces from the surface of the model toward the brittle ductile transition at around 20 km depth where brittle faulting terminates. This change in fault inclination leads to listric surfaces that bend toward the brittle ductile transition and are finally transformed into sub-horizontal detachment faults.
 The fault geometries can be explained by depth-dependent viscosity. A high viscosity close to the surface of the model facilitates steep tensile fractures. In greater depth horizontal shear stresses develop, which favor inclined or sub-horizontal shear fractures. The shear stress is created by the strain difference between brittle blocks in upper layers, which formed due to brittle faulting, and the continuously stretched lower viscous layers.
 Cracks are represented by planar discontinuities within isotropic solids (Figure 11). External deformation is applied either as extension perpendicular to the crack surface or as shear parallel to the surface. Summarizing, stress fields calculated by Melange are identical to stress fields predicted by analytical solutions (Figure 12). Differences, where they appear, can be attributed to finite deformation steps in the numerical experiments in difference to infinitesimal analytical solutions.
3.2.3. Wing Crack Formation
 Crack formation was modeled as wing cracks, a micro to meso scale structure often observed when brittle materials with preexisting faults or cracks are compressed (Figure 13). Wing cracks nucleate at crack tips and rotate to become mode I fractures, which are typically sub-parallel to the direction of compression (Figure 13a) [Dyskin et al., 1999, 2003]. They involve sliding on the initial crack surface and thus extension parallel to the initial crack surface. Our experiments used the same experimental setup as analogue experiments performed by Dyskin et al. . Details are given in section D.3.
 In the experiment a preexisting circular crack is inserted at an angle of 30° to compression. Tensile cracks nucleate at the tips and grow sub-parallel to the direction of compression (Figures 13b–13d). Close to the tips of the initial crack an extended area is affected by fracturing, forming a bulge toward the center. The bulge is most probably a result of the progressive opening of the wing cracks.
 Bulging, opening and the general direction of the numerical wing cracks are in general agreement with the theoretical crack growth. However, real wing cracks are much more discrete and the inclination close to the initial crack is more pronounced. There are two possible explanations for these differences. Wing crack formation is partly controlled by the roughness of the surface of the initial crack [Dyskin et al., 2003]. Roughness is high in the modeled crack compared to a real crack and may inhibit sliding. Another explanation would be a certain remaining amount of mesh bias in the NNN lattice, which favors vertical crack growth.
3.2.4. Viscoelastic Relaxation
 The accuracy of the viscoelastic routine was tested against an approximate analytical solution. For this purpose a stress-strain curve obtained from Melange for uniaxial extension of a solid with mid-crustal rheology is compared to an analytical solution for a 1-dimensional solid with identical properties. Sidewalls are unfixed in the numerical experiment, so that Poisson effects are minimized. Gravity is not considered, and the total simulation time is 500 ka. Further details are given in section D.4 and Figure 14.
 The stress-strain curves in both calculations converge against zero after the same time. The maximum difference between the two approaches amounts to ∼12%. It is not clear how much of this difference is caused by the comparison of a 1D solution to a 3D model. We assume therefore that the relaxation time is a better measure for the model accuracy, since the error vanishes toward the viscous stress relaxation.
3.2.5. Sandbox Extension
Buiter et al.  describe a classical sandbox extension benchmark experiment, were structures resulting from scaled numerical experiments are compared with structures in analogue sandbox models. We applied an identical setup to Melange. The original sandbox experiment consists of a 3 cm thick sand-layer on top of a 0.5 cm thick viscous sheet, which covers the central basal part of the model. Extension is achieved by pulling the right wall together with a thin rigid sheet forming the bottom of the right hand side of the model. A detailed description of the experiment is given in section D.5. Results are summarized in Figure 15.
 The extension leads in all experiments, analogue and numerical, to the early formation of two graben structures. Continued extension of the analogue model results in the formation of conjugate fault sets that form additional graben structures and the graben remains localized in the center (Figure 15). Melange is the only software that reproduces these structures from the analogue model. All other numerical models fail to localize in the same way as the analogue experiment.
3.2.6. Brittle Basin Formation
 The last simulation shows the 3D development of a graben zone during extension (Figure 16). Here, the model is fully brittle. The developing graben structure forms an initial set of boundary faults with vertical upper faults that curve below about 2 km. Fault scarps are curved seen from above. In later stages, synthetic fault pairs form parallel to the main boundary fault. Summarizing, the structural development is similar to real-world examples [Kearey et al., 2009; Fossen, 2010].
 Melange is the first lattice-particle model to implement rheological key properties of lithospheric material including elastic isotropy and scaled gravity. The range of elastic parameters is sufficient to model most lithospheric rocks. The particular strength of Melange is the modeling of brittle failure in combination with viscoelastic ductile creep. Numerically calculated stress fields and viscoelastic stress relaxation are similar to analytical solutions. Wing cracks develop under compression in the 3D simulations, extensional fault structures associated with the brittle-ductile transition form realistic listric fault patterns and 3D simulations of rift extension reproduce natural geometries. Numerically calculated stress fields and viscoelastic stress relaxation are similar to analytical solutions.
 We conclude that Melange is a viable model for many dynamic processes associated with the deformation of lithospheric material.
Appendix A:: Elastic Properties of the Hexagonal Close Packed Next-Nearest Neighbor (HCP NNN) Lattice With Shear and Normal Forces
 The relation between spring constants and the macroscopic elastic properties of the NNN and the NN lattice can be calculated from the energy stored in a unit cell. Assuming small displacements of the lattice points we can compare the continuum model with the discrete model [Ostoja-Starzewski, 2002; Wang and Mora, 2008].
 We consider a regular spring lattice with angular and linear springs and periodically repeating unit cells. Torsion of the linear springs is not considered. The displacement of lattice points is calculated from the uniform stress tensor.
 The energy density is: , where is the volume of the unit cell [Wang and Mora, 2008]. From the standard formula for the energy stored in a Hookean spring the strain energy of a unit cell can be calculated as:
where the first term accounts for nearest neighbors and the second term for next-nearest neighbors.
 The angular displacement and the linear displacement can be calculated from the strain tensor E as γ1,2 = 2m1,2 · En and ϵ = n · En [Pazdniakou and Adler, 2012], respectively, where n is the normalized spring vector. The vectors m1,2 are perpendicular to the spring and to each other and can be calculated using an arbitrary vector a, under the condition that a is neither parallel nor normal to the spring: m1 = a × n and m2 = m1 × n.
 Using these relations the angular displacement for small angles can be calculated by
and the linear displacement is given by:
A2. Geometry of The Unit Cell
 The coordinates of the six next-nearest neighbors, expressed as multiples of r := |rα| and assuming that the particle in question is at the location (0,0,0) of the coordinate system, are:
 Coordinates of the 12 nearest neighbors, again expressed as multiples of r:
 The equilibrium distance to nearest neighbors |rα| is related to the distance to next-nearest neighbors |rβ| by: .
The general form of the resulting stiffness tensor S – which involves arbitrary values for all four spring constants – is transversely isotropic. However, if we set the precondition that and , the stiffness tensor of the next-nearest neighbor spring network becomes isotropic:
The general form of the stiffness matrix for an isotropic material is given by:
Substituting the elements of S given in equation (A5) into equation (A6) proves the isotropy of the next-nearest neighbor lattice.
 Solving for the spring constants leads to the following expressions (remember: this requires that and ):
The shear modulus G = (1 + v)/E or, expressed in terms of the lattice constants:
Possible values for the Poisson ratio are in the interval 0.25 > v > −1. The interval can be derived from the following relations, which are given by the compliance form of S: and .
Appendix B:: Viscoelastic Transformation Matrix
 The constitutive differential equation describing 1D Maxwell viscoelasticity [Roylance, 2001a] is
Here, is the relaxation time, η is the viscosity, E the Young's modulus and the strain rate. Assuming a constant strain ϵ – i. e. a strain rate = 0 – the integration of equation (B1) leads to the following well known equation for one-dimensional time-dependent stress relaxation:
Equation (B1) can be expanded to higher spatial dimensions in systems were only normal stresses are relevant [Ramberg, 1975; Weijermars, 1991]. Thus, if a coordinate system with the same orientation as the principal stresses is considered (Figure B1) time-dependent viscoelastic deformation is described by the following system of uncoupled differential equations:
where , and are the strain rates parallel to the respective coordinate axis.
 With = σ/η and equation (B1), the time dependent strain rate is given by (t) = (σ0/η)exp(−t/τ). Substituting into equation (B3) and solving the differential equation leads to
where kx = σx/E, ky = σy/E and kz = σz/E.σx, σy and σz are normal stresses parallel to the respective coordinate axis. Figure B1 illustrates the concept behind equations (B3) and (B4).
 Precondition for volume-conservative symmetric deformation is that
at any time t [Lai et al., 1996]. In case of Newtonian viscosity normal strain rates are related directly to the normal components of the deviatoric stress tensor σ′ by [Weijermars, 1991]. Substituting these relations into equation (B5) and using the definition of deviatoric normal stresses shows that equation (B5) is satisfied. Thus, volume conservation is guaranteed if strain rates in the system of differential equations (equation (B3)) are governed by the principal deviatoric stress tensor σ′ [Ramberg, 1975; Weijermars, 1991]. This is achieved by setting in equation (B4).
 If we consider particles with a normalized initial radius, then x0 = y0 = z0 = 1 and x, y and z represent the stretch ratios in the direction of the principal normal stresses. In a coordinate system defined by the orientation of the principal stresses, the scaling matrix Λ is therefore given by:
The transformation matrix T for an arbitrary coordinate system can be calculated from S by:
where R is the basis transformation matrix from standard coordinates to the principal stress system.
Equation (B5) shows that Λ converges for very large time steps against
Appendix C:: Mathematical Description and Deformation of the Particle Shape
 The transformation matrix T defined in equation (B6) is symmetric and thus any transformation of spherical or ellipsoidal particles results in another ellipsoidal or spherical shape. Thus, Melange uses a computationally convenient description of ellipsoids using the positive definite matrix A [Bronstein and Semendjajew, 1991]. The equation xTAx = 1 defines an ellipsoid with unit radius. If A equals the unit matrix than the relation describes a sphere, the particle shape prior to deformation.
 The following equations assume that the origin of considered coordinate systems is located in the center of a particle, which is identical to the node. The particle-ellipsoid can then be stretched along the main axes of a reference coordinate system by multiplying with matrix M, given as
si are the stretch ratios parallel to the main axes of the relevant coordinate system. This operation can be visualized as stretching of the ellipsoid via an inverse stretch of the coordinate system.
 Therefore M = Λ−1, where Λ is the viscoelastic scaling matrix from equation (B6). If stretching does not occur along the main axes of the system, an additional rotation has to be performed similar to equation (B7) and the final ellipsoid equation results in
This can be summarized to the new shape matrix .
Appendix D:: Description of Benchmark Experiments
D1. Scaling With Model Resolution
 In a first set of experiments we tested the impact of the model resolution on the stress-strain relation and on the structural evolution of fault networks. The experiments are based on a simplified crustal rheology under uniform uniaxial strain and consider viscous deformation, gravity and brittle failure, which are alternately disabled so that the responsible mechanism behind deviations can be identified.
 The Young's modulus is 80 GPa in the entire model, the viscosity ranges layerwise from 1.0 × 1025 Pa s at the top of the model to 5 × 1021 Pa s at the bottom. In order to approximate a rift setting, where material with low viscosity is relatively close to the surface, the setup reduces the viscosity below the center to 1.0 × 1022 (see Figure 10, which shows the setup as a profile parallel to the X and Y axes). The angle of internal friction φ = π/5.2 in the uppermost 10 km, φ = π/4.1 between 10 and 30 km depth and φ = π/3.7 in the regions below. In simulations considering bond breaking a Gaussian distribution of the breaking strength with 30% deviation is applied, a common setup for lattice-particle models [Monette and Anderson, 1994; Malthe-Sørenssen et al., 1998; Flekkøy and Malthe-Sørenssen, 2002].
 Extension is uniaxial in the X direction with Δε = 0.0001 and a timestep Δt = 500 a. The system size is 100 km in X and 50 km in Y. Model resolutions are 45 × 18 × 6, 65 × 30 × 8 and 85 × 32 × 13, respectively.
Figure 9 shows the average stress-strain curves for two different model resolutions (45 × 18 × 6 and 85 × 32 × 13). If faulting is inhibited (Figure 9a) the resulting curves are largely identical, although the stress shows a deviance of ∼3.8% prior to the deformation and of ∼3.6% once the final strain of 0.077 is reached. The scaling mechanism of the gravity force has an influence on the stress, this can be seen when comparing Figure 9a with Figure 9b where gravity is disabled. Once sufficient strain had built up, stress deviations due to gravity are similar to experiments without gravity.
 When comparing Figures 9b and 9c one can see that the causal connection between model viscosity and model resolution is negligible. If viscosity is disabled, the stress difference between the two model resolutions shown in Figure 9b amounts to ∼2.3% at ε = 0.077. If viscosity is considered (Figure 9b) the difference is ∼2.1%.
Figure 10 displays the resulting fault structures, which are identical in their key properties depth, wavelength and geometry, and thus independent from the resolution. The decreasing viscosity combined with an increasing angle of internal friction inhibits further brittle failure below c. Twenty km. Fault networks form graben structures and single faults are generally listric.
D2. Tensile Principal Stress Fields for Planar Fault Planes in Combination With Remote Loading
 Below, results of Melange are compared with analytical in-plane solutions provided by Pollard and Aydin  and Pollard and Seagall  who considered a homogeneous, isotropic linear elastic material. Cracks are represented by planar discontinuities with negligible thickness which are bounded in extent. Deformation is applied either as remote tension perpendicular to the crack or as shear parallel to the crack surface (Figure 11). By prohibiting variations in geometry, material properties or boundary conditions in the third dimension, the authors were able to treat their stress calculations as in-plane problems for a planar section normal to the crack surface.
 The computer experiments consist likewise of a homogeneous, isotropic elastic material. Gravity and bond-breaking are not enabled. Cracks are planar discontinuities normal to the x axis, and are modeled by the removal of springs crossing the predefined crack plane. Stress concentrations at the system boundaries are avoided by using periodic boundaries along the x axis and the Z axis. The system consists of a cube with edge length 1. A crack plane has no boundaries in the Y-direction and penetrates the complete cube (Figure 11). Two different setups are considered: (1) uniaxial remote extension acting perpendicular to a planar crack and (2) right-lateral shear parallel to a planar crack.
 In the following the standard notation for crack deformation is adapted [Fossen, 2010]: in the case when the tensile principal stress is normal to the crack-plane it is termed “mode I”, in the case when a crack parallel shear stress is applied it is termed “mode II” (Figure 11).
 Remote deformation consists either of uniaxial extension or crack parallel shear. In order to increase the comparability of the numerical model with the analytical solutions – which ignore crack opening – the model applies a very small external deformation: a uniaxial extension of Δε = 0.001 parallel to the x axis and a shear strain of Δγ = 0.0001 parallel to the Z axis. Cracks have a width of 0.5 in unit length, parallel to the Z-direction.
 Numerically and analytically determined stress fields for planes perpendicular to the fault surface are compared in Figure 12. All coordinates are normalized to the interval [0, 1]. Stress maps show the orientation of the normalized principal tensile stress (σ3).
D3. Wing Crack Formation
 The setup of the wing crack experiment shown in Figure 13 mirrors analogue wing crack experiments performed by Dyskin et al. . Young's modulus E is set to 5E9 (similar to resin, which was used in the analogue experiments) and the viscosity is set to 25 Pa s. The system is cubic with a side length of 0.17 m.
 A circular crack is inserted into the solid, with an angle of 60° to the X-Z plane and thus oblique to symmetry planes within the lattice structure (Figure 13b). The crack is inserted by removing springs crossing the predefined crack plane. The top and the bottom boundary are fixed and movement of particles at side boundaries is unrestricted. The angle of internal friction is set to π/3.
 Compression is created by moving the top wall downward in steps of Δε = −0.0000125, associated with a time step of 0.001 s, identical to the wing crack experiments by Dyskin et al. .
D4. Viscoelastic Stress Relaxation
 In this benchmark experiment the stress-strain curve obtained from Melange under uniaxial extension is compared with the analytical solution for the extension of a 1-dimensional body. For this purpose the initially equilibrated body is extended only once in time step 0. In the following the stress is recorded until the tensile stress within the body is completely relaxed. The analytical solution, following equation (B2), is
 The Young's Modulus E of the material is set to 53e9, the viscosity η to 1023 and the initial extension Δε to 0.0635. The numerical setup consists of a cube with a resolution of 30 × 30 × 30 particles with free boundary particles and an extension that is applied parallel to the x axis. During the experiment the stress in the X-direction is recorded.
 Results of the analytical solution and the numerical experiment are compiled in Figure 14, where the tensile stress in the X-direction (σx) is plotted versus time. The curves are in good agreement, despite the fact that a 3D setup is compared with a 1D setup. In both cases equilibrium is obtained after about 300.000 a. The most notable difference is the somewhat smaller initial tensile stress of the numerical solution with σx = −3.7 MPa, compared to −3.4 MPa of the analytical solution.
D5. Extensional Sandbox Experiment
 Another benchmark experiment is based on Buiter et al. , who compare structures resulting from scaled numerical models with structures from sandbox models by Schreurs et al. . Below, the structural evolution of an identical setup calculated with Melange is compared with the original experiments.
 The original sandbox experiment described in Schreurs et al.  is 20 cm wide and 3.5 cm high. It consists of a 3 cm thick sand-layer on top of a 0.5 cm thick viscous sheet, which covers the central basal part of the model (Figure 15, before extension). A thin rigid sheet covering the base of the model extends from the middle to the right wall and is attached to it. Extension is achieved by pulling the right wall outward.
 In Melange the right half of the lowermost layer of particles is pulled to the right and remains fixed during relaxation. The layer above has a second-next neighbor lattice geometry with a central viscous part. The topmost layer consists of unconnected particles, which were considered best to reflect the properties of sand. The transition from the moving rigid sheet to the stationary bottom of the model is accommodated over 0.8 cm. Other parameters are compiled in Table D1.
Table D1. Parameters Used in Numerical Extension Experiments
η of Basal Central Layer
400 × 75
3 × 106 Pa
1 × 1012 Pa s
1 : 1
401 × 71
4.6 × 1013 Pa s
1 km : 1 cm
170 × 30 × 7
53 × 109 Pa
1.0 × 1015 Pa s
1 km : 1 cm
170 × 30 × 7
53 × 109 Pa
4.6 × 1013 Pa s
1 km : 1 cm
 Since the original experiments by Buiter et al.  tried to clarify the influence of the exact viscosity of the viscous basal layer on the structural development, we calculated two different runs with viscosities of 1.0 × 1015 Pa s and 4.6 × 1013 Pa s. The smaller viscosity value is scaled to the original viscosity in the analogue model. In order to avoid extreme computation times, we stopped the low-viscous simulation at an extension of 1.0 cm.
 The structural development of the finite difference code I2ELVIS, the finite element code Sopale [Buiter et al., 2006], the analogue experiments performed by the University of Bern and by the IFP Rueil-Malmaison [Schreurs et al., 2006] are compiled in Figure 15, together with the results from Melange. In all experiments the extension leads to the early formation of two conjugate shear zones with the tip centered at the basal sheet (Figure 15, 0.5 cm extension). These first faults have dip angles of 60° and 69° in the analogue sandbox models, and dip angles of 45° to 55° in I2ELVIS and Sopale. The faults that develop in Melange dip at ∼62° if the basal layer has a larger viscosity, and at ∼59° otherwise. Continued extension of the analogue models and of Melange results in the formation of two conjugate fault sets, which form additional symmetrical graben structures left and right of the center (Figure 15, 1 cm extension). These conjugate graben structures faults do not develop in I2ELVIS and in Sopale. The main effect of a viscous basal layer with low viscosity is the formation of more faults and smaller blocks, probably because stress distributed more quickly and is less localized.
 All models – numerical and analogue – behave approximately similar during further extension. The surface depression becomes wider and more asymmetric, while shear zones migrate preferentially to the right.
D6. Graben Formation
Figure 16a shows a 3D rift development in order to illustrate the more advanced capabilities of Melange. Extension in the rift model is parallel to the x axis, whereas strain in the Z axis is zero (Figure 16b). Gravity is applied parallel to the y axis, the model height is 5 km and the original width is 10 km. The model is brittle, since it represents only the upper 5 km of the crust and is wrapping in Z-direction.
 The developing graben structure forms an initial set of boundary faults with vertical upper faults that curve below about 2 km, caused by the effects of gravity. The graben is relatively small with a width of about 4 km and fault scarps are curved on the model surface. The internal parts of the graben become segmented in the last stage, where synthetic fault pairs form parallel to the main boundary fault on the right hand side. Subsidence in the graben is up to 1.5 km.
Appendix E:: Implementation Details
 Melange runs parallelized on computers with SMP architecture using the GOMP library. Core routines are implemented in C++, while the program flow is controlled via a built-in Python API. Users can control several aspects of the material parameters, the deformation style and boundary conditions.
 Melange maintains three neighbor lists for each particle, which comprise pointers to connected nearest and next-nearest particles and to unconnected particles in proximity to the particle. Lists to connected particles are initialized when the lattice is constructed.
 Lists containing pointers to unconnected particles are permanently updated during the elastic relaxation procedure, adding particles within a distance where a collision is possible. The algorithm applies a grid-based spatial index to search for neighbor particles in close proximity. After elastic relaxation, neighbor particles which are located beyond a minimum distance are removed from the list.
 Maintaining lists of unconnected neighbors for each particle increases the computational efficiency significantly, by reducing the number of queries to the global spatial index.
Force from connected particles
Repulsion from unconnected particles
Gravitational load of a particle
Young's modulus of a particle in the model/in reality
Cross-sectional area of a particle in the model/in reality
Position vector relative to a node
Positive definite matrix describing the shape of the particle hull
Viscoelastic transformation matrix
Angle of internal friction
Stress tensor, deviatoric stress tensor, principal deviatoric stress in tensor notation
Spring constant for nearest neighbors, normal force/shear force
Spring constant for next-nearest neighbors, normal force/shear force
Displacement normal and perpendicular to a spring
Particle volume in the model/in reality
Spring vector relative to node, equilibrium position of the spring
Critical shear and normal stress for brittle failure
Strain, strain rate
Normal stress, shear stress
Superscripts indicating nearest or next nearest neighbors, respectively
Acceleration due to gravity
Hexagonal close-packed symmetry
Subscripts indicating normal or shear force or displacement
Nearest neighbor, next-nearest neighbor symmetry
 This project was funded by the Deutsche Forschungsgemeinschaft (DFG), grant KO 2463/4–2 of the Forschergruppe “Rift Link”. We also thank Marcus Ebner, who invented the name of the software. We thank the reviewers and the editor for thoughtful suggestions that significantly improved the manuscript.