# Stresses with Gradients in an Unjointed Medium: Uniform Material

Variation in stress with depth cannot be ignored near the ground surface – the `model gravity` command is used to inform 3DEC that gravitational acceleration operates on the model. It is important to understand that the `model gravity` command does not directly cause stresses to appear in the model; it simply causes body forces to act on all gridpoints of deformable blocks (or centroids of rigid blocks). These body forces correspond to the weight of material surrounding each gridpoint. If no initial stresses are present, the forces will cause the material to move (during stepping) in the direction of the forces until equal and opposite forces are generated by zone stresses. Given the appropriate boundary conditions (e.g., fixed bottom, roller side boundaries), the model will, in fact, generate its own gravitational stresses compatible with the applied gravity. However, this process is inefficient, since many hundreds or thousands of steps may be necessary for equilibrium. It is better to initialize the internal stresses such that they satisfy both equilibrium and the gravitational gradient. The `block insitu topography` command is usually the best approach. The internal stresses must also match boundary stresses at stress boundaries.

Even though the boundary and in-situ stresses are specified to produce a force balance, some cycling of the model is normally required. This is because the boundary forces are only applied at the end of a cycle; a small force imbalance is produced by the in-situ stresses. Usually, this imbalance is reduced within a few hundred cycles.

Consider, for example, a 20 m × 20 m × 20 m box of homogeneous unjointed material at a depth of 200 m underground, with fixed base and stress boundaries on the other five sides. The example below produces an equilibrium system for this problem condition:

Initial stress state with gravitational gradient

```model new
model large-strain on

block create brick 0,20 0,20 0,20
;
block zone generate edgelength 4.0
;
block zone cmodel assign mohr-coulomb
block zone property  density 2500 bulk 5e9 shear 3e9 friction 35
;
model gravity 0 0 -10
;
; install initial stress forigin block with top 200 m below the surface
block insitu topography ratio-x 0.5 ratio-y 0.5 overburden [-200*10*2500]

; apply stresses to sides
block face apply stress -2.75e6,-2.75e6,-5.5e6 0,0,0 &
gradient-z   1.25e4, 1.25e4, 2.5e4 0,0,0 range position-x  0.0
block face apply  stress -2.75e6,-2.75e6,-5.5e6 0,0,0 &
gradient-z   1.25e4, 1.25e4, 2.5e4 0,0,0 range position-x 20.0
block face apply  stress -2.75e6,-2.75e6,-5.5e6 0,0,0 &
gradient-z   1.25e4, 1.25e4, 2.5e4 0,0,0 range position-y  0.0
block face apply  stress -2.75e6,-2.75e6,-5.5e6 0,0,0 &
gradient-z   1.25e4, 1.25e4, 2.5e4 0,0,0 range position-y 20.0

; apply stress to top
block face apply  stress   0,0,-5.0e6 0,0,0 range position-z 20.0

; fix bottom
block gridpoint apply velocity-z = 0.0  range position-z  0.0

model solve
;
```

In this example, horizontal stresses and gradients are equal to half the vertical stresses and gradients, but they may be set at any value that does not violate the yield criterion (Mohr-Coulomb, in this case). After preparing a data file such as the one above, the model should be cycled to check that an equilibrium state is reached. If material failure does occur (e.g., reduce phi = 10º), this will show as an unbalanced force magnitude that is roughly the same order of magnitude as the applied loading.