[cig-commits] r7377 - short/3D/PyLith/trunk/examples/twocells/twotri3

willic3 at geodynamics.org willic3 at geodynamics.org
Fri Jun 22 11:08:29 PDT 2007


Author: willic3
Date: 2007-06-22 11:08:29 -0700 (Fri, 22 Jun 2007)
New Revision: 7377

Added:
   short/3D/PyLith/trunk/examples/twocells/twotri3/README
Modified:
   short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_disp.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_slip.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliprate.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotri3/shearxy.spatialdb
Log:
All examples are now in here, and the axial and shear examples work
correctly (except for problems in the VTK output).
The fault example produces zero displacements everywhere, so something
is still wrong with that.



Added: short/3D/PyLith/trunk/examples/twocells/twotri3/README
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/README	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/README	2007-06-22 18:08:29 UTC (rev 7377)
@@ -0,0 +1,52 @@
+This directory contains a set of 3 elastic plane strain example
+problems. All problems share the same mesh and material properties,
+with the only differences being in the boundary conditions.  The mesh
+consists of two triangles forming a square.  The information describing
+the examples may be divided into four groups:
+
+1.  Global mesh information:  described in file twotri3.mesh
+
+2.  Parameter settings common to all examples:  described in file
+pylithapp.cfg.
+
+3.  Material properties common to all examples:  described in the
+database file matprops.cfg.
+
+4.  Example-specific parameters and boundary condition specifications.
+
+The examples and associated files are:
+
+1.  axialdisp:  Axial displacements are applied to the lower left and
+upper right corners of the square.
+  a.  axialdisp.cfg:  Parameter settings for this problem.
+  b.  axialdisp.spatialdb:  Boundary condition database for this
+      problem.
+
+2.  sheardisp:  The left edge of the square is pinned in the x-direction
+and moved downward in the y-direction, while the right edge is moved
+upward in the y-direction.
+  a.  sheardisp.cfg:  Parameter settings for this problem.
+  b.  sheardisp.spatialdb:  Boundary condition database for this
+      problem.
+
+3.  dislocation:  Fault displacements are applied between the two
+triangles, while the lower left and upper right corners are fixed in
+x and y.
+  a.  dislocation.cfg:  Parameter settings for this problem.
+  b.  dislocation.spatialdb:  Boundary condition database for this
+      problem.
+  c.  dislocation_disp.spatialdb:  Fault slip database for this problem.
+  d.  dislocation_sliprate.spatialdb:  Fault slip rate database for this
+      problem.
+  e.  dislocation_sliptime.spatialdb:  Fault slip time database for this
+      problem.
+
+All of the files are documented.  The 'pylithapp.cfg' file is read
+automatically when running PyLith.  To add to or override these
+settings, you may place an additional .cfg file on the command line.
+To run the examples, you can type:
+pylith axialdisp.cfg
+pylith sheardisp.cfg
+pylith dislocation.cfg
+
+Each of these commands will produce a corresponding VTK file, which may be viewed with visualization packages such as ParaView or Mayavi.

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.spatialdb	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.spatialdb	2007-06-22 18:08:29 UTC (rev 7377)
@@ -1,15 +1,44 @@
 #SPATIAL.ascii 1
+
+// This database is used to specify the boundary conditions for the axial
+// displacement example.
+
+// This follows the format for a Simple DB (the only type presently available).
 SimpleDB {
+
+  // There are two values specified in the database, corresponding to the
+  // constraint values for the x (dof-0) and y (dof-1) degrees of freedom.
   num-values = 2
   value-names =  dof-0 dof-1
+
+  // The constraint values (displacements) have units of meters.
   value-units =  m  m
+
+  // The values are specified at two spatial locations.
   num-locs = 2
+
+  // The dimension of the spatial distribution is 1, since data is being
+  // specified at points.
   data-dim = 1
+
+  // The spatial dimension of the database is 2.
   space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
   cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
     to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
     space-dim = 2
   }
 }
+
+// This is where the data is specified.
+// As described in axialdisp.cfg, this database will be used to specify
+// data at a point (pylith.bc.BCSingle).
+// The entries are:
+// X-coord, Y-coord, dof-0 (x constraint), dof-1 (y constraint).
 -0.5 -0.5  -0.01 -0.01
  0.5  0.5   0.01  0.01

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_disp.spatialdb	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_disp.spatialdb	2007-06-22 18:08:29 UTC (rev 7377)
@@ -1,14 +1,43 @@
 #SPATIAL.ascii 1
+
+// This database is used to specify the boundary conditions for the
+// dislocation (kinematic fault) example.
+
+// This follows the format for a Simple DB (the only type presently available).
 SimpleDB {
+
+  // There are two values specified in the database, corresponding to the
+  // constraint values for the x (dof-0) and y (dof-1) degrees of freedom.
   num-values = 2
   value-names =  dof-0 dof-1
+
+  // The constraint values (displacements) have units of meters.
   value-units =  m  m
+
+  // The values are specified at one spatial location.
   num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since the same data
+  // is specified for all points in the set.
   data-dim = 0
+
+  // The spatial dimension of the database is 2.
   space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
   cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
     to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
     space-dim = 2
   }
 }
+
+// This is where the data is specified.
+// As described in dislocation.cfg, this database will be used to specify
+// data at a point (pylith.bc.BCSingle).
+// The entries are:
+// X-coord, Y-coord, dof-0 (x constraint), dof-1 (y constraint).
 0.0  0.0     0.0  0.0

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_slip.spatialdb	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_slip.spatialdb	2007-06-22 18:08:29 UTC (rev 7377)
@@ -1,14 +1,41 @@
 #SPATIAL.ascii 1
+
+// This database is used to specify the fault slip for the
+// dislocation (kinematic fault) example.
 SimpleDB {
+
+  // There are two values specified in the database, corresponding to the
+  // slip values for the left-lateral and fault-opening components.
   num-values = 2
   value-names =  left-lateral-slip fault-opening
+
+  // The fault slip values have units of meters.
   value-units =  m  m
+
+  // The values are specified at one spatial location.
   num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since the same data
+  // is specified for all points in the set.
   data-dim = 0
+
+  // The spatial dimension of the database is 2.
   space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
   cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
     to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
     space-dim = 2
   }
 }
+
+// This is where the data is specified.
+// As described in dislocation.cfg, this database will be used to specify
+// uniform data for a fault (pylith.faults.SingleFault).
+// The entries are:
+// X-Coord, Y-Coord, left-lateral slip, fault-opening slip
 0.0  0.0   0.01  0.0

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliprate.spatialdb	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliprate.spatialdb	2007-06-22 18:08:29 UTC (rev 7377)
@@ -1,14 +1,41 @@
 #SPATIAL.ascii 1
+
+// This database is used to specify the fault slip rate for the
+// dislocation (kinematic fault) example.
 SimpleDB {
+
+  // There is one value specified in the database, corresponding to the
+  // slip rate.
   num-values = 1
   value-names =  slip-rate
+
+  // The fault slip rate has units of meters/second.
   value-units =  m/s
+
+  // The value is specified at one spatial location.
   num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since the same data
+  // is specified for all points in the set.
   data-dim = 0
+
+  // The spatial dimension of the database is 2.
   space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
   cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
     to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
     space-dim = 2
   }
 }
+
+// This is where the data is specified.
+// As described in dislocation.cfg, this database will be used to specify
+// uniform data for a fault (pylith.faults.SingleFault).
+// The entries are:
+// X-Coord, Y-Coord, slip rate
 0.0  0.0  1.0e+6

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb	2007-06-22 18:08:29 UTC (rev 7377)
@@ -1,14 +1,41 @@
 #SPATIAL.ascii 1
+
+// This database is used to specify the fault slip time for the
+// dislocation (kinematic fault) example.
 SimpleDB {
+
+  // There is one value specified in the database, corresponding to the
+  // time at which fault slip begins.
   num-values = 1
   value-names =  slip-time
+
+  // The fault slip time has units of meters.
   value-units =  s
+
+  // The value is specified at one spatial location.
   num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since the same data
+  // is specified for all points in the set.
   data-dim = 0
+
+  // The spatial dimension of the database is 2.
   space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
   cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
     to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
     space-dim = 2
   }
 }
+
+// This is where the data is specified.
+// As described in dislocation.cfg, this database will be used to specify
+// uniform data for a fault (pylith.faults.SingleFault).
+// The entries are:
+// X-Coord, Y-Coord, slip time
 0.0  0.0   -1.0

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb	2007-06-22 18:08:29 UTC (rev 7377)
@@ -1,14 +1,46 @@
 #SPATIAL.ascii 1
+
+// This database is used to specify the material properties for all of the
+// examples in this directory.
+
+// This follows the format for a Simple DB (the only type presently available).
 SimpleDB {
+
+  // There are 3 values specified in the database, corresponding to density,
+  // S-velocity, and P-velocity (values for shear modulus and Lame's constant
+  // are computed from these values.
   num-values = 3
   value-names =  density vs vp
+
+  // These are the units used to specify density, vs, and vp.
   value-units =  kg/m^3  m/s  m/s
+
+  // Values are only specified at a single point since they are constant
+  // throughout the mesh.
   num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since it is constant
+  // throughout the mesh.
   data-dim = 0
+
+  // The spatial dimension of the database is 2.
   space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
   cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
     to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
     space-dim = 2
   }
 }
+// This is where the data is specified.
+// We only need to specify a single point, since the properties are uniform.
+// The values given here will give a shear modulus and Lame's constant both
+// equal to 30 GPa (Poisson's ratio = 0.25).
+// The entries are:
+// X-coord, Y-coord, density, Vs, Vp.
+
 0.0  0.0   2700.0  3333.333333333333  5773.502691896258

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg	2007-06-22 18:08:29 UTC (rev 7377)
@@ -12,54 +12,63 @@
 [pylithapp]
 
 # ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
-importer = pylith.meshio.MeshIOCubit
-
-[pylithapp.mesh_generator.importer]
-filename = box.exo
-coordsys.space_dim = 2
-
-# ----------------------------------------------------------------------
 # problem
+# Specify the problem settings.
+# This is a time-dependent problem so we use that facility.
 # ----------------------------------------------------------------------
 [pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
-dimension = 2
+
+# We want an implicit formulation.
 formulation = pylith.problems.Implicit
+
+# This is a container for a boundary condition specified on four sides
+# of a rectangular domain.
 bc = pylith.bc.BCFourSides
 
 # ----------------------------------------------------------------------
-# materials
+# boundary conditions
+# Provide information on the boundary conditions.
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
 
-[pylithapp.timedependent.materials.material]
-label = elastic material
-id = 1
-db.iohandler.filename = matprops.spatialdb
-quadrature = pylith.feassemble.quadrature.Quadrature2D
-quadrature.cell.shape = triangle
+# Boundary conditions to be applied to the negative x-side of the mesh.
+[pylithapp.timedependent.bc.x_neg]
 
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
 fixed_dof = [0, 1]
+
+# Give an ID of 10 to this boundary condition.
 id = 10
-label = 10
+
+# The nodes associated with this boundary condition have the name
+# 'x_neg' in the mesh file.
+label = x_neg
+
+# We are assigning the label 'Dirichlet BC -x edge' to the database.
 db.label = Dirichlet BC -x edge
+
+# The name of the file containing the spatial database for the BC
+# specification.
 db.iohandler.filename = shearxy.spatialdb
 
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
 [pylithapp.timedependent.bc.x_pos]
-fixed_dof = [0, 1]
+
+# We are only fixing the 1 (y) degree of freedom.
+fixed_dof = [1]
+
+# Give an ID of 11 to this boundary condition.
 id = 11
-label = 11
+
+# The nodes associated with this boundary condition have the name
+# 'x_pos' in the mesh file.
+label = x_pos
+
+# We are assigning the label 'Dirichlet BC +x edge' to the database.
 db.label = Dirichlet BC +x edge
+
+# The name of the file containing the spatial database for the BC
+# specification.
 db.iohandler.filename = shearxy.spatialdb
 
 # ----------------------------------------------------------------------
@@ -72,4 +81,4 @@
 # output
 # ----------------------------------------------------------------------
 [pylithapp.problem.formulation.output.output]
-filename = shearplanestrain.vtk
+filename = sheardisp.vtk

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/shearxy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/shearxy.spatialdb	2007-06-22 15:32:14 UTC (rev 7376)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/shearxy.spatialdb	2007-06-22 18:08:29 UTC (rev 7377)
@@ -1,15 +1,44 @@
 #SPATIAL.ascii 1
+
+// This database is used to specify the boundary conditions for the shear
+// displacement example.
+
+// This follows the format for a Simple DB (the only type presently available).
 SimpleDB {
+
+  // There are two values specified in the database, corresponding to the
+  // constraint values for the x (dof-0) and y (dof-1) degrees of freedom.
   num-values = 2
   value-names =  dof-0  dof-1
+
+  // The constraint values (displacements) have units of meters.
   value-units =  m  m
+
+  // The values are specified at two spatial locations (two edges).
   num-locs = 2
+
+  // The dimension of the spatial distribution is 1, since data is being
+  // specified at points.
   data-dim = 1
+
+  // The spatial dimension of the database is 2.
   space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
   cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
     to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
     space-dim = 2
   }
 }
+
+// This is where the data is specified.
+// As described in sheardisp.cfg, this database will be used to specify
+// data along an edge (pylith.bc.BCFourSides).
+// The entries are:
+// X-coord, Y-coord, dof-0 (x constraint), dof-1 (y constraint).
 -0.5  0.0    0.0  -0.01
 +0.5  0.0    0.0  +0.01



More information about the cig-commits mailing list