Skip to main content
Version: Latest

Quickstart

This page takes you from source code to a result in a few minutes. You will build the 2D executable, run the shipped example examples/tectonics/core-complex.cfg, and look at the normal fault that forms as a brittle crust is pulled apart.

1. Build​

Clone DynEarthSol and build the 2D executable in its root directory (see Installation for dependencies and build options):

git clone --recursive https://github.com/GeoFLAC/DynEarthSol.git
cd DynEarthSol
make ndims=2

This creates dynearthsol2d.

2. Run​

Run the example in its own folder so the output stays together:

mkdir quickstart
cd quickstart
cp ../examples/tectonics/core-complex.cfg .
OMP_NUM_THREADS=4 ../dynearthsol2d core-complex.cfg

The run takes about a minute and a half with four threads. DES prints a status line as it goes and finishes with a timing summary.

What the model is​

SettingValue
Domain100 km wide, 10 km thick; elements of about 1 km, finer between x = 30 and 70 km
Materialelasto-plastic (Mohr–Coulomb), friction angle 30°, cohesion softening from 44 to 4 MPa over plastic strain 0.5
Loadingboth sides pulled outward at m/s (3.2 cm/yr each), free surface with slow diffusion
Seeda weak zone dipping 60°, centred at x = 50 km in the lower half of the layer, given plastic strain 0.5
Duration50,000 years, a frame every 1500 years

The weak zone seeds a fault. Cohesion softening then concentrates further slip on it, and the mesh is rebuilt as it distorts.

3. Look at the output​

The run writes, under the model name result3:

FileContents
result3.save.000000 … 00003334 saved frames of all fields
result3.chkpt.*checkpoints for restarting
result3.infoone line per frame: step, time, time step, wall time, mesh size
result3.manifesthow and where the run was built and run (provenance)

Convert the frames to VTK and open them in ParaView:

../2vtk.py result3

This writes result3.000000.vtu to result3.000033.vtu. Open the series in ParaView and colour it by plastic strain.

Or plot the last frame with Python, using the reader shipped with DES:

import sys
sys.path.insert(0, '..') # the DynEarthSol directory
import matplotlib.pyplot as plt
from matplotlib.tri import Triangulation
from Dynearthsol import Dynearthsol

des = Dynearthsol('result3')
frame = des.frames[-1]
xy = des.read_field(frame, 'coordinate') / 1e3 # km
conn = des.read_field(frame, 'connectivity')
plstrain = des.read_field(frame, 'plastic strain')

fig, ax = plt.subplots(figsize=(9, 1.9), constrained_layout=True)
pc = ax.tripcolor(Triangulation(xy[:, 0], xy[:, 1], conn),
facecolors=plstrain, vmin=0, vmax=2)
ax.set_aspect('equal'); ax.set_xlabel('x (km)'); ax.set_ylabel('z (km)')
fig.colorbar(pc, cax=ax.inset_axes([1.01, 0, .012, 1]), label='plastic strain')
fig.savefig('plastic_strain.png', dpi=150, bbox_inches='tight')

4. What you should see​

Plastic strain after 50,000 years

After 50,000 years the layer has extended by about 3 km. Almost all of that extension is taken up by one normal fault that grew from the weak zone, from the base of the layer near x = 43 km to the surface near x = 53 km. Its footwall has risen about 1.3 km above the original surface. The rest of the layer has hardly deformed.

Next steps​