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

brad at geodynamics.org brad at geodynamics.org
Tue Jun 18 11:39:30 PDT 2013


Author: brad
Date: 2013-06-18 11:39:29 -0700 (Tue, 18 Jun 2013)
New Revision: 22357

Added:
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step21_impulse_resp.png
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/greensfns.lyx
Modified:
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx
Log:
Manual merge from v1.7-trunk: step21 manual stuff.

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2013-06-18 00:53:53 UTC (rev 22356)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2013-06-18 18:39:29 UTC (rev 22357)
@@ -632,6 +632,13 @@
 \end_inset
 
 
+\begin_inset CommandInset include
+LatexCommand input
+filename "greensfns.lyx"
+
+\end_inset
+
+
 \end_layout
 
 \end_body

Added: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step21_impulse_resp.png
===================================================================
(Binary files differ)


Property changes on: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/figs/step21_impulse_resp.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/greensfns.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/greensfns.lyx	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/greensfns.lyx	2013-06-18 18:39:29 UTC (rev 22357)
@@ -0,0 +1,445 @@
+#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-greensfns"
+
+\end_inset
+
+Green's Functions Generation Example
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Generation of Green's functions from a fault
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault impulses
+\end_layout
+
+\begin_layout Itemize
+Running a different problem type
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Elastic material
+\end_layout
+
+\begin_layout Itemize
+HDF5 output
+\end_layout
+
+\begin_layout Itemize
+Interpolated point output
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This example describes a problem where we generate a set of Green's functions
+ that could be used in an inversion.
+ 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
+step21.cfg
+\family default
+.
+ The example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith step21.cfg --problem=pylith.problems.GreensFns
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+ and 
+\family typewriter
+greensfns.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+step21.cfg
+\family default
+ file.
+ The 
+\family typewriter
+.cfg
+\family default
+ files are extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step21 - Green's Function Generation
+\end_layout
+
+\begin_layout Standard
+This problem makes use of two 
+\family typewriter
+.cfg
+\family default
+ files that are read by default -- 
+\family typewriter
+pylithapp.cfg
+\family default
+ and 
+\family typewriter
+greensfns.cfg
+\family default
+.
+ The 
+\family typewriter
+greensfns.cfg
+\family default
+ file is read automatically because we have changed the problem type to
+ 
+\family typewriter
+GreensFns
+\family default
+ (as opposed to the default 
+\family typewriter
+TimeDependent
+\family default
+ problem type).
+ The facility name then becomes 
+\family typewriter
+greensfns
+\family default
+, and PyLith will therefore search for a 
+\family typewriter
+.cfg
+\family default
+ file matching the name of the facility.
+ The 
+\family typewriter
+greensfns.cfg
+\family default
+ file contains settings that are specific to the 
+\family typewriter
+GreensFns
+\family default
+ problem type:
+\end_layout
+
+\begin_layout LyX-Code
+[greensfns]
+\end_layout
+
+\begin_layout LyX-Code
+fault_id = 10
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[greensfns.interfaces]
+\end_layout
+
+\begin_layout LyX-Code
+fault = pylith.faults.FaultCohesiveImpulses
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[greensfns.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+impulse_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+db_impulse_amplitude.label = Amplitude of slip impulses
+\end_layout
+
+\begin_layout LyX-Code
+db_impulse_amplitude.iohandler.filename = spatialdb/impulse_amplitude.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_impulse_amplitude.query_type = nearest 
+\end_layout
+
+\begin_layout Standard
+We specify the 
+\family typewriter
+fault_id
+\family default
+, which is required by the 
+\family typewriter
+GreensFns
+\family default
+ problem type (it is the same as the ID used when generating the mesh).
+ We also change the fault type to 
+\family typewriter
+FaultCohesiveImpulses
+\family default
+, which allows us to apply a single impulse of slip for each impulse with
+ a nonzero slip value in the corresponding 
+\family typewriter
+spatialdb
+\family default
+ file (
+\family typewriter
+spatialdb/impulse_amplitude.spatialdb
+\family default
+).
+ We indicate that we would like to apply slip impulses in both the left-lateral
+ (
+\family typewriter
+impulse_dof
+\family default
+ = 0) and updip (
+\family typewriter
+impulse_dof
+\family default
+ = 1) directions, and we use nearest-neighbor interpolation to determine
+ the amount of applied slip.
+ Note that in the 
+\family typewriter
+spatialdb/impulse_amplitude.spatialdb
+\family default
+ file we specify negative slip, thus reversing the sense of applied slip
+ for both slip directions.
+ Note that we also put a margin of zeros around the edge of the fault, which
+ prevents impulses from being applied along this boundary.
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step21.cfg
+\family default
+ file defines the remainder of the parameters for this problem.
+ The boundary conditions and fault information are provided as for previous
+ examples.
+ Rather than computing the solution over the ground surface, we choose to
+ provide output at a set of points.
+ PyLith provides the ability to interpolate displacements to a specified
+ set of points, which would generally be necessary when generating Green's
+ functions:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+output = [domain,points]
+\end_layout
+
+\begin_layout LyX-Code
+output.points = pylith.meshio.OutputSolnPoints
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.points]
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step21-points.h5
+\end_layout
+
+\begin_layout LyX-Code
+reader.filename = greensfns_points.txt
+\end_layout
+
+\begin_layout LyX-Code
+coordsys.space_dim = 3
+\end_layout
+
+\begin_layout LyX-Code
+coordsys.units = m
+\end_layout
+
+\begin_layout Standard
+We first define 
+\family typewriter
+OutputSolnPoints
+\family default
+ as the output manager for points output.
+ We use HDF5 output for all of the Green's function output, as it will generally
+ be more efficient (faster I/O, smaller file sizes).
+ We must provide a set of points for point output.
+ The file 
+\family typewriter
+greensfns_points.txt
+\family default
+ contains a set of (x,y,z) coordinates.
+ We must also provide the spatial dimension of the coordinates as well as
+ the units used.
+ Note that we do not output any info or data fields for state variable output,
+ as this would otherwise create a large amount of output for each applied
+ slip impulse.
+ When we have run the simulation, the output HDF5 files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step21
+\family default
+).
+ In Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step21-imp-resp"
+
+\end_inset
+
+ we show an impulse of left-lateral slip applied on the fault and the resulting
+ response at the specified set of points.
+ The time corresponds to the impulse number in multiples of the specified
+ time step size.
+\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/step21_impulse_resp.png
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+A slip impulse and the resulting point displacement responses visualized
+ using ParaView.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step21-imp-resp"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document



More information about the CIG-COMMITS mailing list