[cig-commits] r22102 - in short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8: . figs

brad at geodynamics.org brad at geodynamics.org
Fri May 17 17:19:26 PDT 2013


Author: brad
Date: 2013-05-17 17:19:26 -0700 (Fri, 17 May 2013)
New Revision: 22102

Added:
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step01-displ.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step02-displ.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step03-displ.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step04-displ-t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step05-displ-t40.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step06-displ-t300.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step07-displ-vel-t300.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step08-strain-displ-t150.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step09-strain-displ-t150.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step10-fault-traction-slip.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step11-fault-traction-slip.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step12-displ-t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step13-displ-t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step14-displ-t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step15-displ-t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step16-stress_xx-t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step17-displ-t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step18-displ.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step19-stress_t200.jpg
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step20_disp.png
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload.lyx
Removed:
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike/
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity/
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static/
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/
Modified:
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx
Log:
Consolidate 3dhex8 directories.

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2013-05-18 00:11:40 UTC (rev 22101)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2013-05-18 00:19:26 UTC (rev 22102)
@@ -1,638 +1,638 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-3d-hex8"
-
-\end_inset
-
-Tutorials Using Hexahedral Mesh Created by CUBIT
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this set of tutorials:
-\end_layout
-
-\begin_layout Itemize
-Static solution
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-CUBIT mesh format
-\end_layout
-
-\begin_layout Itemize
-Trilinear hexahedral cells
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-HDF5 output
-\end_layout
-
-\begin_layout Itemize
-Dirichlet displacement and velocity boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Neumann traction boundary conditions and time-varying tractions
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-UniformDB spatial database
-\end_layout
-
-\begin_layout Itemize
-Static fault rupture
-\end_layout
-
-\begin_layout Itemize
-Multiple kinematic fault ruptures
-\end_layout
-
-\begin_layout Itemize
-Specifying more than one material
-\end_layout
-
-\begin_layout Itemize
-Nonlinear solver
-\end_layout
-
-\begin_layout Itemize
-Linearly elastic isotropic material
-\end_layout
-
-\begin_layout Itemize
-Maxwell linear viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Generalized Maxwell linear viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Power-law viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Drucker-Prager elastoplastic material
-\end_layout
-
-\begin_layout Itemize
-Adaptive time stepping
-\end_layout
-
-\begin_layout Itemize
-Static fault friction
-\end_layout
-
-\begin_layout Itemize
-Slip-weakening fault friction
-\end_layout
-
-\begin_layout Itemize
-Rate-and-state fault friction
-\end_layout
-
-\begin_layout Itemize
-Gravitational body forces
-\end_layout
-
-\begin_layout Itemize
-Initial stresses
-\end_layout
-
-\begin_layout Itemize
-Finite strain
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/3d/hex8
-\family default
-.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is meant to demonstrate most of the important features of
- PyLith as a quasi-static finite-element code, using a sequence of example
- problems.
- All problems use the same 3D hexahedral mesh generated using the CUBIT
- 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-cubit.sandia.gov
-\end_layout
-
-\end_inset
-
- mesh generation package.
- Each example builds on the previous examples, as we demonstrate new features.
- As in the other examples, the files include extensive comments.
- We start with the generation of the mesh, which is composed of 144 trilinear
- hexahedra.
- The tutorial demonstrates the usage of the CUBIT mesh generation package
- to create a mesh, as well as describing how to use a CUBIT-generated mesh
- in PyLith.
- Following the discussion of how to generate the mesh, we discuss the 
-\family typewriter
-pylithapp.cfg
-\family default
- file, which contains information common to all the simulations.
- We group the examples into four sections, each pertaining to a particular
- set of PyLith features.
- We suggest users go through each of these sections in order as the complexity
- increases at each step.
- 
-\end_layout
-
-\begin_layout Subsection
-Mesh Generation and Description
-\end_layout
-
-\begin_layout Standard
-The mesh for these examples is a simple rectangular solid (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3dhex8-mesh"
-
-\end_inset
-
-).
- Although it would be possible to generate this mesh by hand, it is much
- simpler to use a mesh generation package, and we use CUBIT for this example.
- We provide documented journal files in 
-\family typewriter
-examples/3d/hex8/mesh.
-
-\family default
- Dissection of these journal files should provide some insight into how
- to use CUBIT with PyLith.
- For more detailed information on using CUBIT, refer to the CUBIT documentation
- 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-cubit.sandia.gov
-\end_layout
-
-\end_inset
-
-.
- If you have CUBIT installed on your machine, you can use the journal files
- to create your own mesh.
- Otherwise, you can use the mesh that has already been created.
-\end_layout
-
-\begin_layout Standard
-If you are using CUBIT to generate your own mesh, there are two ways to
- use the journal files.
- The simplest method is to go to the
-\family sans
- Tools
-\family default
- menu, select 
-\family sans
-Play Journal File
-\family default
-, and then select the file 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
-.
- This will run the commands in that file as well as the commands in 
-\family typewriter
-geometry.jou
-\family default
-, which is referenced from 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
-.
- Prior to doing this, you should set your directory to the one containing
- the journal files.
- This method will create the mesh, but you will gain very little insight
- into what is being done.
- A more informative approach is to input each journal command into the CUBIT
- command window directly.
- That way, you will see what each command does.
- The first command in 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
- is 
-\family typewriter
-`playback
-\family default
- 
-\family typewriter
-geometry.jou
-\family default
-', so you should start with the commands in 
-\family typewriter
-geometry.jou
-\family default
-.
- The first three commands, which define the block shape, are
-\end_layout
-
-\begin_layout LyX-Code
-reset
-\end_layout
-
-\begin_layout LyX-Code
-brick x 6000 y 6000 z 4000
-\end_layout
-
-\begin_layout LyX-Code
-volume 1 move x 0 y 0 z -2000
-\end_layout
-
-\begin_layout Standard
-Continuing through the remainder of the commands in 
-\family typewriter
-geometry.jou
-\family default
-, and then using the additional commands in 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
-, you will eventually end up with the file 
-\family typewriter
-box_hex8_1000m.exo
-\family default
-, which contains all of the mesh information.
- This information is similar to that included in PyLith mesh ASCII format,
- but the information is contained in an Exodus file, which is a specialized
- netCDF file.
- If you have the 
-\family typewriter
-ncdump
-\family default
- command available, you can see what is in the file by typing:
-\end_layout
-
-\begin_layout LyX-Code
-ncdump box_hex8_1000m.exo
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/hex8-mesh.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of trilinear hexahedral cells generated by CUBIT used for
- the suite of example problems.
- The different colors represent the two different materials.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:3dhex8-mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Additional Common Information
-\end_layout
-
-\begin_layout Standard
-In addition to the mesh, the example problems share other information.
- As in previous examples, we place this information in 
-\family typewriter
-pylithapp.cfg
-\family default
-.
- Since these examples use a mesh from CUBIT, in this file we set the importer
- to 
-\family typewriter
-MeshIOCubit
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator]
-\end_layout
-
-\begin_layout LyX-Code
-reader = pylith.meshio.MeshIOCubit
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator.reader]
-\end_layout
-
-\begin_layout LyX-Code
-filename = mesh/box_hex8_1000m.exo
-\end_layout
-
-\begin_layout Standard
-This example differs from some earlier examples, because we specify two
- material groups:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-materials = [upper_crust,lower_crust]
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.upper_crust]
-\end_layout
-
-\begin_layout LyX-Code
-label = Upper crust material
-\end_layout
-
-\begin_layout LyX-Code
-id = 1
-\end_layout
-
-\begin_layout LyX-Code
-db.iohandler.filename = spatialdb/mat_elastic.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATLagrange
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.dimension = 3
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-label = Lower crust material
-\end_layout
-
-\begin_layout LyX-Code
-id = 2
-\end_layout
-
-\begin_layout LyX-Code
-db.iohandler.filename = spatialdb/mat_elastic.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATLagrange
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.dimension = 3
-\end_layout
-
-\begin_layout Standard
-The two material groups correspond to the two different colored regions
- in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3dhex8-mesh"
-
-\end_inset
-
-.
- Using two material groups allows us to specify different material types
- or material variations for the upper crust and lower crust, if desired.
- For now, we retain the default 
-\family typewriter
-ElasticIsotropic3D
-\family default
- material type for both materials.
- This behavior will be overridden by example-specific
-\family typewriter
-.cfg
-\family default
- files in some of the examples.
- Although the material groups are specified in 
-\family typewriter
-pylithapp.cfg
-\family default
-, the physical properties for the material models are given in 
-\family typewriter
-spatialdb/
-\begin_inset Newline linebreak
-\end_inset
-
-mat_elastic.spatialdb
-\family default
-.
- This spatial database provides values at a single point, resulting in uniform
- properties within the material.
-\end_layout
-
-\begin_layout Subsection
-Example Problems
-\end_layout
-
-\begin_layout Standard
-The example problems are divided into categories that roughly correspond
- to simple static problems, quasi-static problems, problems involving fault
- friction, and problems where gravity is used.
- For the most part, each successive example involves just adding or changing
- a few parameters from the previous example.
- For this reason, it is advisable to go through each example in order, starting
- with the simplest (static problems).
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset include
-LatexCommand input
-filename "static/static.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "quasistatic/quasistatic.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "friction/friction.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "gravity/gravity.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "surfload/surfload.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "dike/dike.lyx"
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8"
+
+\end_inset
+
+Tutorials Using Hexahedral Mesh Created by CUBIT
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this set of tutorials:
+\end_layout
+
+\begin_layout Itemize
+Static solution
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+CUBIT mesh format
+\end_layout
+
+\begin_layout Itemize
+Trilinear hexahedral cells
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+HDF5 output
+\end_layout
+
+\begin_layout Itemize
+Dirichlet displacement and velocity boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Neumann traction boundary conditions and time-varying tractions
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Static fault rupture
+\end_layout
+
+\begin_layout Itemize
+Multiple kinematic fault ruptures
+\end_layout
+
+\begin_layout Itemize
+Specifying more than one material
+\end_layout
+
+\begin_layout Itemize
+Nonlinear solver
+\end_layout
+
+\begin_layout Itemize
+Linearly elastic isotropic material
+\end_layout
+
+\begin_layout Itemize
+Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Generalized Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Power-law viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Drucker-Prager elastoplastic material
+\end_layout
+
+\begin_layout Itemize
+Adaptive time stepping
+\end_layout
+
+\begin_layout Itemize
+Static fault friction
+\end_layout
+
+\begin_layout Itemize
+Slip-weakening fault friction
+\end_layout
+
+\begin_layout Itemize
+Rate-and-state fault friction
+\end_layout
+
+\begin_layout Itemize
+Gravitational body forces
+\end_layout
+
+\begin_layout Itemize
+Initial stresses
+\end_layout
+
+\begin_layout Itemize
+Finite strain
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/3d/hex8
+\family default
+.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is meant to demonstrate most of the important features of
+ PyLith as a quasi-static finite-element code, using a sequence of example
+ problems.
+ All problems use the same 3D hexahedral mesh generated using the CUBIT
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+cubit.sandia.gov
+\end_layout
+
+\end_inset
+
+ mesh generation package.
+ Each example builds on the previous examples, as we demonstrate new features.
+ As in the other examples, the files include extensive comments.
+ We start with the generation of the mesh, which is composed of 144 trilinear
+ hexahedra.
+ The tutorial demonstrates the usage of the CUBIT mesh generation package
+ to create a mesh, as well as describing how to use a CUBIT-generated mesh
+ in PyLith.
+ Following the discussion of how to generate the mesh, we discuss the 
+\family typewriter
+pylithapp.cfg
+\family default
+ file, which contains information common to all the simulations.
+ We group the examples into four sections, each pertaining to a particular
+ set of PyLith features.
+ We suggest users go through each of these sections in order as the complexity
+ increases at each step.
+ 
+\end_layout
+
+\begin_layout Subsection
+Mesh Generation and Description
+\end_layout
+
+\begin_layout Standard
+The mesh for these examples is a simple rectangular solid (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3dhex8-mesh"
+
+\end_inset
+
+).
+ Although it would be possible to generate this mesh by hand, it is much
+ simpler to use a mesh generation package, and we use CUBIT for this example.
+ We provide documented journal files in 
+\family typewriter
+examples/3d/hex8/mesh.
+
+\family default
+ Dissection of these journal files should provide some insight into how
+ to use CUBIT with PyLith.
+ For more detailed information on using CUBIT, refer to the CUBIT documentation
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+cubit.sandia.gov
+\end_layout
+
+\end_inset
+
+.
+ If you have CUBIT installed on your machine, you can use the journal files
+ to create your own mesh.
+ Otherwise, you can use the mesh that has already been created.
+\end_layout
+
+\begin_layout Standard
+If you are using CUBIT to generate your own mesh, there are two ways to
+ use the journal files.
+ The simplest method is to go to the
+\family sans
+ Tools
+\family default
+ menu, select 
+\family sans
+Play Journal File
+\family default
+, and then select the file 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+.
+ This will run the commands in that file as well as the commands in 
+\family typewriter
+geometry.jou
+\family default
+, which is referenced from 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+.
+ Prior to doing this, you should set your directory to the one containing
+ the journal files.
+ This method will create the mesh, but you will gain very little insight
+ into what is being done.
+ A more informative approach is to input each journal command into the CUBIT
+ command window directly.
+ That way, you will see what each command does.
+ The first command in 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+ is 
+\family typewriter
+`playback
+\family default
+ 
+\family typewriter
+geometry.jou
+\family default
+', so you should start with the commands in 
+\family typewriter
+geometry.jou
+\family default
+.
+ The first three commands, which define the block shape, are
+\end_layout
+
+\begin_layout LyX-Code
+reset
+\end_layout
+
+\begin_layout LyX-Code
+brick x 6000 y 6000 z 4000
+\end_layout
+
+\begin_layout LyX-Code
+volume 1 move x 0 y 0 z -2000
+\end_layout
+
+\begin_layout Standard
+Continuing through the remainder of the commands in 
+\family typewriter
+geometry.jou
+\family default
+, and then using the additional commands in 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+, you will eventually end up with the file 
+\family typewriter
+box_hex8_1000m.exo
+\family default
+, which contains all of the mesh information.
+ This information is similar to that included in PyLith mesh ASCII format,
+ but the information is contained in an Exodus file, which is a specialized
+ netCDF file.
+ If you have the 
+\family typewriter
+ncdump
+\family default
+ command available, you can see what is in the file by typing:
+\end_layout
+
+\begin_layout LyX-Code
+ncdump box_hex8_1000m.exo
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/hex8-mesh.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of trilinear hexahedral cells generated by CUBIT used for
+ the suite of example problems.
+ The different colors represent the two different materials.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:3dhex8-mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Additional Common Information
+\end_layout
+
+\begin_layout Standard
+In addition to the mesh, the example problems share other information.
+ As in previous examples, we place this information in 
+\family typewriter
+pylithapp.cfg
+\family default
+.
+ Since these examples use a mesh from CUBIT, in this file we set the importer
+ to 
+\family typewriter
+MeshIOCubit
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator]
+\end_layout
+
+\begin_layout LyX-Code
+reader = pylith.meshio.MeshIOCubit
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator.reader]
+\end_layout
+
+\begin_layout LyX-Code
+filename = mesh/box_hex8_1000m.exo
+\end_layout
+
+\begin_layout Standard
+This example differs from some earlier examples, because we specify two
+ material groups:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials = [upper_crust,lower_crust]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.upper_crust]
+\end_layout
+
+\begin_layout LyX-Code
+label = Upper crust material
+\end_layout
+
+\begin_layout LyX-Code
+id = 1
+\end_layout
+
+\begin_layout LyX-Code
+db.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 3
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+label = Lower crust material
+\end_layout
+
+\begin_layout LyX-Code
+id = 2
+\end_layout
+
+\begin_layout LyX-Code
+db.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 3
+\end_layout
+
+\begin_layout Standard
+The two material groups correspond to the two different colored regions
+ in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3dhex8-mesh"
+
+\end_inset
+
+.
+ Using two material groups allows us to specify different material types
+ or material variations for the upper crust and lower crust, if desired.
+ For now, we retain the default 
+\family typewriter
+ElasticIsotropic3D
+\family default
+ material type for both materials.
+ This behavior will be overridden by example-specific
+\family typewriter
+.cfg
+\family default
+ files in some of the examples.
+ Although the material groups are specified in 
+\family typewriter
+pylithapp.cfg
+\family default
+, the physical properties for the material models are given in 
+\family typewriter
+spatialdb/
+\begin_inset Newline linebreak
+\end_inset
+
+mat_elastic.spatialdb
+\family default
+.
+ This spatial database provides values at a single point, resulting in uniform
+ properties within the material.
+\end_layout
+
+\begin_layout Subsection
+Example Problems
+\end_layout
+
+\begin_layout Standard
+The example problems are divided into categories that roughly correspond
+ to simple static problems, quasi-static problems, problems involving fault
+ friction, and problems where gravity is used.
+ For the most part, each successive example involves just adding or changing
+ a few parameters from the previous example.
+ For this reason, it is advisable to go through each example in order, starting
+ with the simplest (static problems).
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "static.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "quasistatic.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "friction.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "gravity.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "surfload.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "dike.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike.lyx (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike/dike.lyx)
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike.lyx	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike.lyx	2013-05-18 00:19:26 UTC (rev 22102)
@@ -0,0 +1,286 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-dike"
+
+\end_inset
+
+Dike Intrusion Example
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Fault opening via prescribed tractions to mimic a dike instrusion
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Elastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describes a problem where prescribed tensile tractions
+ are imposed on a fault to mimic a dike intrusion.
+ The example is contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ file is 
+\family typewriter
+step20.cfg
+\family default
+.
+ The example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith step20.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+step20.cfg
+\family default
+ file.
+ The 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step20 - Static Dike Intrusion
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step20.cfg
+\family default
+ file defines a problem with spatially varying tensile normal tractions
+ on the fault surface associated with a fluid intrusion.
+ The lateral sides and bottom of the domain are fixed using Dirichlet (roller)
+ boundary conditions.
+ As in the other examples, we also setup output for the ground surface.
+\end_layout
+
+\begin_layout Standard
+We use the FaultCohesiveDyn object to impose tractions on the fault surface.
+ We must include a fault constitutive model so we choose static friction
+ with a coefficient of friction of 0.1.
+ The coefficient of friction is irrelevant for the center of the fault where
+ we impose uniform tensile tractions (10 MPa) and the fault opens, but it
+ facilitates clamping the edges of the fault via compressive normal tractions
+ (-100 MPa).
+ Note that we must set the property 
+\family typewriter
+open_free_surface
+\family default
+ to True in order for the tractions to be imposed when the fault is open;
+ the default behavior for fault opening is a free surface (the two sides
+ of the fault are completely uncoupled).
+ The most important fault parameters for prescribing the tensile fault tractions
+ are
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+open_free_surface = True
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+traction_perturbation = pylith.faults.TractPerturbation
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Initial fault tractions
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/tractions_opening.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.query_type = nearest 
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step20
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step20-disp"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step20_disp.png
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement magnitude for example step20 visualized using ParaView.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step20-disp"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step01-displ.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static/figs/step01-displ.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step02-displ.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static/figs/step02-displ.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step03-displ.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static/figs/step03-displ.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step04-displ-t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/figs/step04-displ-t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step05-displ-t40.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/figs/step05-displ-t40.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step06-displ-t300.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/figs/step06-displ-t300.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step07-displ-vel-t300.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/figs/step07-displ-vel-t300.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step08-strain-displ-t150.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/figs/step08-strain-displ-t150.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step09-strain-displ-t150.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/figs/step09-strain-displ-t150.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step10-fault-traction-slip.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/figs/step10-fault-traction-slip.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step11-fault-traction-slip.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/figs/step11-fault-traction-slip.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step12-displ-t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/figs/step12-displ-t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step13-displ-t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/figs/step13-displ-t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step14-displ-t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/figs/step14-displ-t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step15-displ-t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity/figs/step15-displ-t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step16-stress_xx-t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity/figs/step16-stress_xx-t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step17-displ-t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity/figs/step17-displ-t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step18-displ.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/figs/step18-displ.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step19-stress_t200.jpg (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/figs/step19-stress_t200.jpg)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step20_disp.png (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike/figs/step20_disp.png)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction.lyx (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/friction.lyx)
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction.lyx	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction.lyx	2013-05-18 00:19:26 UTC (rev 22102)
@@ -0,0 +1,1218 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-friction"
+
+\end_inset
+
+Fault Friction Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Static fault friction
+\end_layout
+
+\begin_layout Itemize
+Slip-weakening fault friction
+\end_layout
+
+\begin_layout Itemize
+Rate-and-state fault friction
+\end_layout
+
+\begin_layout Itemize
+Nonlinear solver
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples provides an introduction to using fault friction in
+ static and quasi-static problems with PyLith.
+ Dynamic problems with fault friction are discussed in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:tutorial:shearwave:quad4"
+
+\end_inset
+
+.
+ The boundary conditions are all either static or quasi-static Dirichlet
+ conditions, and only elastic materials are used.
+ In all the fault friction examples we apply axial (x) displacements on
+ both the positive and negative x-faces to maintain a compressive normal
+ tractions on the fault.
+ Otherwise, there would be no frictional resistance.
+ Fault friction generates nonlinear behavior, so we use the nonlinear solver.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step10.cfg
+\family default
+, 
+\family typewriter
+step11.cfg
+\family default
+, 
+\family typewriter
+step12.cfg
+\family default
+, 
+\family typewriter
+step13.cfg
+\family default
+, and 
+\family typewriter
+step14.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step10 - Static Friction (Stick) with Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step10.cfg
+\family default
+ file defines a problem that is identical to example step01, except for
+ the presence of a vertical fault with static friction.
+ In this case, the applied displacements are insufficient to cause the fault
+ to slip, so the solution is identical to that in example step01.
+ As in previous examples involving faults, we must first provide an array
+ defining the fault interfaces:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# Set interfaces to an array of 1 fault: 'fault'.
+\end_layout
+
+\begin_layout LyX-Code
+interfaces = [fault]
+\end_layout
+
+\begin_layout Standard
+Since all fault friction models are nonlinear we must also use the nonlinear
+ solver:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit]
+\end_layout
+
+\begin_layout LyX-Code
+# Fault friction is a nonlinear problem so we need to use the nonlinear
+\end_layout
+
+\begin_layout LyX-Code
+# solver.
+\end_layout
+
+\begin_layout LyX-Code
+solver = pylith.problems.SolverNonlinear
+\end_layout
+
+\begin_layout Standard
+We need to change the fault interface from the default (
+\family typewriter
+FaultCohesiveKin
+\family default
+) to 
+\family typewriter
+FaultCohesiveDyn
+\family default
+ and we set the friction model to use:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces]
+\end_layout
+
+\begin_layout LyX-Code
+# Change fault to dynamic fault interface.
+\end_layout
+
+\begin_layout LyX-Code
+fault = pylith.faults.FaultCohesiveDyn
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Use the static friction model.
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.StaticFriction
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+StaticFriction
+\family default
+ model requires values for the coefficient of friction and the cohesion
+ (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+).
+ We provide both of these using a 
+\family typewriter
+UniformDB
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set static friction model parameters using a uniform DB.
+ Set the
+\end_layout
+
+\begin_layout LyX-Code
+# static coefficient of friction to 0.6 and cohesion to 0.0 Pa.
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.label = Static friction
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.values = [friction-coefficient,cohesion]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.data = [0.6,0.0*Pa]
+\end_layout
+
+\begin_layout Standard
+Fault friction models require additional PETSc settings:
+\end_layout
+
+\begin_layout LyX-Code
+# NOTE: There are additional settings specific to fault friction.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.petsc]
+\end_layout
+
+\begin_layout LyX-Code
+# Friction sensitivity solve used to compute the increment in slip
+\end_layout
+
+\begin_layout LyX-Code
+# associated with changes in the Lagrange multiplier imposed by the
+\end_layout
+
+\begin_layout LyX-Code
+# fault constitutive model.
+\end_layout
+
+\begin_layout LyX-Code
+friction_pc_type = asm
+\end_layout
+
+\begin_layout LyX-Code
+friction_sub_pc_factor_shift_type = nonzero
+\end_layout
+
+\begin_layout LyX-Code
+friction_ksp_max_it = 25
+\end_layout
+
+\begin_layout LyX-Code
+friction_ksp_gmres_restart = 30
+\end_layout
+
+\begin_layout LyX-Code
+# Uncomment to view details of friction sensitivity solve.
+\end_layout
+
+\begin_layout LyX-Code
+#friction_ksp_monitor = true
+\end_layout
+
+\begin_layout LyX-Code
+#friction_ksp_view = true
+\end_layout
+
+\begin_layout LyX-Code
+friction_ksp_converged_reason = true
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step10
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step10-fault-traction-slip"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step10-fault-traction-slip.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Magnitude of tractions on the fault for example step10 visualized using
+ ParaView.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step10-fault-traction-slip"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step11 - Static Friction (Slip) with Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+In step11 we apply twice as much shear displacement as in step10, which
+ is sufficient to induce slip on the fault.
+ All other settings are identical.
+ To change the amount of shear displacement, we change the spatial database
+ for the positive and negative x-faces to a 
+\family typewriter
+UniformDB
+\family default
+, and apply the altered values within the 
+\family typewriter
+.cfg
+\family default
+ file:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [-1.0*m,2.0*m]
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [1.0*m,-2.0*m]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step11
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step11-fault-traction-slip"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step11-fault-traction-slip.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Magnitude of tractions on the fault for example step10 visualized using
+ ParaView.
+ Vectors of fault slip are also plotted.
+ Note that PyLith outputs slip in the fault coordinate system, so we transform
+ them to the global coordinate system using the Calculator in ParaView.
+ A more general approach involves outputing the fault coordinate system
+ information and using these fields in the Calculator.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step11-fault-traction-slip"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step12 - Static Friction with Quasi-Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step12.cfg
+\family default
+ file describes a problem that is similar to examples step10 and step11,
+ except that we apply velocity boundary conditions and run the simulation
+ for 200 years.
+ Once fault friction is overcome, the fault slips at a steady rate.
+ To prevent convergence problems we set the time step size to a constant
+ value of 5 years:
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 200 years, and use a constant time
+\end_layout
+
+\begin_layout LyX-Code
+# step size of 5 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 200.0*year
+\end_layout
+
+\begin_layout LyX-Code
+dt = 5.0*year
+\end_layout
+
+\begin_layout Standard
+As in the other fault friction examples, we apply initial displacements
+ along the x-axis (to maintain a compressive stress on the fault), and we
+ apply velocity boundary conditions that yield a left-lateral sense of motion:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face -- Dirichlet
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0,1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [-1.0*m,0.0*m]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+For this example, we keep the same coefficient of friction as examples step10
+ and step11, but we include a cohesion of 2 MPa:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set static friction model parameters using a uniform DB.
+ Set the
+\end_layout
+
+\begin_layout LyX-Code
+# static coefficient of friction to 0.6 and cohesion to 2.0 MPa.
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.label = Static friction
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.values = [friction-coefficient,cohesion]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.data = [0.6,2.0*MPa]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step12
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step12-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step12-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step12 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step12-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step13 - Slip-Weakening Friction with Quasi-Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+In this example we replace the static friction fault constitutive model
+ in step12 with a slip-weakening friction fault constitutive model.
+ Fault friction is overcome at about t = 80 years, the fault slips in each
+ subsequent time step.
+ We again use a constant time step size of 5 years and apply the same intial
+ displacement and velocity boundary conditions.
+\end_layout
+
+\begin_layout Standard
+We first define the friction model for the simulation:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Use the slip-weakening friction model.
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.SlipWeakening
+\end_layout
+
+\begin_layout Standard
+The slip-weakening constitutive model requires a static coefficient of friction,
+ a dynamic coefficient of friction, a slip weakening parameter, and a cohesion
+ (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+):
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set slip-weakening friction model parameters using a uniform DB.
+ Set the
+\end_layout
+
+\begin_layout LyX-Code
+# parameters as follows:
+\end_layout
+
+\begin_layout LyX-Code
+# static coefficient of friction: 0.6
+\end_layout
+
+\begin_layout LyX-Code
+# dynamic coefficient of friction: 0.5
+\end_layout
+
+\begin_layout LyX-Code
+# slip-weakening parameter: 0.2 m
+\end_layout
+
+\begin_layout LyX-Code
+# cohesion: 0 Pa
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.label = Slip weakening
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.values = [static-coefficient,dynamic-coefficient,
+\begin_inset Newline newline
+\end_inset
+
+slip-weakening-parameter,cohesion]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.data = [0.6,0.5,0.2*m,0.0*Pa]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step1
+\family default
+3).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step13-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step13-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step13 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step13-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step14 - Rate-and-State Friction with Quasi-Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+In step14 we use a rate-and-state friction model with an ageing law instead
+ of a slip-weakening friction model.
+ Slip begins to occur at about t = 45 years, and continues in each subsequent
+ time step.
+ We again use a constant time step size of 5 years and apply the same intial
+ displacement and velocity boundary conditions.
+\end_layout
+
+\begin_layout Standard
+We first define the friction model for the simulation:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Use the rate-and-state aging friction model.
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.RateStateAgeing
+\end_layout
+
+\begin_layout Standard
+The rate-and-state constitutive model requires a reference coefficient of
+ friction, a reference slip rate, a slip weakening parameter, an a-value,
+ a b-value, and a cohesion (see 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+):
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# Set rate-and-state parameters using a UniformDB.
+ Set the parameters as
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# follows:
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# reference coefficient of friction: 0.6
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# reference slip rate: 1.0e-06 m/s
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# slip-weakening parameter: 0.037 m
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# a: 0.0125
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# b: 0.0172
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# cohesion: 0 Pa
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+friction.db_properties.label = Rate State Ageing
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+friction.db_properties.values = [reference-friction-coefficient,reference-slip-rat
+e,
+\begin_inset Newline newline
+\end_inset
+
+characteristic-slip-distance,constitutive-parameter-a,constitutive-parameter-b,c
+ohesion]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+friction.db_properties.data = [0.6,1.0e-6*m/s,0.0370*m,0.0125,0.0172,0.0*Pa]
+\end_layout
+
+\begin_layout Standard
+For this model, we also want to set the initial value of the state variable:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set spatial database for the initial value of the state variable.
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state.label = Rate State Ageing State
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state.values = [state-variable]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state.data = [92.7*s]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step14
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step14-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step14-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step14 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step14-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity.lyx (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity/gravity.lyx)
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity.lyx	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/gravity.lyx	2013-05-18 00:19:26 UTC (rev 22102)
@@ -0,0 +1,731 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-gravity"
+
+\end_inset
+
+Gravitational Body Force Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Gravitational body forces
+\end_layout
+
+\begin_layout Itemize
+Initial stresses
+\end_layout
+
+\begin_layout Itemize
+Finite strain
+\end_layout
+
+\begin_layout Itemize
+Generalized Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describes a set of problems for PyLith involving gravitatio
+nal body forces.
+ All of the examples are quasi-static and run for a time period of 200 years.
+ These examples also demonstrate the use of a generalized Maxwell viscoelastic
+ material, which is used for the lower crust in all examples.
+ The final example (step17) demonstrates the usage of a finite strain formulatio
+n, which automatically invokes the nonlinear solver.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step15.cfg
+\family default
+, 
+\family typewriter
+step16.cfg
+\family default
+, and 
+\family typewriter
+step17.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step15 - Gravitational Body Forces
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step15.cfg
+\family default
+ file defines a problem with extremely simple Dirichlet boundary conditions.
+ On the positive and negative x-faces, the positive and negative y-faces,
+ and the negative z-face, the displacements normal to the face are set to
+ zero.
+ Because all of the materials in the example have the same density, the
+ elastic solution for loading via gravitational body forces is
+\begin_inset Formula 
+\begin{equation}
+\sigma_{zz}=\rho gh;\:\sigma_{xx}=\sigma_{yy}=\frac{\nu\rho gh}{1-\nu}\:.\label{eq:1-1}
+\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+We first set the gravity field, which by default has values of 9.80655 
+\begin_inset Formula $\unitfrac{m}{s^{2}}$
+\end_inset
+
+ for acceleration and 
+\begin_inset Formula $\left[0,0,-1\right]$
+\end_inset
+
+ for direction:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# Set gravity field (default is None)
+\end_layout
+
+\begin_layout LyX-Code
+gravity_field = spatialdata.spatialdb.GravityField
+\end_layout
+
+\begin_layout Standard
+We use adaptive time stepping, set the simulation time to 200 years, and
+ specify a maximum time step size of 10 years:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit]
+\end_layout
+
+\begin_layout LyX-Code
+# Change time stepping algorithm from uniform time step, to adaptive
+\end_layout
+
+\begin_layout LyX-Code
+# time stepping.
+\end_layout
+
+\begin_layout LyX-Code
+time_step = pylith.problems.TimeStepAdapt
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 200 years, and set the maximum time
+\end_layout
+
+\begin_layout LyX-Code
+# step size to 10 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 200.0*year
+\end_layout
+
+\begin_layout LyX-Code
+max_dt = 10.0*year
+\end_layout
+
+\begin_layout LyX-Code
+stability_factor = 1.0 ; use time step equal to stable value from materials
+\end_layout
+
+\begin_layout Standard
+We use a generalized Maxwell model for the lower crust (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Formulation-for-Gen-Max"
+
+\end_inset
+
+), and use a 
+\family typewriter
+SimpleDB
+\family default
+ to provide the properties.
+ We also request the relevant properties and state variables for output:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to generalized Maxwell viscoelastic.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.GenMaxwellIsotropic3D
+\end_layout
+
+\begin_layout LyX-Code
+# Provide a spatial database from which to obtain property values.
+\end_layout
+
+\begin_layout LyX-Code
+# Since there are additional properties and state variables for the
+\end_layout
+
+\begin_layout LyX-Code
+# generalized Maxwell model, we explicitly request that they be output.
+\end_layout
+
+\begin_layout LyX-Code
+# Properties are named in cell_info_fields and state variables are named
+ in
+\end_layout
+
+\begin_layout LyX-Code
+# cell_data_fields.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.iohandler.filename = spatialdb/mat_genmaxwell.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,shear_ratio,maxwell_time]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,viscous_strain_1,viscous_strain_2,
+\begin_inset Newline newline
+\end_inset
+
+viscous_strain_3]
+\end_layout
+
+\begin_layout Standard
+The boundary conditions for this example are trivial, so we are able to
+ use the default 
+\family typewriter
+ZeroDispDB
+\family default
+ for all faces.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step15
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step15-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step15-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step15 at t = 200 years visualized using
+ ParaView.
+ The z-component of the displacement field is shown with the color contours,
+ and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step15-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step16 - Gravitational Body Forces with Initial Stresses
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step16.cfg
+\family default
+ file defines a problem that is identical to example step15, except that
+ initial stresses are used to prevent the initial large displacements due
+ to 'turning on' gravity.
+ Since all normal stress components are given an initial stress of 
+\begin_inset Formula $\rho gh$
+\end_inset
+
+, the initial stress state is lithostatic, which is an appropriate condition
+ for many tectonic problems in the absence of tectonic stresses (e.g., McGarr
+ 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "McGarr:1988"
+
+\end_inset
+
+).
+ When compared to example step15, this example should maintain a lithostatic
+ state of stress for the entire simulation, and displacements should remain
+ essentially zero.
+\end_layout
+
+\begin_layout Standard
+We set the gravity field, as in example step15, and we again use adaptive
+ time stepping with a generalized Maxwell rheology for the lower crust.
+ We provide values for the initial stress for both the upper and lower crust.
+ Since the materials have the same density, we are able to use the same
+ 
+\family typewriter
+SimpleDB
+\family default
+ with a linear variation for both (see file 
+\family typewriter
+examples/3d/hex8/spatialdb/initial_stress.spatialdb
+\family default
+):
+\end_layout
+
+\begin_layout LyX-Code
+# We must specify initial stresses for each material.
+\end_layout
+
+\begin_layout LyX-Code
+# We provide a filename for the spatial database that gives the stresses,
+\end_layout
+
+\begin_layout LyX-Code
+# and we change the query_type from the default 'nearest' to 'linear'.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.upper_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.query_type = linear
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.query_type = linear
+\end_layout
+
+\begin_layout Standard
+Note that we use a 
+\family typewriter
+linear
+\family default
+ 
+\family typewriter
+query_type
+\family default
+ rather than the default type of 
+\family typewriter
+nearest
+\family default
+, so that a linear interpolation is performed along the z-direction.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step16
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step16-stress_xx-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step16-stress_xx-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Stress field (xx-component) for example step16 at t = 200 years visualized
+ using ParaView.
+ Note that for this example, Stress_xx = Stress_yy = Stress_zz, and there
+ is no vertical displacement throughout the simulation.
+ Also note that the stresses appear as four layers since we have used 
+\family typewriter
+CellFilterAvg
+\family default
+ for material output.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step16-stress_xx-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step17 - Gravitational Body Forces with Small Strain
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step17.cfg
+\family default
+ file defines a problem that is identical to example step15, except that
+ we now use a small strain formulation (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Small-Strain-Formulation"
+
+\end_inset
+
+).
+ All of the problems up to this point have assumed infinitesimal strain,
+ meaning that the change in shape of the domain during deformation is not
+ taken into account.
+ In many problems it is important to consider the change in shape of the
+ domain.
+ This is particularly important in many problems involving gravitational
+ body forces, since a change in shape of the domain results in a different
+ stress field.
+ By examining the stress and deformation fields for this example in comparison
+ with those of example step15, we can see what effect the infinitesimal
+ strain approximation has on our solution.
+\end_layout
+
+\begin_layout Standard
+We set the gravity field, as in example step15 and again use adaptive time
+ stepping withs a generalized Maxwell rheology for the lower crust.
+ The only change is that we change the problem formulation from the default
+ 
+\family typewriter
+Implicit
+\family default
+ to 
+\family typewriter
+ImplicitLgDeform
+\family default
+.
+ Since the large deformation formulation is nonlinear, PyLith automatically
+ switches the solver from the default 
+\family typewriter
+SolverLinear
+\family default
+ to 
+\family typewriter
+SolverNonlinear
+\family default
+.
+ It is thus only necessary to change the formulation:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# Set the formulation for finite strain.
+ The default solver will
+\end_layout
+
+\begin_layout LyX-Code
+# automatically be switched to the nonlinear solver.
+\end_layout
+
+\begin_layout LyX-Code
+formulation = pylith.problems.ImplicitLgDeform
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step17
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step17-disp-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step17-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step17 at t = 200 years visualized using
+ ParaView.
+ The z-component of the displacement field is shown with the color contours,
+ and the vectors show the computed displacements.
+ Note the larger displacements compared with example step15.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step17-disp-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic.lyx (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx)
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic.lyx	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic.lyx	2013-05-18 00:19:26 UTC (rev 22102)
@@ -0,0 +1,2501 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-quasistatic"
+
+\end_inset
+
+Quasi-Static Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+Formatting timestamps of VTK output files
+\end_layout
+
+\begin_layout Itemize
+HDF5 output
+\end_layout
+
+\begin_layout Itemize
+Output of velocity field
+\end_layout
+
+\begin_layout Itemize
+Dirichlet displacement and velocity boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Neumann traction boundary conditions and time-varying tractions
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Itemize
+CompositeDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Quasi-static fault rupture and fault creep
+\end_layout
+
+\begin_layout Itemize
+Multiple kinematic fault ruptures
+\end_layout
+
+\begin_layout Itemize
+Specifying more than one material
+\end_layout
+
+\begin_layout Itemize
+Nonlinear solver
+\end_layout
+
+\begin_layout Itemize
+Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Power-law viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Drucker-Prager elastoplastic material
+\end_layout
+
+\begin_layout Itemize
+Adaptive time stepping
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describes a set of quasi-static problems for PyLith.
+ These quasi-static problems primarily demonstrate the usage of time-dependent
+ boundary conditions and fault slip, as well as different rheologies.
+ Some of the examples also demonstrate the usage of the nonlinear solver,
+ which is required by the nonlinear rheologies (power-law viscoelastic and
+ Drucker-Prager elastoplastic).
+ Some of the examples also demonstrate the usage of HDF5 output, which is
+ an alternative to the default VTK output.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step04.cfg
+\family default
+, 
+\family typewriter
+step05.cfg
+\family default
+, 
+\family typewriter
+step06.cfg
+\family default
+, 
+\family typewriter
+step07.cfg
+\family default
+, 
+\family typewriter
+step08.cfg
+\family default
+, and 
+\family typewriter
+step09.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step04 - Pure Dirichlet Velocity Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step04.cfg
+\family default
+ file defines a problem with x-displacements fixed at zero on the positive
+ and negative x-faces while velocity boundary conditions are applied in
+ the y-directions on the same faces, yielding a left-lateral sense of movement.
+ The bottom (negative z) boundary is held fixed in the z-direction.
+ We also use a Maxwell viscoelastic material for the lower crust, and the
+ simulation is run for 200 years using a constant time-step size of 20 years.
+ The default time stepping behavior is 
+\family typewriter
+TimeStepUniform
+\family default
+.
+ We retain that behavior for this problem and provide the total simulation
+ time and the time-step size:
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 200 years, and use a constant time
+\end_layout
+
+\begin_layout LyX-Code
+# step size of 20 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 200.0*year
+\end_layout
+
+\begin_layout LyX-Code
+dt = 20.0*year 
+\end_layout
+
+\begin_layout Standard
+We then change the material type of the lower crust, provide a spatial database
+ from which to obtain the material properties (using the default 
+\family typewriter
+SimpleDB
+\family default
+), and request additional output information for the material:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to Maxwell viscoelastic.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.MaxwellIsotropic3D
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Provide a spatial database from which to obtain property values.
+\end_layout
+
+\begin_layout LyX-Code
+# Since there are additional properties and state variables for the Maxwell
+\end_layout
+
+\begin_layout LyX-Code
+# model, we explicitly request that they be output.
+ Properties are named in
+\end_layout
+
+\begin_layout LyX-Code
+# cell_info_fields and state variables are named in cell_data_fields.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.iohandler.filename = spatialdb/mat_maxwell.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,maxwell_time]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,viscous_strain]
+\end_layout
+
+\begin_layout Standard
+Note that the default 
+\family typewriter
+output.cell_info_fields
+\family default
+ are those corresponding to an elastic material (
+\family typewriter
+density
+\family default
+, 
+\family typewriter
+mu
+\family default
+, 
+\family typewriter
+lambda
+\family default
+), and the default 
+\family typewriter
+output.cell_data_fields
+\family default
+ are 
+\family typewriter
+total_strain
+\family default
+ and 
+\family typewriter
+stress
+\family default
+.
+ For materials other than elastic, there are generally additional material
+ properties and state variables, and the appropriate additional fields must
+ be specifically requested for each material type.
+\end_layout
+
+\begin_layout Standard
+This example has no displacements in the elastic solution (t = 0), so we
+ retain the default 
+\family typewriter
+ZeroDispDB
+\family default
+ for all instances of 
+\family typewriter
+db_initial
+\family default
+.
+ To apply the velocity boundary conditions, we must specify 
+\family typewriter
+db_rate
+\family default
+, which is zero by default.
+ We use a 
+\family typewriter
+UniformDB
+\family default
+ to assign the velocities:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+Note that 
+\family typewriter
+db_rate
+\family default
+ requires a start time, which allows the condition to be applied at any
+ time during the simulation.
+ For this example, we start the velocity boundary conditions at t = 0.
+\end_layout
+
+\begin_layout Standard
+Finally, we must provide information on VTK output.
+ This is slightly more complicated than the static case, because we must
+ decide the frequency with which output occurs for each output manager.
+ We also assign a more user-friendly format to the output file time stamp,
+ and we request that the time stamp is in units of 1 year (rather than the
+ default value of seconds):
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for VTK domain output of solution over domain.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.domain]
+\end_layout
+
+\begin_layout LyX-Code
+# We specify that output occurs in terms of a given time frequency, and
+\end_layout
+
+\begin_layout LyX-Code
+# ask for output every 40 years.
+ The time stamps of the output files are
+\end_layout
+
+\begin_layout LyX-Code
+# in years (rather than the default of seconds), and we give a format for
+\end_layout
+
+\begin_layout LyX-Code
+# the time stamp.
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 40.0*year
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step04.vtk
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_format = %04.0f
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_constant = 1.0*year
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for VTK domain output of solution over ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step04-groundsurf.vtk
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_format = %04.0f
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_constant = 1.0*year
+\end_layout
+
+\begin_layout Standard
+We provide similar output information for the two materials (
+\family typewriter
+upper_crust
+\family default
+ and 
+\family typewriter
+lower_crust
+\family default
+).
+ Note that for the domain output, we requested output in terms of a given
+ time frequency, while for the subdomain we requested output in terms of
+ number of time steps.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step04
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step04-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step04-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step04 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step04-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step05 - Time-Varying Dirichlet and Neumann Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step05.cfg
+\family default
+ file describes a problem with time-varying Dirichlet and Neumann boundary
+ conditions.
+ The example is similar to example step04, with a few important differences:
+\end_layout
+
+\begin_layout Itemize
+The Dirichlet boundary conditions on the negative x-face include an initial
+ displacement (applied in the elastic solution), as well as a constant velocity.
+\end_layout
+
+\begin_layout Itemize
+Neumann (traction) boundary conditions are applied in the negative x-direction
+ on the positive x-face, giving a compressive stress.
+ An initial traction is applied in the elastic solution, and then at t =
+ 100 years it begins decreasing linearly until it reaches zero at the end
+ of the simulation (t = 200 years).
+\end_layout
+
+\begin_layout Standard
+We again use a Maxwell viscoelastic material for the lower crust.
+\end_layout
+
+\begin_layout Standard
+For the boundary conditions, we must first change the boundary condition
+ type for the positive x-face from the default Dirichlet to Neumann:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face -- first change bc type to Neumann
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc]
+\end_layout
+
+\begin_layout LyX-Code
+x_pos = pylith.bc.Neumann 
+\end_layout
+
+\begin_layout Standard
+We provide quadrature information for this face as we did for example step02.
+ We then use a 
+\family typewriter
+UniformDB
+\family default
+ for both the initial tractions as well as the traction rates.
+ We provide a start time of 100 years for the traction rates, and use a
+ rate of 0.01 MPa/year, so that by the end of 200 years we have completely
+ cancelled the initial traction of -1 MPa:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+# First specify a UniformDB for the initial tractions, along with the values.
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Neumann BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [traction-shear-horiz,traction-shear-vert,traction-normal]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [0.0*MPa,0.0*MPa,-1.0*MPa]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Provide information on traction rates.
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Neumann rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [traction-rate-shear-horiz,traction-rate-shear-vert,
+\begin_inset Newline newline
+\end_inset
+
+traction-rate-normal,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*MPa/year,0.0*MPa/year,0.01*MPa/year,100.0*year]
+\end_layout
+
+\begin_layout Standard
+The boundary conditions on the negative x-face are analogous, but we are
+ instead using Dirichlet boundary conditions, and the initial displacement
+ is in the same direction as the applied velocities:
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Initial displacements.
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [0.0*cm,-0.5*cm]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Velocities.
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+The boundary conditions on the negative z-face are supplied in the same
+ manner as for example step04.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step05
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step05-displ-t40"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step05-displ-t40.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step05 at t = 40 years visualized using ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step05-displ-t40"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step06 - Dirichlet Boundary Conditions with Time-Dependent Kinematic Fault
+ Slip
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step06.cfg
+\family default
+ file defines a problem with Dirichlet (displacement) boundary conditions
+ corresponding to zero x- and y-displacements applied on the negative and
+ positive x-faces and a vertical fault that includes multiple earthquake
+ ruptures as well as steady fault creep.
+ The upper (locked) portion of the fault has 4 m of left-lateral slip every
+ 200 years, while the lower (creeping) portion of the fault slips at a steady
+ rate of 2 cm/year.
+ The problem bears some similarity to the strike-slip fault model of Savage
+ and Prescott 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Savage:Prescott:1978"
+
+\end_inset
+
+, except that the fault creep extends through the viscoelastic portion of
+ the domain, and the far-field displacement boundary conditions are held
+ fixed.
+\end_layout
+
+\begin_layout Standard
+In this example and the remainder of the examples in this section, we change
+ the time stepping behavior from the default 
+\family typewriter
+TimeStepUniform
+\family default
+ to 
+\family typewriter
+TimeStepAdapt
+\family default
+.
+ For adaptive time stepping, we provide the maximum permissible time-step
+ size, along with a stability factor.
+ The stability factor controls the time-step size relative to the stable
+ time-step size provided by the different materials in the model.
+ A 
+\family typewriter
+stability_factor
+\family default
+ of 1.0 means we should use the stable time-step size, while a 
+\family typewriter
+stability_factor
+\family default
+ greater than 1.0 means we want to use a smaller time-step size.
+ A 
+\family typewriter
+stability_factor
+\family default
+ less than 1.0 allows time-step sizes greater than the stable time-step size,
+ which may provide inaccurate results.
+ The adaptive time stepping information is provided as:
+\end_layout
+
+\begin_layout LyX-Code
+# Change time stepping algorithm from uniform time step, to adaptive
+\end_layout
+
+\begin_layout LyX-Code
+# time stepping.
+\end_layout
+
+\begin_layout LyX-Code
+time_step = pylith.problems.TimeStepAdapt
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 700 years, and set the maximum time
+\end_layout
+
+\begin_layout LyX-Code
+# step size to 10 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 700.0*year
+\end_layout
+
+\begin_layout LyX-Code
+max_dt = 10.0*year
+\end_layout
+
+\begin_layout LyX-Code
+stability_factor = 1.0 ; use time step equal to stable value from materials
+\end_layout
+
+\begin_layout Standard
+In this example and the remainder of the examples in this section, we also
+ make use of HDF5 output rather than the default VTK output.
+ HDF5 output is a new feature beginning with PyLith version 1.6, and it is
+ much more efficient with the additional advantage that multiple time steps
+ can be contained in a single file.
+ PyLith also produces Xdmf files describing the contents of the HDF5 files,
+ which allows the files to be read easily by applications such as ParaView.
+ Since VTK output is still the default, we must change the value from the
+ default.
+ Also note that the filename suffix is 
+\family typewriter
+.h5
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over domain.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.domain]
+\end_layout
+
+\begin_layout LyX-Code
+# We specify that output occurs in terms of a given time frequency, and
+\end_layout
+
+\begin_layout LyX-Code
+# ask for output every 50 years.
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 50.0*year
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We are using HDF5 output so we must change the default writer.
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06.h5  
+\end_layout
+
+\begin_layout Standard
+Note that we no longer need the 
+\family typewriter
+writer.time_format
+\family default
+ or 
+\family typewriter
+writer.time_constant
+\family default
+ properties, since all time steps are contained in a single file.
+ The HDF5 writer does not have these properties, so if we attempt to define
+ them an error will result.
+\end_layout
+
+\begin_layout Standard
+We also set the writer for other output as well, since it is not the default.
+ For subdomain output we use:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06-groundsurf.h5  
+\end_layout
+
+\begin_layout Standard
+For fault output we use:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for fault rupture output.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.output]
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06-fault.h5
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newline newline
+\end_inset
+
+pylith.meshio.DataWriterHDF5
+\family default
+ for fault output.
+\end_layout
+
+\begin_layout Standard
+Due to the simplicity of the boundary conditions, we are able to use the
+ default 
+\family typewriter
+ZeroDispBC
+\family default
+ for the positive and negative x-faces, as well as the negative z-face.
+ As for example step03, we define a fault interface, we identify the nodeset
+ corresponding to the fault, and we provide quadrature information for the
+ fault.
+ We then define an array of earthquake sources and provide an origin time
+ for each:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set earthquake sources to an array consisting of creep and 3 ruptures.
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs = [creep,one,two,three]
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.creep.origin_time = 00.0*year
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.one.origin_time = 200.0*year
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.two.origin_time = 400.0*year
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.three.origin_time = 600.0*year
+\end_layout
+
+\begin_layout Standard
+Note that the creep begins at t = 0 years, while the ruptures (
+\family typewriter
+one
+\family default
+, 
+\family typewriter
+two
+\family default
+, 
+\family typewriter
+three
+\family default
+) occur at regular intervals of 200 years.
+ We retain the default 
+\family typewriter
+StepSlipFn
+\family default
+ for the ruptures.
+ Each of the ruptures has the same amount of slip, and slip occurs simultaneousl
+y for the entire rupture region, so we can use the same 
+\family typewriter
+SimpleDB
+\family default
+ files providing slip and slip time for each rupture:
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip and origin time for first rupture.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.one.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip and origin time for second rupture.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.two.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip and origin time for third rupture.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.three.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\end_layout
+
+\begin_layout Standard
+For the creep source, we change the slip function to 
+\family typewriter
+ConstRateSlipFn
+\family default
+, and we use a 
+\family typewriter
+SimpleDB
+\family default
+ for both the slip time and the slip rate:
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip rate and origin time for fault creep.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.creep]
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.ConstRateSlipFn
+\end_layout
+
+\begin_layout LyX-Code
+slip_function.slip_rate.iohandler.filename = spatialdb/sliprate_creep.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_function.slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\end_layout
+
+\begin_layout Standard
+For all earthquake sources we provide both an 
+\family typewriter
+origin_time
+\family default
+ and a 
+\family typewriter
+slip_function.slip_time
+\family default
+.
+ The first provides the starting time for the entire earthquake source,
+ while the second provides any spatial variation in the slip time with respect
+ to the 
+\family typewriter
+origin_time
+\family default
+ (if any).
+ Since there are multiple earthquake sources of different types, there are
+ a number of additional fault information fields available for output.
+ We add these additional fields' output to the fault information file:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_creep,
+\begin_inset Newline newline
+\end_inset
+
+final_slip_one,final_slip_two,final_slip_three,slip_time_creep,slip_time_one,
+\begin_inset Newline newline
+\end_inset
+
+slip_time_two,slip_time_three]
+\end_layout
+
+\begin_layout Standard
+This additional information will be contained in file 
+\family typewriter
+step06-fault_info.h5
+\family default
+.
+ It will contain final slip information for each earthquake source along
+ with slip time information.
+ When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step06
+\family default
+).
+ To open the files in ParaView, the Xdmf (
+\family typewriter
+.xmf
+\family default
+) files should be opened, as these files describe the HDF5 data structure.
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step06-displ-t300"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step06-displ-t300.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step06 at t = 300 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step06-displ-t300"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step07 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
+ Fault Slip
+\end_layout
+
+\begin_layout Standard
+In step07 we add velocity boundary conditions in the positive and negative
+ y-directions on the positive and negative x-faces, so that the external
+ boundaries keep pace with the average fault slip.
+ This problem is nearly identical to the strike-slip fault model of Savage
+ and Prescott 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Savage:Prescott:1978"
+
+\end_inset
+
+, except that the fault creep extends through the viscoelastic portion of
+ the domain.
+\end_layout
+
+\begin_layout Standard
+We use the default 
+\family typewriter
+ZeroDispBC
+\family default
+ for the initial displacements on the positive and negative x-faces, as
+ well as the negative z-face.
+ For the velocities on the positive and negative x-faces, we use a 
+\family typewriter
+UniformDB
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+The fault definition information is identical to example 
+\family typewriter
+step06
+\family default
+.
+ In previous examples, we have just used the default output for the domain
+ and subdomain (ground surface), which includes the displacements.
+ In many cases, it is also useful to include the velocities.
+ PyLith provides this information, computing the velocities for the current
+ time step as the difference between the current displacements and the displacem
+ents from the previous time step, divided by the time-step size.
+ This is more accurate than computing the velocities from the displacement
+ field output that has been decimated in time.
+ We can obtain this information by explicitly requesting it in 
+\family typewriter
+vertex_data_fields
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over domain.
+\begin_inset Newline newline
+\end_inset
+
+[pylithapp.problem.formulation.output.domain]
+\end_layout
+
+\begin_layout LyX-Code
+# We specify that output occurs in terms of a given time frequency, and
+\end_layout
+
+\begin_layout LyX-Code
+# ask for output every 50 years.
+\end_layout
+
+\begin_layout LyX-Code
+# We also request velocity output in addition to displacements.
+\begin_inset Newline newline
+\end_inset
+
+vertex_data_fields = [displacement,velocity]
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 50.0*year
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We are using HDF5 output so we must change the default writer.
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step07.h5
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We also request velocity output in addition to displacements.
+\end_layout
+
+\begin_layout LyX-Code
+vertex_data_fields = [displacement,velocity]
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step07-groundsurf.h5
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step07
+\family default
+).
+ As for example step06, make sure to open the 
+\family typewriter
+.xmf
+\family default
+ files rather than the 
+\family typewriter
+.h5
+\family default
+ files.
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step07-displ-vel-t300"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step07-displ-vel-t300.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field (color contours) and velocity field (vectors) for example
+ step07 at t = 300 years visualized using ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed velocities.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step07-displ-vel-t300"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step08 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
+ Fault Slip and Power-Law Rheology
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Tutorial-Step08-Power-law"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step08.cfg
+\family default
+ file defines a problem that is identical to example step07, except the
+ the lower crust is composed of a power-law viscoelastic material.
+ Since the material behavior is now nonlinear, we must use the nonlinear
+ solver:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# For this problem we must switch to a nonlinear solver.
+\end_layout
+
+\begin_layout LyX-Code
+implicit.solver = pylith.problems.SolverNonlinear
+\end_layout
+
+\begin_layout Standard
+Although we have not discussed the PyLith PETSc settings previously, note
+ that the use of the nonlinear solver may require additional options if
+ we wish to override the defaults.
+ These settings are contained in 
+\family typewriter
+pylithapp.cfg
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.petsc]
+\end_layout
+
+\begin_layout LyX-Code
+# Nonlinear solver monitoring options.
+\end_layout
+
+\begin_layout LyX-Code
+snes_rtol = 1.0e-8
+\end_layout
+
+\begin_layout LyX-Code
+snes_atol = 1.0e-12
+\end_layout
+
+\begin_layout LyX-Code
+snes_max_it = 100
+\end_layout
+
+\begin_layout LyX-Code
+snes_monitor = true
+\end_layout
+
+\begin_layout LyX-Code
+snes_view = true
+\end_layout
+
+\begin_layout LyX-Code
+snes_converged_reason = true
+\end_layout
+
+\begin_layout Standard
+These settings are ignored unless we are using the nonlinear solver.
+\end_layout
+
+\begin_layout Standard
+When setting the physical properties for the power-law material in PyLith,
+ the parameters (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Power-Law-Maxwell-Viscoelastic"
+
+\end_inset
+
+) do not generally correspond to the values provided in laboratory results.
+ PyLith includes a utility code, 
+\family typewriter
+powerlaw_gendb.py
+\family default
+, to simplify the process of using laboratory results with PyLith.
+ This utility code is installed in the same location as PyLith.
+ An example of how to use it is in 
+\family typewriter
+examples/3d/hex8/spatialdb/powerlaw
+\family default
+.
+ The user must provide a spatial database defining the spatial distribution
+ of laboratory-derived parameters (contained in 
+\family typewriter
+powerlaw_params.
+\begin_inset Newline linebreak
+\end_inset
+
+spatialdb
+\family default
+), another spatial database defining the temperature field in degrees K
+ (contained in 
+\family typewriter
+temperature.spatialdb
+\family default
+), and a set of points for which values are desired (
+\family typewriter
+powerlaw_points.txt
+\family default
+).
+ The parameters for the code are defined in 
+\family typewriter
+powerlaw_gendb.cfg
+\family default
+.
+ The properties expected by PyLith are 
+\family typewriter
+reference_strain_rate
+\family default
+, 
+\family typewriter
+reference_stress
+\family default
+, and 
+\family typewriter
+power_law_exponent
+\family default
+.
+ The user must specify either 
+\family typewriter
+reference_strain_rate
+\family default
+ or 
+\family typewriter
+reference_stress
+\family default
+ so that 
+\family typewriter
+powerlaw_gendb.py
+\family default
+ can compute the other property.
+ Default values of 1.0e-6 1/s and 1 MPa are provided.
+ In this example, the same database was used for all parameters, and a separate
+ database was used to define the temperature distribution.
+ In practice, the user can provide any desired thermal model to provide
+ the spatial database for the temperature.
+ In this example, a simple 1D (vertically-varying) distribution was used.
+ The utility code can be used by simply executing it from the 
+\family typewriter
+examples/3d/hex8/spatialdb/powerlaw
+\family default
+ directory:
+\end_layout
+
+\begin_layout LyX-Code
+powerlaw_gendb.py
+\end_layout
+
+\begin_layout Standard
+This code will automatically read the parameters in 
+\family typewriter
+powerlaw_gendb.cfg
+\family default
+ in creating the file
+\begin_inset Newline newline
+\end_inset
+
+ 
+\family typewriter
+examples/3d/hex8/spatialdb/mat_powerlaw.spatialdb
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+We first change the material type of the lower crust to 
+\family typewriter
+PowerLaw3D
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to power-law viscoelastic.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.PowerLaw3D
+\end_layout
+
+\begin_layout Standard
+In many cases, it is useful to obtain the material properties from two different
+ sources.
+ For example, the elastic properties may come from a seismic velocity model
+ while the viscous properties may be derived from a thermal model.
+ In such a case we can use a 
+\family typewriter
+CompositeDB
+\family default
+, which allows a different spatial database to be used for a subset of the
+ properties.
+ We do this as follows:
+\end_layout
+
+\begin_layout LyX-Code
+# Provide a spatial database from which to obtain property values.
+\end_layout
+
+\begin_layout LyX-Code
+# In this case, we prefer to obtain the power-law properties from one
+\end_layout
+
+\begin_layout LyX-Code
+# database and the elastic properties from another database, so we use
+\end_layout
+
+\begin_layout LyX-Code
+# a CompositeDB.
+ Each part of the CompositeDB is a SimpleDB.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_properties = spatialdata.spatialdb.CompositeDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_A = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_B = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout Standard
+We must define the properties that come from each spatial database and then
+ provide the database parameters:
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# Provide the values to be obtained from each database and the database
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# name.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+[pylithapp.timedependent.materials.lower_crust.db_properties]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+values_A = [density,vs,vp]   ; Elastic properties.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_A.label = Elastic properties
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+values_B = [reference-stress,reference-strain-rate,power-law-exponent] 
+  ; Power-law properties.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_B.label = Power-law properties
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_B.iohandler.filename = spatialdb/mat_powerlaw.spatialdb
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+PowerLaw3D
+\family default
+ material has additional properties and state variables with respect to
+ the default 
+\family typewriter
+ElasticIsotropic3D
+\family default
+ material, so we request that these properties be written to the 
+\family typewriter
+lower_crust
+\family default
+ material files:
+\end_layout
+
+\begin_layout LyX-Code
+# Since there are additional properties and state variables for the
+\end_layout
+
+\begin_layout LyX-Code
+# power-law model, we explicitly request that they be output.
+ Properties are
+\end_layout
+
+\begin_layout LyX-Code
+# named in cell_info_fields and state variables are named in
+\end_layout
+
+\begin_layout LyX-Code
+# cell_data_fields.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,reference_strain_rate,reference_stre
+ss,
+\begin_inset Newline newline
+\end_inset
+
+power_law_exponent]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,viscous_strain]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step08
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step08-strain-displ-t150"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step08-strain-displ-t150.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+The XY-component of strain (color contours) and displacement field (vectors)
+ for example step08 at t = 150 years visualized using ParaView.
+ For this visualization, we loaded both the 
+\family typewriter
+step08-lower_crust.xmf
+\family default
+ and 
+\family typewriter
+step08-upper_crust.xmf
+\family default
+ files to contour the strain field, and superimposed on it the displacement
+ field vectors from 
+\family typewriter
+step08.xmf
+\family default
+.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step08-strain-displ-t150"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step09 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
+ Fault Slip and Drucker-Prager Elastoplastic Rheology
+\end_layout
+
+\begin_layout Standard
+In this example we use a Drucker-Prager elastoplastic rheology in the lower
+ crust.
+ As in example step08, the material behavior is nonlinear so we again use
+ the nonlinear solver.
+ The material is elastoplastic, there is no inherent time-dependent response
+ and the stable time-step size for the material depends on the loading condition
+s.
+ To avoid this, we set the maximum time-step size to 5 years rather than
+ the value of 10 years used in example 
+\family typewriter
+step08
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 700 years, and set the maximum time
+\end_layout
+
+\begin_layout LyX-Code
+# step size to 5 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 700.0*year
+\end_layout
+
+\begin_layout LyX-Code
+max_dt = 5.0*year
+\end_layout
+
+\begin_layout LyX-Code
+stability_factor = 1.0 ; use time step equal to stable value from materials
+\end_layout
+
+\begin_layout LyX-Code
+# For this problem we set adapt_skip to zero so that the time step size
+ is
+\end_layout
+
+\begin_layout LyX-Code
+# readjusted every time step.
+\end_layout
+
+\begin_layout LyX-Code
+adapt_skip = 0
+\end_layout
+
+\begin_layout Standard
+We change the material type of the lower crust to 
+\family typewriter
+DruckerPrager3D
+\family default
+, and we again use a 
+\family typewriter
+CompositeDB
+\family default
+ to assign the material properties:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to Drucker-Prager.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.DruckerPrager3D
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+# Provide a spatial database from which to obtain property values.
+\end_layout
+
+\begin_layout LyX-Code
+# In this case, we prefer to obtain the Drucker-Prager properties from one
+\end_layout
+
+\begin_layout LyX-Code
+# database and the elastic properties from another database, so we use
+\end_layout
+
+\begin_layout LyX-Code
+# a CompositeDB.
+ Each part of the CompositeDB is a SimpleDB.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_properties = spatialdata.spatialdb.CompositeDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_A = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_B = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout Standard
+As for the step08 example, we first define the properties that come from
+ each spatial database and then provide the database filename:
+\end_layout
+
+\begin_layout LyX-Code
+# Provide the values to be obtained from each database and the database
+\end_layout
+
+\begin_layout LyX-Code
+# name.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust.db_properties]
+\end_layout
+
+\begin_layout LyX-Code
+values_A = [density,vs,vp]   ; Elastic properties.
+\end_layout
+
+\begin_layout LyX-Code
+db_A.label = Elastic properties
+\end_layout
+
+\begin_layout LyX-Code
+db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+values_B = [friction-angle,cohesion,dilatation-angle]   ; Drucker-Prager
+ properties.
+\end_layout
+
+\begin_layout LyX-Code
+db_B.label = Drucker-Prager properties
+\end_layout
+
+\begin_layout LyX-Code
+db_B.iohandler.filename = spatialdb/mat_druckerprager.spatialdb
+\end_layout
+
+\begin_layout Standard
+We also request output of the properties and state variables that are unique
+ to the 
+\family typewriter
+DruckerPrager3D
+\family default
+ material:
+\end_layout
+
+\begin_layout LyX-Code
+# Since there are additional properties and state variables for the
+\end_layout
+
+\begin_layout LyX-Code
+# Drucker-Prager model, we explicitly request that they be output.
+\end_layout
+
+\begin_layout LyX-Code
+# Properties are named in cell_info_fields and state variables are named
+ in
+\end_layout
+
+\begin_layout LyX-Code
+# cell_data_fields.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,alpha_yield,beta,alpha_flow]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,plastic_strain]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step09
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step09-strain-displ-t150"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step08-strain-displ-t150.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+The XY-component of strain (color contours) and displacement field (vectors)
+ for example step09 at t = 150 years visualized using ParaView.
+ For this visualization, we loaded both the 
+\family typewriter
+step09-lower_crust.xmf
+\family default
+ and 
+\family typewriter
+step09-upper_crust.xmf
+\family default
+ files to contour the strain field, and superimposed on it the displacement
+ field vectors from 
+\family typewriter
+step09.xmf
+\family default
+.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step09-strain-displ-t150"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static.lyx (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static/static.lyx)
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static.lyx	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/static.lyx	2013-05-18 00:19:26 UTC (rev 22102)
@@ -0,0 +1,873 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-static"
+
+\end_inset
+
+Static Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Static solution
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Dirichlet displacement boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Neumann traction boundary conditions
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Static fault rupture
+\end_layout
+
+\begin_layout Itemize
+Specifying more than one material
+\end_layout
+
+\begin_layout Itemize
+Linearly elastic isotropic material
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describe the simplest class of problems for PyLith.
+ The problems are all purely elastic, and there is no time-dependence.
+ This set of elastostatic examples primarily demonstrates the application
+ of different types of boundary conditions in PyLith, as well as demonstrating
+ the use of a kinematic fault for a static problem.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step01.cfg
+\family default
+, 
+\family typewriter
+step02.cfg
+\family default
+, and 
+\family typewriter
+step03.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented to provide detailed information on the various
+ parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step01 - Pure Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step01.cfg
+\family default
+ file defines a problem with pure Dirichlet (displacement) boundary conditions
+ corresponding to compression in the x-direction and shear in the y-direction.
+ The bottom (minimum z) boundary is held fixed in the z-direction.
+ On the positive and negative x-faces, compressional displacements of 1
+ m are applied in the x-direction and shear displacements yielding a left-latera
+l sense of shear are applied in the y-direction.
+ In this example and in subsequent examples we would like to output the
+ displacement solution over a subset of the domain corresponding to the
+ ground surface.
+ To do this, we first set the output to an array of two output managers
+ as follows:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit]
+\end_layout
+
+\begin_layout LyX-Code
+# Set the output to an array of 2 output managers.
+\end_layout
+
+\begin_layout LyX-Code
+# We will output the solution over the domain and the ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+output = [domain,subdomain]
+\end_layout
+
+\begin_layout Standard
+We then define the subdomain output manager to correspond to a subset of
+ the domain:
+\end_layout
+
+\begin_layout LyX-Code
+# Set subdomain component to OutputSolnSubset (boundary of the domain).
+\end_layout
+
+\begin_layout LyX-Code
+output.subdomain = pylith.meshio.OutputSolnSubset
+\end_layout
+
+\begin_layout Standard
+Later (in the output section at the end of the file), we specify the nodeset
+ that corresponds to the desired output:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for VTK domain output of solution over ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step01-groundsurf.vtk
+\end_layout
+
+\begin_layout Standard
+For the boundary conditions, we must describe which degrees of freedom are
+ being constrained (
+\family typewriter
+bc_dof
+\family default
+), we must provide a the label associated with the CUBIT nodeset associated
+ with the BC, and we must specify the type of spatial database is being
+ used to describe the boundary conditions.
+ For the x-faces, we use a 
+\family typewriter
+SimpleDB
+\family default
+ to provide the displacements on the x-faces:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
+\end_layout
+
+\begin_layout Standard
+For a 
+\family typewriter
+SimpleDB
+\family default
+, we must provide a filename.
+ The default spatial database for 
+\family typewriter
+db_initial
+\family default
+ is 
+\family typewriter
+ZeroDispBC
+\family default
+, which automatically applies zero displacements to all vertices in the
+ nodeset, and no filename is required (or needed).
+ This is what we use for the bottom of the mesh:
+\end_layout
+
+\begin_layout LyX-Code
+# -z face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.z_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [2]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -z
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step01
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step01-displ"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step01-displ.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step01 visualized using ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step01-displ"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step02 - Dirichlet and Neumann Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step02.cfg
+\family default
+ file defines a problem with Dirichlet (displacement) boundary conditions
+ corresponding to zero x and y-displacements applied on the negative x-face
+ and Neumann (traction) boundary conditions corresponding to normal compression
+ and horizontal shear applied on the positive x-face.
+ The bottom (negative z) boundary is held fixed in the z-direction.
+ The problem is similar to example step01, except that 1 MPa of normal compressi
+on and 1 MPa of shear (in a left-lateral sense) are applied on the positive
+ x-face, and the negative x-face is pinned in both the x and y-directions.
+\end_layout
+
+\begin_layout Standard
+For the boundary conditions, we must first change the boundary condition
+ type for the positive x-face from the default Dirichlet to Neumann:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face -- first change bc type to Neumann
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc]
+\end_layout
+
+\begin_layout LyX-Code
+x_pos = pylith.bc.Neumann 
+\end_layout
+
+\begin_layout Standard
+We use a 
+\family typewriter
+SimpleDB
+\family default
+ to describe the traction boundary conditions.
+ When applying traction boundary conditions over a surface, it is also necessary
+ to specify integration information for the surface.
+ Since this is a three-dimensional problem, the dimension of the surface
+ is 2.
+ Since the cells being used are trilinear hexahedra, the cell type is 
+\family typewriter
+FIATLagrange
+\family default
+ and we use an integration order of 2.
+ A lower integration order would not provide sufficient accuracy while a
+ higher integration order would offer no benefit (while requiring more computati
+on time and storage):
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Neumann BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/tractions_axial_shear.spatialdb
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We must specify quadrature information for the cell faces.
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 2
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.quad_order = 2 
+\end_layout
+
+\begin_layout Standard
+The boundary conditions on the negative x-face are simpler than they were
+ in example step01 (zero displacements in the x and y-directions), so we
+ can use the default 
+\family typewriter
+ZeroDispBC
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1] 
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x 
+\end_layout
+
+\begin_layout Standard
+The boundary conditions on the negative z-face are supplied in the same
+ manner as for example step01.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step02
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step02-displ"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step02-displ.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step02 visualized using ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step02-displ"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step03 - Dirichlet Boundary Conditions with Kinematic Fault Slip
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step03.cfg
+\family default
+ file describes a problem with Dirichlet (displacement) boundary conditions
+ corresponding to zero x and y-displacements applied on the negative and
+ positive x-faces and a vertical fault with a combination of left-lateral
+ and updip motion.
+ The left-lateral component of fault slip has a constant value of 2 m in
+ the upper crust, and then decreases linearly to zero at the base of the
+ model.
+ The reverse slip component has a value of 0.25 m at the surface, and then
+ decreases linearly to zero at 2 km depth.
+\end_layout
+
+\begin_layout Standard
+Due to the simplicity of the boundary conditions, we are able to use the
+ default 
+\family typewriter
+ZeroDispBC
+\family default
+ for the positive and negative x-faces, as well as the negative z-face.
+ To use a fault, we must first define a fault interface.
+ We do this by providing an array containing a single interface:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# Set interfaces to an array of 1 fault: 'fault'.
+\end_layout
+
+\begin_layout LyX-Code
+interfaces = [fault] 
+\end_layout
+
+\begin_layout Standard
+For this example we specify the fault slip, so we set the interface type
+ to 
+\family typewriter
+FaultCohesiveKin
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Set the type of fault interface condition.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces]
+\end_layout
+
+\begin_layout LyX-Code
+fault = pylith.faults.FaultCohesiveKin 
+\end_layout
+
+\begin_layout Standard
+We must then identify the nodeset corresponding to the fault, and provide
+ integration information for the fault surface:
+\end_layout
+
+\begin_layout LyX-Code
+# Set the parameters for the fault interface condition.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# The label corresponds to the name of the nodeset in CUBIT.
+\end_layout
+
+\begin_layout LyX-Code
+label = fault
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We must define the quadrature information for fault cells.
+\end_layout
+
+\begin_layout LyX-Code
+# The fault cells are 2D (surface).
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 2 
+\end_layout
+
+\begin_layout Standard
+We retain the default 
+\family typewriter
+StepSlipFn
+\family default
+ since we want static fault slip.
+ Finally, we use one 
+\family typewriter
+SimpleDB
+\family default
+ to define the spatial variation of fault slip, and another 
+\family typewriter
+SimpleDB
+\family default
+ to define the spatial variation in slip initiation times (the start time
+ is 0.0 everywhere since this is a static problem):
+\end_layout
+
+\begin_layout LyX-Code
+# The slip time and final slip are defined in spatial databases.
+\begin_inset Newline newline
+\end_inset
+
+[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+\begin_inset Newline newline
+\end_inset
+
+slip.iohandler.filename = spatialdb/finalslip.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip.query_type = linear
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb 
+\end_layout
+
+\begin_layout Standard
+Since the problem now contains a fault, we can request that fault infomation
+ is also output:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for VTK fault output.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.output]
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step03-fault.vtk 
+\end_layout
+
+\begin_layout Standard
+This will result in two extra files being produced.
+ The first file (
+\family typewriter
+step03-fault_info.vtk
+\family default
+) contains information such as the normal directions to the fault surface,
+ the applied fault slip, and the fault slip times.
+ The second file (
+\family typewriter
+step03-fault_t0000000.vtk
+\family default
+) contains the cumulative fault slip for the time step and the change in
+ tractions on the fault surface due to the slip.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step03
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step03-displ"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step03-displ.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step03 visualized using ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step03-displ"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload.lyx (from rev 22098, short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx)
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload.lyx	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload.lyx	2013-05-18 00:19:26 UTC (rev 22102)
@@ -0,0 +1,559 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-surfload"
+
+\end_inset
+
+Surface Load Traction Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Time-dependent Neumann (traction) boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Elastic material
+\end_layout
+
+\begin_layout Itemize
+Output of solution at user-defined locations
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describes a set of problems for PyLith involving surface
+ loading with a Neumann (traction) applied to the ground surface.
+ The first example demonstrates the use of a surface load in a static problem,
+ and the second example demonstates how to apply a cyclic load in a quasi-static
+ problem.
+ The second problem also includes output of the solution at user-defined
+ locations.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step18.cfg
+\family default
+ and 
+\family typewriter
+step19.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step18 - Static Surface Load
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step18.cfg
+\family default
+ file defines a problem with a spatially varying axial surface load applied
+ to the top surface with Dirichlet (roller) boundary conditions on the lateral
+ and bottom surfaces.
+ We first set the array of boundary conditions with one for each surface
+ of the domain.
+ As in the other examples, we also setup output for the ground surface.
+\end_layout
+
+\begin_layout Standard
+For the Dirichlet boundary conditions we fix the degree of freedom associated
+ with motion normal to the boundary while leaving the other degrees of freedom
+ free.
+ We do not explicitly specify the use of a Dirichlet boundary condition
+ because it is the default.
+ Similarly, the ZeroDispDB is the default spatial database for the displacements
+ in a Dirichlet boundary condition, so all we need to specify is the degree
+ of freedom that is constrained, the name of the nodeset from CUBIT, and
+ a label used in diagnostic output.
+ For the Dirichlet boundary condition on the +x surface we have:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout Standard
+On the top surface we apply a Neumann boundary condition for the surface
+ load, so we first set the boundary condition type and then specify the
+ nodeset in CUBIT associated with this surface.
+ For the static surface load, we use a spatial database for the initial
+ value and linear interpolation.
+ We integrate the surface tractions over the boundary, so we also specify
+ the numerical integration scheme to use.
+ Finally, we specify a vector for the up direction because the tractions
+ are applied to a horizontal surface, resulting in ambiguous shear directions
+ for our default orientation convention.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc]
+\end_layout
+
+\begin_layout LyX-Code
+z_pos = pylith.bc.Neumann
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.z_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+\begin_inset Newline newline
+\end_inset
+
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Neumann BC on +z
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/tractions_axial_pressure.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+# Use linear interpolation
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.query_type = linear
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Diagnostic output
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [initial-value]
+\end_layout
+
+\begin_layout LyX-Code
+output.writer.filename = output/step18-traction.vtk
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_filter = pylith.meshio.CellFilterAvg
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We must specify quadrature information for the cell faces.
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 2
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.quad_order = 2
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Because normal for +z surface is [0,0,1], the horizontal and
+\end_layout
+
+\begin_layout LyX-Code
+# vertical shear directions are ambiguous.
+ We provide a "fake" up
+\end_layout
+
+\begin_layout LyX-Code
+# direction of [0,1,0] so that the horizontal shear direction ("up" x
+\end_layout
+
+\begin_layout LyX-Code
+# normal) is [1,0,0] and the vertical shear direction (normal x horiz
+\end_layout
+
+\begin_layout LyX-Code
+# shear dir) is [0,1,0].
+\end_layout
+
+\begin_layout LyX-Code
+up_dir = [0,1,0]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step18
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step18-displ"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step18-displ.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step18 visualized using ParaView.
+ The vectors show the displacement field while the colors in the wireframe
+ correspond to the z-component of the displacement field.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step18-displ"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step19 - Time-Dependent Surface Load
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step19.cfg
+\family default
+ file defines a problem that is identical to example step18, except that
+ we vary the amplitude of the surface load as a function of time.
+ We use a temporal database (analogous to our spatial databases for specifying
+ spatial variations) to prescribe a piecewise linear variation of the amplitude
+ with time as given in the file 
+\family typewriter
+spatialdb/loadcycle.timedb
+\family default
+.
+ The amplitude begins at zero, progresses to 1.0, then 1.5, before decreasing
+ in a symmetric fashion.
+ The temporal database can use variable time steps to prescribe arbitrary
+ time histories.
+ 
+\end_layout
+
+\begin_layout Standard
+Rather than specify a spatial database for the initial value of the Neumann
+ boundary condition corresponding to the surface load, we specify a spatial
+ database for the change in value and the temporal database:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.z_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+db_change = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_change.label = Amplitude of Neumann BC on +z
+\end_layout
+
+\begin_layout LyX-Code
+db_change.iohandler.filename = spatialdb/tractions_axial_pressure.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+# Use linear interpolation
+\end_layout
+
+\begin_layout LyX-Code
+db_change.query_type = linear
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+th_change = spatialdata.spatialdb.TimeHistory
+\end_layout
+
+\begin_layout LyX-Code
+th_change.label = Time history for Neumann BC on +z
+\end_layout
+
+\begin_layout LyX-Code
+th_change.filename = spatialdb/loadcycle.timedb
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step19
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step19-stress-t200"
+
+\end_inset
+
+.
+ We also output the solution at user-defined locations, which are given
+ in the file 
+\family typewriter
+output_points.txt.
+
+\family default
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:output:points"
+
+\end_inset
+
+ for a discussion of the output parameters.
+ This type of output is designed for comparison against observations and
+ inversions and output via HDF5 files (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:HDF5/Xdmf-Output"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step19-stress_t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Stress field (zz-component) for example step19 at t = 200 years visualized
+ using ParaView.
+ The stresses appear as four layers since we have used 
+\family typewriter
+CellFilterAvg
+\family default
+ for material output.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step19-stress-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document



More information about the CIG-COMMITS mailing list