[cig-commits] r22177 - in short/3D/PyLith/trunk/examples/3d/hex8: . spatialdb

willic3 at geodynamics.org willic3 at geodynamics.org
Wed Jun 5 17:49:57 PDT 2013


Author: willic3
Date: 2013-06-05 17:49:56 -0700 (Wed, 05 Jun 2013)
New Revision: 22177

Added:
   short/3D/PyLith/trunk/examples/3d/hex8/greensfns.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/greensfns_points.txt
   short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb
   short/3D/PyLith/trunk/examples/3d/hex8/step21.cfg
Modified:
   short/3D/PyLith/trunk/examples/3d/hex8/README
   short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
Log:
Moved over 3D GF example.



Modified: short/3D/PyLith/trunk/examples/3d/hex8/README
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/README	2013-06-05 18:29:56 UTC (rev 22176)
+++ short/3D/PyLith/trunk/examples/3d/hex8/README	2013-06-06 00:49:56 UTC (rev 22177)
@@ -42,6 +42,9 @@
 pylithapp.cfg - PyLith configuration file containing parameters common to
 all simulations.
 
+greensfns.cfg - Green's function generation file that is only read for
+problem step21.
+
 stepxx.cfg - PyLith configuration file containing parameters for a
 particular example. The example problems are briefly described below:
 
@@ -69,6 +72,7 @@
 step18: Axial traction surface load on top surface (static)
 step19: Time dependent axial traction surface load on top surface (quasi-static)
 step20: Dike opening via initial tractions and fault constitutive model
+step21: Generation of Green's functions for a strike-slip fault (static)
 
 ----------------------------------------
 mesh directory
@@ -101,6 +105,11 @@
   Spatial database defining fault rupture for examples step06, step07,
   step08, and step09.
 
+impulse_amplitude.spatialdb
+
+  Spatial database defining impulses to be applied for GF generation
+  (step21).
+
 initial_stress.spatialdb
 
   Spatial database defining initial stresses for example step16.

Added: short/3D/PyLith/trunk/examples/3d/hex8/greensfns.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/greensfns.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/greensfns.cfg	2013-06-06 00:49:56 UTC (rev 22177)
@@ -0,0 +1,76 @@
+[greensfns]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+#
+# This simulation computes the Green's functions for slip impulses at
+# points on the fault surface.
+#
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+#
+# This is not a self-contained simulation configuration file. This
+# file specifies only the Green's function parameters for the
+# simulation. The general static and mesh parameters are specificed in
+# the pylithapp.cfg file which PyLith reads by default.
+#
+# NOTE: This file will be read automatically when the problem is
+# changed to "GreensFns" because the facility name is "greensfns", and
+# PyLith will look for a .cfg file matching the name of the facility.
+#
+# To run the simulation:
+# pylith step21.cfg --problem=pylith.problems.GreensFns
+#
+# Output will be directed to directory output.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[greensfns]
+fault_id = 10
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+# Set the type of fault interface condition.
+[greensfns.interfaces]
+fault = pylith.faults.FaultCohesiveImpulses
+
+# Set the parameters for the fault interface condition.
+[greensfns.interfaces.fault]
+# Generate impulses for lateral slip only, no fault opening.
+# Fault DOF 0 corresponds to left-lateral slip.
+impulse_dof = [0]
+
+# Set the amplitude of the slip impulses (amplitude is nonzero on only
+# a subset of the fault)
+db_impulse_amplitude.label = Amplitude of slip impulses
+db_impulse_amplitude.iohandler.filename = spatialdb/impulse_amplitude.spatialdb
+db_impulse_amplitude.query_type = nearest
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Domain
+[greensfns.formulation.output.domain]
+writer.filename = output/step21.h5
+
+# Points
+[greensfns.formulation.output.points]
+writer.filename = output/step21-points.h5
+
+# Fault
+[greensfns.interfaces.fault.output]
+writer.filename = output/step21-fault.h5
+vertex_info_fields = [area]
+
+# Materials
+[greensfns.materials.upper_crust.output]
+writer.filename = output/step21-upper_crust.h5
+
+[greensfns.materials.lower_crust.output]
+writer.filename = output/step21-lower_crust.h5
+
+# End of file

Added: short/3D/PyLith/trunk/examples/3d/hex8/greensfns_points.txt
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/greensfns_points.txt	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/greensfns_points.txt	2013-06-06 00:49:56 UTC (rev 22177)
@@ -0,0 +1,30 @@
+# This file contains a list of points where we want the solution. The
+# solution will be interpolated to these points, so they need not
+# coincide with vertices of the mesh.
+#
+# We specify the coordinates in the default coordinate system (3-D
+# Cartesian). To specify points in another coordinate system, use the
+# coordsys component of the OutputSolnPoints object. The points will
+# be transformed into the coordinate system of the mesh before
+# interpolation.
+500.0  -1500.0   -0.2
+500.0  -1000.0   -0.2
+500.0   -500.0   -0.2
+500.0      0.0   -0.2
+500.0    500.0   -0.2
+500.0   1000.0   -0.2
+500.0   1500.0   -0.2
+1000.0  -1500.0   -0.2
+1000.0  -1000.0   -0.2
+1000.0   -500.0   -0.2
+1000.0      0.2   -0.2
+1000.0    500.0   -0.2
+1000.0   1000.0   -0.2
+1000.0   1500.0   -0.2
+1500.0  -1500.0   -0.2
+1500.0  -1000.2   -0.2
+1500.0   -500.0   -0.2
+1500.0      0.0   -0.2
+1500.0    500.0   -0.2
+1500.0   1000.0   -0.2
+1500.0   1500.0   -0.2

Modified: short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg	2013-06-05 18:29:56 UTC (rev 22176)
+++ short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg	2013-06-06 00:49:56 UTC (rev 22177)
@@ -40,13 +40,13 @@
 # ----------------------------------------------------------------------
 # materials
 # ----------------------------------------------------------------------
-[pylithapp.timedependent]
+[pylithapp.problem]
 
 # Set materials to an array of 2 materials:
 #   'upper_crust' and 'lower_crust'
 materials = [upper_crust,lower_crust]
 
-[pylithapp.timedependent.materials.upper_crust]
+[pylithapp.problem.materials.upper_crust]
 label = Upper crust material
 id = 1
 db_properties.label = Properties for upper crust
@@ -54,7 +54,7 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 3
 
-[pylithapp.timedependent.materials.lower_crust]
+[pylithapp.problem.materials.lower_crust]
 label = Lower crust material
 id = 2
 db_properties.label = Properties for lower crust

Added: short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb	2013-06-06 00:49:56 UTC (rev 22177)
@@ -0,0 +1,58 @@
+// -*- C++ -*- (syntax highlighting)
+//
+// This spatial database specifies the distribution of slip on the
+// fault surface for the forward problem.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 35
+  data-dim = 2 // Data is specified on a plane.
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0e+3 // Specify coordinates in km for convenience.
+    space-dim = 3
+  } // cs-data
+} // SimpleDB
+// Columns are
+// (1) x coordinate (km)
+// (2) y coordinate (km)
+// (3) z coordinate (km)
+// (4) slip (m)
+0.0  -2.0   0.0   -1.0
+0.0  -2.0  -1.0   -1.0
+0.0  -2.0  -2.0   -1.0
+0.0  -2.0  -3.0   -1.0
+0.0  -1.0   0.0   -1.0
+0.0  -1.0  -1.0   -1.0
+0.0  -1.0  -2.0   -1.0
+0.0  -1.0  -3.0   -1.0
+0.0   0.0   0.0   -1.0
+0.0   0.0  -1.0   -1.0
+0.0   0.0  -2.0   -1.0
+0.0   0.0  -3.0   -1.0
+0.0   1.0   0.0   -1.0
+0.0   1.0  -1.0   -1.0
+0.0   1.0  -2.0   -1.0
+0.0   1.0  -3.0   -1.0
+0.0   2.0   0.0   -1.0
+0.0   2.0  -1.0   -1.0
+0.0   2.0  -2.0   -1.0
+0.0   2.0  -3.0   -1.0
+0.0  -3.0   0.0    0.0
+0.0  -3.0  -1.0    0.0
+0.0  -3.0  -2.0    0.0
+0.0  -3.0  -3.0    0.0
+0.0   3.0   0.0    0.0
+0.0   3.0  -1.0    0.0
+0.0   3.0  -2.0    0.0
+0.0   3.0  -3.0    0.0
+0.0  -3.0  -4.0    0.0
+0.0  -2.0  -4.0    0.0
+0.0  -1.0  -4.0    0.0
+0.0   0.0  -4.0    0.0
+0.0   1.0  -4.0    0.0
+0.0   2.0  -4.0    0.0
+0.0   3.0  -4.0    0.0

Added: short/3D/PyLith/trunk/examples/3d/hex8/step21.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step21.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step21.cfg	2013-06-06 00:49:56 UTC (rev 22177)
@@ -0,0 +1,140 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+#
+# This is a purely elastic static problem using Dirichlet (displacement)
+# boundary conditions and slip on a vertical fault. It is used for
+# Green's function generation.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step21.
+# It must also be run as a Green's function problem (it will read the
+# settings in pylithapp.cfg and greensfns.cfg by default.
+#
+# To run the simulation:
+# pylith step21.cfg --problem=pylith.problems.GreensFns
+#
+# Output will be directed to directory output.
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+distributor.write_partition = True
+distributor.data_writer = pylith.meshio.DataWriterHDF5
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.time_step]
+# Define the total time for the simulation and the default time step size.
+total_time = 0.0*s ; total time of simulation
+# Define an appropriat time step for simulations. Important for
+# nondimensionalization of velocities and slip rates.
+dt = 1.0*year
+
+[pylithapp.problem]
+# Set bc to an array of 3 boundary conditions: 'x_pos','x_neg', and 'z_neg'.
+bc = [x_pos,x_neg,z_neg]
+
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
+
+[pylithapp.problem.formulation]
+# Set the output to an array of 2 output managers.
+# We will output the solution over the domain and at specified points.
+output = [domain,points]
+
+# Set points component to OutputSolnPoints (set of points).
+output.points = pylith.meshio.OutputSolnPoints
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Set the parameters for Dirichlet boundary conditions applied on the
+# -x, +x, and -z faces of the box.
+#
+# We fix the x and y degrees of freedom on the -x and +x faces, and
+# fix the z degree of freedom on the bottom (-z) face.
+#
+# For all boundaries, we retain the default ZeroDispDB, which specifies
+# a zero value.
+#
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+# +x face
+[pylithapp.problem.bc.x_pos]
+bc_dof = [0, 1]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+
+# -x face
+[pylithapp.problem.bc.x_neg]
+bc_dof = [0, 1]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+
+# -z face
+[pylithapp.problem.bc.z_neg]
+bc_dof = [2]
+label = face_zneg_nofault
+db_initial.label = Dirichlet BC on -z
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+# Set label for the fault.
+# The label corresponds to the name of the nodeset in CUBIT.
+[pylithapp.problem.interfaces.fault]
+label = fault
+
+# We must define the quadrature information for fault cells.
+# The fault cells are 2D (surface).
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Define output manager for domain output.
+[pylithapp.problem.formulation.output.domain]
+writer = pylith.meshio.DataWriterHDF5
+
+# Define output manager for points output.
+[pylithapp.problem.formulation.output.points]
+writer = pylith.meshio.DataWriterHDF5
+
+# Point coordinates will be read from greensfns_points.txt.
+reader.filename = greensfns_points.txt
+
+# Spatial dimension is 3 and we will output coordinates in m.
+coordsys.space_dim = 3
+coordsys.units = m
+
+# Define output manager for fault output.
+[pylithapp.problem.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5
+
+# We will not be writing any cell_info or cell_data fields for material
+# output.
+[pylithapp.problem.materials.upper_crust.output]
+cell_info_fields = []
+cell_data_fields = []
+writer = pylith.meshio.DataWriterHDF5
+
+[pylithapp.problem.materials.lower_crust.output]
+cell_info_fields = []
+cell_data_fields = []
+writer = pylith.meshio.DataWriterHDF5
+
+# Mesh partition information.
+[pylithapp.mesh_generator.distributor.data_writer]
+filename = output/step21-partition.h5



More information about the CIG-COMMITS mailing list